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CAAA7O,EAAA,cAAA0C,MAAA,KACX1C,EAAAqmE,GAAW,QACXrmE,EAAAqmE,GAAA,EACA,gBACA,0BACA,cACA,CACA,sBACA,MACA,sBACA,GACA,8GACA,GACA,6BACA,+CACA,mDACA,kFACA,GACA,gHACA,qGACA,GACA,gBACA,2EACA,wHACA,+FACA,wFACA,CACA,UACA,CACA,mBACA,SACA,YACA,MACA,uBACA,CACA,KACA,OACA,CACA,aACA,cAC6B,yBAC7B,EACA,CACA,eACA,iBACA,eAC6B,WAC7B,EACA,CACA,WACA,WACA,cACA,EACA,CAEA,EACA,CACA,wBACA,SACA,YACA,MACA,kCACiB,EAEjB,CACA,YACA,SACA,YACA,MACA,0BACiB,EAEjB,CACA,kBACA,SACA,YACA,MACA,cACiB,EAEjB,CACA,aACA,SACA,YACA,MACA,yFACA,yEACiB,EAEjB,CACA,qBACA,SACA,YACA,MACA,wBACiB,EAEjB,CACA,8BACA,SACA,YACA,MACA,kCACiB,EAEjB,CACA,oBACA,SACA,YACA,MACA,uBACA,EAEA,CACA,MACA,CACA,eACiB,UACjB,EACA,CACA,YACA,MACA,OACA,KACA,GACA,CAEA,EACA,CACA,qBACiB,UACjB,EACA,CACA,mBACiB,UACjB,EACA,CACA,eACiB,UACjB,EACA,CACA,aACA,UACA,EACS,EAET,CACA,gBACA,UACA,CACA,mBACA,SACA,YACA,MACA,2BACiB,EAEjB,CACA,mBACA,SACA,YACA,MACA,mBACA,CACA,KACA,OACA,CACA,aACA,cAC6B,mBAC7B,EACA,CACA,eACA,iBAC6B,eAC7B,EACA,CACA,eACA,iBACA,4BACA,kBACA,EACA,CAEA,EACA,CACA,YACA,SACA,YACA,MACA,uDACiB,EAEjB,CACA,UACA,SACA,YACA,MACA,yCACiB,EAEjB,CACA,gBACA,SACA,YACA,MACA,8BACiB,EAEjB,CACA,oBACA,SACA,YACA,MACA,uBACiB,EAEjB,CACA,qBACA,SACA,YACA,MACA,wBACA,EAEA,CACA,MACA,CACA,aACiB,UACjB,EACA,CACA,cACiB,UACjB,EACA,CACA,aACA,MACA,KACA,OACA,KACA,GACA,CAEA,CACA,EACS,EAET,CACA,gBACA,UACA,CACA,mBACA,SACA,YACA,MACA,2BACiB,EAEjB,CACA,YACA,SACA,YACA,MACA,uDACiB,EAEjB,CACA,UACA,SACA,YACA,MACA,8BACiB,EAEjB,CACA,aACA,SACA,YACA,MACA,gBACiB,EAEjB,CACA,qBACA,SACA,YACA,MACA,wBACiB,EAEjB,CACA,oBACA,SACA,YACA,MACA,uBACA,EAEA,CACA,MACA,CACA,cACA,UACA,EACS,EAET,CACA,2BACA,UACA,CACA,mBACA,SACA,YACA,MACA,2BACiB,EAEjB,CACA,0BACA,SACA,YACA,MACA,uBACiB,EAEjB,CACA,aACA,SACA,YACA,MACA,eACA,EAEA,CACS,SAET,CACA,gBACA,UACA,CACA,mBACA,SACA,YACA,MACA,2BACiB,EAEjB,CACA,aACA,SACA,YACA,MACA,eACiB,EAEjB,CACA,gBACA,SACA,YACA,MACA,oBACA,EAEA,CACS,SAET,CACA,oBACA,UACA,CACA,mBACA,SACA,YACA,MACA,2BACiB,EAEjB,CACA,aACA,SACA,YACA,MACA,eACA,EAEA,CACA,MACA,CACA,eACiB,UACjB,EACA,CACA,aACA,UACA,EACS,EAET,CACA,qBACA,UACA,CACA,mBACA,SACA,YACA,MACA,2BACiB,EAEjB,CACA,aACA,SACA,YACA,MACA,eACA,EAEA,CACA,MACA,CACA,YACA,MACA,OACA,KACA,GACA,CAEA,EACA,CACA,qBACiB,UACjB,EACA,CACA,mBACA,UACA,EACA,EAEA,CACA,UACA,CACA,mBACA,MACA,sDACA,CACA,MACA,cACA,QACA,CACA,iBACA,MACA,yCACA,CACqB,WACrB,EACA,CACA,gBACA,MACA,qCACA,CACqB,gBACrB,EACA,CACA,iBACA,MACA,gCACA,CACqB,UACrB,EACA,CACA,cACA,MACA,4BACA,CACA,UACA,EACA,CAEA,EACA,CACA,yBACA,MACA,kDACA,CACA,MACA,cACA,QACA,CACA,YACA,MACA,aACA,CACqB,SACrB,EACA,CACA,eACA,MACA,yBACA,CACqB,UACrB,EACA,CACA,YACA,MACA,2BACA,CACA,MACA,OACA,KACA,GACA,CAEA,EACA,CACA,YACA,MACA,yCACA,CACqB,gBACrB,EACA,CACA,kBACA,MACA,6BACA,CACqB,gBACrB,EACA,CACA,qBACA,MACA,mFACA,CACqB,UACrB,EACA,CACA,mBACA,MACA,kDACA,CACqB,UACrB,EACA,CACA,0BACA,MACA,iDACA,CACqB,UACrB,EACA,CACA,uBACA,MACA,0CACA,CACqB,UACrB,EACA,CACA,eACA,MACA,oCACA,CACqB,UACrB,EACA,CACA,aACA,MACA,kCACA,CACqB,UACrB,EACA,CACA,wBACA,MACA,oBACA,CACqB,gBACrB,EACA,CACA,aACA,MACA,eACA,CACA,gBACA,EACA,CAEA,EACA,CACA,QACA,CACA,qBACA,QACA,CACA,gBACA,iBACiB,QACjB,EACA,CACA,iBACA,WACA,QACA,EACS,EAET,CACA,oBACA,QACA,CACA,gBACA,iBACiB,QACjB,EACA,CACA,cACA,WACA,QACA,EACA,EAEA,CACA,QACA,CACA,SACA,oBACS,0BACT,EACA,CACA,UACA,wBACS,mCACT,EACA,CACA,UACA,wBACS,iCACT,EACA,CACA,UACA,oBACS,2DACT,EACA,CACA,UACA,qBACS,sDACT,EACA,CACA,UACA,4BACS,kDACT,EACA,CACA,UACA,iBACS,qCACT,EACA,CACA,UACA,oBACS,0BACT,EACA,CACA,UACA,uBACS,2CACT,EACA,CACA,UACA,8BACS,mDACT,EACA,CACA,UACA,6BACS,sCACT,EACA,CACA,UACA,kCACS,kCACT,EACA,CACA,UACA,kCACA,kCACA,EACA,iBAAA5mE,CAAA,CAAAO,CAAA,CAAAL,CAAA,eC/qBa,IAAAe,EAAAf,EAAA,aAEbqkD,EAAA,UAA4B,CAAAA,SAAA,WAAAxgC,CAAA,CAAAygC,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAC5B,SAAAC,EAAA1hD,CAAA,SAAAA,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EACA,CACAK,KAAA,QACiBL,KAAA,WACjB,EACS,EAET,CACAK,KAAA,SACAiF,SAAA,CACA,CACAjF,KAAA,SACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACAp9C,KAAA,CACA,CACAvG,KAAA,QACiBL,KAAA,WACjB,EACS,EAET,CACAK,KAAA,WACAiF,SAAA,CACA,CACAjF,KAAA,OACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,KACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACAp9C,KAAA,CACA,CACAvG,KAAA,WACiBL,KAAA,KACjB,EACS,EAET,CACAK,KAAA,wBACAiF,SAAA,CACA,CACAjF,KAAA,OACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,KACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,OACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACAp9C,KAAA,CACA,CACAvG,KAAA,OACiBL,KAAA,WACjB,EACA,CACAK,KAAA,OACiBL,KAAA,QACjB,EACA,CACAK,KAAA,WACiBL,KAAA,KACjB,EACA,CACAK,KAAA,QACiBL,KAAA,KACjB,EACA,CACAK,KAAA,QACiBL,KAAA,WACjB,EACS,EAET,CACAK,KAAA,sBACAiF,SAAA,CACA,CACAjF,KAAA,QACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,oBACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,aACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACAp9C,KAAA,CACA,CACAvG,KAAA,aACiBL,KAAA,WACjB,EACS,EAET,CACAK,KAAA,uBACAiF,SAAA,CACA,CACAjF,KAAA,QACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,KACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,oBACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,OACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,aACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACAp9C,KAAA,CACA,CACAvG,KAAA,WACiBL,KAAA,KACjB,EACS,EAET,CACAK,KAAA,yBACAiF,SAAA,CACA,CACAjF,KAAA,QACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,oBACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,OACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACAp9C,KAAA,CACA,CACAvG,KAAA,aACiBL,KAAA,WACjB,EACS,EAET,CACAK,KAAA,wBACAiF,SAAA,CACA,CACAjF,KAAA,QACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,aACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACAp9C,KAAA,CACA,CACAvG,KAAA,aACiBL,KAAA,WACjB,EACS,EAET,CACAK,KAAA,WACAiF,SAAA,CACA,CACAjF,KAAA,SACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACAp9C,KAAA,CACA,CACAvG,KAAA,QACiBL,KAAA,KACjB,EACS,EAET,CACAK,KAAA,mBACAiF,SAAA,CACA,CACAjF,KAAA,UACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,OACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACAp9C,KAAA,CACA,CACAvG,KAAA,OACiBL,KAAA,WACjB,EACA,CACAK,KAAA,OACiBL,KAAA,QACjB,EACA,CACAK,KAAA,QACiBL,KAAA,KACjB,EACA,CACAK,KAAA,QACiBL,KAAA,WACjB,EACS,EAET,CACAK,KAAA,iBACAiF,SAAA,CACA,CACAjF,KAAA,UACAy8D,MAAA,GACiB9Y,SAAA,EACjB,EACA,CACA3jD,KAAA,OACAy8D,MAAA,GACiB9Y,S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b,SAAA20F,EAAAzuF,CAAA,EACA,GAAAA,GAGA,iBAAAA,GAAA,qBAAAA,EAAA,CACA,IAAAqvF,EAAArvF,EAAA,iBACA7E,EAAAk0F,CAAA,IACAC,EAAAD,CAAA,IACA,OACAl0F,MAAAA,EACAgB,QAAAozF,EAAAD,EACA,CACA,CATA,CAYA,SAAAC,EAAAvvF,CAAA,MACAwvF,EACA,IAAAhzF,EAAA,KACA,oBAAAwD,EAAA,CACA,IAAA7D,EAAArC,EAAA21F,6BAAA,CAAA5yE,GAAA,CAAA7c,GACA,GAAA7D,EACA,OAAAA,CACA,KAEA,WAAA6D,GACAwvF,EAAA11F,EAAA21F,6BAAA,CAAA5yE,GAAA,WACArgB,EAAAwD,EAAA,QAEA,iBAAAA,IACAwvF,EAAA11F,EAAA21F,6BAAA,CAAA5yE,GAAA,iBACArgB,EAAAwD,EAAA,aACA,QACA,GAAAxD,EACAgzF,EAAApxE,OAAA,OAAA5hB,GAEA,2BADA,CArIAK,OAAA8L,cAAA,CAAA7O,EAAA,aAAyC,CAAA0C,MAAA,KACzC1C,EAAA20F,8BAAA,CAAA30F,EAAA21F,6BAAA,QAIA31F,EAAA21F,6BAAA,KAAAvwF,IAAA,CACA,6CACA,+CACA,sDACA,8DACA,iEACA,2DACA,8DACA,0EACA,CACA,4BACA,gDACA,CACA,uEACA,CACA,wBACA,oEACA,CACA,0EACA,CACA,8BACA,mEACA,CACA,CACA,8BACA,0DACA,CACA,CACA,wBACA,yDACA,CACA,4EACA,oEACA,0EACA,sEACA,qEACA,yEACA,sEACA,CACA,sBACA,iFACA,CACA,CACA,2BACA,kEACA,CACA,CACA,4BACA,8DACA,CACA,uCACA,uDACA,0EACA,CACA,0BACA,0DACA,CACA,6EACA,kDACA,6DACA,uEACA,CACA,uBACA,uEACA,CACA,CACA,wBACA,wDACA,CACA,mEACA,uDACA,gEACA,CACA,sBACA,wEACA,CACA,CACA,iCACA,iDACA,CACA,yDACA,uDACA,qCACA,sDACA,wEACA,CACA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CAAA,SAAA94Q,EAAAA,EAAAqF,CAAA,CAAAyzQ,EAAA,EAAA94Q,EAAAy4B,CAAA,+BAAAogP,EAAA,MAAAA,EAAA,OAAAE,KAAA/4Q,EAAAy4B,CAAA","sources":["webpack://_N_E/./node_modules/@coral-xyz/anchor/dist/browser/index.js","webpack://_N_E/./node_modules/@coral-xyz/anchor/dist/cjs/nodewallet.js","webpack://_N_E/./node_modules/@coral-xyz/anchor/dist/cjs/utils/common.js","webpack://_N_E/./node_modules/@coral-xyz/anchor/node_modules/bs58/index.js","webpack://_N_E/./node_modules/@coral-xyz/anchor/node_modules/camelcase/index.js","webpack://_N_E/./node_modules/@coral-xyz/borsh/dist/index.js","webpack://_N_E/./node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js","webpack://_N_E/./node_modules/stylis/src/Utility.js","webpack://_N_E/./node_modules/stylis/src/Tokenizer.js","webpack://_N_E/./node_modules/stylis/src/Enum.js","webpack://_N_E/./node_modules/stylis/src/Serializer.js","webpack://_N_E/./node_modules/stylis/src/Middleware.js","webpack://_N_E/./node_modules/stylis/src/Parser.js","webpack://_N_E/./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","webpack://_N_E/./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","webpack://_N_E/./node_modules/@emotion/react/dist/emotion-element-43c6fea0.browser.esm.js","webpack://_N_E/./node_modules/@emotion/react/dist/emotion-react.browser.esm.js","webpack://_N_E/./node_modules/@emotion/hash/dist/emotion-hash.esm.js","webpack://_N_E/./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","webpack://_N_E/./node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","webpack://_N_E/./node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js","webpack://_N_E/./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","webpack://_N_E/./node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.js","webpack://_N_E/./node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js","webpack://_N_E/./node_modules/@mui/material/GlobalStyles/GlobalStyles.js","webpack://_N_E/./node_modules/@mui/material/styles/createMixins.js","webpack://_N_E/./node_modules/@mui/material/colors/common.js","webpack://_N_E/./node_modules/@mui/material/colors/grey.js","webpack://_N_E/./node_modules/@mui/material/colors/purple.js","webpack://_N_E/./node_modules/@mui/material/colors/red.js","webpack://_N_E/./node_modules/@mui/material/colors/orange.js","webpack://_N_E/./node_modules/@mui/material/colors/blue.js","webpack://_N_E/./node_modules/@mui/material/colors/lightBlue.js","webpack://_N_E/./node_modules/@mui/material/colors/green.js","webpack://_N_E/./node_modules/@mui/material/styles/createPalette.js","webpack://_N_E/./node_modules/@mui/material/styles/createTypography.js","webpack://_N_E/./node_modules/@mui/material/styles/shadows.js","webpack://_N_E/./node_modules/@mui/material/styles/createTransitions.js","webpack://_N_E/./node_modules/@mui/material/styles/zIndex.js","webpack://_N_E/./node_modules/@mui/material/styles/createTheme.js","webpack://_N_E/./node_modules/@mui/material/styles/defaultTheme.js","webpack://_N_E/./node_modules/@mui/material/styles/identifier.js","webpack://_N_E/./node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js","webpack://_N_E/./node_modules/@mui/system/colorManipulator.js","webpack://_N_E/./node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js","webpack://_N_E/./node_modules/@mui/system/esm/RtlProvider/index.js","webpack://_N_E/./node_modules/@mui/system/esm/breakpoints.js","webpack://_N_E/./node_modules/@mui/system/esm/createTheme/applyStyles.js","webpack://_N_E/./node_modules/@mui/system/esm/createTheme/createBreakpoints.js","webpack://_N_E/./node_modules/@mui/system/esm/createTheme/shape.js","webpack://_N_E/./node_modules/@mui/system/esm/createTheme/createSpacing.js","webpack://_N_E/./node_modules/@mui/system/esm/createTheme/createTheme.js","webpack://_N_E/./node_modules/@mui/system/esm/merge.js","webpack://_N_E/./node_modules/@mui/system/esm/memoize.js","webpack://_N_E/./node_modules/@mui/system/esm/spacing.js","webpack://_N_E/./node_modules/@mui/system/esm/style.js","webpack://_N_E/./node_modules/@mui/system/esm/compose.js","webpack://_N_E/./node_modules/@mui/system/esm/borders.js","webpack://_N_E/./node_modules/@mui/system/esm/cssGrid.js","webpack://_N_E/./node_modules/@mui/system/esm/palette.js","webpack://_N_E/./node_modules/@mui/system/esm/sizing.js","webpack://_N_E/./node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js","webpack://_N_E/./node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js","webpack://_N_E/./node_modules/@mui/system/esm/useTheme.js","webpack://_N_E/./node_modules/@mui/system/esm/useThemeWithoutDefault.js","webpack://_N_E/./node_modules/@mui/utils/capitalize/capitalize.js","webpack://_N_E/./node_modules/@mui/utils/clamp/clamp.js","webpack://_N_E/./node_modules/@mui/utils/clamp/index.js","webpack://_N_E/./node_modules/@mui/utils/deepmerge/deepmerge.js","webpack://_N_E/./node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js","webpack://_N_E/./node_modules/@mui/utils/formatMuiErrorMessage/index.js","webpack://_N_E/./node_modules/@mui/utils/resolveProps/resolveProps.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/helpers/token-instructions.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/index.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/math/decimal-util.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/math/index.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/math/math-util.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/math/percentage.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/address-util.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/ata-util.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/index.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/network/account-requests.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/network/index.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/network/parsing.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/public-key-utils.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/token-util.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/transactions/index.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/transactions/transactions-builder.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/transactions/transactions-processor.js","webpack://_N_E/./node_modules/@orca-so/common-sdk/dist/web3/transactions/types.js","webpack://_N_E/./node_modules/@project-serum/anchor/dist/browser/index.js","webpack://_N_E/./node_modules/@project-serum/anchor/node_modules/bs58/index.js","webpack://_N_E/./node_modules/@project-serum/borsh/dist/lib/index.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/artifacts/merkle_distributor.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/clients/distributor-client.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/clients/index.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/constants.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/context.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/fetcher/fetcher.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/fetcher/index.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/fetcher/parsing.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/index.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/instructions/clawback.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/instructions/index.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/instructions/newClaim.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/instructions/newDistributor.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/instructions/setAdmin.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/instructions/setClawbackReceiver.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/instructions/setMerkleRoot.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/instructions/setTimestamp.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/methods.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/pda.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/types/index.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/types/type.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/utils/balance-tree.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/utils/bytes32.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/utils/helper.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/utils/index.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/utils/merkle-tree.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/utils/program.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/dist/utils/spl.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/node_modules/@coral-xyz/anchor/dist/browser/index.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/node_modules/@coral-xyz/borsh/dist/index.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/node_modules/bs58/index.js","webpack://_N_E/./node_modules/@renec-foundation/distributor-sdk/node_modules/camelcase/index.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/ata.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/common.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/index.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/instructions/account.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/instructions/ata.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/instructions/index.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/instructions/mint.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/instructions/nft.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/layout.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/price.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/splTokenRegistry.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/token.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/tokenAmount.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/tokenList.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/tokenOwner.js","webpack://_N_E/./node_modules/@saberhq/token-utils/dist/cjs/tokenProvider.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/option-utils/dist/cjs/index.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/broadcaster/index.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/broadcaster/sendAndSpamRawTx.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/broadcaster/tiered.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/computeBudget/index.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/computeBudget/instructions.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/computeBudget/layouts.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/constants.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/error.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/index.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/interfaces.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/provider.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/transaction/PendingTransaction.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/transaction/TransactionEnvelope.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/transaction/TransactionReceipt.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/transaction/index.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/transaction/parseTransactionLogs.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/transaction/programErr.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/transaction/txSizer.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/transaction/utils.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/utils/index.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/utils/instructions.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/utils/misc.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/utils/printAccountOwners.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/utils/printTXTable.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/utils/pubkeyCache.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/utils/publicKey.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/utils/simulateTransactionWithCommitment.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/utils/time.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/utils/txLink.js","webpack://_N_E/./node_modules/@saberhq/token-utils/node_modules/@saberhq/solana-contrib/dist/cjs/wallet.js","webpack://_N_E/./node_modules/@solana/buffer-layout/lib/Layout.js","webpack://_N_E/./node_modules/@solana/spl-token/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://_N_E/./node_modules/@solana/spl-token/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://_N_E/./node_modules/@solana/spl-token/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://_N_E/./node_modules/@solana/spl-token/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://_N_E/./node_modules/@solana/spl-token/lib/index.browser.esm.js","webpack://_N_E/./node_modules/@noble/hashes/esm/_u64.js","webpack://_N_E/./node_modules/@noble/hashes/esm/sha512.js","webpack://_N_E/./node_modules/@noble/curves/esm/abstract/utils.js","webpack://_N_E/./node_modules/@noble/curves/esm/abstract/modular.js","webpack://_N_E/./node_modules/@noble/curves/esm/abstract/curve.js","webpack://_N_E/./node_modules/@noble/curves/esm/abstract/edwards.js","webpack://_N_E/./node_modules/@noble/curves/esm/ed25519.js","webpack://_N_E/./node_modules/@solana/web3.js/node_modules/superstruct/dist/index.mjs","webpack://_N_E/./node_modules/rpc-websockets/node_modules/eventemitter3/index.mjs","webpack://_N_E/./node_modules/rpc-websockets/dist/index.browser.mjs","webpack://_N_E/./node_modules/@noble/hashes/esm/sha3.js","webpack://_N_E/./node_modules/@noble/hashes/esm/hmac.js","webpack://_N_E/./node_modules/@noble/curves/esm/abstract/weierstrass.js","webpack://_N_E/./node_modules/@noble/curves/esm/_shortw_utils.js","webpack://_N_E/./node_modules/@noble/curves/esm/secp256k1.js","webpack://_N_E/./node_modules/@solana/web3.js/lib/index.browser.esm.js","webpack://_N_E/./node_modules/@solana/web3.js/node_modules/bs58/index.js","webpack://_N_E/./node_modules/@ubeswap/token-math/dist/cjs/constants.js","webpack://_N_E/./node_modules/@ubeswap/token-math/dist/cjs/format.js","webpack://_N_E/./node_modules/@ubeswap/token-math/dist/cjs/fraction.js","webpack://_N_E/./node_modules/@ubeswap/token-math/dist/cjs/index.js","webpack://_N_E/./node_modules/@ubeswap/token-math/dist/cjs/percent.js","webpack://_N_E/./node_modules/@ubeswap/token-math/dist/cjs/price.js","webpack://_N_E/./node_modules/@ubeswap/token-math/dist/cjs/token.js","webpack://_N_E/./node_modules/@ubeswap/token-math/dist/cjs/tokenAmount.js","webpack://_N_E/./node_modules/@ubeswap/token-math/dist/cjs/utils.js","webpack://_N_E/./node_modules/assert/build/assert.js","webpack://_N_E/./node_modules/assert/build/internal/assert/assertion_error.js","webpack://_N_E/./node_modules/assert/build/internal/errors.js","webpack://_N_E/./node_modules/assert/build/internal/util/comparisons.js","webpack://_N_E/./node_modules/base-x/src/index.js","webpack://_N_E/./node_modules/base64-js/index.js","webpack://_N_E/./node_modules/big.js/big.js","webpack://_N_E/./node_modules/bigint-buffer/dist/browser.js","webpack://_N_E/./node_modules/bignumber.js/bignumber.js","webpack://_N_E/./node_modules/bn.js/lib/bn.js","webpack://_N_E/./node_modules/borsh/lib/index.js","webpack://_N_E/./node_modules/borsh/node_modules/bs58/index.js","webpack://_N_E/./node_modules/bs58/index.js","webpack://_N_E/./node_modules/bs58/node_modules/base-x/src/index.js","webpack://_N_E/./node_modules/buffer-layout/lib/Layout.js","webpack://_N_E/./node_modules/buffer/index.js","webpack://_N_E/./node_modules/call-bind/callBound.js","webpack://_N_E/./node_modules/call-bind/index.js","webpack://_N_E/./node_modules/camelcase/index.js","webpack://_N_E/./node_modules/decimal.js-light/decimal.js","webpack://_N_E/./node_modules/decimal.js/decimal.js","webpack://_N_E/./node_modules/define-data-property/index.js","webpack://_N_E/./node_modules/define-properties/index.js","webpack://_N_E/./node_modules/err-code/index.js","webpack://_N_E/./node_modules/es-define-property/index.js","webpack://_N_E/./node_modules/es-errors/eval.js","webpack://_N_E/./node_modules/es-errors/index.js","webpack://_N_E/./node_modules/es-errors/range.js","webpack://_N_E/./node_modules/es-errors/ref.js","webpack://_N_E/./node_modules/es-errors/syntax.js","webpack://_N_E/./node_modules/es-errors/type.js","webpack://_N_E/./node_modules/es-errors/uri.js","webpack://_N_E/./node_modules/eventemitter3/index.js","webpack://_N_E/./node_modules/for-each/index.js","webpack://_N_E/./node_modules/function-bind/implementation.js","webpack://_N_E/./node_modules/function-bind/index.js","webpack://_N_E/./node_modules/get-intrinsic/index.js","webpack://_N_E/./node_modules/gopd/index.js","webpack://_N_E/./node_modules/has-property-descriptors/index.js","webpack://_N_E/./node_modules/has-proto/index.js","webpack://_N_E/./node_modules/has-symbols/index.js","webpack://_N_E/./node_modules/has-symbols/shams.js","webpack://_N_E/./node_modules/has-tostringtag/shams.js","webpack://_N_E/./node_modules/hasown/index.js","webpack://_N_E/./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack://_N_E/./node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","webpack://_N_E/./node_modules/hoist-non-react-statics/node_modules/react-is/index.js","webpack://_N_E/./node_modules/ieee754/index.js","webpack://_N_E/./node_modules/inherits/inherits_browser.js","webpack://_N_E/./node_modules/is-arguments/index.js","webpack://_N_E/./node_modules/is-callable/index.js","webpack://_N_E/./node_modules/is-generator-function/index.js","webpack://_N_E/./node_modules/is-nan/implementation.js","webpack://_N_E/./node_modules/is-nan/index.js","webpack://_N_E/./node_modules/is-nan/polyfill.js","webpack://_N_E/./node_modules/is-nan/shim.js","webpack://_N_E/./node_modules/is-typed-array/index.js","webpack://_N_E/./node_modules/jayson/lib/client/browser/index.js","webpack://_N_E/./node_modules/jayson/lib/generateRequest.js","webpack://_N_E/./node_modules/js-sha256/src/sha256.js","webpack://_N_E/./node_modules/js-sha3/src/sha3.js","webpack://_N_E/./node_modules/jsbi/dist/jsbi-umd.js","webpack://_N_E/./node_modules/lodash.debounce/index.js","webpack://_N_E/./node_modules/next/dist/build/polyfills/object.assign/polyfill.js","webpack://_N_E/?adc8","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/is-browser.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/noop.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/GlobalConfig.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/frameloop/render-step.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/frameloop/batcher.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/frameloop/frame.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/use-force-update.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/context/PresenceContext.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/use-constant.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/errors.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs","webpack://_N_E/./node_modules/usehooks-ts/dist/index.mjs","webpack://_N_E/./src/hooks/use-local-storage.ts","webpack://_N_E/./node_modules/@mui/private-theming/useTheme/ThemeContext.js","webpack://_N_E/./node_modules/@mui/private-theming/useTheme/useTheme.js","webpack://_N_E/./node_modules/@mui/private-theming/ThemeProvider/nested.js","webpack://_N_E/./node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js","webpack://_N_E/./node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js","webpack://_N_E/./node_modules/@mui/material/styles/ThemeProvider.js","webpack://_N_E/./node_modules/@mui/material/CssBaseline/CssBaseline.js","webpack://_N_E/./src/providers/theme/options.ts","webpack://_N_E/./src/providers/theme/index.tsx","webpack://_N_E/./node_modules/@solana/wallet-adapter-base/lib/esm/types.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react/lib/esm/useConnection.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react/lib/esm/ConnectionProvider.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-base/lib/esm/errors.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-base/lib/esm/adapter.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-base/lib/esm/transaction.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-base/lib/esm/signer.js","webpack://_N_E/./node_modules/@solana/wallet-standard-util/lib/esm/signIn.js","webpack://_N_E/./node_modules/@solana-mobile/mobile-wallet-adapter-protocol/lib/esm/index.js","webpack://_N_E/./node_modules/@solana-mobile/mobile-wallet-adapter-protocol-web3js/lib/esm/index.js","webpack://_N_E/./node_modules/@solana-mobile/wallet-adapter-mobile/lib/esm/index.js","webpack://_N_E/./node_modules/@wallet-standard/features/lib/esm/connect.js","webpack://_N_E/./node_modules/@wallet-standard/features/lib/esm/events.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-base/lib/esm/standard.js","webpack://_N_E/./node_modules/@solana/wallet-standard-wallet-adapter-base/lib/esm/types.js","webpack://_N_E/./node_modules/@solana/wallet-standard-features/lib/esm/signIn.js","webpack://_N_E/./node_modules/@solana/wallet-standard-chains/lib/esm/index.js","webpack://_N_E/./node_modules/@solana/wallet-standard-util/lib/esm/endpoint.js","webpack://_N_E/./node_modules/@solana/wallet-standard-util/lib/esm/commitment.js","webpack://_N_E/./node_modules/@wallet-standard/features/lib/esm/disconnect.js","webpack://_N_E/./node_modules/@wallet-standard/wallet/lib/esm/util.js","webpack://_N_E/./node_modules/@solana/wallet-standard-wallet-adapter-base/lib/esm/adapter.js","webpack://_N_E/./node_modules/@wallet-standard/app/lib/esm/wallets.js","webpack://_N_E/./node_modules/@solana/wallet-standard-wallet-adapter-react/lib/esm/useStandardWalletAdapters.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react/lib/esm/getEnvironment.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react/lib/esm/getInferredClusterFromEndpoint.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react/lib/esm/useLocalStorage.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react/lib/esm/errors.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react/lib/esm/WalletProviderBase.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react/lib/esm/WalletProvider.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react-ui/lib/esm/Collapse.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react-ui/lib/esm/Button.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletIcon.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletListItem.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletSVG.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletModal.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletModalProvider.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-phantom/lib/esm/adapter.js","webpack://_N_E/./node_modules/@wallet-standard/wallet/lib/esm/register.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/icon.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/wallet.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/detect.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-solflare/lib/esm/adapter.js","webpack://_N_E/./src/providers/wallet/index.tsx","webpack://_N_E/./src/utils/create-emotion-cache.ts","webpack://_N_E/./src/pages/_app.tsx","webpack://_N_E/./src/types/merkle_distributor.ts","webpack://_N_E/./src/providers/solana/index.tsx","webpack://_N_E/./src/styles/global.scss","webpack://_N_E/./node_modules/@fontsource-variable/inter/index.css","webpack://_N_E/./node_modules/@fontsource/rubik-mono-one/index.css","webpack://_N_E/./node_modules/@solana/wallet-adapter-react-ui/styles.css","webpack://_N_E/./node_modules/next/head.js","webpack://_N_E/./node_modules/object-is/implementation.js","webpack://_N_E/./node_modules/object-is/index.js","webpack://_N_E/./node_modules/object-is/polyfill.js","webpack://_N_E/./node_modules/object-is/shim.js","webpack://_N_E/./node_modules/object-keys/implementation.js","webpack://_N_E/./node_modules/object-keys/index.js","webpack://_N_E/./node_modules/object-keys/isArguments.js","webpack://_N_E/./node_modules/possible-typed-array-names/index.js","webpack://_N_E/./node_modules/process/browser.js","webpack://_N_E/./node_modules/promise-retry/index.js","webpack://_N_E/./node_modules/promise-retry/node_modules/retry/index.js","webpack://_N_E/./node_modules/promise-retry/node_modules/retry/lib/retry.js","webpack://_N_E/./node_modules/promise-retry/node_modules/retry/lib/retry_operation.js","webpack://_N_E/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://_N_E/./node_modules/prop-types/index.js","webpack://_N_E/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://_N_E/./node_modules/react-query/devtools/index.js","webpack://_N_E/./node_modules/react-query/es/core/focusManager.js","webpack://_N_E/./node_modules/react-query/es/core/index.js","webpack://_N_E/./node_modules/react-query/es/core/logger.js","webpack://_N_E/./node_modules/react-query/es/core/mutation.js","webpack://_N_E/./node_modules/react-query/es/core/notifyManager.js","webpack://_N_E/./node_modules/react-query/es/core/onlineManager.js","webpack://_N_E/./node_modules/react-query/es/core/query.js","webpack://_N_E/./node_modules/react-query/es/core/queryCache.js","webpack://_N_E/./node_modules/react-query/es/core/mutationCache.js","webpack://_N_E/./node_modules/react-query/es/core/infiniteQueryBehavior.js","webpack://_N_E/./node_modules/react-query/es/core/queryClient.js","webpack://_N_E/./node_modules/react-query/es/core/retryer.js","webpack://_N_E/./node_modules/react-query/es/core/subscribable.js","webpack://_N_E/./node_modules/react-query/es/core/types.js","webpack://_N_E/./node_modules/react-query/es/core/utils.js","webpack://_N_E/./node_modules/react-query/es/index.js","webpack://_N_E/./node_modules/react-query/es/react/reactBatchedUpdates.js","webpack://_N_E/./node_modules/react-query/es/react/setBatchUpdatesFn.js","webpack://_N_E/./node_modules/react-query/es/react/logger.js","webpack://_N_E/./node_modules/react-query/es/react/setLogger.js","webpack://_N_E/./node_modules/react-query/es/react/QueryClientProvider.js","webpack://_N_E/./node_modules/react-query/es/core/mutationObserver.js","webpack://_N_E/./node_modules/react-query/es/react/utils.js","webpack://_N_E/./node_modules/react-query/es/react/useMutation.js","webpack://_N_E/./node_modules/react-query/es/core/queryObserver.js","webpack://_N_E/./node_modules/react-query/es/react/QueryErrorResetBoundary.js","webpack://_N_E/./node_modules/react-query/es/react/useBaseQuery.js","webpack://_N_E/./node_modules/react-query/es/react/useQuery.js","webpack://_N_E/./node_modules/react-query/es/core/hydration.js","webpack://_N_E/./node_modules/react-query/es/react/Hydrate.js","webpack://_N_E/./node_modules/react-query/es/react/index.js","webpack://_N_E/./node_modules/rpc-websockets/node_modules/eventemitter3/index.js","webpack://_N_E/./node_modules/safe-buffer/index.js","webpack://_N_E/./node_modules/set-function-length/index.js","webpack://_N_E/./node_modules/tiny-invariant/dist/tiny-invariant.cjs.js","webpack://_N_E/./node_modules/util/support/isBufferBrowser.js","webpack://_N_E/./node_modules/util/support/types.js","webpack://_N_E/./node_modules/util/util.js","webpack://_N_E/./node_modules/uuid/dist/esm-browser/rng.js","webpack://_N_E/./node_modules/uuid/dist/esm-browser/regex.js","webpack://_N_E/./node_modules/uuid/dist/esm-browser/validate.js","webpack://_N_E/./node_modules/uuid/dist/esm-browser/stringify.js","webpack://_N_E/./node_modules/uuid/dist/esm-browser/v4.js","webpack://_N_E/./node_modules/uuid/dist/esm-browser/index.js","webpack://_N_E/./node_modules/which-typed-array/index.js","webpack://_N_E/ignored|/codebuild/output/src3331091090/src/frontend/node_modules/@coral-xyz/anchor/dist/cjs|fs","webpack://_N_E/ignored|/codebuild/output/src3331091090/src/frontend/node_modules/bn.js/lib|buffer","webpack://_N_E/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://_N_E/./node_modules/@solana/buffer-layout-utils/lib/cjs/base.js","webpack://_N_E/./node_modules/@solana/buffer-layout-utils/lib/cjs/bigint.js","webpack://_N_E/./node_modules/@solana/buffer-layout-utils/lib/cjs/decimal.js","webpack://_N_E/./node_modules/@solana/buffer-layout-utils/lib/cjs/index.js","webpack://_N_E/./node_modules/@solana/buffer-layout-utils/lib/cjs/native.js","webpack://_N_E/./node_modules/@solana/buffer-layout-utils/lib/cjs/web3.js","webpack://_N_E/./node_modules/available-typed-arrays/index.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://_N_E/./node_modules/@noble/hashes/esm/_assert.js","webpack://_N_E/./node_modules/@noble/hashes/esm/_md.js","webpack://_N_E/./node_modules/@noble/hashes/esm/sha256.js","webpack://_N_E/./node_modules/@noble/hashes/esm/crypto.js","webpack://_N_E/./node_modules/@noble/hashes/esm/utils.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react-ui/lib/esm/useWalletModal.js","webpack://_N_E/./node_modules/@solana/wallet-adapter-react/lib/esm/useWallet.js","webpack://_N_E/./node_modules/@solana/wallet-standard-features/lib/esm/signAndSendTransaction.js","webpack://_N_E/./node_modules/@solana/wallet-standard-features/lib/esm/signMessage.js","webpack://_N_E/./node_modules/@solana/wallet-standard-features/lib/esm/signTransaction.js","webpack://_N_E/./node_modules/pako/dist/pako.esm.mjs","webpack://_N_E/./node_modules/text-encoding-utf-8/lib/encoding.lib.mjs","webpack://_N_E/./node_modules/tslib/tslib.es6.mjs","webpack://_N_E/"],"sourcesContent":["import { Buffer as Buffer$1 } from 'buffer';\nimport { PublicKey, Transaction, TransactionInstruction, SendTransactionError, NONCE_ACCOUNT_LENGTH, SystemProgram } from '@solana/web3.js';\nimport * as web3_js from '@solana/web3.js';\nexport { web3_js as web3 };\nimport BN from 'bn.js';\nexport { default as BN } from 'bn.js';\nimport bs58$1 from 'bs58';\nimport camelCase from 'camelcase';\nimport * as borsh from '@coral-xyz/borsh';\nimport { sha256 as sha256$1 } from '@noble/hashes/sha256';\nimport { inflate } from 'pako';\nimport EventEmitter from 'eventemitter3';\n\n/**\n * Splits an array into chunks\n *\n * @param array Array of objects to chunk.\n * @param size The max size of a chunk.\n * @returns A two dimensional array where each T[] length is < the provided size.\n */\nfunction chunks(array, size) {\n return Array.apply(0, new Array(Math.ceil(array.length / size))).map((_, index) => array.slice(index * size, (index + 1) * size));\n}\n/**\n * Check if a transaction object is a VersionedTransaction or not\n *\n * @param tx\n * @returns bool\n */\nconst isVersionedTransaction = (tx) => {\n return \"version\" in tx;\n};\n\nfunction encode$3(data) {\n return data.reduce((str, byte) => str + byte.toString(16).padStart(2, \"0\"), \"0x\");\n}\nfunction decode$3(data) {\n if (data.indexOf(\"0x\") === 0) {\n data = data.substr(2);\n }\n if (data.length % 2 === 1) {\n data = \"0\" + data;\n }\n let key = data.match(/.{2}/g);\n if (key === null) {\n return Buffer$1.from([]);\n }\n return Buffer$1.from(key.map((byte) => parseInt(byte, 16)));\n}\n\nvar hex = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode$3,\n decode: decode$3\n});\n\nfunction decode$2(array) {\n const decoder = new TextDecoder(\"utf-8\") // Browser https://caniuse.com/textencoder.\n ; // Node.\n return decoder.decode(array);\n}\nfunction encode$2(input) {\n const encoder = new TextEncoder() // Browser.\n ; // Node.\n return encoder.encode(input);\n}\n\nvar utf8 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n decode: decode$2,\n encode: encode$2\n});\n\nfunction encode$1(data) {\n return bs58$1.encode(data);\n}\nfunction decode$1(data) {\n return bs58$1.decode(data);\n}\n\nvar bs58 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode$1,\n decode: decode$1\n});\n\nfunction encode(data) {\n return data.toString(\"base64\");\n}\nfunction decode(data) {\n return Buffer$1.from(data, \"base64\");\n}\n\nvar base64 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode,\n decode: decode\n});\n\nvar index$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hex: hex,\n utf8: utf8,\n bs58: bs58,\n base64: base64\n});\n\nfunction isCompositeAccounts(accountItem) {\n return \"accounts\" in accountItem;\n}\n// Deterministic IDL address as a function of the program id.\nasync function idlAddress(programId) {\n const base = (await PublicKey.findProgramAddress([], programId))[0];\n return await PublicKey.createWithSeed(base, seed(), programId);\n}\n// Seed for generating the idlAddress.\nfunction seed() {\n return \"anchor:idl\";\n}\nconst IDL_ACCOUNT_LAYOUT = borsh.struct([\n borsh.publicKey(\"authority\"),\n borsh.vecU8(\"data\"),\n]);\nfunction decodeIdlAccount(data) {\n return IDL_ACCOUNT_LAYOUT.decode(data);\n}\n/**\n * Convert the given IDL to camelCase.\n *\n * The IDL is generated from Rust which has different conventions compared to\n * JS/TS, e.g. instruction names in Rust are snake_case.\n *\n * The conversion happens automatically for programs, however, if you are using\n * internals such as `BorshInstructionCoder` and you only have the original\n * (not camelCase) IDL, you might need to use this function.\n *\n * @param idl IDL to convert to camelCase\n * @returns camelCase version of the IDL\n */\nfunction convertIdlToCamelCase(idl) {\n const KEYS_TO_CONVERT = [\"name\", \"path\", \"account\", \"relations\", \"generic\"];\n // `my_account.field` is getting converted to `myAccountField` but we\n // need `myAccount.field`.\n const toCamelCase = (s) => s.split(\".\").map(camelCase).join(\".\");\n const recursivelyConvertNamesToCamelCase = (obj) => {\n for (const key in obj) {\n const val = obj[key];\n if (KEYS_TO_CONVERT.includes(key)) {\n obj[key] = Array.isArray(val) ? val.map(toCamelCase) : toCamelCase(val);\n }\n else if (typeof val === \"object\") {\n recursivelyConvertNamesToCamelCase(val);\n }\n }\n };\n const camelCasedIdl = structuredClone(idl);\n recursivelyConvertNamesToCamelCase(camelCasedIdl);\n return camelCasedIdl;\n}\n/** Conveniently handle all defined field kinds with proper type support. */\nfunction handleDefinedFields(fields, unitCb, namedCb, tupleCb) {\n // Unit\n if (!(fields === null || fields === void 0 ? void 0 : fields.length))\n return unitCb();\n // Named\n if (fields[0].name) {\n return namedCb(fields);\n }\n // Tuple\n return tupleCb(fields);\n}\n\nfunction parseIdlErrors(idl) {\n const errors = new Map();\n if (idl.errors) {\n idl.errors.forEach((e) => {\n var _a;\n let msg = (_a = e.msg) !== null && _a !== void 0 ? _a : e.name;\n errors.set(e.code, msg);\n });\n }\n return errors;\n}\nfunction toInstruction(idlIx, ...args) {\n if (idlIx.args.length != args.length) {\n throw new Error(\"Invalid argument length\");\n }\n const ix = {};\n let idx = 0;\n idlIx.args.forEach((ixArg) => {\n ix[ixArg.name] = args[idx];\n idx += 1;\n });\n return ix;\n}\n// Throws error if any account required for the `ix` is not given.\nfunction validateAccounts(ixAccounts, accounts = {}) {\n ixAccounts.forEach((acc) => {\n if (isCompositeAccounts(acc)) {\n validateAccounts(acc.accounts, accounts[acc.name]);\n }\n else {\n if (!accounts[acc.name]) {\n throw new Error(`Account \\`${acc.name}\\` not provided.`);\n }\n }\n });\n}\n// Translates an address to a Pubkey.\nfunction translateAddress(address) {\n return address instanceof PublicKey ? address : new PublicKey(address);\n}\n\n/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n this.value = void 0;\n this.key = void 0;\n this.type = void 0;\n this.refinement = void 0;\n this.path = void 0;\n this.branch = void 0;\n this.failures = void 0;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options) {\n if (options === void 0) {\n options = {};\n }\n\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n this.TYPE = void 0;\n this.type = void 0;\n this.schema = void 0;\n this.coercer = void 0;\n this.validator = void 0;\n this.refiner = void 0;\n this.entries = void 0;\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options) {\n if (options === void 0) {\n options = {};\n }\n\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options) {\n if (options === void 0) {\n options = {};\n }\n\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value matches one of a set of types.\n */\n\nfunction union$1(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n coercer(value, ctx) {\n const firstMatch = Structs.find(s => {\n const [e] = s.validate(value, {\n coerce: true\n });\n return !e;\n }) || unknown();\n return firstMatch.coercer(value, ctx);\n },\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n\n/**\n * Sends a transaction to a program with the given accounts and instruction\n * data.\n */\nasync function invoke(programId, accounts, data, provider) {\n programId = translateAddress(programId);\n if (!provider) {\n provider = getProvider();\n }\n const tx = new Transaction();\n tx.add(new TransactionInstruction({\n programId,\n keys: accounts !== null && accounts !== void 0 ? accounts : [],\n data,\n }));\n if (provider.sendAndConfirm === undefined) {\n throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");\n }\n return await provider.sendAndConfirm(tx, []);\n}\nconst GET_MULTIPLE_ACCOUNTS_LIMIT = 99;\nasync function getMultipleAccounts(connection, publicKeys, commitment) {\n const results = await getMultipleAccountsAndContext(connection, publicKeys, commitment);\n return results.map((result) => {\n return result\n ? { publicKey: result.publicKey, account: result.account }\n : null;\n });\n}\nasync function getMultipleAccountsAndContext(connection, publicKeys, commitment) {\n if (publicKeys.length <= GET_MULTIPLE_ACCOUNTS_LIMIT) {\n return await getMultipleAccountsAndContextCore(connection, publicKeys, commitment);\n }\n else {\n const batches = chunks(publicKeys, GET_MULTIPLE_ACCOUNTS_LIMIT);\n const results = await Promise.all(batches.map((batch) => getMultipleAccountsAndContextCore(connection, batch, commitment)));\n return results.flat();\n }\n}\nasync function getMultipleAccountsAndContextCore(connection, publicKeys, commitmentOverride) {\n const commitment = commitmentOverride !== null && commitmentOverride !== void 0 ? commitmentOverride : connection.commitment;\n const { value: accountInfos, context } = await connection.getMultipleAccountsInfoAndContext(publicKeys, commitment);\n const accounts = accountInfos.map((account, idx) => {\n if (account === null) {\n return null;\n }\n return {\n publicKey: publicKeys[idx],\n account,\n context,\n };\n });\n return accounts;\n}\n// copy from @solana/web3.js that has a commitment param\nasync function simulateTransaction(connection, transaction, signers, commitment, includeAccounts) {\n var _a;\n if (signers && signers.length > 0) {\n transaction.sign(...signers);\n }\n // @ts-expect-error\n const message = transaction._compile();\n const signData = message.serialize();\n // @ts-expect-error\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString(\"base64\");\n const config = {\n encoding: \"base64\",\n commitment: commitment !== null && commitment !== void 0 ? commitment : connection.commitment,\n };\n if (includeAccounts) {\n const addresses = (Array.isArray(includeAccounts) ? includeAccounts : message.nonProgramIds()).map((key) => key.toBase58());\n config[\"accounts\"] = {\n encoding: \"base64\",\n addresses,\n };\n }\n if (signers && signers.length > 0) {\n config.sigVerify = true;\n }\n const args = [encodedTransaction, config];\n // @ts-expect-error\n const unsafeRes = await connection._rpcRequest(\"simulateTransaction\", args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if (\"error\" in res) {\n let logs;\n if (\"data\" in res.error) {\n logs = (_a = res.error.data) === null || _a === void 0 ? void 0 : _a.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = \"\\n \";\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\"failed to simulate transaction: \" + res.error.message, logs);\n }\n return res.result;\n}\n// copy from @solana/web3.js\nfunction jsonRpcResult(schema) {\n return coerce(createRpcResult(schema), UnknownRpcResult, (value) => {\n if (\"error\" in value) {\n return value;\n }\n else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n// copy from @solana/web3.js\nconst UnknownRpcResult = createRpcResult(unknown());\n// copy from @solana/web3.js\nfunction createRpcResult(result) {\n return union$1([\n type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n result,\n }),\n type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n error: type({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n// copy from @solana/web3.js\nfunction jsonRpcResultAndContext(value) {\n return jsonRpcResult(type({\n context: type({\n slot: number(),\n }),\n value,\n }));\n}\n// copy from @solana/web3.js\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({\n err: nullable(union$1([type({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(nullable(array(nullable(type({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }))))),\n unitsConsumed: optional(number()),\n}));\n\nvar rpc = /*#__PURE__*/Object.freeze({\n __proto__: null,\n invoke: invoke,\n getMultipleAccounts: getMultipleAccounts,\n getMultipleAccountsAndContext: getMultipleAccountsAndContext,\n simulateTransaction: simulateTransaction\n});\n\n/**\n * The network and wallet context used to send transactions paid for and signed\n * by the provider.\n */\nclass AnchorProvider {\n /**\n * @param connection The cluster connection where the program is deployed.\n * @param wallet The wallet used to pay for and sign all transactions.\n * @param opts Transaction confirmation options to use by default.\n */\n constructor(connection, wallet, opts = AnchorProvider.defaultOptions()) {\n this.connection = connection;\n this.wallet = wallet;\n this.opts = opts;\n this.publicKey = wallet === null || wallet === void 0 ? void 0 : wallet.publicKey;\n }\n static defaultOptions() {\n return {\n preflightCommitment: \"processed\",\n commitment: \"processed\",\n };\n }\n /**\n * Returns a `Provider` with a wallet read from the local filesystem.\n *\n * @param url The network cluster url.\n * @param opts The default transaction confirmation options.\n *\n * (This api is for Node only.)\n */\n static local(url, opts = AnchorProvider.defaultOptions()) {\n {\n throw new Error(`Provider local is not available on browser.`);\n }\n }\n /**\n * Returns a `Provider` read from the `ANCHOR_PROVIDER_URL` environment\n * variable\n *\n * (This api is for Node only.)\n */\n static env() {\n {\n throw new Error(`Provider env is not available on browser.`);\n }\n }\n /**\n * Sends the given transaction, paid for and signed by the provider's wallet.\n *\n * @param tx The transaction to send.\n * @param signers The signers of the transaction.\n * @param opts Transaction confirmation options.\n */\n async sendAndConfirm(tx, signers, opts) {\n var _a, _b, _c, _d;\n if (opts === undefined) {\n opts = this.opts;\n }\n if (isVersionedTransaction(tx)) {\n if (signers) {\n tx.sign(signers);\n }\n }\n else {\n tx.feePayer = (_a = tx.feePayer) !== null && _a !== void 0 ? _a : this.wallet.publicKey;\n tx.recentBlockhash = (await this.connection.getLatestBlockhash(opts.preflightCommitment)).blockhash;\n if (signers) {\n for (const signer of signers) {\n tx.partialSign(signer);\n }\n }\n }\n tx = await this.wallet.signTransaction(tx);\n const rawTx = tx.serialize();\n try {\n return await sendAndConfirmRawTransaction(this.connection, rawTx, opts);\n }\n catch (err) {\n // thrown if the underlying 'confirmTransaction' encounters a failed tx\n // the 'confirmTransaction' error does not return logs so we make another rpc call to get them\n if (err instanceof ConfirmError) {\n // choose the shortest available commitment for 'getTransaction'\n // (the json RPC does not support any shorter than \"confirmed\" for 'getTransaction')\n // because that will see the tx sent with `sendAndConfirmRawTransaction` no matter which\n // commitment `sendAndConfirmRawTransaction` used\n const txSig = encode$1(isVersionedTransaction(tx)\n ? ((_b = tx.signatures) === null || _b === void 0 ? void 0 : _b[0]) || new Uint8Array()\n : (_c = tx.signature) !== null && _c !== void 0 ? _c : new Uint8Array());\n const maxVer = isVersionedTransaction(tx) ? 0 : undefined;\n const failedTx = await this.connection.getTransaction(txSig, {\n commitment: \"confirmed\",\n maxSupportedTransactionVersion: maxVer,\n });\n if (!failedTx) {\n throw err;\n }\n else {\n const logs = (_d = failedTx.meta) === null || _d === void 0 ? void 0 : _d.logMessages;\n throw !logs ? err : new SendTransactionError(err.message, logs);\n }\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Similar to `send`, but for an array of transactions and signers.\n * All transactions need to be of the same type, it doesn't support a mix of `VersionedTransaction`s and `Transaction`s.\n *\n * @param txWithSigners Array of transactions and signers.\n * @param opts Transaction confirmation options.\n */\n async sendAll(txWithSigners, opts) {\n var _a, _b, _c;\n if (opts === undefined) {\n opts = this.opts;\n }\n const recentBlockhash = (await this.connection.getLatestBlockhash(opts.preflightCommitment)).blockhash;\n let txs = txWithSigners.map((r) => {\n var _a, _b;\n if (isVersionedTransaction(r.tx)) {\n let tx = r.tx;\n if (r.signers) {\n tx.sign(r.signers);\n }\n return tx;\n }\n else {\n let tx = r.tx;\n let signers = (_a = r.signers) !== null && _a !== void 0 ? _a : [];\n tx.feePayer = (_b = tx.feePayer) !== null && _b !== void 0 ? _b : this.wallet.publicKey;\n tx.recentBlockhash = recentBlockhash;\n signers.forEach((kp) => {\n tx.partialSign(kp);\n });\n return tx;\n }\n });\n const signedTxs = await this.wallet.signAllTransactions(txs);\n const sigs = [];\n for (let k = 0; k < txs.length; k += 1) {\n const tx = signedTxs[k];\n const rawTx = tx.serialize();\n try {\n sigs.push(await sendAndConfirmRawTransaction(this.connection, rawTx, opts));\n }\n catch (err) {\n // thrown if the underlying 'confirmTransaction' encounters a failed tx\n // the 'confirmTransaction' error does not return logs so we make another rpc call to get them\n if (err instanceof ConfirmError) {\n // choose the shortest available commitment for 'getTransaction'\n // (the json RPC does not support any shorter than \"confirmed\" for 'getTransaction')\n // because that will see the tx sent with `sendAndConfirmRawTransaction` no matter which\n // commitment `sendAndConfirmRawTransaction` used\n const txSig = encode$1(isVersionedTransaction(tx)\n ? ((_a = tx.signatures) === null || _a === void 0 ? void 0 : _a[0]) || new Uint8Array()\n : (_b = tx.signature) !== null && _b !== void 0 ? _b : new Uint8Array());\n const maxVer = isVersionedTransaction(tx) ? 0 : undefined;\n const failedTx = await this.connection.getTransaction(txSig, {\n commitment: \"confirmed\",\n maxSupportedTransactionVersion: maxVer,\n });\n if (!failedTx) {\n throw err;\n }\n else {\n const logs = (_c = failedTx.meta) === null || _c === void 0 ? void 0 : _c.logMessages;\n throw !logs ? err : new SendTransactionError(err.message, logs);\n }\n }\n else {\n throw err;\n }\n }\n }\n return sigs;\n }\n /**\n * Simulates the given transaction, returning emitted logs from execution.\n *\n * @param tx The transaction to send.\n * @param signers The signers of the transaction. If unset, the transaction\n * will be simulated with the \"sigVerify: false\" option. This\n * allows for simulation of transactions without asking the\n * wallet for a signature.\n * @param opts Transaction confirmation options.\n */\n async simulate(tx, signers, commitment, includeAccounts) {\n let recentBlockhash = (await this.connection.getLatestBlockhash(commitment !== null && commitment !== void 0 ? commitment : this.connection.commitment)).blockhash;\n let result;\n if (isVersionedTransaction(tx)) {\n if (signers && signers.length > 0) {\n tx.sign(signers);\n tx = await this.wallet.signTransaction(tx);\n }\n // Doesn't support includeAccounts which has been changed to something\n // else in later versions of this function.\n result = await this.connection.simulateTransaction(tx, { commitment });\n }\n else {\n tx.feePayer = tx.feePayer || this.wallet.publicKey;\n tx.recentBlockhash = recentBlockhash;\n if (signers && signers.length > 0) {\n tx = await this.wallet.signTransaction(tx);\n }\n result = await simulateTransaction(this.connection, tx, signers, commitment, includeAccounts);\n }\n if (result.value.err) {\n throw new SimulateError(result.value);\n }\n return result.value;\n }\n}\nclass SimulateError extends Error {\n constructor(simulationResponse, message) {\n super(message);\n this.simulationResponse = simulationResponse;\n }\n}\n// Copy of Connection.sendAndConfirmRawTransaction that throws\n// a better error if 'confirmTransaction` returns an error status\nasync function sendAndConfirmRawTransaction(connection, rawTransaction, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n };\n const signature = await connection.sendRawTransaction(rawTransaction, sendOptions);\n const status = (await connection.confirmTransaction(signature, options && options.commitment)).value;\n if (status.err) {\n throw new ConfirmError(`Raw transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n}\nclass ConfirmError extends Error {\n constructor(message) {\n super(message);\n }\n}\n/**\n * Sets the default provider on the client.\n */\nfunction setProvider(provider) {\n _provider = provider;\n}\n/**\n * Returns the default provider being used by the client.\n */\nfunction getProvider() {\n if (_provider === null) {\n return AnchorProvider.local();\n }\n return _provider;\n}\n// Global provider used as the default when a provider is not given.\nlet _provider = null;\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar dist = {};\n\n// Instruction errors.\nObject.defineProperty(dist, \"__esModule\", { value: true });\nvar ANCHOR_ERROR__REQUIRE_EQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_EQ_VIOLATED = ANCHOR_ERROR__REQUIRE_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_VIOLATED = ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID = ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION = ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE = dist.ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE = ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION = ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION = ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS = ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION = ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM = ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM = ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM = ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE = dist.ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE = ANCHOR_ERROR__CONSTRAINT_SPACE = dist.ANCHOR_ERROR__CONSTRAINT_SPACE = ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS = ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER = ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT = ANCHOR_ERROR__CONSTRAINT_ZERO = dist.ANCHOR_ERROR__CONSTRAINT_ZERO = ANCHOR_ERROR__CONSTRAINT_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_ADDRESS = ANCHOR_ERROR__CONSTRAINT_CLOSE = dist.ANCHOR_ERROR__CONSTRAINT_CLOSE = ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT = ANCHOR_ERROR__CONSTRAINT_ASSOCIATED = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED = ANCHOR_ERROR__CONSTRAINT_STATE = dist.ANCHOR_ERROR__CONSTRAINT_STATE = ANCHOR_ERROR__CONSTRAINT_EXECUTABLE = dist.ANCHOR_ERROR__CONSTRAINT_EXECUTABLE = ANCHOR_ERROR__CONSTRAINT_SEEDS = dist.ANCHOR_ERROR__CONSTRAINT_SEEDS = ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT = dist.ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT = ANCHOR_ERROR__CONSTRAINT_OWNER = dist.ANCHOR_ERROR__CONSTRAINT_OWNER = ANCHOR_ERROR__CONSTRAINT_RAW = dist.ANCHOR_ERROR__CONSTRAINT_RAW = ANCHOR_ERROR__CONSTRAINT_SIGNER = dist.ANCHOR_ERROR__CONSTRAINT_SIGNER = ANCHOR_ERROR__CONSTRAINT_HAS_ONE = dist.ANCHOR_ERROR__CONSTRAINT_HAS_ONE = ANCHOR_ERROR__CONSTRAINT_MUT = dist.ANCHOR_ERROR__CONSTRAINT_MUT = ANCHOR_ERROR__EVENT_INSTRUCTION_STUB = dist.ANCHOR_ERROR__EVENT_INSTRUCTION_STUB = ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY = dist.ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY = ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM = dist.ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM = ANCHOR_ERROR__IDL_INSTRUCTION_STUB = dist.ANCHOR_ERROR__IDL_INSTRUCTION_STUB = ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE = dist.ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE = ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE = dist.ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE = ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND = dist.ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND = ANCHOR_ERROR__INSTRUCTION_MISSING = dist.ANCHOR_ERROR__INSTRUCTION_MISSING = void 0;\nvar ANCHOR_ERROR__DEPRECATED = dist.ANCHOR_ERROR__DEPRECATED = ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION = dist.ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION = ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT = dist.ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT = ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH = dist.ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH = ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS = dist.ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS = ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT = dist.ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT = ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH = dist.ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH = ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT = dist.ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT = ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA = dist.ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA = ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED = dist.ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED = ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED = dist.ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED = ANCHOR_ERROR__ACCOUNT_NOT_SIGNER = dist.ANCHOR_ERROR__ACCOUNT_NOT_SIGNER = ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE = dist.ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE = ANCHOR_ERROR__INVALID_PROGRAM_ID = dist.ANCHOR_ERROR__INVALID_PROGRAM_ID = ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM = dist.ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM = ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE = dist.ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE = ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS = dist.ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS = ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE = dist.ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE = ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE = dist.ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE = ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH = ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND = ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET = ANCHOR_ERROR__REQUIRE_GTE_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_GTE_VIOLATED = ANCHOR_ERROR__REQUIRE_GT_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_GT_VIOLATED = ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED = ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED = ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED = void 0;\n/** 8 byte instruction identifier not provided. */\nvar ANCHOR_ERROR__INSTRUCTION_MISSING = dist.ANCHOR_ERROR__INSTRUCTION_MISSING = 100;\n/** Fallback functions are not supported. */\nvar ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND = dist.ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND = 101;\n/** The program could not deserialize the given instruction. */\nvar ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE = dist.ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE = 102;\n/** The program could not serialize the given instruction. */\nvar ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE = dist.ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE = 103;\n// IDL instruction errors.\n/** The program was compiled without idl instructions. */\nvar ANCHOR_ERROR__IDL_INSTRUCTION_STUB = dist.ANCHOR_ERROR__IDL_INSTRUCTION_STUB = 1000;\n/** The transaction was given an invalid program for the IDL instruction. */\nvar ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM = dist.ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM = 1001;\n/** IDL account must be empty in order to resize, try closing first. */\nvar ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY = dist.ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY = 1002;\n// Event instructions.\n/** The program was compiled without `event-cpi` feature. */\nvar ANCHOR_ERROR__EVENT_INSTRUCTION_STUB = dist.ANCHOR_ERROR__EVENT_INSTRUCTION_STUB = 1500;\n// Constraint errors.\n/** A mut constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MUT = dist.ANCHOR_ERROR__CONSTRAINT_MUT = 2000;\n/** A has one constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_HAS_ONE = dist.ANCHOR_ERROR__CONSTRAINT_HAS_ONE = 2001;\n/** A signer constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_SIGNER = dist.ANCHOR_ERROR__CONSTRAINT_SIGNER = 2002;\n/** A raw constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_RAW = dist.ANCHOR_ERROR__CONSTRAINT_RAW = 2003;\n/** An owner constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_OWNER = dist.ANCHOR_ERROR__CONSTRAINT_OWNER = 2004;\n/** A rent exemption constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT = dist.ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT = 2005;\n/** A seeds constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_SEEDS = dist.ANCHOR_ERROR__CONSTRAINT_SEEDS = 2006;\n/** An executable constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_EXECUTABLE = dist.ANCHOR_ERROR__CONSTRAINT_EXECUTABLE = 2007;\n/** Deprecated Error, feel free to replace with something else. */\nvar ANCHOR_ERROR__CONSTRAINT_STATE = dist.ANCHOR_ERROR__CONSTRAINT_STATE = 2008;\n/** An associated constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_ASSOCIATED = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED = 2009;\n/** An associated init constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT = 2010;\n/** A close constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_CLOSE = dist.ANCHOR_ERROR__CONSTRAINT_CLOSE = 2011;\n/** An address constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_ADDRESS = 2012;\n/** Expected zero account discriminant. */\nvar ANCHOR_ERROR__CONSTRAINT_ZERO = dist.ANCHOR_ERROR__CONSTRAINT_ZERO = 2013;\n/** A token mint constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT = 2014;\n/** A token owner constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER = 2015;\n/** A mint mint authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY = 2016;\n/** A mint freeze authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY = 2017;\n/** A mint decimals constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS = 2018;\n/** A space constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_SPACE = dist.ANCHOR_ERROR__CONSTRAINT_SPACE = 2019;\n/** A required account for the constraint is None. */\nvar ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE = dist.ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE = 2020;\n/** A token account token program constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM = 2021;\n/** A mint token program constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM = 2022;\n/** An associated token account token program constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM = 2023;\n/** A group pointer extension constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION = 2024;\n/** A group pointer extension authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY = 2025;\n/** A group pointer extension group address constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS = 2026;\n/** A group member pointer extension constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION = 2027;\n/** A group member pointer extension authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY = 2028;\n/** A group member pointer extension group address constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS = 2029;\n/** A metadata pointer extension constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION = 2030;\n/** A metadata pointer extension authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY = 2031;\n/** A metadata pointer extension metadata address constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS = 2032;\n/** A close authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION = 2033;\n/** A close authority extension authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY = 2034;\n/** A permanent delegate extension constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION = 2035;\n/** A permanent delegate extension delegate constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE = dist.ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE = 2036;\n/** A transfer hook extension constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION = 2037;\n/** A transfer hook extension authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY = 2038;\n/** A transfer hook extension transfer hook program id constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID = 2039;\n// Require errors.\n/** A require expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_VIOLATED = 2500;\n/** A require_eq expression was violated. */\nANCHOR_ERROR__REQUIRE_EQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_EQ_VIOLATED = 2501;\n/** A require_keys_eq expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED = 2502;\n/** A require_neq expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED = 2503;\n/** A require_keys_neq expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED = 2504;\n/** A require_gt expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_GT_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_GT_VIOLATED = 2505;\n/** A require_gte expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_GTE_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_GTE_VIOLATED = 2506;\n// Account errors.\n/** The account discriminator was already set on this account. */\nvar ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET = 3000;\n/** No 8 byte discriminator was found on the account. */\nvar ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND = 3001;\n/** 8 byte discriminator did not match what was expected. */\nvar ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH = 3002;\n/** Failed to deserialize the account. */\nvar ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE = dist.ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE = 3003;\n/** Failed to serialize the account. */\nvar ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE = dist.ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE = 3004;\n/** Not enough account keys given to the instruction. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS = dist.ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS = 3005;\n/** The given account is not mutable. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE = dist.ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE = 3006;\n/** The given account is owned by a different program than expected. */\nvar ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM = dist.ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM = 3007;\n/** Program ID was not as expected. */\nvar ANCHOR_ERROR__INVALID_PROGRAM_ID = dist.ANCHOR_ERROR__INVALID_PROGRAM_ID = 3008;\n/** Program account is not executable. */\nvar ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE = dist.ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE = 3009;\n/** The given account did not sign. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_SIGNER = dist.ANCHOR_ERROR__ACCOUNT_NOT_SIGNER = 3010;\n/** The given account is not owned by the system program. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED = dist.ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED = 3011;\n/** The program expected this account to be already initialized. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED = dist.ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED = 3012;\n/** The given account is not a program data account. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA = dist.ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA = 3013;\n/** The given account is not the associated token account. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT = dist.ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT = 3014;\n/** The given public key does not match the required sysvar. */\nvar ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH = dist.ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH = 3015;\n/** The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit. */\nvar ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT = dist.ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT = 3016;\n/** The account was duplicated for more than one reallocation. */\nvar ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS = dist.ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS = 3017;\n// Miscellaneous errors.\n/** The declared program id does not match the actual program id. */\nvar ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH = dist.ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH = 4100;\n/** You cannot/should not initialize the payer account as a program account. */\nvar ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT = dist.ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT = 4101;\n/** The program could not perform the numeric conversion, out of range integral type conversion attempted. */\nvar ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION = dist.ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION = 4102;\n// Deprecated errors.\n/** The API being used is deprecated and should no longer be used. */\nANCHOR_ERROR__DEPRECATED = dist.ANCHOR_ERROR__DEPRECATED = 5000;\n\nconst _AVAILABLE_FEATURES = new Set([\"debug-logs\"]);\nconst _FEATURES = new Map();\nfunction set(key) {\n if (!_AVAILABLE_FEATURES.has(key)) {\n throw new Error(\"Invalid feature\");\n }\n _FEATURES.set(key, true);\n}\nfunction isSet(key) {\n return _FEATURES.get(key) !== undefined;\n}\n\nvar features = /*#__PURE__*/Object.freeze({\n __proto__: null,\n set: set,\n isSet: isSet\n});\n\nclass IdlError extends Error {\n constructor(message) {\n super(message);\n this.name = \"IdlError\";\n }\n}\nclass ProgramErrorStack {\n constructor(stack) {\n this.stack = stack;\n }\n static parse(logs) {\n var _a;\n const programKeyRegex = /^Program (\\w*) invoke/;\n const successRegex = /^Program \\w* success/;\n const programStack = [];\n for (let i = 0; i < logs.length; i++) {\n if (successRegex.exec(logs[i])) {\n programStack.pop();\n continue;\n }\n const programKey = (_a = programKeyRegex.exec(logs[i])) === null || _a === void 0 ? void 0 : _a[1];\n if (!programKey) {\n continue;\n }\n programStack.push(new PublicKey(programKey));\n }\n return new ProgramErrorStack(programStack);\n }\n}\nclass AnchorError extends Error {\n constructor(errorCode, errorMessage, errorLogs, logs, origin, comparedValues) {\n super(errorLogs.join(\"\\n\").replace(\"Program log: \", \"\"));\n this.errorLogs = errorLogs;\n this.logs = logs;\n this.error = { errorCode, errorMessage, comparedValues, origin };\n this._programErrorStack = ProgramErrorStack.parse(logs);\n }\n static parse(logs) {\n if (!logs) {\n return null;\n }\n const anchorErrorLogIndex = logs.findIndex((log) => log.startsWith(\"Program log: AnchorError\"));\n if (anchorErrorLogIndex === -1) {\n return null;\n }\n const anchorErrorLog = logs[anchorErrorLogIndex];\n const errorLogs = [anchorErrorLog];\n let comparedValues;\n if (anchorErrorLogIndex + 1 < logs.length) {\n // This catches the comparedValues where the following is logged\n // \n // Left:\n // \n // Right:\n // \n if (logs[anchorErrorLogIndex + 1] === \"Program log: Left:\") {\n const pubkeyRegex = /^Program log: (.*)$/;\n const leftPubkey = pubkeyRegex.exec(logs[anchorErrorLogIndex + 2])[1];\n const rightPubkey = pubkeyRegex.exec(logs[anchorErrorLogIndex + 4])[1];\n comparedValues = [\n new PublicKey(leftPubkey),\n new PublicKey(rightPubkey),\n ];\n errorLogs.push(...logs.slice(anchorErrorLogIndex + 1, anchorErrorLogIndex + 5));\n }\n // This catches the comparedValues where the following is logged\n // \n // Left: \n // Right: \n else if (logs[anchorErrorLogIndex + 1].startsWith(\"Program log: Left:\")) {\n const valueRegex = /^Program log: (Left|Right): (.*)$/;\n const leftValue = valueRegex.exec(logs[anchorErrorLogIndex + 1])[2];\n const rightValue = valueRegex.exec(logs[anchorErrorLogIndex + 2])[2];\n errorLogs.push(...logs.slice(anchorErrorLogIndex + 1, anchorErrorLogIndex + 3));\n comparedValues = [leftValue, rightValue];\n }\n }\n const regexNoInfo = /^Program log: AnchorError occurred\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const noInfoAnchorErrorLog = regexNoInfo.exec(anchorErrorLog);\n const regexFileLine = /^Program log: AnchorError thrown in (.*):(\\d*)\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const fileLineAnchorErrorLog = regexFileLine.exec(anchorErrorLog);\n const regexAccountName = /^Program log: AnchorError caused by account: (.*)\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const accountNameAnchorErrorLog = regexAccountName.exec(anchorErrorLog);\n if (noInfoAnchorErrorLog) {\n const [errorCodeString, errorNumber, errorMessage] = noInfoAnchorErrorLog.slice(1, 4);\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, undefined, comparedValues);\n }\n else if (fileLineAnchorErrorLog) {\n const [file, line, errorCodeString, errorNumber, errorMessage] = fileLineAnchorErrorLog.slice(1, 6);\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n const fileLine = { file, line: parseInt(line) };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, fileLine, comparedValues);\n }\n else if (accountNameAnchorErrorLog) {\n const [accountName, errorCodeString, errorNumber, errorMessage] = accountNameAnchorErrorLog.slice(1, 5);\n const origin = accountName;\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, origin, comparedValues);\n }\n else {\n return null;\n }\n }\n get program() {\n return this._programErrorStack.stack[this._programErrorStack.stack.length - 1];\n }\n get programErrorStack() {\n return this._programErrorStack.stack;\n }\n toString() {\n return this.message;\n }\n}\n// An error from a user defined program.\nclass ProgramError extends Error {\n constructor(code, msg, logs) {\n super();\n this.code = code;\n this.msg = msg;\n this.logs = logs;\n if (logs) {\n this._programErrorStack = ProgramErrorStack.parse(logs);\n }\n }\n static parse(err, idlErrors) {\n const errString = err.toString();\n // TODO: don't rely on the error string. web3.js should preserve the error\n // code information instead of giving us an untyped string.\n let unparsedErrorCode;\n if (errString.includes(\"custom program error:\")) {\n let components = errString.split(\"custom program error: \");\n if (components.length !== 2) {\n return null;\n }\n else {\n unparsedErrorCode = components[1];\n }\n }\n else {\n const matches = errString.match(/\"Custom\":([0-9]+)}/g);\n if (!matches || matches.length > 1) {\n return null;\n }\n unparsedErrorCode = matches[0].match(/([0-9]+)/g)[0];\n }\n let errorCode;\n try {\n errorCode = parseInt(unparsedErrorCode);\n }\n catch (parseErr) {\n return null;\n }\n // Parse user error.\n let errorMsg = idlErrors.get(errorCode);\n if (errorMsg !== undefined) {\n return new ProgramError(errorCode, errorMsg, err.logs);\n }\n // Parse framework internal error.\n errorMsg = LangErrorMessage.get(errorCode);\n if (errorMsg !== undefined) {\n return new ProgramError(errorCode, errorMsg, err.logs);\n }\n // Unable to parse the error. Just return the untranslated error.\n return null;\n }\n get program() {\n var _a;\n return (_a = this._programErrorStack) === null || _a === void 0 ? void 0 : _a.stack[this._programErrorStack.stack.length - 1];\n }\n get programErrorStack() {\n var _a;\n return (_a = this._programErrorStack) === null || _a === void 0 ? void 0 : _a.stack;\n }\n toString() {\n return this.msg;\n }\n}\nfunction translateError(err, idlErrors) {\n if (isSet(\"debug-logs\")) {\n console.log(\"Translating error:\", err);\n }\n const anchorError = AnchorError.parse(err.logs);\n if (anchorError) {\n return anchorError;\n }\n const programError = ProgramError.parse(err, idlErrors);\n if (programError) {\n return programError;\n }\n if (err.logs) {\n const handler = {\n get: function (target, prop) {\n if (prop === \"programErrorStack\") {\n return target.programErrorStack.stack;\n }\n else if (prop === \"program\") {\n return target.programErrorStack.stack[err.programErrorStack.stack.length - 1];\n }\n else {\n // this is the normal way to return all other props\n // without modifying them.\n // @ts-expect-error\n return Reflect.get(...arguments);\n }\n },\n };\n err.programErrorStack = ProgramErrorStack.parse(err.logs);\n return new Proxy(err, handler);\n }\n return err;\n}\nconst LangErrorCode = {\n // Instructions.\n InstructionMissing: ANCHOR_ERROR__INSTRUCTION_MISSING,\n InstructionFallbackNotFound: ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND,\n InstructionDidNotDeserialize: ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE,\n InstructionDidNotSerialize: ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE,\n // IDL instructions.\n IdlInstructionStub: ANCHOR_ERROR__IDL_INSTRUCTION_STUB,\n IdlInstructionInvalidProgram: ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM,\n IdlAccountNotEmpty: ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY,\n // Event instructions.\n EventInstructionStub: ANCHOR_ERROR__EVENT_INSTRUCTION_STUB,\n // Constraints.\n ConstraintMut: ANCHOR_ERROR__CONSTRAINT_MUT,\n ConstraintHasOne: ANCHOR_ERROR__CONSTRAINT_HAS_ONE,\n ConstraintSigner: ANCHOR_ERROR__CONSTRAINT_SIGNER,\n ConstraintRaw: ANCHOR_ERROR__CONSTRAINT_RAW,\n ConstraintOwner: ANCHOR_ERROR__CONSTRAINT_OWNER,\n ConstraintRentExempt: ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT,\n ConstraintSeeds: ANCHOR_ERROR__CONSTRAINT_SEEDS,\n ConstraintExecutable: ANCHOR_ERROR__CONSTRAINT_EXECUTABLE,\n ConstraintState: ANCHOR_ERROR__CONSTRAINT_STATE,\n ConstraintAssociated: ANCHOR_ERROR__CONSTRAINT_ASSOCIATED,\n ConstraintAssociatedInit: ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT,\n ConstraintClose: ANCHOR_ERROR__CONSTRAINT_CLOSE,\n ConstraintAddress: ANCHOR_ERROR__CONSTRAINT_ADDRESS,\n ConstraintZero: ANCHOR_ERROR__CONSTRAINT_ZERO,\n ConstraintTokenMint: ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT,\n ConstraintTokenOwner: ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER,\n ConstraintMintMintAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY,\n ConstraintMintFreezeAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY,\n ConstraintMintDecimals: ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS,\n ConstraintSpace: ANCHOR_ERROR__CONSTRAINT_SPACE,\n ConstraintAccountIsNone: ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE,\n ConstraintTokenTokenProgram: ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM,\n ConstraintMintTokenProgram: ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM,\n ConstraintAssociatedTokenTokenProgram: ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM,\n ConstraintMintGroupPointerExtension: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION,\n ConstraintMintGroupPointerExtensionAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY,\n ConstraintMintGroupPointerExtensionGroupAddress: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS,\n ConstraintMintGroupMemberPointerExtension: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION,\n ConstraintMintGroupMemberPointerExtensionAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY,\n ConstraintMintGroupMemberPointerExtensionMemberAddress: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS,\n ConstraintMintMetadataPointerExtension: ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION,\n ConstraintMintMetadataPointerExtensionAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY,\n ConstraintMintMetadataPointerExtensionMetadataAddress: ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS,\n ConstraintMintCloseAuthorityExtension: ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION,\n ConstraintMintCloseAuthorityExtensionAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY,\n ConstraintMintPermanentDelegateExtension: ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION,\n ConstraintMintPermanentDelegateExtensionDelegate: ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE,\n ConstraintMintTransferHookExtension: ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION,\n ConstraintMintTransferHookExtensionAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY,\n ConstraintMintTransferHookExtensionProgramId: ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID,\n // Require.\n RequireViolated: ANCHOR_ERROR__REQUIRE_VIOLATED,\n RequireEqViolated: ANCHOR_ERROR__REQUIRE_EQ_VIOLATED,\n RequireKeysEqViolated: ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED,\n RequireNeqViolated: ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED,\n RequireKeysNeqViolated: ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED,\n RequireGtViolated: ANCHOR_ERROR__REQUIRE_GT_VIOLATED,\n RequireGteViolated: ANCHOR_ERROR__REQUIRE_GTE_VIOLATED,\n // Accounts.\n AccountDiscriminatorAlreadySet: ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET,\n AccountDiscriminatorNotFound: ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND,\n AccountDiscriminatorMismatch: ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH,\n AccountDidNotDeserialize: ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE,\n AccountDidNotSerialize: ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE,\n AccountNotEnoughKeys: ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS,\n AccountNotMutable: ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE,\n AccountOwnedByWrongProgram: ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM,\n InvalidProgramId: ANCHOR_ERROR__INVALID_PROGRAM_ID,\n InvalidProgramExecutable: ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE,\n AccountNotSigner: ANCHOR_ERROR__ACCOUNT_NOT_SIGNER,\n AccountNotSystemOwned: ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED,\n AccountNotInitialized: ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED,\n AccountNotProgramData: ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA,\n AccountNotAssociatedTokenAccount: ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT,\n AccountSysvarMismatch: ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH,\n AccountReallocExceedsLimit: ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT,\n AccountDuplicateReallocs: ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS,\n // Miscellaneous\n DeclaredProgramIdMismatch: ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH,\n TryingToInitPayerAsProgramAccount: ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT,\n InvalidNumericConversion: ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION,\n // Used for APIs that shouldn't be used anymore.\n Deprecated: ANCHOR_ERROR__DEPRECATED,\n};\nconst LangErrorMessage = new Map([\n // Instructions.\n [\n LangErrorCode.InstructionMissing,\n \"8 byte instruction identifier not provided\",\n ],\n [\n LangErrorCode.InstructionFallbackNotFound,\n \"Fallback functions are not supported\",\n ],\n [\n LangErrorCode.InstructionDidNotDeserialize,\n \"The program could not deserialize the given instruction\",\n ],\n [\n LangErrorCode.InstructionDidNotSerialize,\n \"The program could not serialize the given instruction\",\n ],\n // Idl instructions.\n [\n LangErrorCode.IdlInstructionStub,\n \"The program was compiled without idl instructions\",\n ],\n [\n LangErrorCode.IdlInstructionInvalidProgram,\n \"The transaction was given an invalid program for the IDL instruction\",\n ],\n [\n LangErrorCode.IdlAccountNotEmpty,\n \"IDL account must be empty in order to resize, try closing first\",\n ],\n // Event instructions.\n [\n LangErrorCode.EventInstructionStub,\n \"The program was compiled without `event-cpi` feature\",\n ],\n // Constraints.\n [LangErrorCode.ConstraintMut, \"A mut constraint was violated\"],\n [LangErrorCode.ConstraintHasOne, \"A has one constraint was violated\"],\n [LangErrorCode.ConstraintSigner, \"A signer constraint was violated\"],\n [LangErrorCode.ConstraintRaw, \"A raw constraint was violated\"],\n [LangErrorCode.ConstraintOwner, \"An owner constraint was violated\"],\n [\n LangErrorCode.ConstraintRentExempt,\n \"A rent exemption constraint was violated\",\n ],\n [LangErrorCode.ConstraintSeeds, \"A seeds constraint was violated\"],\n [LangErrorCode.ConstraintExecutable, \"An executable constraint was violated\"],\n [\n LangErrorCode.ConstraintState,\n \"Deprecated Error, feel free to replace with something else\",\n ],\n [LangErrorCode.ConstraintAssociated, \"An associated constraint was violated\"],\n [\n LangErrorCode.ConstraintAssociatedInit,\n \"An associated init constraint was violated\",\n ],\n [LangErrorCode.ConstraintClose, \"A close constraint was violated\"],\n [LangErrorCode.ConstraintAddress, \"An address constraint was violated\"],\n [LangErrorCode.ConstraintZero, \"Expected zero account discriminant\"],\n [LangErrorCode.ConstraintTokenMint, \"A token mint constraint was violated\"],\n [LangErrorCode.ConstraintTokenOwner, \"A token owner constraint was violated\"],\n [\n LangErrorCode.ConstraintMintMintAuthority,\n \"A mint mint authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintFreezeAuthority,\n \"A mint freeze authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintDecimals,\n \"A mint decimals constraint was violated\",\n ],\n [LangErrorCode.ConstraintSpace, \"A space constraint was violated\"],\n [\n LangErrorCode.ConstraintAccountIsNone,\n \"A required account for the constraint is None\",\n ],\n [\n LangErrorCode.ConstraintTokenTokenProgram,\n \"A token account token program constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintTokenProgram,\n \"A mint token program constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintAssociatedTokenTokenProgram,\n \"An associated token account token program constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupPointerExtension,\n \"A group pointer extension constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupPointerExtensionAuthority,\n \"A group pointer extension authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupPointerExtensionGroupAddress,\n \"A group pointer extension group address constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupMemberPointerExtension,\n \"A group member pointer extension constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupMemberPointerExtensionAuthority,\n \"A group member pointer extension authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupMemberPointerExtensionMemberAddress,\n \"A group member pointer extension group address constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintMetadataPointerExtension,\n \"A metadata pointer extension constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintMetadataPointerExtensionAuthority,\n \"A metadata pointer extension authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintMetadataPointerExtensionMetadataAddress,\n \"A metadata pointer extension metadata address constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintCloseAuthorityExtension,\n \"A close authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintCloseAuthorityExtensionAuthority,\n \"A close authority extension authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintPermanentDelegateExtension,\n \"A permanent delegate extension constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintPermanentDelegateExtensionDelegate,\n \"A permanent delegate extension delegate constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintTransferHookExtension,\n \"A transfer hook extension constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintTransferHookExtensionAuthority,\n \"A transfer hook extension authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintTransferHookExtensionProgramId,\n \"A transfer hook extension transfer hook program id constraint was violated\",\n ],\n // Require.\n [LangErrorCode.RequireViolated, \"A require expression was violated\"],\n [LangErrorCode.RequireEqViolated, \"A require_eq expression was violated\"],\n [\n LangErrorCode.RequireKeysEqViolated,\n \"A require_keys_eq expression was violated\",\n ],\n [LangErrorCode.RequireNeqViolated, \"A require_neq expression was violated\"],\n [\n LangErrorCode.RequireKeysNeqViolated,\n \"A require_keys_neq expression was violated\",\n ],\n [LangErrorCode.RequireGtViolated, \"A require_gt expression was violated\"],\n [LangErrorCode.RequireGteViolated, \"A require_gte expression was violated\"],\n // Accounts.\n [\n LangErrorCode.AccountDiscriminatorAlreadySet,\n \"The account discriminator was already set on this account\",\n ],\n [\n LangErrorCode.AccountDiscriminatorNotFound,\n \"No 8 byte discriminator was found on the account\",\n ],\n [\n LangErrorCode.AccountDiscriminatorMismatch,\n \"8 byte discriminator did not match what was expected\",\n ],\n [LangErrorCode.AccountDidNotDeserialize, \"Failed to deserialize the account\"],\n [LangErrorCode.AccountDidNotSerialize, \"Failed to serialize the account\"],\n [\n LangErrorCode.AccountNotEnoughKeys,\n \"Not enough account keys given to the instruction\",\n ],\n [LangErrorCode.AccountNotMutable, \"The given account is not mutable\"],\n [\n LangErrorCode.AccountOwnedByWrongProgram,\n \"The given account is owned by a different program than expected\",\n ],\n [LangErrorCode.InvalidProgramId, \"Program ID was not as expected\"],\n [LangErrorCode.InvalidProgramExecutable, \"Program account is not executable\"],\n [LangErrorCode.AccountNotSigner, \"The given account did not sign\"],\n [\n LangErrorCode.AccountNotSystemOwned,\n \"The given account is not owned by the system program\",\n ],\n [\n LangErrorCode.AccountNotInitialized,\n \"The program expected this account to be already initialized\",\n ],\n [\n LangErrorCode.AccountNotProgramData,\n \"The given account is not a program data account\",\n ],\n [\n LangErrorCode.AccountNotAssociatedTokenAccount,\n \"The given account is not the associated token account\",\n ],\n [\n LangErrorCode.AccountSysvarMismatch,\n \"The given public key does not match the required sysvar\",\n ],\n [\n LangErrorCode.AccountReallocExceedsLimit,\n \"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit\",\n ],\n [\n LangErrorCode.AccountDuplicateReallocs,\n \"The account was duplicated for more than one reallocation\",\n ],\n // Miscellaneous\n [\n LangErrorCode.DeclaredProgramIdMismatch,\n \"The declared program id does not match the actual program id\",\n ],\n [\n LangErrorCode.TryingToInitPayerAsProgramAccount,\n \"You cannot/should not initialize the payer account as a program account\",\n ],\n [\n LangErrorCode.InvalidNumericConversion,\n \"The program could not perform the numeric conversion, out of range integral type conversion attempted\",\n ],\n // Deprecated\n [\n LangErrorCode.Deprecated,\n \"The API being used is deprecated and should no longer be used\",\n ],\n]);\n\nclass IdlCoder {\n static fieldLayout(field, types = [], genericArgs) {\n const fieldName = field.name;\n switch (field.type) {\n case \"bool\": {\n return borsh.bool(fieldName);\n }\n case \"u8\": {\n return borsh.u8(fieldName);\n }\n case \"i8\": {\n return borsh.i8(fieldName);\n }\n case \"u16\": {\n return borsh.u16(fieldName);\n }\n case \"i16\": {\n return borsh.i16(fieldName);\n }\n case \"u32\": {\n return borsh.u32(fieldName);\n }\n case \"i32\": {\n return borsh.i32(fieldName);\n }\n case \"f32\": {\n return borsh.f32(fieldName);\n }\n case \"u64\": {\n return borsh.u64(fieldName);\n }\n case \"i64\": {\n return borsh.i64(fieldName);\n }\n case \"f64\": {\n return borsh.f64(fieldName);\n }\n case \"u128\": {\n return borsh.u128(fieldName);\n }\n case \"i128\": {\n return borsh.i128(fieldName);\n }\n case \"u256\": {\n return borsh.u256(fieldName);\n }\n case \"i256\": {\n return borsh.i256(fieldName);\n }\n case \"bytes\": {\n return borsh.vecU8(fieldName);\n }\n case \"string\": {\n return borsh.str(fieldName);\n }\n case \"pubkey\": {\n return borsh.publicKey(fieldName);\n }\n default: {\n if (\"option\" in field.type) {\n return borsh.option(IdlCoder.fieldLayout({ type: field.type.option }, types, genericArgs), fieldName);\n }\n if (\"vec\" in field.type) {\n return borsh.vec(IdlCoder.fieldLayout({ type: field.type.vec }, types, genericArgs), fieldName);\n }\n if (\"array\" in field.type) {\n let [type, len] = field.type.array;\n len = IdlCoder.resolveArrayLen(len, genericArgs);\n return borsh.array(IdlCoder.fieldLayout({ type }, types, genericArgs), len, fieldName);\n }\n if (\"defined\" in field.type) {\n if (!types) {\n throw new IdlError(\"User defined types not provided\");\n }\n const definedName = field.type.defined.name;\n const typeDef = types.find((t) => t.name === definedName);\n if (!typeDef) {\n throw new IdlError(`Type not found: ${field.name}`);\n }\n return IdlCoder.typeDefLayout({\n typeDef,\n types,\n genericArgs: genericArgs !== null && genericArgs !== void 0 ? genericArgs : field.type.defined.generics,\n name: fieldName,\n });\n }\n if (\"generic\" in field.type) {\n const genericArg = genericArgs === null || genericArgs === void 0 ? void 0 : genericArgs.at(0);\n if ((genericArg === null || genericArg === void 0 ? void 0 : genericArg.kind) !== \"type\") {\n throw new IdlError(`Invalid generic field: ${field.name}`);\n }\n return IdlCoder.fieldLayout({ ...field, type: genericArg.type }, types);\n }\n throw new IdlError(`Not yet implemented: ${JSON.stringify(field.type)}`);\n }\n }\n }\n /**\n * Get the type layout of the given defined type(struct or enum).\n */\n static typeDefLayout({ typeDef, types, name, genericArgs, }) {\n switch (typeDef.type.kind) {\n case \"struct\": {\n const fieldLayouts = handleDefinedFields(typeDef.type.fields, () => [], (fields) => fields.map((f) => {\n const genArgs = genericArgs\n ? IdlCoder.resolveGenericArgs({\n type: f.type,\n typeDef,\n genericArgs,\n })\n : genericArgs;\n return IdlCoder.fieldLayout(f, types, genArgs);\n }), (fields) => fields.map((f, i) => {\n const genArgs = genericArgs\n ? IdlCoder.resolveGenericArgs({\n type: f,\n typeDef,\n genericArgs,\n })\n : genericArgs;\n return IdlCoder.fieldLayout({ name: i.toString(), type: f }, types, genArgs);\n }));\n return borsh.struct(fieldLayouts, name);\n }\n case \"enum\": {\n const variants = typeDef.type.variants.map((variant) => {\n const fieldLayouts = handleDefinedFields(variant.fields, () => [], (fields) => fields.map((f) => {\n const genArgs = genericArgs\n ? IdlCoder.resolveGenericArgs({\n type: f.type,\n typeDef,\n genericArgs,\n })\n : genericArgs;\n return IdlCoder.fieldLayout(f, types, genArgs);\n }), (fields) => fields.map((f, i) => {\n const genArgs = genericArgs\n ? IdlCoder.resolveGenericArgs({\n type: f,\n typeDef,\n genericArgs,\n })\n : genericArgs;\n return IdlCoder.fieldLayout({ name: i.toString(), type: f }, types, genArgs);\n }));\n return borsh.struct(fieldLayouts, variant.name);\n });\n if (name !== undefined) {\n // Buffer-layout lib requires the name to be null (on construction)\n // when used as a field.\n return borsh.rustEnum(variants).replicate(name);\n }\n return borsh.rustEnum(variants, name);\n }\n case \"type\": {\n return IdlCoder.fieldLayout({ type: typeDef.type.alias, name }, types);\n }\n }\n }\n /**\n * Get the type of the size in bytes. Returns `1` for variable length types.\n */\n static typeSize(ty, idl, genericArgs) {\n var _a;\n switch (ty) {\n case \"bool\":\n return 1;\n case \"u8\":\n return 1;\n case \"i8\":\n return 1;\n case \"i16\":\n return 2;\n case \"u16\":\n return 2;\n case \"u32\":\n return 4;\n case \"i32\":\n return 4;\n case \"f32\":\n return 4;\n case \"u64\":\n return 8;\n case \"i64\":\n return 8;\n case \"f64\":\n return 8;\n case \"u128\":\n return 16;\n case \"i128\":\n return 16;\n case \"u256\":\n return 32;\n case \"i256\":\n return 32;\n case \"bytes\":\n return 1;\n case \"string\":\n return 1;\n case \"pubkey\":\n return 32;\n default:\n if (\"option\" in ty) {\n return 1 + IdlCoder.typeSize(ty.option, idl, genericArgs);\n }\n if (\"coption\" in ty) {\n return 4 + IdlCoder.typeSize(ty.coption, idl, genericArgs);\n }\n if (\"vec\" in ty) {\n return 1;\n }\n if (\"array\" in ty) {\n let [type, len] = ty.array;\n len = IdlCoder.resolveArrayLen(len, genericArgs);\n return IdlCoder.typeSize(type, idl, genericArgs) * len;\n }\n if (\"defined\" in ty) {\n const typeDef = (_a = idl.types) === null || _a === void 0 ? void 0 : _a.find((t) => t.name === ty.defined.name);\n if (!typeDef) {\n throw new IdlError(`Type not found: ${JSON.stringify(ty)}`);\n }\n const typeSize = (type) => {\n const genArgs = genericArgs !== null && genericArgs !== void 0 ? genericArgs : ty.defined.generics;\n const args = genArgs\n ? IdlCoder.resolveGenericArgs({\n type,\n typeDef,\n genericArgs: genArgs,\n })\n : genArgs;\n return IdlCoder.typeSize(type, idl, args);\n };\n switch (typeDef.type.kind) {\n case \"struct\": {\n return handleDefinedFields(typeDef.type.fields, () => [0], (fields) => fields.map((f) => typeSize(f.type)), (fields) => fields.map((f) => typeSize(f))).reduce((acc, size) => acc + size, 0);\n }\n case \"enum\": {\n const variantSizes = typeDef.type.variants.map((variant) => {\n return handleDefinedFields(variant.fields, () => [0], (fields) => fields.map((f) => typeSize(f.type)), (fields) => fields.map((f) => typeSize(f))).reduce((acc, size) => acc + size, 0);\n });\n return Math.max(...variantSizes) + 1;\n }\n case \"type\": {\n return IdlCoder.typeSize(typeDef.type.alias, idl, genericArgs);\n }\n }\n }\n if (\"generic\" in ty) {\n const genericArg = genericArgs === null || genericArgs === void 0 ? void 0 : genericArgs.at(0);\n if ((genericArg === null || genericArg === void 0 ? void 0 : genericArg.kind) !== \"type\") {\n throw new IdlError(`Invalid generic: ${ty.generic}`);\n }\n return IdlCoder.typeSize(genericArg.type, idl, genericArgs);\n }\n throw new Error(`Invalid type ${JSON.stringify(ty)}`);\n }\n }\n /**\n * Resolve the generic array length or return the constant-sized array length.\n */\n static resolveArrayLen(len, genericArgs) {\n if (typeof len === \"number\")\n return len;\n if (genericArgs) {\n const genericLen = genericArgs.find((g) => g.kind === \"const\");\n if ((genericLen === null || genericLen === void 0 ? void 0 : genericLen.kind) === \"const\") {\n len = +genericLen.value;\n }\n }\n if (typeof len !== \"number\") {\n throw new IdlError(\"Generic array length did not resolve\");\n }\n return len;\n }\n /**\n * Recursively resolve generic arguments i.e. replace all generics with the\n * actual type that they hold based on the initial `genericArgs` given.\n */\n static resolveGenericArgs({ type, typeDef, genericArgs, isDefined, }) {\n if (typeof type !== \"object\")\n return null;\n for (const index in typeDef.generics) {\n const defGeneric = typeDef.generics[index];\n if (\"generic\" in type && defGeneric.name === type.generic) {\n return [genericArgs[index]];\n }\n if (\"option\" in type) {\n const args = IdlCoder.resolveGenericArgs({\n type: type.option,\n typeDef,\n genericArgs,\n isDefined,\n });\n if (!args || !isDefined)\n return args;\n if (args[0].kind === \"type\") {\n return [\n {\n kind: \"type\",\n type: { option: args[0].type },\n },\n ];\n }\n }\n if (\"vec\" in type) {\n const args = IdlCoder.resolveGenericArgs({\n type: type.vec,\n typeDef,\n genericArgs,\n isDefined,\n });\n if (!args || !isDefined)\n return args;\n if (args[0].kind === \"type\") {\n return [\n {\n kind: \"type\",\n type: { vec: args[0].type },\n },\n ];\n }\n }\n if (\"array\" in type) {\n const [elTy, len] = type.array;\n const isGenericLen = typeof len === \"object\";\n const args = IdlCoder.resolveGenericArgs({\n type: elTy,\n typeDef,\n genericArgs,\n isDefined,\n });\n if (args) {\n // Has generic type, also check for generic length\n for (const i in typeDef.generics.slice(+index)) {\n const curIndex = +index + +i;\n if (isGenericLen &&\n typeDef.generics[curIndex].name === len.generic) {\n args.push(genericArgs[curIndex]);\n }\n }\n if (!isDefined)\n return args;\n if (args[0].kind === \"type\" && args[1].kind === \"const\") {\n return [\n {\n kind: \"type\",\n type: { array: [args[0].type, +args[1].value] },\n },\n ];\n }\n }\n // Only generic len\n if (isGenericLen && defGeneric.name === len.generic) {\n const arg = genericArgs[index];\n if (!isDefined)\n return [arg];\n return [\n {\n kind: \"type\",\n type: { array: [elTy, +arg.value] },\n },\n ];\n }\n // Non-generic\n return null;\n }\n if (\"defined\" in type) {\n if (!type.defined.generics)\n return null;\n return type.defined.generics\n .flatMap((g) => {\n switch (g.kind) {\n case \"type\":\n return IdlCoder.resolveGenericArgs({\n type: g.type,\n typeDef,\n genericArgs,\n isDefined: true,\n });\n case \"const\":\n return [g];\n }\n })\n .filter((g) => g !== null);\n }\n }\n return null;\n }\n}\n\n/**\n * Encodes and decodes program instructions.\n */\nclass BorshInstructionCoder {\n constructor(idl) {\n this.idl = idl;\n const ixLayouts = idl.instructions.map((ix) => {\n const name = ix.name;\n const fieldLayouts = ix.args.map((arg) => IdlCoder.fieldLayout(arg, idl.types));\n const layout = borsh.struct(fieldLayouts, name);\n return [name, { discriminator: ix.discriminator, layout }];\n });\n this.ixLayouts = new Map(ixLayouts);\n const sighashLayouts = ixLayouts.map(([name, { discriminator, layout }]) => {\n return [bs58$1.encode(discriminator), { name, layout }];\n });\n this.sighashLayouts = new Map(sighashLayouts);\n }\n /**\n * Encodes a program instruction.\n */\n encode(ixName, ix) {\n const buffer = Buffer$1.alloc(1000); // TODO: use a tighter buffer.\n const encoder = this.ixLayouts.get(ixName);\n if (!encoder) {\n throw new Error(`Unknown method: ${ixName}`);\n }\n const len = encoder.layout.encode(ix, buffer);\n const data = buffer.slice(0, len);\n return Buffer$1.concat([Buffer$1.from(encoder.discriminator), data]);\n }\n /**\n * Decodes a program instruction.\n */\n decode(ix, encoding = \"hex\") {\n if (typeof ix === \"string\") {\n ix = encoding === \"hex\" ? Buffer$1.from(ix, \"hex\") : bs58$1.decode(ix);\n }\n const disc = ix.slice(0, DISCRIMINATOR_SIZE);\n const data = ix.slice(DISCRIMINATOR_SIZE);\n const decoder = this.sighashLayouts.get(bs58$1.encode(disc));\n if (!decoder) {\n return null;\n }\n return {\n name: decoder.name,\n data: decoder.layout.decode(data),\n };\n }\n /**\n * Returns a formatted table of all the fields in the given instruction data.\n */\n format(ix, accountMetas) {\n return InstructionFormatter.format(ix, accountMetas, this.idl);\n }\n}\nclass InstructionFormatter {\n static format(ix, accountMetas, idl) {\n const idlIx = idl.instructions.find((i) => ix.name === i.name);\n if (!idlIx) {\n console.error(\"Invalid instruction given\");\n return null;\n }\n const args = idlIx.args.map((idlField) => {\n return {\n name: idlField.name,\n type: InstructionFormatter.formatIdlType(idlField.type),\n data: InstructionFormatter.formatIdlData(idlField, ix.data[idlField.name], idl.types),\n };\n });\n const flatIdlAccounts = InstructionFormatter.flattenIdlAccounts(idlIx.accounts);\n const accounts = accountMetas.map((meta, idx) => {\n if (idx < flatIdlAccounts.length) {\n return {\n name: flatIdlAccounts[idx].name,\n ...meta,\n };\n }\n // \"Remaining accounts\" are unnamed in Anchor.\n else {\n return {\n name: undefined,\n ...meta,\n };\n }\n });\n return {\n args,\n accounts,\n };\n }\n static formatIdlType(idlType) {\n if (typeof idlType === \"string\") {\n return idlType;\n }\n if (\"option\" in idlType) {\n return `Option<${this.formatIdlType(idlType.option)}>`;\n }\n if (\"coption\" in idlType) {\n return `COption<${this.formatIdlType(idlType.coption)}>`;\n }\n if (\"vec\" in idlType) {\n return `Vec<${this.formatIdlType(idlType.vec)}>`;\n }\n if (\"array\" in idlType) {\n return `Array<${idlType.array[0]}; ${idlType.array[1]}>`;\n }\n if (\"defined\" in idlType) {\n const name = idlType.defined.name;\n if (idlType.defined.generics) {\n const generics = idlType.defined.generics\n .map((g) => {\n switch (g.kind) {\n case \"type\":\n return InstructionFormatter.formatIdlType(g.type);\n case \"const\":\n return g.value;\n }\n })\n .join(\", \");\n return `${name}<${generics}>`;\n }\n return name;\n }\n throw new Error(`Unknown IDL type: ${idlType}`);\n }\n static formatIdlData(idlField, data, types) {\n if (typeof idlField.type === \"string\") {\n return data.toString();\n }\n if (\"vec\" in idlField.type) {\n return (\"[\" +\n data\n .map((d) => this.formatIdlData({ name: \"\", type: idlField.type.vec }, d, types))\n .join(\", \") +\n \"]\");\n }\n if (\"option\" in idlField.type) {\n return data === null\n ? \"null\"\n : this.formatIdlData({ name: \"\", type: idlField.type.option }, data, types);\n }\n if (\"defined\" in idlField.type) {\n if (!types) {\n throw new Error(\"User defined types not provided\");\n }\n const definedName = idlField.type.defined.name;\n const typeDef = types.find((t) => t.name === definedName);\n if (!typeDef) {\n throw new Error(`Type not found: ${definedName}`);\n }\n return InstructionFormatter.formatIdlDataDefined(typeDef, data, types);\n }\n return \"unknown\";\n }\n static formatIdlDataDefined(typeDef, data, types) {\n switch (typeDef.type.kind) {\n case \"struct\": {\n return (\"{ \" +\n handleDefinedFields(typeDef.type.fields, () => \"\", (fields) => {\n return Object.entries(data)\n .map(([key, val]) => {\n const field = fields.find((f) => f.name === key);\n if (!field) {\n throw new Error(`Field not found: ${key}`);\n }\n return (key +\n \": \" +\n InstructionFormatter.formatIdlData(field, val, types));\n })\n .join(\", \");\n }, (fields) => {\n return Object.entries(data)\n .map(([key, val]) => {\n return (key +\n \": \" +\n InstructionFormatter.formatIdlData({ name: \"\", type: fields[key] }, val, types));\n })\n .join(\", \");\n }) +\n \" }\");\n }\n case \"enum\": {\n const variantName = Object.keys(data)[0];\n const variant = typeDef.type.variants.find((v) => v.name === variantName);\n if (!variant) {\n throw new Error(`Unable to find variant: ${variantName}`);\n }\n const enumValue = data[variantName];\n return handleDefinedFields(variant.fields, () => variantName, (fields) => {\n const namedFields = Object.keys(enumValue)\n .map((f) => {\n const fieldData = enumValue[f];\n const idlField = fields.find((v) => v.name === f);\n if (!idlField) {\n throw new Error(`Field not found: ${f}`);\n }\n return (f +\n \": \" +\n InstructionFormatter.formatIdlData(idlField, fieldData, types));\n })\n .join(\", \");\n return `${variantName} { ${namedFields} }`;\n }, (fields) => {\n const tupleFields = Object.entries(enumValue)\n .map(([key, val]) => {\n return (key +\n \": \" +\n InstructionFormatter.formatIdlData({ name: \"\", type: fields[key] }, val, types));\n })\n .join(\", \");\n return `${variantName} { ${tupleFields} }`;\n });\n }\n case \"type\": {\n return InstructionFormatter.formatIdlType(typeDef.type.alias);\n }\n }\n }\n static flattenIdlAccounts(accounts, prefix) {\n return accounts\n .map((account) => {\n const accName = sentenceCase(account.name);\n if (account.hasOwnProperty(\"accounts\")) {\n const newPrefix = prefix ? `${prefix} > ${accName}` : accName;\n return InstructionFormatter.flattenIdlAccounts(account.accounts, newPrefix);\n }\n else {\n return {\n ...account,\n name: prefix ? `${prefix} > ${accName}` : accName,\n };\n }\n })\n .flat();\n }\n}\nfunction sentenceCase(field) {\n const result = field.replace(/([A-Z])/g, \" $1\");\n return result.charAt(0).toUpperCase() + result.slice(1);\n}\n\n/**\n * Number of bytes in anchor discriminators\n */\nconst DISCRIMINATOR_SIZE = 8;\n\n/**\n * Encodes and decodes account objects.\n */\nclass BorshAccountsCoder {\n constructor(idl) {\n this.idl = idl;\n if (!idl.accounts) {\n this.accountLayouts = new Map();\n return;\n }\n const types = idl.types;\n if (!types) {\n throw new Error(\"Accounts require `idl.types`\");\n }\n const layouts = idl.accounts.map((acc) => {\n const typeDef = types.find((ty) => ty.name === acc.name);\n if (!typeDef) {\n throw new Error(`Account not found: ${acc.name}`);\n }\n return [acc.name, IdlCoder.typeDefLayout({ typeDef, types })];\n });\n this.accountLayouts = new Map(layouts);\n }\n async encode(accountName, account) {\n const buffer = Buffer$1.alloc(1000); // TODO: use a tighter buffer.\n const layout = this.accountLayouts.get(accountName);\n if (!layout) {\n throw new Error(`Unknown account: ${accountName}`);\n }\n const len = layout.encode(account, buffer);\n const accountData = buffer.slice(0, len);\n const discriminator = this.accountDiscriminator(accountName);\n return Buffer$1.concat([discriminator, accountData]);\n }\n decode(accountName, data) {\n // Assert the account discriminator is correct.\n const discriminator = this.accountDiscriminator(accountName);\n if (discriminator.compare(data.slice(0, DISCRIMINATOR_SIZE))) {\n throw new Error(\"Invalid account discriminator\");\n }\n return this.decodeUnchecked(accountName, data);\n }\n decodeAny(data) {\n const discriminator = data.slice(0, DISCRIMINATOR_SIZE);\n const accountName = Array.from(this.accountLayouts.keys()).find((key) => this.accountDiscriminator(key).equals(discriminator));\n if (!accountName) {\n throw new Error(\"Account not found\");\n }\n return this.decodeUnchecked(accountName, data);\n }\n decodeUnchecked(accountName, acc) {\n // Chop off the discriminator before decoding.\n const data = acc.subarray(DISCRIMINATOR_SIZE);\n const layout = this.accountLayouts.get(accountName);\n if (!layout) {\n throw new Error(`Unknown account: ${accountName}`);\n }\n return layout.decode(data);\n }\n memcmp(accountName, appendData) {\n const discriminator = this.accountDiscriminator(accountName);\n return {\n offset: 0,\n bytes: bs58$1.encode(appendData ? Buffer$1.concat([discriminator, appendData]) : discriminator),\n };\n }\n size(accountName) {\n return (DISCRIMINATOR_SIZE +\n IdlCoder.typeSize({ defined: { name: accountName } }, this.idl));\n }\n /**\n * Calculates and returns a unique 8 byte discriminator prepended to all anchor accounts.\n *\n * @param name The name of the account to calculate the discriminator.\n */\n accountDiscriminator(name) {\n var _a;\n const account = (_a = this.idl.accounts) === null || _a === void 0 ? void 0 : _a.find((acc) => acc.name === name);\n if (!account) {\n throw new Error(`Account not found: ${name}`);\n }\n return Buffer$1.from(account.discriminator);\n }\n}\n\nclass BorshEventCoder {\n constructor(idl) {\n var _a;\n if (!idl.events) {\n this.layouts = new Map();\n return;\n }\n const types = idl.types;\n if (!types) {\n throw new Error(\"Events require `idl.types`\");\n }\n const layouts = idl.events.map((ev) => {\n const typeDef = types.find((ty) => ty.name === ev.name);\n if (!typeDef) {\n throw new Error(`Event not found: ${ev.name}`);\n }\n return [ev.name, IdlCoder.typeDefLayout({ typeDef, types })];\n });\n this.layouts = new Map(layouts);\n this.discriminators = new Map(((_a = idl.events) !== null && _a !== void 0 ? _a : []).map((ev) => [\n encode(Buffer$1.from(ev.discriminator)),\n ev.name,\n ]));\n }\n decode(log) {\n let logArr;\n // This will throw if log length is not a multiple of 4.\n try {\n logArr = decode(log);\n }\n catch (e) {\n return null;\n }\n const disc = encode(logArr.slice(0, 8));\n // Only deserialize if the discriminator implies a proper event.\n const eventName = this.discriminators.get(disc);\n if (!eventName) {\n return null;\n }\n const layout = this.layouts.get(eventName);\n if (!layout) {\n throw new Error(`Unknown event: ${eventName}`);\n }\n const data = layout.decode(logArr.slice(8));\n return { data, name: eventName };\n }\n}\n\n/**\n * Encodes and decodes user-defined types.\n */\nclass BorshTypesCoder {\n constructor(idl) {\n const types = idl.types;\n if (!types) {\n this.typeLayouts = new Map();\n return;\n }\n const layouts = types\n .filter((ty) => !ty.generics)\n .map((ty) => [\n ty.name,\n IdlCoder.typeDefLayout({ typeDef: ty, types }),\n ]);\n this.typeLayouts = new Map(layouts);\n }\n encode(name, type) {\n const buffer = Buffer$1.alloc(1000); // TODO: use a tighter buffer.\n const layout = this.typeLayouts.get(name);\n if (!layout) {\n throw new Error(`Unknown type: ${name}`);\n }\n const len = layout.encode(type, buffer);\n return buffer.slice(0, len);\n }\n decode(name, data) {\n const layout = this.typeLayouts.get(name);\n if (!layout) {\n throw new Error(`Unknown type: ${name}`);\n }\n return layout.decode(data);\n }\n}\n\n/**\n * BorshCoder is the default Coder for Anchor programs implementing the\n * borsh based serialization interface.\n */\nclass BorshCoder {\n constructor(idl) {\n this.instruction = new BorshInstructionCoder(idl);\n this.accounts = new BorshAccountsCoder(idl);\n this.events = new BorshEventCoder(idl);\n this.types = new BorshTypesCoder(idl);\n }\n}\n\n/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n\n /**\n * Decode from a Buffer into an JavaScript value.\n *\n * @param {Buffer} b - the buffer from which encoded data is read.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {(Number|Array|Object)} - the value of the decoded data.\n *\n * @abstract\n */\n decode(b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Encode a JavaScript value into a Buffer.\n *\n * @param {(Number|Array|Object)} src - the value to be encoded into\n * the buffer. The type accepted depends on the (sub-)type of {@link\n * Layout}.\n *\n * @param {Buffer} b - the buffer into which encoded data will be\n * written.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {Number} - the number of bytes encoded, including the\n * space skipped for internal padding, but excluding data such as\n * {@link Sequence#count|lengths} when stored {@link\n * ExternalLayout|externally}. This is the adjustment to `offset`\n * producing the offset where data for the next layout would be\n * written.\n *\n * @abstract\n */\n encode(src, b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Buffer} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nvar Layout_2 = Layout;\n\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\n\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\n\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n\n if (undefined === offset) {\n offset = 0;\n } else if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n\n super(layout.span, property || layout.property);\n\n /** The subordinated layout. */\n this.layout = layout;\n\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Buffer\n * being accessed. */\n this.offset = offset;\n }\n\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.decode(b, offset + this.offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\n\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super( span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\nconst V2E32 = Math.pow(2, 32);\n\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return {hi32, lo32};\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n } else if (0 <= offset) {\n offset += fd.span;\n }\n }\n }\n}\n\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\n\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n\n super(property || layout.property || 'variant');\n\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\n\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n const upv = ((discr instanceof UInt)\n || (discr instanceof UIntBE));\n if (upv) {\n discr = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discr = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && upv) {\n span += discr.layout.span;\n }\n }\n super(span, property);\n\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discr;\n\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = upv;\n\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisified rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (src.hasOwnProperty(this.discriminator.property)) {\n if (this.defaultLayout\n && src.hasOwnProperty(this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || src.hasOwnProperty(vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (src.hasOwnProperty(vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n let clo = this.registry[discr];\n if (undefined === clo) {\n let contentOffset = 0;\n clo = this.defaultLayout;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[clo.property] = this.defaultLayout.decode(b, offset + contentOffset);\n } else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n return contentOffset + clo.encode(src[clo.property], b,\n offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Buffer)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Buffer}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset) {\n let variant = vb;\n if (Buffer.isBuffer(vb)) {\n if (undefined === offset) {\n offset = 0;\n }\n variant = this.discriminator.decode(vb, offset);\n }\n return this.registry[variant];\n }\n}\n\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n return contentOffset + this.layout.getSpan(b, offset + contentOffset);\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!src.hasOwnProperty(this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n }\n}\n/* eslint-enable no-extend-native */\n\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Buffer.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob$1 extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return b.slice(offset, offset + span);\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(Buffer.isBuffer(src)\n && (span === src.length))) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Buffer as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n b.write(src.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\n\n/** Factory for {@link OffsetLayout}. */\nvar offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nvar u8 = (property => new UInt(1, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nvar u32 = (property => new UInt(4, property));\n\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nvar nu64 = (property => new NearUInt64(property));\n\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nvar ns64 = (property => new NearInt64(property));\n\n/** Factory for {@link Structure} values. */\nvar struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n\n/** Factory for {@link Union} values. */\nvar union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n\n/** Factory for {@link Blob} values. */\nvar blob = ((length, property) => new Blob$1(length, property));\n\nclass SystemInstructionCoder {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n constructor(_) { }\n encode(ixName, ix) {\n switch (ixName) {\n case \"createAccount\": {\n return encodeCreateAccount(ix);\n }\n case \"assign\": {\n return encodeAssign(ix);\n }\n case \"transfer\": {\n return encodeTransfer(ix);\n }\n case \"createAccountWithSeed\": {\n return encodeCreateAccountWithSeed(ix);\n }\n case \"advanceNonceAccount\": {\n return encodeAdvanceNonceAccount(ix);\n }\n case \"withdrawNonceAccount\": {\n return encodeWithdrawNonceAccount(ix);\n }\n case \"initializeNonceAccount\": {\n return encodeInitializeNonceAccount(ix);\n }\n case \"authorizeNonceAccount\": {\n return encodeAuthorizeNonceAccount(ix);\n }\n case \"allocate\": {\n return encodeAllocate(ix);\n }\n case \"allocateWithSeed\": {\n return encodeAllocateWithSeed(ix);\n }\n case \"assignWithSeed\": {\n return encodeAssignWithSeed(ix);\n }\n case \"transferWithSeed\": {\n return encodeTransferWithSeed(ix);\n }\n default: {\n throw new Error(`Invalid instruction: ${ixName}`);\n }\n }\n }\n encodeState(_ixName, _ix) {\n throw new Error(\"System does not have state\");\n }\n}\nclass RustStringLayout extends Layout_2 {\n constructor(property) {\n super(-1, property);\n this.property = property;\n this.layout = struct([\n u32(\"length\"),\n u32(\"lengthPadding\"),\n blob(offset(u32(), -8), \"chars\"),\n ], this.property);\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.layout.span;\n }\n const data = {\n chars: Buffer.from(src, \"utf8\"),\n };\n return this.layout.encode(data, b, offset);\n }\n decode(b, offset = 0) {\n const data = this.layout.decode(b, offset);\n return data[\"chars\"].toString();\n }\n getSpan(b, offset = 0) {\n return (u32().span +\n u32().span +\n new BN(new Uint8Array(b).slice(offset, offset + 4), 10, \"le\").toNumber());\n }\n}\nfunction rustStringLayout(property) {\n return new RustStringLayout(property);\n}\nfunction publicKey$2(property) {\n return blob(32, property);\n}\nfunction encodeCreateAccount({ lamports, space, owner }) {\n return encodeData({\n createAccount: { lamports, space, owner: owner.toBuffer() },\n });\n}\nfunction encodeAssign({ owner }) {\n return encodeData({\n assign: { owner: owner.toBuffer() },\n });\n}\nfunction encodeTransfer({ lamports }) {\n return encodeData({\n transfer: { lamports },\n });\n}\nfunction encodeCreateAccountWithSeed({ base, seed, lamports, space, owner, }) {\n return encodeData({\n createAccountWithSeed: {\n base: base.toBuffer(),\n seed,\n lamports,\n space,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(3).span + seed.length);\n}\nfunction encodeInitializeNonceAccount({ authorized }) {\n return encodeData({\n initializeNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeAdvanceNonceAccount({ authorized }) {\n return encodeData({\n advanceNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeWithdrawNonceAccount({ lamports }) {\n return encodeData({\n withdrawNonceAccount: { lamports },\n });\n}\nfunction encodeAuthorizeNonceAccount({ authorized }) {\n return encodeData({\n authorizeNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeAllocate({ space }) {\n return encodeData({\n allocate: { space },\n });\n}\nfunction encodeAllocateWithSeed({ base, seed, space, owner }) {\n return encodeData({\n allocateWithSeed: {\n base: base.toBuffer(),\n seed,\n space,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(9).span + seed.length);\n}\nfunction encodeAssignWithSeed({ base, seed, owner }) {\n return encodeData({\n assignWithSeed: {\n base: base.toBuffer(),\n seed,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(10).span + seed.length);\n}\nfunction encodeTransferWithSeed({ lamports, seed, owner }) {\n return encodeData({\n transferWithSeed: {\n lamports,\n seed,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(11).span + seed.length);\n}\nconst LAYOUT = union(u32(\"instruction\"));\nLAYOUT.addVariant(0, struct([\n ns64(\"lamports\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"createAccount\");\nLAYOUT.addVariant(1, struct([publicKey$2(\"owner\")]), \"assign\");\nLAYOUT.addVariant(2, struct([ns64(\"lamports\")]), \"transfer\");\nLAYOUT.addVariant(3, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n ns64(\"lamports\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"createAccountWithSeed\");\nLAYOUT.addVariant(4, struct([publicKey$2(\"authorized\")]), \"advanceNonceAccount\");\nLAYOUT.addVariant(5, struct([ns64(\"lamports\")]), \"withdrawNonceAccount\");\nLAYOUT.addVariant(6, struct([publicKey$2(\"authorized\")]), \"initializeNonceAccount\");\nLAYOUT.addVariant(7, struct([publicKey$2(\"authorized\")]), \"authorizeNonceAccount\");\nLAYOUT.addVariant(8, struct([ns64(\"space\")]), \"allocate\");\nLAYOUT.addVariant(9, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"allocateWithSeed\");\nLAYOUT.addVariant(10, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n publicKey$2(\"owner\"),\n]), \"assignWithSeed\");\nLAYOUT.addVariant(11, struct([\n ns64(\"lamports\"),\n rustStringLayout(\"seed\"),\n publicKey$2(\"owner\"),\n]), \"transferWithSeed\");\nfunction encodeData(instruction, maxSpan) {\n const b = Buffer.alloc(maxSpan !== null && maxSpan !== void 0 ? maxSpan : instructionMaxSpan);\n const span = LAYOUT.encode(instruction, b);\n if (maxSpan === undefined) {\n return b.slice(0, span);\n }\n return b;\n}\nconst instructionMaxSpan = Math.max(...Object.values(LAYOUT.registry).map((r) => r.span));\n\nclass SystemAccountsCoder {\n constructor(idl) {\n this.idl = idl;\n }\n async encode(accountName, account) {\n switch (accountName) {\n case \"nonce\": {\n const buffer = Buffer.alloc(NONCE_ACCOUNT_LENGTH);\n const len = NONCE_ACCOUNT_LAYOUT.encode(account, buffer);\n return buffer.slice(0, len);\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n decode(accountName, ix) {\n return this.decodeUnchecked(accountName, ix);\n }\n decodeUnchecked(accountName, ix) {\n switch (accountName) {\n case \"nonce\": {\n return decodeNonceAccount(ix);\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n // TODO: this won't use the appendData.\n memcmp(accountName, _appendData) {\n switch (accountName) {\n case \"nonce\": {\n return {\n dataSize: NONCE_ACCOUNT_LENGTH,\n };\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n size(accountName) {\n return IdlCoder.typeSize({ defined: { name: accountName } }, this.idl);\n }\n}\nfunction decodeNonceAccount(ix) {\n return NONCE_ACCOUNT_LAYOUT.decode(ix);\n}\nclass WrappedLayout$1 extends Layout_2 {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nfunction publicKey$1(property) {\n return new WrappedLayout$1(blob(32), (b) => new PublicKey(b), (key) => key.toBuffer(), property);\n}\nconst NONCE_ACCOUNT_LAYOUT = struct([\n u32(\"version\"),\n u32(\"state\"),\n publicKey$1(\"authorizedPubkey\"),\n publicKey$1(\"nonce\"),\n struct([nu64(\"lamportsPerSignature\")], \"feeCalculator\"),\n]);\n\nclass SystemEventsCoder {\n constructor(_idl) { }\n decode(_log) {\n throw new Error(\"System program does not have events\");\n }\n}\n\nclass SystemTypesCoder {\n constructor(_idl) { }\n encode(_name, _type) {\n throw new Error(\"System does not have user-defined types\");\n }\n decode(_name, _typeData) {\n throw new Error(\"System does not have user-defined types\");\n }\n}\n\n/**\n * Coder for the System program.\n */\nclass SystemCoder {\n constructor(idl) {\n this.instruction = new SystemInstructionCoder(idl);\n this.accounts = new SystemAccountsCoder(idl);\n this.events = new SystemEventsCoder(idl);\n this.types = new SystemTypesCoder(idl);\n }\n}\n\nfunction hash(data) {\n return new TextDecoder().decode(sha256$1(data));\n}\n\nvar sha256 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hash: hash\n});\n\n// Sync version of web3.PublicKey.createWithSeed.\nfunction createWithSeedSync(fromPublicKey, seed, programId) {\n const buffer = Buffer$1.concat([\n fromPublicKey.toBuffer(),\n Buffer$1.from(seed),\n programId.toBuffer(),\n ]);\n return new PublicKey(sha256$1(buffer));\n}\n\nvar pubkey = /*#__PURE__*/Object.freeze({\n __proto__: null,\n createWithSeedSync: createWithSeedSync\n});\n\nconst TOKEN_PROGRAM_ID = new PublicKey(\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\");\nconst ASSOCIATED_PROGRAM_ID = new PublicKey(\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\");\nfunction associatedAddress({ mint, owner, }) {\n return PublicKey.findProgramAddressSync([owner.toBuffer(), TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], ASSOCIATED_PROGRAM_ID)[0];\n}\n\nvar token = /*#__PURE__*/Object.freeze({\n __proto__: null,\n TOKEN_PROGRAM_ID: TOKEN_PROGRAM_ID,\n ASSOCIATED_PROGRAM_ID: ASSOCIATED_PROGRAM_ID,\n associatedAddress: associatedAddress\n});\n\nvar browserPonyfill = {exports: {}};\n\n(function (module, exports) {\nvar global = typeof self !== 'undefined' ? self : commonjsGlobal;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException;\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\n((function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n}))({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch; // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch; // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers;\nexports.Request = ctx.Request;\nexports.Response = ctx.Response;\nmodule.exports = exports;\n}(browserPonyfill, browserPonyfill.exports));\n\nvar fetch = /*@__PURE__*/getDefaultExportFromCjs(browserPonyfill.exports);\n\n/**\n * Returns a verified build from the anchor registry. null if no such\n * verified build exists, e.g., if the program has been upgraded since the\n * last verified build.\n */\nasync function verifiedBuild(connection, programId, limit = 5) {\n const url = `https://api.apr.dev/api/v0/program/${programId.toString()}/latest?limit=${limit}`;\n const [programData, latestBuildsResp] = await Promise.all([\n fetchData(connection, programId),\n fetch(url),\n ]);\n // Filter out all non successful builds.\n const latestBuilds = (await latestBuildsResp.json()).filter((b) => !b.aborted && b.state === \"Built\" && b.verified === \"Verified\");\n if (latestBuilds.length === 0) {\n return null;\n }\n // Get the latest build.\n const build = latestBuilds[0];\n // Has the program been upgraded since the last build?\n if (programData.slot.toNumber() !== build.verified_slot) {\n return null;\n }\n // Success.\n return build;\n}\n/**\n * Returns the program data account for this program, containing the\n * metadata for this program, e.g., the upgrade authority.\n */\nasync function fetchData(connection, programId) {\n const accountInfo = await connection.getAccountInfo(programId);\n if (accountInfo === null) {\n throw new Error(\"program account not found\");\n }\n const { program } = decodeUpgradeableLoaderState(accountInfo.data);\n const programdataAccountInfo = await connection.getAccountInfo(program.programdataAddress);\n if (programdataAccountInfo === null) {\n throw new Error(\"program data account not found\");\n }\n const { programData } = decodeUpgradeableLoaderState(programdataAccountInfo.data);\n return programData;\n}\nconst UPGRADEABLE_LOADER_STATE_LAYOUT = borsh.rustEnum([\n borsh.struct([], \"uninitialized\"),\n borsh.struct([borsh.option(borsh.publicKey(), \"authorityAddress\")], \"buffer\"),\n borsh.struct([borsh.publicKey(\"programdataAddress\")], \"program\"),\n borsh.struct([\n borsh.u64(\"slot\"),\n borsh.option(borsh.publicKey(), \"upgradeAuthorityAddress\"),\n ], \"programData\"),\n], undefined, borsh.u32());\nfunction decodeUpgradeableLoaderState(data) {\n return UPGRADEABLE_LOADER_STATE_LAYOUT.decode(data);\n}\n\nvar registry = /*#__PURE__*/Object.freeze({\n __proto__: null,\n verifiedBuild: verifiedBuild,\n fetchData: fetchData,\n decodeUpgradeableLoaderState: decodeUpgradeableLoaderState\n});\n\nvar index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n sha256: sha256,\n rpc: rpc,\n publicKey: pubkey,\n bytes: index$1,\n token: token,\n features: features,\n registry: registry\n});\n\nfunction splitArgsAndCtx(idlIx, args) {\n var _a, _b;\n let options = {};\n const inputLen = idlIx.args ? idlIx.args.length : 0;\n if (args.length > inputLen) {\n if (args.length !== inputLen + 1) {\n throw new Error(`provided too many arguments ${args} to instruction ${idlIx === null || idlIx === void 0 ? void 0 : idlIx.name} expecting: ${(_b = (_a = idlIx.args) === null || _a === void 0 ? void 0 : _a.map((a) => a.name)) !== null && _b !== void 0 ? _b : []}`);\n }\n options = args.pop();\n }\n return [args, options];\n}\n\nclass InstructionNamespaceFactory {\n static build(idlIx, encodeFn, programId) {\n if (idlIx.name === \"_inner\") {\n throw new IdlError(\"the _inner name is reserved\");\n }\n const ix = (...args) => {\n const [ixArgs, ctx] = splitArgsAndCtx(idlIx, [...args]);\n validateAccounts(idlIx.accounts, ctx.accounts);\n validateInstruction(idlIx, ...args);\n const keys = ix.accounts(ctx.accounts);\n if (ctx.remainingAccounts !== undefined) {\n keys.push(...ctx.remainingAccounts);\n }\n if (isSet(\"debug-logs\")) {\n console.log(\"Outgoing account metas:\", keys);\n }\n return new TransactionInstruction({\n keys,\n programId,\n data: encodeFn(idlIx.name, toInstruction(idlIx, ...ixArgs)),\n });\n };\n // Utility fn for ordering the accounts for this instruction.\n ix[\"accounts\"] = (accs) => {\n return InstructionNamespaceFactory.accountsArray(accs, idlIx.accounts, programId, idlIx.name);\n };\n return ix;\n }\n static accountsArray(ctx, accounts, programId, ixName) {\n if (!ctx) {\n return [];\n }\n return accounts\n .map((acc) => {\n if (isCompositeAccounts(acc)) {\n const rpcAccs = ctx[acc.name];\n return InstructionNamespaceFactory.accountsArray(rpcAccs, acc.accounts, programId, ixName).flat();\n }\n let pubkey;\n try {\n pubkey = translateAddress(ctx[acc.name]);\n }\n catch (err) {\n throw new Error(`Wrong input type for account \"${acc.name}\" in the instruction accounts object${ixName !== undefined ? ' for instruction \"' + ixName + '\"' : \"\"}. Expected PublicKey or string.`);\n }\n const isOptional = acc.optional && pubkey.equals(programId);\n const isWritable = Boolean(acc.writable && !isOptional);\n const isSigner = Boolean(acc.signer && !isOptional);\n return {\n pubkey,\n isWritable,\n isSigner,\n };\n })\n .flat();\n }\n}\n// Throws error if any argument required for the `ix` is not given.\nfunction validateInstruction(ix, ...args) {\n // todo\n}\n\nclass TransactionFactory {\n static build(idlIx, ixFn) {\n const txFn = (...args) => {\n var _a, _b, _c;\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n const tx = new Transaction();\n if (ctx.preInstructions && ctx.instructions) {\n throw new Error(\"instructions is deprecated, use preInstructions\");\n }\n (_a = ctx.preInstructions) === null || _a === void 0 ? void 0 : _a.forEach((ix) => tx.add(ix));\n (_b = ctx.instructions) === null || _b === void 0 ? void 0 : _b.forEach((ix) => tx.add(ix));\n tx.add(ixFn(...args));\n (_c = ctx.postInstructions) === null || _c === void 0 ? void 0 : _c.forEach((ix) => tx.add(ix));\n return tx;\n };\n return txFn;\n }\n}\n\nclass RpcFactory {\n static build(idlIx, txFn, idlErrors, provider) {\n const rpc = async (...args) => {\n var _a;\n const tx = txFn(...args);\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n if (provider.sendAndConfirm === undefined) {\n throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");\n }\n try {\n return await provider.sendAndConfirm(tx, (_a = ctx.signers) !== null && _a !== void 0 ? _a : [], ctx.options);\n }\n catch (err) {\n throw translateError(err, idlErrors);\n }\n };\n return rpc;\n }\n}\n\nclass AccountFactory {\n static build(idl, coder, programId, provider) {\n var _a;\n return ((_a = idl.accounts) !== null && _a !== void 0 ? _a : []).reduce((accountFns, acc) => {\n accountFns[acc.name] = new AccountClient(idl, acc, programId, provider, coder);\n return accountFns;\n }, {});\n }\n}\nclass AccountClient {\n /**\n * Returns the number of bytes in this account.\n */\n get size() {\n return this._size;\n }\n /**\n * Returns the program ID owning all accounts.\n */\n get programId() {\n return this._programId;\n }\n /**\n * Returns the client's wallet and network provider.\n */\n get provider() {\n return this._provider;\n }\n /**\n * Returns the coder.\n */\n get coder() {\n return this._coder;\n }\n constructor(idl, idlAccount, programId, provider, coder) {\n this._idlAccount = idlAccount;\n this._programId = programId;\n this._provider = provider !== null && provider !== void 0 ? provider : getProvider();\n this._coder = coder !== null && coder !== void 0 ? coder : new BorshCoder(idl);\n this._size = this._coder.accounts.size(idlAccount.name);\n }\n /**\n * Returns a deserialized account, returning null if it doesn't exist.\n *\n * @param address The address of the account to fetch.\n */\n async fetchNullable(address, commitment) {\n const { data } = await this.fetchNullableAndContext(address, commitment);\n return data;\n }\n /**\n * Returns a deserialized account along with the associated rpc response context, returning null if it doesn't exist.\n *\n * @param address The address of the account to fetch.\n */\n async fetchNullableAndContext(address, commitment) {\n const accountInfo = await this.getAccountInfoAndContext(address, commitment);\n const { value, context } = accountInfo;\n return {\n data: value && value.data.length !== 0\n ? this._coder.accounts.decode(this._idlAccount.name, value.data)\n : null,\n context,\n };\n }\n /**\n * Returns a deserialized account.\n *\n * @param address The address of the account to fetch.\n */\n async fetch(address, commitment) {\n const { data } = await this.fetchNullableAndContext(address, commitment);\n if (data === null) {\n throw new Error(`Account does not exist or has no data ${address.toString()}`);\n }\n return data;\n }\n /**\n * Returns a deserialized account along with the associated rpc response context.\n *\n * @param address The address of the account to fetch.\n */\n async fetchAndContext(address, commitment) {\n const { data, context } = await this.fetchNullableAndContext(address, commitment);\n if (data === null) {\n throw new Error(`Account does not exist ${address.toString()}`);\n }\n return { data, context };\n }\n /**\n * Returns multiple deserialized accounts.\n * Accounts not found or with wrong discriminator are returned as null.\n *\n * @param addresses The addresses of the accounts to fetch.\n */\n async fetchMultiple(addresses, commitment) {\n const accounts = await this.fetchMultipleAndContext(addresses, commitment);\n return accounts.map((account) => (account ? account.data : null));\n }\n /**\n * Returns multiple deserialized accounts.\n * Accounts not found or with wrong discriminator are returned as null.\n *\n * @param addresses The addresses of the accounts to fetch.\n */\n async fetchMultipleAndContext(addresses, commitment) {\n const accounts = await getMultipleAccountsAndContext(this._provider.connection, addresses.map((address) => translateAddress(address)), commitment);\n // Decode accounts where discriminator is correct, null otherwise\n return accounts.map((result) => {\n if (result == null) {\n return null;\n }\n const { account, context } = result;\n return {\n data: this._coder.accounts.decode(this._idlAccount.name, account.data),\n context,\n };\n });\n }\n /**\n * Returns all instances of this account type for the program.\n *\n * @param filters User-provided filters to narrow the results from `connection.getProgramAccounts`.\n *\n * When filters are not defined this method returns all\n * the account instances.\n *\n * When filters are of type `Buffer`, the filters are appended\n * after the discriminator.\n *\n * When filters are of type `GetProgramAccountsFilter[]`,\n * filters are appended after the discriminator filter.\n */\n async all(filters) {\n const filter = this.coder.accounts.memcmp(this._idlAccount.name, filters instanceof Buffer ? filters : undefined);\n const coderFilters = [];\n if ((filter === null || filter === void 0 ? void 0 : filter.offset) != undefined && (filter === null || filter === void 0 ? void 0 : filter.bytes) != undefined) {\n coderFilters.push({\n memcmp: { offset: filter.offset, bytes: filter.bytes },\n });\n }\n if ((filter === null || filter === void 0 ? void 0 : filter.dataSize) != undefined) {\n coderFilters.push({ dataSize: filter.dataSize });\n }\n let resp = await this._provider.connection.getProgramAccounts(this._programId, {\n commitment: this._provider.connection.commitment,\n filters: [...coderFilters, ...(Array.isArray(filters) ? filters : [])],\n });\n return resp.map(({ pubkey, account }) => {\n return {\n publicKey: pubkey,\n account: this._coder.accounts.decode(this._idlAccount.name, account.data),\n };\n });\n }\n /**\n * Returns an `EventEmitter` emitting a \"change\" event whenever the account\n * changes.\n */\n subscribe(address, commitment) {\n const sub = subscriptions.get(address.toString());\n if (sub) {\n return sub.ee;\n }\n const ee = new EventEmitter();\n address = translateAddress(address);\n const listener = this._provider.connection.onAccountChange(address, (acc) => {\n const account = this._coder.accounts.decode(this._idlAccount.name, acc.data);\n ee.emit(\"change\", account);\n }, commitment);\n subscriptions.set(address.toString(), {\n ee,\n listener,\n });\n return ee;\n }\n /**\n * Unsubscribes from the account at the given address.\n */\n async unsubscribe(address) {\n let sub = subscriptions.get(address.toString());\n if (!sub) {\n console.warn(\"Address is not subscribed\");\n return;\n }\n if (subscriptions) {\n await this._provider.connection\n .removeAccountChangeListener(sub.listener)\n .then(() => {\n subscriptions.delete(address.toString());\n })\n .catch(console.error);\n }\n }\n /**\n * Returns an instruction for creating this account.\n */\n async createInstruction(signer, sizeOverride) {\n const size = this.size;\n if (this._provider.publicKey === undefined) {\n throw new Error(\"This function requires the Provider interface implementor to have a 'publicKey' field.\");\n }\n return SystemProgram.createAccount({\n fromPubkey: this._provider.publicKey,\n newAccountPubkey: signer.publicKey,\n space: sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size,\n lamports: await this._provider.connection.getMinimumBalanceForRentExemption(sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size),\n programId: this._programId,\n });\n }\n async getAccountInfo(address, commitment) {\n return await this._provider.connection.getAccountInfo(translateAddress(address), commitment);\n }\n async getAccountInfoAndContext(address, commitment) {\n return await this._provider.connection.getAccountInfoAndContext(translateAddress(address), commitment);\n }\n}\n// Tracks all subscriptions.\nconst subscriptions = new Map();\n\nconst PROGRAM_LOG = \"Program log: \";\nconst PROGRAM_DATA = \"Program data: \";\nconst PROGRAM_LOG_START_INDEX = PROGRAM_LOG.length;\nconst PROGRAM_DATA_START_INDEX = PROGRAM_DATA.length;\nclass EventManager {\n constructor(programId, provider, coder) {\n this._programId = programId;\n this._provider = provider;\n this._eventParser = new EventParser(programId, coder);\n this._eventCallbacks = new Map();\n this._eventListeners = new Map();\n this._listenerIdCount = 0;\n }\n addEventListener(eventName, callback) {\n var _a;\n let listener = this._listenerIdCount;\n this._listenerIdCount += 1;\n // Store the listener into the event map.\n if (!this._eventListeners.has(eventName)) {\n this._eventListeners.set(eventName, []);\n }\n this._eventListeners.set(eventName, ((_a = this._eventListeners.get(eventName)) !== null && _a !== void 0 ? _a : []).concat(listener));\n // Store the callback into the listener map.\n this._eventCallbacks.set(listener, [eventName, callback]);\n // Create the subscription singleton, if needed.\n if (this._onLogsSubscriptionId !== undefined) {\n return listener;\n }\n this._onLogsSubscriptionId = this._provider.connection.onLogs(this._programId, (logs, ctx) => {\n if (logs.err) {\n return;\n }\n for (const event of this._eventParser.parseLogs(logs.logs)) {\n const allListeners = this._eventListeners.get(event.name);\n if (allListeners) {\n allListeners.forEach((listener) => {\n const listenerCb = this._eventCallbacks.get(listener);\n if (listenerCb) {\n const [, callback] = listenerCb;\n callback(event.data, ctx.slot, logs.signature);\n }\n });\n }\n }\n });\n return listener;\n }\n async removeEventListener(listener) {\n // Get the callback.\n const callback = this._eventCallbacks.get(listener);\n if (!callback) {\n throw new Error(`Event listener ${listener} doesn't exist!`);\n }\n const [eventName] = callback;\n // Get the listeners.\n let listeners = this._eventListeners.get(eventName);\n if (!listeners) {\n throw new Error(`Event listeners don't exist for ${eventName}!`);\n }\n // Update both maps.\n this._eventCallbacks.delete(listener);\n listeners = listeners.filter((l) => l !== listener);\n this._eventListeners.set(eventName, listeners);\n if (listeners.length === 0) {\n this._eventListeners.delete(eventName);\n }\n // Kill the websocket connection if all listeners have been removed.\n if (this._eventCallbacks.size === 0) {\n if (this._eventListeners.size !== 0) {\n throw new Error(`Expected event listeners size to be 0 but got ${this._eventListeners.size}`);\n }\n if (this._onLogsSubscriptionId !== undefined) {\n await this._provider.connection.removeOnLogsListener(this._onLogsSubscriptionId);\n this._onLogsSubscriptionId = undefined;\n }\n }\n }\n}\nclass EventParser {\n constructor(programId, coder) {\n this.coder = coder;\n this.programId = programId;\n }\n // Each log given, represents an array of messages emitted by\n // a single transaction, which can execute many different programs across\n // CPI boundaries. However, the subscription is only interested in the\n // events emitted by *this* program. In achieving this, we keep track of the\n // program execution context by parsing each log and looking for a CPI\n // `invoke` call. If one exists, we know a new program is executing. So we\n // push the programId onto a stack and switch the program context. This\n // allows us to track, for a given log, which program was executing during\n // its emission, thereby allowing us to know if a given log event was\n // emitted by *this* program. If it was, then we parse the raw string and\n // emit the event if the string matches the event being subscribed to.\n *parseLogs(logs, errorOnDecodeFailure = false) {\n const logScanner = new LogScanner(logs);\n const execution = new ExecutionContext();\n let log = logScanner.next();\n while (log !== null) {\n let [event, newProgram, didPop] = this.handleLog(execution, log, errorOnDecodeFailure);\n if (event) {\n yield event;\n }\n if (newProgram) {\n execution.push(newProgram);\n }\n if (didPop) {\n execution.pop();\n }\n log = logScanner.next();\n }\n }\n // Main log handler. Returns a three element array of the event, the\n // next program that was invoked for CPI, and a boolean indicating if\n // a program has completed execution (and thus should be popped off the\n // execution stack).\n handleLog(execution, log, errorOnDecodeFailure) {\n // Executing program is this program.\n if (execution.stack.length > 0 &&\n execution.program() === this.programId.toString()) {\n return this.handleProgramLog(log, errorOnDecodeFailure);\n }\n // Executing program is not this program.\n else {\n return [null, ...this.handleSystemLog(log)];\n }\n }\n // Handles logs from *this* program.\n handleProgramLog(log, errorOnDecodeFailure) {\n // This is a `msg!` log or a `sol_log_data` log.\n if (log.startsWith(PROGRAM_LOG) || log.startsWith(PROGRAM_DATA)) {\n const logStr = log.startsWith(PROGRAM_LOG)\n ? log.slice(PROGRAM_LOG_START_INDEX)\n : log.slice(PROGRAM_DATA_START_INDEX);\n const event = this.coder.events.decode(logStr);\n if (errorOnDecodeFailure && event === null) {\n throw new Error(`Unable to decode event ${logStr}`);\n }\n return [event, null, false];\n }\n // System log.\n else {\n return [null, ...this.handleSystemLog(log)];\n }\n }\n // Handles logs when the current program being executing is *not* this.\n handleSystemLog(log) {\n // System component.\n const logStart = log.split(\":\")[0];\n // Did the program finish executing?\n if (logStart.match(/^Program (.*) success/g) !== null) {\n return [null, true];\n // Recursive call.\n }\n else if (logStart.startsWith(`Program ${this.programId.toString()} invoke`)) {\n return [this.programId.toString(), false];\n }\n // CPI call.\n else if (logStart.includes(\"invoke\")) {\n return [\"cpi\", false]; // Any string will do.\n }\n else {\n return [null, false];\n }\n }\n}\n// Stack frame execution context, allowing one to track what program is\n// executing for a given log.\nclass ExecutionContext {\n constructor() {\n this.stack = [];\n }\n program() {\n if (!this.stack.length) {\n throw new Error(\"Expected the stack to have elements\");\n }\n return this.stack[this.stack.length - 1];\n }\n push(newProgram) {\n this.stack.push(newProgram);\n }\n pop() {\n if (!this.stack.length) {\n throw new Error(\"Expected the stack to have elements\");\n }\n this.stack.pop();\n }\n}\nclass LogScanner {\n constructor(logs) {\n this.logs = logs;\n }\n next() {\n if (this.logs.length === 0) {\n return null;\n }\n let l = this.logs[0];\n this.logs = this.logs.slice(1);\n return l;\n }\n}\n\nclass SimulateFactory {\n static build(idlIx, txFn, idlErrors, provider, coder, programId, idl) {\n const simulate = async (...args) => {\n var _a;\n const tx = txFn(...args);\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n let resp = undefined;\n if (provider.simulate === undefined) {\n throw new Error(\"This function requires 'Provider.simulate' to be implemented.\");\n }\n try {\n resp = await provider.simulate(tx, ctx.signers, (_a = ctx.options) === null || _a === void 0 ? void 0 : _a.commitment);\n }\n catch (err) {\n throw translateError(err, idlErrors);\n }\n if (resp === undefined) {\n throw new Error(\"Unable to simulate transaction\");\n }\n const logs = resp.logs;\n if (!logs) {\n throw new Error(\"Simulated logs not found\");\n }\n const events = [];\n if (idl.events) {\n let parser = new EventParser(programId, coder);\n for (const event of parser.parseLogs(logs)) {\n events.push(event);\n }\n }\n return { events, raw: logs };\n };\n return simulate;\n }\n}\n\nfunction uint64(property) {\n return new WrappedLayout(blob(8), (b) => u64.fromBuffer(b), (n) => n.toBuffer(), property);\n}\nfunction publicKey(property) {\n return new WrappedLayout(blob(32), (b) => new PublicKey(b), (key) => key.toBuffer(), property);\n}\nfunction coption(layout, property) {\n return new COptionLayout(layout, property);\n}\nclass WrappedLayout extends Layout_2 {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nclass COptionLayout extends Layout_2 {\n constructor(layout, property) {\n super(-1, property);\n this.layout = layout;\n this.discriminator = u32();\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.layout.span + this.discriminator.encode(0, b, offset);\n }\n this.discriminator.encode(1, b, offset);\n return this.layout.encode(src, b, offset + 4) + 4;\n }\n decode(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return null;\n }\n else if (discriminator === 1) {\n return this.layout.decode(b, offset + 4);\n }\n throw new Error(\"Invalid coption \" + this.layout.property);\n }\n getSpan(b, offset = 0) {\n return this.layout.getSpan(b, offset + 4) + 4;\n }\n}\nclass u64 extends BN {\n /**\n * Convert to Buffer representation\n */\n toBuffer() {\n const a = super.toArray().reverse();\n const b = Buffer.from(a);\n if (b.length === 8) {\n return b;\n }\n if (b.length >= 8) {\n throw new Error(\"u64 too large\");\n }\n const zeroPad = Buffer.alloc(8);\n b.copy(zeroPad);\n return zeroPad;\n }\n /**\n * Construct a u64 from Buffer representation\n */\n static fromBuffer(buffer) {\n if (buffer.length !== 8) {\n throw new Error(`Invalid buffer length: ${buffer.length}`);\n }\n return new u64([...buffer]\n .reverse()\n .map((i) => `00${i.toString(16)}`.slice(-2))\n .join(\"\"), 16);\n }\n}\nconst TOKEN_ACCOUNT_LAYOUT = struct([\n publicKey(\"mint\"),\n publicKey(\"owner\"),\n uint64(\"amount\"),\n coption(publicKey(), \"delegate\"),\n ((p) => {\n const U = union(u8(\"discriminator\"), null, p);\n U.addVariant(0, struct([]), \"uninitialized\");\n U.addVariant(1, struct([]), \"initialized\");\n U.addVariant(2, struct([]), \"frozen\");\n return U;\n })(\"state\"),\n coption(uint64(), \"isNative\"),\n uint64(\"delegatedAmount\"),\n coption(publicKey(), \"closeAuthority\"),\n]);\nfunction decodeTokenAccount(b) {\n return TOKEN_ACCOUNT_LAYOUT.decode(b);\n}\n\n// Populates a given accounts context with PDAs and common missing accounts.\nclass AccountsResolver {\n constructor(_args, _accounts, _provider, _programId, _idlIx, accountNamespace, _idlTypes, _customResolver) {\n this._args = _args;\n this._accounts = _accounts;\n this._provider = _provider;\n this._programId = _programId;\n this._idlIx = _idlIx;\n this._idlTypes = _idlTypes;\n this._customResolver = _customResolver;\n this._accountStore = new AccountStore(_provider, accountNamespace, _programId);\n }\n args(args) {\n this._args = args;\n }\n // Note: We serially resolve PDAs one by one rather than doing them\n // in parallel because there can be dependencies between\n // addresses. That is, one PDA can be used as a seed in another.\n async resolve() {\n this.resolveEventCpi(this._idlIx.accounts);\n this.resolveConst(this._idlIx.accounts);\n // Auto populate pdas and relations until we stop finding new accounts\n let depth = 0;\n while ((await this.resolvePdasAndRelations(this._idlIx.accounts)) +\n (await this.resolveCustom()) >\n 0) {\n depth++;\n if (depth === 16) {\n throw new Error(\"Reached maximum depth for account resolution\");\n }\n }\n }\n resolveOptionals(accounts) {\n Object.assign(this._accounts, this.resolveOptionalsHelper(accounts, this._idlIx.accounts));\n }\n get(path) {\n // Only return if pubkey\n const ret = path.reduce((acc, subPath) => acc && acc[subPath], this._accounts);\n if (ret && ret.toBase58) {\n return ret;\n }\n }\n set(path, value) {\n let cur = this._accounts;\n path.forEach((p, i) => {\n var _a;\n const isLast = i === path.length - 1;\n if (isLast) {\n cur[p] = value;\n }\n cur[p] = (_a = cur[p]) !== null && _a !== void 0 ? _a : {};\n cur = cur[p];\n });\n }\n resolveOptionalsHelper(partialAccounts, accounts) {\n const nestedAccountsGeneric = {};\n // Looping through accountItem array instead of on partialAccounts, so\n // we only traverse array once\n for (const accountItem of accounts) {\n const accountName = accountItem.name;\n const partialAccount = partialAccounts[accountName];\n // Skip if the account isn't included (thus would be undefined)\n if (partialAccount === undefined)\n continue;\n if (isPartialAccounts(partialAccount)) {\n // is compound accounts, recurse one level deeper\n if (isCompositeAccounts(accountItem)) {\n nestedAccountsGeneric[accountName] = this.resolveOptionalsHelper(partialAccount, accountItem[\"accounts\"]);\n }\n else {\n // Here we try our best to recover gracefully. If there are optionals we can't check, we will fail then.\n nestedAccountsGeneric[accountName] = flattenPartialAccounts(partialAccount, true);\n }\n }\n else {\n // if not compound accounts, do null/optional check and proceed\n if (partialAccount !== null) {\n nestedAccountsGeneric[accountName] = translateAddress(partialAccount);\n }\n else if (accountItem[\"optional\"]) {\n nestedAccountsGeneric[accountName] = this._programId;\n }\n }\n }\n return nestedAccountsGeneric;\n }\n async resolveCustom() {\n if (this._customResolver) {\n const { accounts, resolved } = await this._customResolver({\n args: this._args,\n accounts: this._accounts,\n provider: this._provider,\n programId: this._programId,\n idlIx: this._idlIx,\n });\n this._accounts = accounts;\n return resolved;\n }\n return 0;\n }\n /**\n * Resolve event CPI accounts `eventAuthority` and `program`.\n *\n * Accounts will only be resolved if they are declared next to each other to\n * reduce the chance of name collision.\n */\n resolveEventCpi(accounts, path = []) {\n for (const i in accounts) {\n const accountOrAccounts = accounts[i];\n if (isCompositeAccounts(accountOrAccounts)) {\n this.resolveEventCpi(accountOrAccounts.accounts, [\n ...path,\n accountOrAccounts.name,\n ]);\n }\n // Validate next index exists\n const nextIndex = +i + 1;\n if (nextIndex === accounts.length)\n return;\n const currentName = accounts[i].name;\n const nextName = accounts[nextIndex].name;\n // Populate event CPI accounts if they exist\n if (currentName === \"eventAuthority\" && nextName === \"program\") {\n const currentPath = [...path, currentName];\n const nextPath = [...path, nextName];\n if (!this.get(currentPath)) {\n this.set(currentPath, PublicKey.findProgramAddressSync([Buffer.from(\"__event_authority\")], this._programId)[0]);\n }\n if (!this.get(nextPath)) {\n this.set(nextPath, this._programId);\n }\n return;\n }\n }\n }\n resolveConst(accounts, path = []) {\n for (const accountOrAccounts of accounts) {\n const name = accountOrAccounts.name;\n if (isCompositeAccounts(accountOrAccounts)) {\n this.resolveConst(accountOrAccounts.accounts, [...path, name]);\n }\n else {\n const account = accountOrAccounts;\n if ((account.signer || account.address) && !this.get([...path, name])) {\n // Default signers to the provider\n if (account.signer) {\n // @ts-expect-error\n if (!this._provider.wallet) {\n throw new Error(\"This function requires the `Provider` interface implementor to have a `wallet` field.\");\n }\n // @ts-expect-error\n this.set([...path, name], this._provider.wallet.publicKey);\n }\n // Set based on `address` field\n if (account.address) {\n this.set([...path, name], translateAddress(account.address));\n }\n }\n }\n }\n }\n async resolvePdasAndRelations(accounts, path = []) {\n let found = 0;\n for (const accountOrAccounts of accounts) {\n const name = accountOrAccounts.name;\n if (isCompositeAccounts(accountOrAccounts)) {\n found += await this.resolvePdasAndRelations(accountOrAccounts.accounts, [...path, name]);\n }\n else {\n const account = accountOrAccounts;\n if ((account.pda || account.relations) && !this.get([...path, name])) {\n found++;\n // Accounts might not get resolved successfully if a seed depends on\n // another seed to be resolved *and* the accounts for resolution are\n // out of order. In this case, skip the accounts that throw in order\n // to resolve those accounts later.\n try {\n if (account.pda) {\n const seeds = await Promise.all(account.pda.seeds.map((seed) => this.toBuffer(seed, path)));\n if (seeds.some((seed) => !seed)) {\n continue;\n }\n const programId = await this.parseProgramId(account, path);\n const [pubkey] = PublicKey.findProgramAddressSync(seeds, programId);\n this.set([...path, name], pubkey);\n }\n }\n catch { }\n try {\n if (account.relations) {\n const accountKey = this.get([...path, account.relations[0]]);\n if (accountKey) {\n const account = await this._accountStore.fetchAccount({\n publicKey: accountKey,\n });\n this.set([...path, name], account[name]);\n }\n }\n }\n catch { }\n }\n }\n }\n return found;\n }\n async parseProgramId(account, path = []) {\n var _a;\n if (!((_a = account.pda) === null || _a === void 0 ? void 0 : _a.program)) {\n return this._programId;\n }\n const buf = await this.toBuffer(account.pda.program, path);\n if (!buf) {\n throw new Error(`Program seed not resolved: ${account.name}`);\n }\n return new PublicKey(buf);\n }\n async toBuffer(seed, path = []) {\n switch (seed.kind) {\n case \"const\":\n return this.toBufferConst(seed);\n case \"arg\":\n return await this.toBufferArg(seed);\n case \"account\":\n return await this.toBufferAccount(seed, path);\n default:\n throw new Error(`Unexpected seed: ${seed}`);\n }\n }\n toBufferConst(seed) {\n return this.toBufferValue(\"bytes\", seed.value);\n }\n async toBufferArg(seed) {\n const [name, ...path] = seed.path.split(\".\");\n const index = this._idlIx.args.findIndex((arg) => arg.name === name);\n if (index === -1) {\n throw new Error(`Unable to find argument for seed: ${name}`);\n }\n const value = path.reduce((acc, path) => (acc !== null && acc !== void 0 ? acc : {})[path], this._args[index]);\n if (value === undefined) {\n return;\n }\n const type = this.getType(this._idlIx.args[index].type, path);\n return this.toBufferValue(type, value);\n }\n async toBufferAccount(seed, path = []) {\n const [name, ...paths] = seed.path.split(\".\");\n const fieldPubkey = this.get([...path, name]);\n if (!fieldPubkey)\n return;\n // The seed is a pubkey of the account.\n if (!paths.length) {\n return this.toBufferValue(\"pubkey\", fieldPubkey);\n }\n if (!seed.account) {\n throw new Error(`Seed account is required in order to resolve type: ${seed.path}`);\n }\n // The key is account data.\n //\n // Fetch and deserialize it.\n const account = await this._accountStore.fetchAccount({\n publicKey: fieldPubkey,\n name: seed.account,\n });\n // Dereference all fields in the path to get the field value\n // used in the seed.\n let accountValue = account;\n let currentPaths = paths;\n while (currentPaths.length > 0) {\n accountValue = accountValue[currentPaths[0]];\n currentPaths = currentPaths.slice(1);\n }\n if (accountValue === undefined)\n return;\n const type = this.getType({ defined: { name: seed.account } }, paths);\n return this.toBufferValue(type, accountValue);\n }\n /**\n * Converts the given idl valaue into a Buffer. The values here must be\n * primitives, e.g. no structs.\n */\n toBufferValue(type, value) {\n switch (type) {\n case \"u8\":\n case \"i8\":\n return Buffer.from([value]);\n case \"u16\":\n case \"i16\":\n return new BN(value).toArrayLike(Buffer, \"le\", 2);\n case \"u32\":\n case \"i32\":\n return new BN(value).toArrayLike(Buffer, \"le\", 4);\n case \"u64\":\n case \"i64\":\n return new BN(value).toArrayLike(Buffer, \"le\", 8);\n case \"u128\":\n case \"i128\":\n return new BN(value).toArrayLike(Buffer, \"le\", 16);\n case \"u256\":\n case \"i256\":\n return new BN(value).toArrayLike(Buffer, \"le\", 32);\n case \"string\":\n return Buffer.from(value);\n case \"pubkey\":\n return value.toBuffer();\n case \"bytes\":\n return Buffer.from(value);\n default:\n if (type === null || type === void 0 ? void 0 : type.array) {\n return Buffer.from(value);\n }\n throw new Error(`Unexpected seed type: ${type}`);\n }\n }\n /**\n * Recursively get the type at some path of either a primitive or a user\n * defined struct.\n */\n getType(type, path = []) {\n var _a;\n const typeName = (_a = type === null || type === void 0 ? void 0 : type.defined) === null || _a === void 0 ? void 0 : _a.name;\n if (typeName) {\n // Handle token account separately\n if (typeName === \"tokenAccount\") {\n switch (path.at(0)) {\n case \"mint\":\n case \"owner\":\n return \"pubkey\";\n case \"amount\":\n case \"delagatedAmount\":\n return \"u64\";\n default:\n throw new Error(`Unknown token account path: ${path}`);\n }\n }\n const definedType = this._idlTypes.find((t) => t.name === typeName);\n if (!definedType) {\n throw new Error(`Type not found: ${typeName}`);\n }\n // Only named structs are supported\n const [fieldName, ...subPath] = path;\n const fields = definedType.type\n .fields;\n const field = fields.find((field) => field.name === fieldName);\n if (!field) {\n throw new Error(`Field not found: ${fieldName}`);\n }\n return this.getType(field.type, subPath);\n }\n return type;\n }\n}\n// TODO: this should be configurable to avoid unnecessary requests.\nclass AccountStore {\n constructor(_provider, accounts, programId) {\n this._provider = _provider;\n this._cache = new Map();\n this._idls = {};\n this._idls[programId.toBase58()] = accounts;\n }\n async fetchAccount({ publicKey, name, }) {\n const address = publicKey.toBase58();\n if (!this._cache.has(address)) {\n const accountInfo = await this._provider.connection.getAccountInfo(publicKey);\n if (accountInfo === null) {\n throw new Error(`Account not found: ${address}`);\n }\n if (name === \"tokenAccount\") {\n const account = decodeTokenAccount(accountInfo.data);\n this._cache.set(address, account);\n }\n else {\n const accounts = await this.getAccountsNs(accountInfo.owner);\n if (accounts) {\n const accountNs = Object.values(accounts)[0];\n if (accountNs) {\n const account = accountNs.coder.accounts.decodeAny(accountInfo.data);\n this._cache.set(address, account);\n }\n }\n }\n }\n return this._cache.get(address);\n }\n async getAccountsNs(programId) {\n const programIdStr = programId.toBase58();\n if (!this._idls[programIdStr]) {\n const idl = await Program.fetchIdl(programId, this._provider);\n if (idl) {\n const program = new Program(idl, this._provider);\n this._idls[programIdStr] = program.account;\n }\n }\n return this._idls[programIdStr];\n }\n}\n\nclass MethodsBuilderFactory {\n static build(provider, programId, idlIx, ixFn, txFn, rpcFn, simulateFn, viewFn, accountNamespace, idlTypes, customResolver) {\n return (...args) => new MethodsBuilder(args, ixFn, txFn, rpcFn, simulateFn, viewFn, provider, programId, idlIx, accountNamespace, idlTypes, customResolver);\n }\n}\nfunction isPartialAccounts(partialAccount) {\n return (typeof partialAccount === \"object\" &&\n partialAccount !== null &&\n !(\"_bn\" in partialAccount) // Ensures not a pubkey\n );\n}\nfunction flattenPartialAccounts(partialAccounts, throwOnNull) {\n const toReturn = {};\n for (const accountName in partialAccounts) {\n const account = partialAccounts[accountName];\n if (account === null) {\n if (throwOnNull)\n throw new Error(\"Failed to resolve optionals due to IDL type mismatch with input accounts!\");\n continue;\n }\n toReturn[accountName] = isPartialAccounts(account)\n ? flattenPartialAccounts(account, true)\n : translateAddress(account);\n }\n return toReturn;\n}\nclass MethodsBuilder {\n constructor(_args, _ixFn, _txFn, _rpcFn, _simulateFn, _viewFn, provider, programId, idlIx, accountNamespace, idlTypes, customResolver) {\n this._args = _args;\n this._ixFn = _ixFn;\n this._txFn = _txFn;\n this._rpcFn = _rpcFn;\n this._simulateFn = _simulateFn;\n this._viewFn = _viewFn;\n this._accounts = {};\n this._remainingAccounts = [];\n this._signers = [];\n this._preInstructions = [];\n this._postInstructions = [];\n this._resolveAccounts = true;\n this._accountsResolver = new AccountsResolver(_args, this._accounts, provider, programId, idlIx, accountNamespace, idlTypes, customResolver);\n }\n args(args) {\n this._args = args;\n this._accountsResolver.args(args);\n }\n /**\n * Set instruction accounts with account resolution.\n *\n * This method only accepts accounts that cannot be resolved.\n *\n * See {@link accountsPartial} for overriding the account resolution or\n * {@link accountsStrict} for strictly specifying all accounts.\n */\n accounts(accounts) {\n // @ts-ignore\n return this.accountsPartial(accounts);\n }\n /**\n * Set instruction accounts with account resolution.\n *\n * There is no functional difference between this method and {@link accounts}\n * method, the only difference is this method allows specifying all accounts\n * even if they can be resolved. On the other hand, {@link accounts} method\n * doesn't accept accounts that can be resolved.\n */\n accountsPartial(accounts) {\n this._resolveAccounts = true;\n this._accountsResolver.resolveOptionals(accounts);\n return this;\n }\n /**\n * Set instruction accounts without account resolution.\n *\n * All accounts strictly need to be specified when this method is used.\n *\n * See {@link accounts} and {@link accountsPartial} methods for automatically\n * resolving accounts.\n */\n accountsStrict(accounts) {\n this._resolveAccounts = false;\n this._accountsResolver.resolveOptionals(accounts);\n return this;\n }\n signers(signers) {\n this._signers = this._signers.concat(signers);\n return this;\n }\n remainingAccounts(accounts) {\n this._remainingAccounts = this._remainingAccounts.concat(accounts);\n return this;\n }\n preInstructions(ixs, prepend = false) {\n if (prepend) {\n this._preInstructions = ixs.concat(this._preInstructions);\n }\n else {\n this._preInstructions = this._preInstructions.concat(ixs);\n }\n return this;\n }\n postInstructions(ixs) {\n this._postInstructions = this._postInstructions.concat(ixs);\n return this;\n }\n /**\n * Get the public keys of the instruction accounts.\n *\n * The return type is an object with account names as keys and their public\n * keys as their values.\n *\n * Note that an account key is `undefined` if the account hasn't yet been\n * specified or resolved.\n */\n async pubkeys() {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._accounts;\n }\n async rpc(options) {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._rpcFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options,\n });\n }\n async rpcAndKeys(options) {\n const pubkeys = await this.pubkeys();\n return {\n pubkeys: pubkeys,\n signature: await this.rpc(options),\n };\n }\n async view(options) {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n if (!this._viewFn) {\n throw new Error(\"Method does not support views\");\n }\n // @ts-ignore\n return this._viewFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options,\n });\n }\n async simulate(options) {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._simulateFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options,\n });\n }\n async instruction() {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._ixFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n });\n }\n /**\n * Convenient shortcut to get instructions and pubkeys via:\n *\n * ```ts\n * const { pubkeys, instructions } = await method.prepare();\n * ```\n */\n async prepare() {\n return {\n instruction: await this.instruction(),\n pubkeys: await this.pubkeys(),\n signers: this._signers,\n };\n }\n async transaction() {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._txFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n });\n }\n}\n\nclass ViewFactory {\n static build(programId, idlIx, simulateFn, idl) {\n const isWritable = idlIx.accounts.find((a) => a.writable);\n const hasReturn = !!idlIx.returns;\n if (isWritable || !hasReturn)\n return;\n const view = async (...args) => {\n let simulationResult = await simulateFn(...args);\n const returnPrefix = `Program return: ${programId} `;\n let returnLog = simulationResult.raw.find((l) => l.startsWith(returnPrefix));\n if (!returnLog) {\n throw new Error(\"View expected return log\");\n }\n let returnData = decode(returnLog.slice(returnPrefix.length));\n let returnType = idlIx.returns;\n if (!returnType) {\n throw new Error(\"View expected return type\");\n }\n const coder = IdlCoder.fieldLayout({ type: returnType }, idl.types);\n return coder.decode(returnData);\n };\n return view;\n }\n}\n\nclass NamespaceFactory {\n /**\n * Generates all namespaces for a given program.\n */\n static build(idl, coder, programId, provider, getCustomResolver) {\n const rpc = {};\n const instruction = {};\n const transaction = {};\n const simulate = {};\n const methods = {};\n const view = {};\n const idlErrors = parseIdlErrors(idl);\n const account = idl.accounts\n ? AccountFactory.build(idl, coder, programId, provider)\n : {};\n idl.instructions.forEach((idlIx) => {\n const ixItem = InstructionNamespaceFactory.build(idlIx, (ixName, ix) => coder.instruction.encode(ixName, ix), programId);\n const txItem = TransactionFactory.build(idlIx, ixItem);\n const rpcItem = RpcFactory.build(idlIx, txItem, idlErrors, provider);\n const simulateItem = SimulateFactory.build(idlIx, txItem, idlErrors, provider, coder, programId, idl);\n const viewItem = ViewFactory.build(programId, idlIx, simulateItem, idl);\n const methodItem = MethodsBuilderFactory.build(provider, programId, idlIx, ixItem, txItem, rpcItem, simulateItem, viewItem, account, idl.types || [], getCustomResolver === null || getCustomResolver === void 0 ? void 0 : getCustomResolver(idlIx));\n const name = idlIx.name;\n instruction[name] = ixItem;\n transaction[name] = txItem;\n rpc[name] = rpcItem;\n simulate[name] = simulateItem;\n methods[name] = methodItem;\n if (viewItem) {\n view[name] = viewItem;\n }\n });\n return [\n rpc,\n instruction,\n transaction,\n account,\n simulate,\n methods,\n view,\n ];\n }\n}\n\n/**\n * ## Program\n *\n * Program provides the IDL deserialized client representation of an Anchor\n * program.\n *\n * This API is the one stop shop for all things related to communicating with\n * on-chain programs. Among other things, one can send transactions, fetch\n * deserialized accounts, decode instruction data, subscribe to account\n * changes, and listen to events.\n *\n * In addition to field accessors and methods, the object provides a set of\n * dynamically generated properties, also known as namespaces, that\n * map one-to-one to program methods and accounts. These namespaces generally\n * can be used as follows:\n *\n * ## Usage\n *\n * ```javascript\n * program..\n * ```\n *\n * API specifics are namespace dependent. The examples used in the documentation\n * below will refer to the two counter examples found\n * [here](https://github.com/coral-xyz/anchor#examples).\n */\nclass Program {\n /**\n * Address of the program.\n */\n get programId() {\n return this._programId;\n }\n /**\n * IDL in camelCase format to work in TypeScript.\n *\n * See {@link rawIdl} field if you need the original IDL.\n */\n get idl() {\n return this._idl;\n }\n /**\n * Raw IDL i.e. the original IDL without camelCase conversion.\n *\n * See {@link idl} field if you need the camelCased version of the IDL.\n */\n get rawIdl() {\n return this._rawIdl;\n }\n /**\n * Coder for serializing requests.\n */\n get coder() {\n return this._coder;\n }\n /**\n * Wallet and network provider.\n */\n get provider() {\n return this._provider;\n }\n /**\n * @param idl The interface definition.\n * @param provider The network and wallet context to use. If not provided\n * then uses [[getProvider]].\n * @param getCustomResolver A function that returns a custom account resolver\n * for the given instruction. This is useful for resolving\n * public keys of missing accounts when building instructions\n */\n constructor(idl, provider = getProvider(), coder, getCustomResolver) {\n const camelCasedIdl = convertIdlToCamelCase(idl);\n // Fields.\n this._idl = camelCasedIdl;\n this._rawIdl = idl;\n this._provider = provider;\n this._programId = translateAddress(idl.address);\n this._coder = coder !== null && coder !== void 0 ? coder : new BorshCoder(camelCasedIdl);\n this._events = new EventManager(this._programId, provider, this._coder);\n // Dynamic namespaces.\n const [rpc, instruction, transaction, account, simulate, methods, views] = NamespaceFactory.build(camelCasedIdl, this._coder, this._programId, provider, getCustomResolver);\n this.rpc = rpc;\n this.instruction = instruction;\n this.transaction = transaction;\n this.account = account;\n this.simulate = simulate;\n this.methods = methods;\n this.views = views;\n }\n /**\n * Generates a Program client by fetching the IDL from the network.\n *\n * In order to use this method, an IDL must have been previously initialized\n * via the anchor CLI's `anchor idl init` command.\n *\n * @param programId The on-chain address of the program.\n * @param provider The network and wallet context.\n */\n static async at(address, provider) {\n const programId = translateAddress(address);\n const idl = await Program.fetchIdl(programId, provider);\n if (!idl) {\n throw new Error(`IDL not found for program: ${address.toString()}`);\n }\n return new Program(idl, provider);\n }\n /**\n * Fetches an idl from the blockchain.\n *\n * In order to use this method, an IDL must have been previously initialized\n * via the anchor CLI's `anchor idl init` command.\n *\n * @param programId The on-chain address of the program.\n * @param provider The network and wallet context.\n */\n static async fetchIdl(address, provider) {\n provider = provider !== null && provider !== void 0 ? provider : getProvider();\n const programId = translateAddress(address);\n const idlAddr = await idlAddress(programId);\n const accountInfo = await provider.connection.getAccountInfo(idlAddr);\n if (!accountInfo) {\n return null;\n }\n // Chop off account discriminator.\n let idlAccount = decodeIdlAccount(accountInfo.data.slice(8));\n const inflatedIdl = inflate(idlAccount.data);\n return JSON.parse(decode$2(inflatedIdl));\n }\n /**\n * Invokes the given callback every time the given event is emitted.\n *\n * @param eventName The PascalCase name of the event, provided by the IDL.\n * @param callback The function to invoke whenever the event is emitted from\n * program logs.\n */\n addEventListener(eventName, callback) {\n return this._events.addEventListener(eventName, callback);\n }\n /**\n * Unsubscribes from the given eventName.\n */\n async removeEventListener(listener) {\n return await this._events.removeEventListener(listener);\n }\n}\n\nnew PublicKey(\"11111111111111111111111111111111\");\nfunction program(provider) {\n return new Program(IDL, provider, coder());\n}\nfunction coder() {\n return new SystemCoder(IDL);\n}\nconst IDL = {\n address: \"11111111111111111111111111111111\",\n metadata: {\n name: \"systemProgram\",\n version: \"0.1.0\",\n spec: \"0.1.0\",\n },\n instructions: [\n {\n name: \"advanceNonceAccount\",\n discriminator: [4, 0, 0, 0],\n accounts: [\n {\n name: \"nonce\",\n writable: true,\n },\n {\n name: \"recentBlockhashes\",\n },\n {\n name: \"authorized\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"allocate\",\n discriminator: [8, 0, 0, 0],\n accounts: [\n {\n name: \"pubkey\",\n writable: true,\n signer: true,\n },\n ],\n args: [\n {\n name: \"space\",\n type: \"u64\",\n },\n ],\n },\n {\n name: \"allocateWithSeed\",\n discriminator: [9, 0, 0, 0],\n accounts: [\n {\n name: \"account\",\n writable: true,\n },\n {\n name: \"base\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"pubkey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"assign\",\n discriminator: [1, 0, 0, 0],\n accounts: [\n {\n name: \"pubkey\",\n writable: true,\n signer: true,\n },\n ],\n args: [\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"assignWithSeed\",\n discriminator: [10, 0, 0, 0],\n accounts: [\n {\n name: \"account\",\n writable: true,\n },\n {\n name: \"base\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"pubkey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"authorizeNonceAccount\",\n discriminator: [7, 0, 0, 0],\n accounts: [\n {\n name: \"nonce\",\n writable: true,\n },\n {\n name: \"authorized\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"createAccount\",\n discriminator: [0, 0, 0, 0],\n accounts: [\n {\n name: \"from\",\n writable: true,\n signer: true,\n },\n {\n name: \"to\",\n writable: true,\n signer: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"createAccountWithSeed\",\n discriminator: [3, 0, 0, 0],\n accounts: [\n {\n name: \"from\",\n writable: true,\n signer: true,\n },\n {\n name: \"to\",\n writable: true,\n },\n {\n name: \"base\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"pubkey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"initializeNonceAccount\",\n discriminator: [6, 0, 0, 0],\n accounts: [\n {\n name: \"nonce\",\n writable: true,\n signer: true,\n },\n {\n name: \"recentBlockhashes\",\n },\n {\n name: \"rent\",\n address: \"SysvarRent111111111111111111111111111111111\",\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"transfer\",\n discriminator: [2, 0, 0, 0],\n accounts: [\n {\n name: \"from\",\n writable: true,\n signer: true,\n },\n {\n name: \"to\",\n writable: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n ],\n },\n {\n name: \"transferWithSeed\",\n discriminator: [11, 0, 0, 0],\n accounts: [\n {\n name: \"from\",\n writable: true,\n },\n {\n name: \"base\",\n signer: true,\n },\n {\n name: \"to\",\n writable: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"withdrawNonceAccount\",\n discriminator: [5, 0, 0, 0],\n accounts: [\n {\n name: \"nonce\",\n writable: true,\n },\n {\n name: \"to\",\n writable: true,\n },\n {\n name: \"recentBlockhashes\",\n },\n {\n name: \"rent\",\n address: \"SysvarRent111111111111111111111111111111111\",\n },\n {\n name: \"authorized\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n ],\n },\n ],\n accounts: [\n {\n name: \"nonce\",\n discriminator: [],\n },\n ],\n types: [\n {\n name: \"feeCalculator\",\n type: {\n kind: \"struct\",\n fields: [\n {\n name: \"lamportsPerSignature\",\n type: \"u64\",\n },\n ],\n },\n },\n {\n name: \"nonce\",\n type: {\n kind: \"struct\",\n fields: [\n {\n name: \"version\",\n type: \"u32\",\n },\n {\n name: \"state\",\n type: \"u32\",\n },\n {\n name: \"authorizedPubkey\",\n type: \"pubkey\",\n },\n {\n name: \"nonce\",\n type: \"pubkey\",\n },\n {\n name: \"feeCalculator\",\n type: {\n defined: {\n name: \"feeCalculator\",\n },\n },\n },\n ],\n },\n },\n ],\n};\n\nclass Native {\n static system(provider) {\n return program(provider);\n }\n}\n\nexport { AccountClient, AnchorError, AnchorProvider, BorshAccountsCoder, BorshCoder, BorshEventCoder, BorshInstructionCoder, DISCRIMINATOR_SIZE, EventManager, EventParser, IdlError, LangErrorCode, LangErrorMessage, MethodsBuilderFactory, Native, Program, ProgramError, ProgramErrorStack, SystemCoder, getProvider, parseIdlErrors, setProvider, splitArgsAndCtx, toInstruction, translateAddress, translateError, index as utils, validateAccounts };\n//# sourceMappingURL=index.js.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst buffer_1 = require(\"buffer\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst common_js_1 = require(\"./utils/common.js\");\n/**\n * Node only wallet.\n */\nclass NodeWallet {\n constructor(payer) {\n this.payer = payer;\n }\n static local() {\n const process = require(\"process\");\n if (!process.env.ANCHOR_WALLET || process.env.ANCHOR_WALLET === \"\") {\n throw new Error(\"expected environment variable `ANCHOR_WALLET` is not set.\");\n }\n const payer = web3_js_1.Keypair.fromSecretKey(buffer_1.Buffer.from(JSON.parse(require(\"fs\").readFileSync(process.env.ANCHOR_WALLET, {\n encoding: \"utf-8\",\n }))));\n return new NodeWallet(payer);\n }\n async signTransaction(tx) {\n if ((0, common_js_1.isVersionedTransaction)(tx)) {\n tx.sign([this.payer]);\n }\n else {\n tx.partialSign(this.payer);\n }\n return tx;\n }\n async signAllTransactions(txs) {\n return txs.map((t) => {\n if ((0, common_js_1.isVersionedTransaction)(t)) {\n t.sign([this.payer]);\n }\n else {\n t.partialSign(this.payer);\n }\n return t;\n });\n }\n get publicKey() {\n return this.payer.publicKey;\n }\n}\nexports.default = NodeWallet;\n//# sourceMappingURL=nodewallet.js.map","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isVersionedTransaction = exports.chunks = exports.isBrowser = void 0;\n/**\n * Returns true if being run inside a web browser,\n * false if in a Node process or electron app.\n */\nexports.isBrowser = process.env.ANCHOR_BROWSER ||\n (typeof window !== \"undefined\" && !((_a = window.process) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(\"type\")));\n/**\n * Splits an array into chunks\n *\n * @param array Array of objects to chunk.\n * @param size The max size of a chunk.\n * @returns A two dimensional array where each T[] length is < the provided size.\n */\nfunction chunks(array, size) {\n return Array.apply(0, new Array(Math.ceil(array.length / size))).map((_, index) => array.slice(index * size, (index + 1) * size));\n}\nexports.chunks = chunks;\n/**\n * Check if a transaction object is a VersionedTransaction or not\n *\n * @param tx\n * @returns bool\n */\nconst isVersionedTransaction = (tx) => {\n return \"version\" in tx;\n};\nexports.isVersionedTransaction = isVersionedTransaction;\n//# sourceMappingURL=common.js.map","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","'use strict';\n\nconst UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\n\tfor (let i = 0; i < string.length; i++) {\n\t\tconst character = string[i];\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i) + '-' + string.slice(i);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\ti++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replace(LEADING_CAPITAL, m1 => toLowerCase(m1));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier))\n\t\t.replace(NUMBERS_AND_IDENTIFIER, m => toUpperCase(m));\n};\n\nconst camelCase = (input, options) => {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false ?\n\t\tstring => string.toLowerCase() :\n\t\tstring => string.toLocaleLowerCase(options.locale);\n\tconst toUpperCase = options.locale === false ?\n\t\tstring => string.toUpperCase() :\n\t\tstring => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\n\tif (options.preserveConsecutiveUppercase) {\n\t\tinput = preserveConsecutiveUppercase(input, toLowerCase);\n\t} else {\n\t\tinput = toLowerCase(input);\n\t}\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n};\n\nmodule.exports = camelCase;\n// TODO: Remove this for the next major release\nmodule.exports.default = camelCase;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.map = exports.array = exports.rustEnum = exports.str = exports.vecU8 = exports.tagged = exports.vec = exports.bool = exports.option = exports.publicKey = exports.i256 = exports.u256 = exports.i128 = exports.u128 = exports.i64 = exports.u64 = exports.struct = exports.f64 = exports.f32 = exports.i32 = exports.u32 = exports.i16 = exports.u16 = exports.i8 = exports.u8 = void 0;\nconst buffer_layout_1 = require(\"buffer-layout\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nvar buffer_layout_2 = require(\"buffer-layout\");\nObject.defineProperty(exports, \"u8\", { enumerable: true, get: function () { return buffer_layout_2.u8; } });\nObject.defineProperty(exports, \"i8\", { enumerable: true, get: function () { return buffer_layout_2.s8; } });\nObject.defineProperty(exports, \"u16\", { enumerable: true, get: function () { return buffer_layout_2.u16; } });\nObject.defineProperty(exports, \"i16\", { enumerable: true, get: function () { return buffer_layout_2.s16; } });\nObject.defineProperty(exports, \"u32\", { enumerable: true, get: function () { return buffer_layout_2.u32; } });\nObject.defineProperty(exports, \"i32\", { enumerable: true, get: function () { return buffer_layout_2.s32; } });\nObject.defineProperty(exports, \"f32\", { enumerable: true, get: function () { return buffer_layout_2.f32; } });\nObject.defineProperty(exports, \"f64\", { enumerable: true, get: function () { return buffer_layout_2.f64; } });\nObject.defineProperty(exports, \"struct\", { enumerable: true, get: function () { return buffer_layout_2.struct; } });\nclass BNLayout extends buffer_layout_1.Layout {\n constructor(span, signed, property) {\n super(span, property);\n this.blob = (0, buffer_layout_1.blob)(span);\n this.signed = signed;\n }\n decode(b, offset = 0) {\n const num = new bn_js_1.default(this.blob.decode(b, offset), 10, \"le\");\n if (this.signed) {\n return num.fromTwos(this.span * 8).clone();\n }\n return num;\n }\n encode(src, b, offset = 0) {\n if (this.signed) {\n src = src.toTwos(this.span * 8);\n }\n return this.blob.encode(src.toArrayLike(Buffer, \"le\", this.span), b, offset);\n }\n}\nfunction u64(property) {\n return new BNLayout(8, false, property);\n}\nexports.u64 = u64;\nfunction i64(property) {\n return new BNLayout(8, true, property);\n}\nexports.i64 = i64;\nfunction u128(property) {\n return new BNLayout(16, false, property);\n}\nexports.u128 = u128;\nfunction i128(property) {\n return new BNLayout(16, true, property);\n}\nexports.i128 = i128;\nfunction u256(property) {\n return new BNLayout(32, false, property);\n}\nexports.u256 = u256;\nfunction i256(property) {\n return new BNLayout(32, true, property);\n}\nexports.i256 = i256;\nclass WrappedLayout extends buffer_layout_1.Layout {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nfunction publicKey(property) {\n return new WrappedLayout((0, buffer_layout_1.blob)(32), (b) => new web3_js_1.PublicKey(b), (key) => key.toBuffer(), property);\n}\nexports.publicKey = publicKey;\nclass OptionLayout extends buffer_layout_1.Layout {\n constructor(layout, property) {\n super(-1, property);\n this.layout = layout;\n this.discriminator = (0, buffer_layout_1.u8)();\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.discriminator.encode(0, b, offset);\n }\n this.discriminator.encode(1, b, offset);\n return this.layout.encode(src, b, offset + 1) + 1;\n }\n decode(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return null;\n }\n else if (discriminator === 1) {\n return this.layout.decode(b, offset + 1);\n }\n throw new Error(\"Invalid option \" + this.property);\n }\n getSpan(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return 1;\n }\n else if (discriminator === 1) {\n return this.layout.getSpan(b, offset + 1) + 1;\n }\n throw new Error(\"Invalid option \" + this.property);\n }\n}\nfunction option(layout, property) {\n return new OptionLayout(layout, property);\n}\nexports.option = option;\nfunction bool(property) {\n return new WrappedLayout((0, buffer_layout_1.u8)(), decodeBool, encodeBool, property);\n}\nexports.bool = bool;\nfunction decodeBool(value) {\n if (value === 0) {\n return false;\n }\n else if (value === 1) {\n return true;\n }\n throw new Error(\"Invalid bool: \" + value);\n}\nfunction encodeBool(value) {\n return value ? 1 : 0;\n}\nfunction vec(elementLayout, property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.seq)(elementLayout, (0, buffer_layout_1.offset)(length, -length.span), \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, (values) => ({ values }), property);\n}\nexports.vec = vec;\nfunction tagged(tag, layout, property) {\n const wrappedLayout = (0, buffer_layout_1.struct)([\n u64(\"tag\"),\n layout.replicate(\"data\"),\n ]);\n function decodeTag({ tag: receivedTag, data }) {\n if (!receivedTag.eq(tag)) {\n throw new Error(\"Invalid tag, expected: \" +\n tag.toString(\"hex\") +\n \", got: \" +\n receivedTag.toString(\"hex\"));\n }\n return data;\n }\n return new WrappedLayout(wrappedLayout, decodeTag, (data) => ({ tag, data }), property);\n}\nexports.tagged = tagged;\nfunction vecU8(property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.blob)((0, buffer_layout_1.offset)(length, -length.span), \"data\"),\n ]);\n return new WrappedLayout(layout, ({ data }) => data, (data) => ({ data }), property);\n}\nexports.vecU8 = vecU8;\nfunction str(property) {\n return new WrappedLayout(vecU8(), (data) => data.toString(\"utf-8\"), (s) => Buffer.from(s, \"utf-8\"), property);\n}\nexports.str = str;\nfunction rustEnum(variants, property, discriminant) {\n const unionLayout = (0, buffer_layout_1.union)(discriminant !== null && discriminant !== void 0 ? discriminant : (0, buffer_layout_1.u8)(), property);\n variants.forEach((variant, index) => unionLayout.addVariant(index, variant, variant.property));\n return unionLayout;\n}\nexports.rustEnum = rustEnum;\nfunction array(elementLayout, length, property) {\n const layout = (0, buffer_layout_1.struct)([\n (0, buffer_layout_1.seq)(elementLayout, length, \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, (values) => ({ values }), property);\n}\nexports.array = array;\nclass MapEntryLayout extends buffer_layout_1.Layout {\n constructor(keyLayout, valueLayout, property) {\n super(keyLayout.span + valueLayout.span, property);\n this.keyLayout = keyLayout;\n this.valueLayout = valueLayout;\n }\n decode(b, offset) {\n offset = offset || 0;\n const key = this.keyLayout.decode(b, offset);\n const value = this.valueLayout.decode(b, offset + this.keyLayout.getSpan(b, offset));\n return [key, value];\n }\n encode(src, b, offset) {\n offset = offset || 0;\n const keyBytes = this.keyLayout.encode(src[0], b, offset);\n const valueBytes = this.valueLayout.encode(src[1], b, offset + keyBytes);\n return keyBytes + valueBytes;\n }\n getSpan(b, offset) {\n return (this.keyLayout.getSpan(b, offset) + this.valueLayout.getSpan(b, offset));\n }\n}\nfunction map(keyLayout, valueLayout, property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.seq)(new MapEntryLayout(keyLayout, valueLayout), (0, buffer_layout_1.offset)(length, -length.span), \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => new Map(values), (values) => ({ values: Array.from(values.entries()) }), property);\n}\nexports.map = map;\n//# sourceMappingURL=index.js.map","/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (process.env.NODE_ENV !== 'production') {\n var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;\n\n if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {\n // this would only cause problem in speedy mode\n // but we don't want enabling speedy to affect the observable behavior\n // so we report this error at all times\n console.error(\"You're attempting to insert the following rule:\\n\" + rule + '\\n\\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');\n }\n this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;\n }\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {\n console.error(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n }\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode && tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n\n if (process.env.NODE_ENV !== 'production') {\n this._alreadyInsertedOrderInsensitiveRule = false;\n }\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, COMMENT, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value,\n parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\nvar ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n\nvar isIgnoringComment = function isIgnoringComment(element) {\n return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;\n};\n\nvar createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {\n return function (element, index, children) {\n if (element.type !== 'rule' || cache.compat) return;\n var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);\n\n if (unsafePseudoClasses) {\n var isNested = !!element.parent; // in nested rules comments become children of the \"auto-inserted\" rule and that's always the `element.parent`\n //\n // considering this input:\n // .a {\n // .b /* comm */ {}\n // color: hotpink;\n // }\n // we get output corresponding to this:\n // .a {\n // & {\n // /* comm */\n // color: hotpink;\n // }\n // .b {}\n // }\n\n var commentContainer = isNested ? element.parent.children : // global rule at the root level\n children;\n\n for (var i = commentContainer.length - 1; i >= 0; i--) {\n var node = commentContainer[i];\n\n if (node.line < element.line) {\n break;\n } // it is quite weird but comments are *usually* put at `column: element.column - 1`\n // so we seek *from the end* for the node that is earlier than the rule's `element` and check that\n // this will also match inputs like this:\n // .a {\n // /* comm */\n // .b {}\n // }\n //\n // but that is fine\n //\n // it would be the easiest to change the placement of the comment to be the first child of the rule:\n // .a {\n // .b { /* comm */ }\n // }\n // with such inputs we wouldn't have to search for the comment at all\n // TODO: consider changing this comment placement in the next major version\n\n\n if (node.column < element.column) {\n if (isIgnoringComment(node)) {\n return;\n }\n\n break;\n }\n }\n\n unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n });\n }\n };\n};\n\nvar isImportRule = function isImportRule(element) {\n return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;\n};\n\nvar isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {\n for (var i = index - 1; i >= 0; i--) {\n if (!isImportRule(children[i])) {\n return true;\n }\n }\n\n return false;\n}; // use this to remove incorrect elements from further processing\n// so they don't get handed to the `sheet` (or anything else)\n// as that could potentially lead to additional logs which in turn could be overhelming to the user\n\n\nvar nullifyElement = function nullifyElement(element) {\n element.type = '';\n element.value = '';\n element[\"return\"] = '';\n element.children = '';\n element.props = '';\n};\n\nvar incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {\n if (!isImportRule(element)) {\n return;\n }\n\n if (element.parent) {\n console.error(\"`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.\");\n nullifyElement(element);\n } else if (isPrependedWithRegularRules(index, children)) {\n console.error(\"`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.\");\n nullifyElement(element);\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (process.env.NODE_ENV !== 'production' && !key) {\n throw new Error(\"You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\\n\" + \"If multiple caches share the same key they might \\\"fight\\\" for each other's style elements.\");\n }\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe\n if (/[^a-z-]/.test(key)) {\n throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n }\n }\n\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' '); // $FlowFixMe\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n if (process.env.NODE_ENV !== 'production') {\n omnipresentPlugins.push(createUnsafeSelectorsAlarm({\n get compat() {\n return cache.compat;\n }\n\n }), incorrectImportAlarm);\n }\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {\n if (!element.root) {\n if (element[\"return\"]) {\n currentSheet.insert(element[\"return\"]);\n } else if (element.value && element.type !== COMMENT) {\n // insert empty rule in non-production environments\n // so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet\n currentSheet.insert(element.value + \"{}\");\n }\n }\n } : rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n currentSheet = {\n insert: function insert(rule) {\n sheet.insert(rule + serialized.map);\n }\n };\n }\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isBrowser = \"object\" !== 'undefined';\nvar hasOwn = {}.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nif (process.env.NODE_ENV !== 'production') {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nif (!isBrowser) {\n withEmotionCache = function withEmotionCache(func) {\n return function (props) {\n var cache = useContext(EmotionCacheContext);\n\n if (cache === null) {\n // yes, we're potentially creating this on every render\n // it doesn't actually matter though since it's only on the server\n // so there will only every be a single render\n // that could change in the future because of suspense and etc. but for now,\n // this works and i don't want to optimise for a future thing that we aren't sure about\n cache = createCache({\n key: 'css'\n });\n return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {\n value: cache\n }, func(props, cache));\n } else {\n return func(props, cache);\n }\n };\n };\n}\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if (process.env.NODE_ENV !== 'production' && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/React.forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar getLastPart = function getLastPart(functionName) {\n // The match may be something like 'Object.createEmotionProps' or\n // 'Loader.prototype.render'\n var parts = functionName.split('.');\n return parts[parts.length - 1];\n};\n\nvar getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {\n // V8\n var match = /^\\s+at\\s+([A-Za-z0-9$.]+)\\s/.exec(line);\n if (match) return getLastPart(match[1]); // Safari / Firefox\n\n match = /^([A-Za-z0-9$.]+)@/.exec(line);\n if (match) return getLastPart(match[1]);\n return undefined;\n};\n\nvar internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS\n// identifiers, thus we only need to replace what is a valid character for JS,\n// but not for CSS.\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {\n if (!stackTrace) return undefined;\n var lines = stackTrace.split('\\n');\n\n for (var i = 0; i < lines.length; i++) {\n var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just \"Error\"\n\n if (!functionName) continue; // If we reach one of these, we have gone too far and should quit\n\n if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an\n // uppercase letter\n\n if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);\n }\n\n return undefined;\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwn.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when\n // the label hasn't already been computed\n\n if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {\n var label = getLabelFromStackTrace(new Error().stack);\n if (label) newProps[labelPropName] = label;\n }\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwn.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwn as h, isBrowser as i, useTheme as u, withEmotionCache as w };\n","import { h as hasOwn, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isBrowser$1 } from './emotion-element-43c6fea0.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-43c6fea0.browser.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\n\nvar pkg = {\n\tname: \"@emotion/react\",\n\tversion: \"11.11.4\",\n\tmain: \"dist/emotion-react.cjs.js\",\n\tmodule: \"dist/emotion-react.esm.js\",\n\tbrowser: {\n\t\t\"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n\t},\n\texports: {\n\t\t\".\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./dist/emotion-react.worker.esm.js\",\n\t\t\t\tbrowser: \"./dist/emotion-react.browser.esm.js\",\n\t\t\t\t\"default\": \"./dist/emotion-react.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./dist/emotion-react.cjs.mjs\",\n\t\t\t\"default\": \"./dist/emotion-react.cjs.js\"\n\t\t},\n\t\t\"./jsx-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js\"\n\t\t},\n\t\t\"./_isolated-hnrs\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js\",\n\t\t\t\tbrowser: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js\",\n\t\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs\",\n\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js\"\n\t\t},\n\t\t\"./jsx-dev-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js\"\n\t\t},\n\t\t\"./package.json\": \"./package.json\",\n\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\"./macro\": {\n\t\t\ttypes: {\n\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t},\n\t\t\t\"default\": \"./macro.js\"\n\t\t}\n\t},\n\ttypes: \"types/index.d.ts\",\n\tfiles: [\n\t\t\"src\",\n\t\t\"dist\",\n\t\t\"jsx-runtime\",\n\t\t\"jsx-dev-runtime\",\n\t\t\"_isolated-hnrs\",\n\t\t\"types/*.d.ts\",\n\t\t\"macro.*\"\n\t],\n\tsideEffects: false,\n\tauthor: \"Emotion Contributors\",\n\tlicense: \"MIT\",\n\tscripts: {\n\t\t\"test:typescript\": \"dtslint types\"\n\t},\n\tdependencies: {\n\t\t\"@babel/runtime\": \"^7.18.3\",\n\t\t\"@emotion/babel-plugin\": \"^11.11.0\",\n\t\t\"@emotion/cache\": \"^11.11.0\",\n\t\t\"@emotion/serialize\": \"^1.1.3\",\n\t\t\"@emotion/use-insertion-effect-with-fallbacks\": \"^1.0.1\",\n\t\t\"@emotion/utils\": \"^1.2.1\",\n\t\t\"@emotion/weak-memoize\": \"^0.3.1\",\n\t\t\"hoist-non-react-statics\": \"^3.3.1\"\n\t},\n\tpeerDependencies: {\n\t\treact: \">=16.8.0\"\n\t},\n\tpeerDependenciesMeta: {\n\t\t\"@types/react\": {\n\t\t\toptional: true\n\t\t}\n\t},\n\tdevDependencies: {\n\t\t\"@definitelytyped/dtslint\": \"0.0.112\",\n\t\t\"@emotion/css\": \"11.11.2\",\n\t\t\"@emotion/css-prettifier\": \"1.1.3\",\n\t\t\"@emotion/server\": \"11.11.0\",\n\t\t\"@emotion/styled\": \"11.11.0\",\n\t\t\"html-tag-names\": \"^1.1.2\",\n\t\treact: \"16.14.0\",\n\t\t\"svg-tag-names\": \"^1.1.1\",\n\t\ttypescript: \"^4.5.5\"\n\t},\n\trepository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n\tpublishConfig: {\n\t\taccess: \"public\"\n\t},\n\t\"umd:main\": \"dist/emotion-react.umd.min.js\",\n\tpreconstruct: {\n\t\tentrypoints: [\n\t\t\t\"./index.js\",\n\t\t\t\"./jsx-runtime.js\",\n\t\t\t\"./jsx-dev-runtime.js\",\n\t\t\t\"./_isolated-hnrs.js\"\n\t\t],\n\t\tumdName: \"emotionReact\",\n\t\texports: {\n\t\t\tenvConditions: [\n\t\t\t\t\"browser\",\n\t\t\t\t\"worker\"\n\t\t\t],\n\t\t\textra: {\n\t\t\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\t\t\"./macro\": {\n\t\t\t\t\ttypes: {\n\t\t\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t\t\t},\n\t\t\t\t\t\"default\": \"./macro.js\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar jsx = function jsx(type, props) {\n var args = arguments;\n\n if (props == null || !hasOwn.call(props, 'css')) {\n // $FlowFixMe\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false; // maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n\n if (!isBrowser$1) {\n var _ref;\n\n var serializedNames = serialized.name;\n var serializedStyles = serialized.styles;\n var next = serialized.next;\n\n while (next !== undefined) {\n serializedNames += ' ' + next.name;\n serializedStyles += next.styles;\n next = next.next;\n }\n\n var shouldCache = cache.compat === true;\n var rules = cache.insert(\"\", {\n name: serializedNames,\n styles: serializedStyles\n }, cache.sheet, shouldCache);\n\n if (shouldCache) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"style\", (_ref = {}, _ref[\"data-emotion\"] = cache.key + \"-global \" + serializedNames, _ref.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref.nonce = cache.sheet.nonce, _ref));\n } // yes, i know these hooks are used conditionally\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false; // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Global.displayName = 'EmotionGlobal';\n}\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {\n console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from component.');\n }\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n ClassNames.displayName = 'EmotionClassNames';\n}\n\nif (process.env.NODE_ENV !== 'production') {\n var isBrowser = \"object\" !== 'undefined'; // #1727, #2905 for some reason Jest and Vitest evaluate modules twice if some consuming module gets mocked\n\n var isTestEnv = typeof jest !== 'undefined' || typeof vi !== 'undefined';\n\n if (isBrowser && !isTestEnv) {\n // globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later\n var globalContext = // $FlowIgnore\n typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef\n : isBrowser ? window : global;\n var globalKey = \"__EMOTION_REACT_\" + pkg.version.split('.')[0] + \"__\";\n\n if (globalContext[globalKey]) {\n console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');\n }\n\n globalContext[globalKey] = true;\n }\n}\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n var contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\\(|(no-)?(open|close)-quote/;\n var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g;\n var hyphenatedCache = {};\n\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n throw new Error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n\n var processed = oldProcessStyleValue(key, value);\n\n if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n return _char.toUpperCase();\n }) + \"?\");\n }\n\n return processed;\n };\n}\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n if (interpolation.__emotion_styles !== undefined) {\n if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n throw new Error(noComponentSelectorMessage);\n }\n\n return interpolation;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = interpolation.styles + \";\";\n\n if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n styles += interpolation.map;\n }\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n\n break;\n }\n\n case 'string':\n if (process.env.NODE_ENV !== 'production') {\n var matched = [];\n var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n var fakeVarName = \"animation\" + matched.length;\n matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n return \"${\" + fakeVarName + \"}\";\n });\n\n if (matched.length) {\n console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n }\n }\n\n break;\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n if (registered == null) {\n return interpolation;\n }\n\n var cached = registered[interpolation];\n return cached !== undefined ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (_key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n }\n\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//g;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[i];\n }\n }\n\n var sourceMap;\n\n if (process.env.NODE_ENV !== 'production') {\n styles = styles.replace(sourceMapPattern, function (match) {\n sourceMap = match;\n return '';\n });\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + // $FlowFixMe we know it's not null\n match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n return {\n name: name,\n styles: styles,\n map: sourceMap,\n next: cursor,\n toString: function toString() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n }\n };\n }\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\n\nexport { serializeStyles };\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport SystemDefaultPropsProvider, { useDefaultProps as useSystemDefaultProps } from '@mui/system/DefaultPropsProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction DefaultPropsProvider(props) {\n return /*#__PURE__*/_jsx(SystemDefaultPropsProvider, _extends({}, props));\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object.isRequired\n} : void 0;\nexport default DefaultPropsProvider;\nexport function useDefaultProps(params) {\n return useSystemDefaultProps(params);\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles as MuiGlobalStyles } from '@mui/styled-engine';\nimport useTheme from '../useTheme';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GlobalStyles({\n styles,\n themeId,\n defaultTheme = {}\n}) {\n const upperTheme = useTheme(defaultTheme);\n const globalStyles = typeof styles === 'function' ? styles(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles;\n return /*#__PURE__*/_jsx(MuiGlobalStyles, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n defaultTheme: PropTypes.object,\n /**\n * @ignore\n */\n styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool]),\n /**\n * @ignore\n */\n themeId: PropTypes.string\n} : void 0;\nexport default GlobalStyles;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles as SystemGlobalStyles } from '@mui/system';\nimport defaultTheme from '../styles/defaultTheme';\nimport THEME_ID from '../styles/identifier';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GlobalStyles(props) {\n return /*#__PURE__*/_jsx(SystemGlobalStyles, _extends({}, props, {\n defaultTheme: defaultTheme,\n themeId: THEME_ID\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The styles you want to apply globally.\n */\n styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool])\n} : void 0;\nexport default GlobalStyles;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, mixins) {\n return _extends({\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n }\n }, mixins);\n}","const common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","const grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nexport default grey;","const purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","const red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","const orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","const blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","const lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","const green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nconst _excluded = [\"mode\", \"contrastThreshold\", \"tonalOffset\"];\nimport deepmerge from '@mui/utils/deepmerge';\nimport { darken, getContrastRatio, lighten } from '@mui/system/colorManipulator';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport purple from '../colors/purple';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport lightBlue from '../colors/lightBlue';\nimport green from '../colors/green';\nexport const light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport const dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: blue[200],\n light: blue[50],\n dark: blue[400]\n };\n }\n return {\n main: blue[700],\n light: blue[400],\n dark: blue[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: purple[200],\n light: purple[50],\n dark: purple[400]\n };\n }\n return {\n main: purple[500],\n light: purple[300],\n dark: purple[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: red[500],\n light: red[300],\n dark: red[700]\n };\n }\n return {\n main: red[700],\n light: red[400],\n dark: red[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: lightBlue[400],\n light: lightBlue[300],\n dark: lightBlue[700]\n };\n }\n return {\n main: lightBlue[700],\n light: lightBlue[500],\n dark: lightBlue[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: green[400],\n light: green[300],\n dark: green[700]\n };\n }\n return {\n main: green[800],\n light: green[500],\n dark: green[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: orange[400],\n light: orange[300],\n dark: orange[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: orange[500],\n dark: orange[900]\n };\n}\nexport default function createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2\n } = palette,\n other = _objectWithoutPropertiesLoose(palette, _excluded);\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (process.env.NODE_ENV !== 'production') {\n const contrast = getContrastRatio(background, contrastText);\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = _extends({}, color);\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\nThe color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : _formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\n\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from \"@mui/material/colors\";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });` : _formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n const modes = {\n dark,\n light\n };\n if (process.env.NODE_ENV !== 'production') {\n if (!modes[mode]) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n const paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common: _extends({}, common),\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset\n }, modes[mode]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"];\nimport deepmerge from '@mui/utils/deepmerge';\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nexport default function createTypography(palette, typography) {\n const _ref = typeof typography === 'function' ? typography(palette) : typography,\n {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}, casing, allVariants);\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return deepmerge(_extends({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n });\n}","const shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"duration\", \"easing\", \"delay\"];\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport const easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nexport const duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);\n}\nexport default function createTransitions(inputTransitions) {\n const mergedEasing = _extends({}, easing, inputTransitions.easing);\n const mergedDuration = _extends({}, duration, inputTransitions.duration);\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string';\n // IE11 support, replace with Number.isNaN\n // eslint-disable-next-line no-restricted-globals\n const isNumber = value => !isNaN(parseFloat(value));\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n if (typeof options !== 'object') {\n console.error(['MUI: Secong argument of transition.create must be an object.', \"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`\"].join('\\n'));\n }\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return _extends({\n getAutoHeightDuration,\n create\n }, inputTransitions, {\n easing: mergedEasing,\n duration: mergedDuration\n });\n}","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nconst _excluded = [\"breakpoints\", \"mixins\", \"spacing\", \"palette\", \"transitions\", \"typography\", \"shape\"];\nimport deepmerge from '@mui/utils/deepmerge';\nimport styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';\nimport systemCreateTheme from '@mui/system/createTheme';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport createTransitions from './createTransitions';\nimport zIndex from './zIndex';\nfunction createTheme(options = {}, ...args) {\n const {\n mixins: mixinsInput = {},\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n if (options.vars) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`vars\\` is a private field used for CSS variables support.\nPlease use another name.` : _formatMuiErrorMessage(18));\n }\n const palette = createPalette(paletteInput);\n const systemTheme = systemCreateTheme(options);\n let muiTheme = deepmerge(systemTheme, {\n mixins: createMixins(systemTheme.breakpoints, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: shadows.slice(),\n typography: createTypography(palette, typographyInput),\n transitions: createTransitions(transitionsInput),\n zIndex: _extends({}, zIndex)\n });\n muiTheme = deepmerge(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.\n const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n const traverse = (node, component) => {\n let key;\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (key in node) {\n const child = node[key];\n if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n const stateClass = generateUtilityClass('', key);\n console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n root: {\n [`&.${stateClass}`]: child\n }\n }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n }\n // Remove the style to prevent global conflicts.\n node[key] = {};\n }\n }\n };\n Object.keys(muiTheme.components).forEach(component => {\n const styleOverrides = muiTheme.components[component].styleOverrides;\n if (styleOverrides && component.indexOf('Mui') === 0) {\n traverse(styleOverrides, component);\n }\n });\n }\n muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nlet warnedOnce = false;\nexport function createMuiTheme(...args) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n }\n }\n return createTheme(...args);\n}\nexport default createTheme;","'use client';\n\nimport createTheme from './createTheme';\nconst defaultTheme = createTheme();\nexport default defaultTheme;","export default '$$material';","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Global } from '@emotion/react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction isEmpty(obj) {\n return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\nexport default function GlobalStyles(props) {\n const {\n styles,\n defaultTheme = {}\n } = props;\n const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;\n return /*#__PURE__*/_jsx(Global, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes = {\n defaultTheme: PropTypes.object,\n styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])\n} : void 0;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.alpha = alpha;\nexports.blend = blend;\nexports.colorChannel = void 0;\nexports.darken = darken;\nexports.decomposeColor = decomposeColor;\nexports.emphasize = emphasize;\nexports.getContrastRatio = getContrastRatio;\nexports.getLuminance = getLuminance;\nexports.hexToRgb = hexToRgb;\nexports.hslToRgb = hslToRgb;\nexports.lighten = lighten;\nexports.private_safeAlpha = private_safeAlpha;\nexports.private_safeColorChannel = void 0;\nexports.private_safeDarken = private_safeDarken;\nexports.private_safeEmphasize = private_safeEmphasize;\nexports.private_safeLighten = private_safeLighten;\nexports.recomposeColor = recomposeColor;\nexports.rgbToHex = rgbToHex;\nvar _formatMuiErrorMessage2 = _interopRequireDefault(require(\"@mui/utils/formatMuiErrorMessage\"));\nvar _clamp = _interopRequireDefault(require(\"@mui/utils/clamp\"));\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return (0, _clamp.default)(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nfunction hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nfunction decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : (0, _formatMuiErrorMessage2.default)(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : (0, _formatMuiErrorMessage2.default)(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nconst colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexports.colorChannel = colorChannel;\nconst private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexports.private_safeColorChannel = private_safeColorChannel;\nfunction recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.indexOf('color') !== -1) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nfunction rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nfunction hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nfunction getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nfunction getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nfunction private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nfunction private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nfunction private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nfunction private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nfunction blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport resolveProps from '@mui/utils/resolveProps';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PropsContext = /*#__PURE__*/React.createContext(undefined);\nfunction DefaultPropsProvider({\n value,\n children\n}) {\n return /*#__PURE__*/_jsx(PropsContext.Provider, {\n value: value,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object\n} : void 0;\nfunction getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name]) {\n return props;\n }\n const config = theme.components[name];\n if (config.defaultProps) {\n // compatible with v5 signature\n return resolveProps(config.defaultProps, props);\n }\n if (!config.styleOverrides && !config.variants) {\n // v6 signature, no property 'defaultProps'\n return resolveProps(config, props);\n }\n return props;\n}\nexport function useDefaultProps({\n props,\n name\n}) {\n const ctx = React.useContext(PropsContext);\n return getThemeProps({\n props,\n name,\n theme: {\n components: ctx\n }\n });\n}\nexport default DefaultPropsProvider;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"value\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RtlContext = /*#__PURE__*/React.createContext();\nfunction RtlProvider(_ref) {\n let {\n value\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n return /*#__PURE__*/_jsx(RtlContext.Provider, _extends({\n value: value != null ? value : true\n }, props));\n}\nprocess.env.NODE_ENV !== \"production\" ? RtlProvider.propTypes = {\n children: PropTypes.node,\n value: PropTypes.bool\n} : void 0;\nexport const useRtl = () => {\n const value = React.useContext(RtlContext);\n return value != null ? value : false;\n};\nexport default RtlProvider;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport PropTypes from 'prop-types';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from './merge';\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nexport const values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n // key is breakpoint\n if (Object.keys(themeBreakpoints.values || values).indexOf(breakpoint) !== -1) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme\n }, props[key]));\n }\n return acc;\n }, null);\n return merge(base, extended);\n };\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nexport function createEmptyBreakpointObject(breakpointsInput = {}) {\n var _breakpointsInput$key;\n const breakpointsInOrder = (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nexport function removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nexport function mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nexport function resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport default breakpoints;","/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n *\n * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nexport default function applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars && typeof theme.getColorSchemeSelector === 'function') {\n // If CssVarsProvider is used as a provider,\n // returns '* :where([data-mui-color-scheme=\"light|dark\"]) &'\n const selector = theme.getColorSchemeSelector(key).replace(/(\\[[^\\]]+\\])/, '*:where($1)');\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"values\", \"unit\", \"step\"];\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return _extends({}, acc, {\n [obj.key]: obj.val\n });\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nexport default function createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5\n } = breakpoints,\n other = _objectWithoutPropertiesLoose(breakpoints, _excluded);\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return _extends({\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit\n }, other);\n}","const shape = {\n borderRadius: 4\n};\nexport default shape;","import { createUnarySpacing } from '../spacing';\n\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nexport default function createSpacing(spacingInput = 8) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n\n // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n // Smaller components, such as icons, can align to a 4dp grid.\n // https://m2.material.io/design/layout/understanding-layout.html\n const transform = createUnarySpacing({\n spacing: spacingInput\n });\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"breakpoints\", \"palette\", \"spacing\", \"shape\"];\nimport deepmerge from '@mui/utils/deepmerge';\nimport createBreakpoints from './createBreakpoints';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\nimport styleFunctionSx from '../styleFunctionSx/styleFunctionSx';\nimport defaultSxConfig from '../styleFunctionSx/defaultSxConfig';\nimport applyStyles from './applyStyles';\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n const breakpoints = createBreakpoints(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = deepmerge({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: _extends({\n mode: 'light'\n }, paletteInput),\n spacing,\n shape: _extends({}, shape, shapeInput)\n }, other);\n muiTheme.applyStyles = applyStyles;\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nexport default createTheme;","import deepmerge from '@mui/utils/deepmerge';\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\nexport default merge;","export default function memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}","import responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nimport { getPath } from './style';\nimport merge from './merge';\nimport memoize from './memoize';\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nexport const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nexport const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nexport function createUnaryUnit(theme, themeKey, defaultValue, propName) {\n var _getPath;\n const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;\n if (typeof themeSpacing === 'number') {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (typeof abs !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);\n }\n }\n return themeSpacing * abs;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n return themeSpacing[abs];\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n return () => undefined;\n}\nexport function createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nexport function getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n const abs = Math.abs(propValue);\n const transformed = transformer(abs);\n if (propValue >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n return `-${transformed}`;\n}\nexport function getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (keys.indexOf(prop) === -1) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n}\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});\n}\nexport function margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nexport function padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nexport function getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nexport function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: responsivePropType\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\nexport default style;","import merge from './merge';\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;","import responsivePropType from './responsivePropType';\nimport style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\nexport function borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return style({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nexport const border = createBorderStyle('border', borderTransform);\nexport const borderTop = createBorderStyle('borderTop', borderTransform);\nexport const borderRight = createBorderStyle('borderRight', borderTransform);\nexport const borderBottom = createBorderStyle('borderBottom', borderTransform);\nexport const borderLeft = createBorderStyle('borderLeft', borderTransform);\nexport const borderColor = createBorderStyle('borderColor');\nexport const borderTopColor = createBorderStyle('borderTopColor');\nexport const borderRightColor = createBorderStyle('borderRightColor');\nexport const borderBottomColor = createBorderStyle('borderBottomColor');\nexport const borderLeftColor = createBorderStyle('borderLeftColor');\nexport const outline = createBorderStyle('outline', borderTransform);\nexport const outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: responsivePropType\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\nexport default borders;","import style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\nimport responsivePropType from './responsivePropType';\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.gap, styleFromPropValue);\n }\n return null;\n};\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: responsivePropType\n} : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: responsivePropType\n} : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: responsivePropType\n} : {};\nrowGap.filterProps = ['rowGap'];\nexport const gridColumn = style({\n prop: 'gridColumn'\n});\nexport const gridRow = style({\n prop: 'gridRow'\n});\nexport const gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport const gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport const gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport const gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport const gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport const gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport const gridArea = style({\n prop: 'gridArea'\n});\nconst grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from './style';\nimport compose from './compose';\nexport function paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nexport const color = style({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const backgroundColor = style({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = compose(color, bgcolor, backgroundColor);\nexport default palette;","import style from './style';\nimport compose from './compose';\nimport { handleBreakpoints, values as breakpointsValues } from './breakpoints';\nexport function sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nexport const width = style({\n prop: 'width',\n transform: sizingTransform\n});\nexport const maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n var _props$theme, _props$theme2;\n const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || breakpointsValues[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return handleBreakpoints(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nexport const minWidth = style({\n prop: 'minWidth',\n transform: sizingTransform\n});\nexport const height = style({\n prop: 'height',\n transform: sizingTransform\n});\nexport const maxHeight = style({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nexport const minHeight = style({\n prop: 'minHeight',\n transform: sizingTransform\n});\nexport const sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nexport const sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nexport const boxSizing = style({\n prop: 'boxSizing'\n});\nconst sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import { padding, margin } from '../spacing';\nimport { borderRadius, borderTransform } from '../borders';\nimport { gap, rowGap, columnGap } from '../cssGrid';\nimport { paletteTransform } from '../palette';\nimport { maxWidth, sizingTransform } from '../sizing';\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n // spacing\n p: {\n style: padding\n },\n pt: {\n style: padding\n },\n pr: {\n style: padding\n },\n pb: {\n style: padding\n },\n pl: {\n style: padding\n },\n px: {\n style: padding\n },\n py: {\n style: padding\n },\n padding: {\n style: padding\n },\n paddingTop: {\n style: padding\n },\n paddingRight: {\n style: padding\n },\n paddingBottom: {\n style: padding\n },\n paddingLeft: {\n style: padding\n },\n paddingX: {\n style: padding\n },\n paddingY: {\n style: padding\n },\n paddingInline: {\n style: padding\n },\n paddingInlineStart: {\n style: padding\n },\n paddingInlineEnd: {\n style: padding\n },\n paddingBlock: {\n style: padding\n },\n paddingBlockStart: {\n style: padding\n },\n paddingBlockEnd: {\n style: padding\n },\n m: {\n style: margin\n },\n mt: {\n style: margin\n },\n mr: {\n style: margin\n },\n mb: {\n style: margin\n },\n ml: {\n style: margin\n },\n mx: {\n style: margin\n },\n my: {\n style: margin\n },\n margin: {\n style: margin\n },\n marginTop: {\n style: margin\n },\n marginRight: {\n style: margin\n },\n marginBottom: {\n style: margin\n },\n marginLeft: {\n style: margin\n },\n marginX: {\n style: margin\n },\n marginY: {\n style: margin\n },\n marginInline: {\n style: margin\n },\n marginInlineStart: {\n style: margin\n },\n marginInlineEnd: {\n style: margin\n },\n marginBlock: {\n style: margin\n },\n marginBlockStart: {\n style: margin\n },\n marginBlockEnd: {\n style: margin\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: gap\n },\n rowGap: {\n style: rowGap\n },\n columnGap: {\n style: columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: sizingTransform\n },\n maxWidth: {\n style: maxWidth\n },\n minWidth: {\n transform: sizingTransform\n },\n height: {\n transform: sizingTransform\n },\n maxHeight: {\n transform: sizingTransform\n },\n minHeight: {\n transform: sizingTransform\n },\n boxSizing: {},\n // typography\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\nexport default defaultSxConfig;","import capitalize from '@mui/utils/capitalize';\nimport merge from '../merge';\nimport { getPath, getStyleValue as getValue } from '../style';\nimport { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from '../breakpoints';\nimport defaultSxConfig from './defaultSxConfig';\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = getPath(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n var _theme$unstable_sxCon;\n const {\n sx,\n theme = {}\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = handleBreakpoints({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme\n });\n } else {\n css = merge(css, breakpointsValues);\n }\n }\n } else {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n return removeUnusedBreakpoints(breakpointsKeys, css);\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\nexport default styleFunctionSx;","'use client';\n\nimport createTheme from './createTheme';\nimport useThemeWithoutDefault from './useThemeWithoutDefault';\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`capitalize(string)\\` expects a string argument.` : _formatMuiErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nexport default clamp;","export { default } from './clamp';","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nexport function isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (!isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? _extends({}, target) : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n if (isPlainObject(source[key]) &&\n // Avoid prototype pollution\n Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\n}","/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe if we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n /* eslint-disable prefer-template */\n let url = 'https://mui.com/production-error/?code=' + code;\n for (let i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}","export { default } from './formatMuiErrorMessage';","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param {object} defaultProps\n * @param {object} props\n * @returns {object} resolved props\n */\nexport default function resolveProps(defaultProps, props) {\n const output = _extends({}, props);\n Object.keys(defaultProps).forEach(propName => {\n if (propName.toString().match(/^(components|slots)$/)) {\n output[propName] = _extends({}, defaultProps[propName], output[propName]);\n } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {\n const defaultSlotProps = defaultProps[propName] || {};\n const slotProps = props[propName];\n output[propName] = {};\n if (!slotProps || !Object.keys(slotProps)) {\n // Reduce the iteration if the slot props is empty\n output[propName] = defaultSlotProps;\n } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {\n // Reduce the iteration if the default slot props is empty\n output[propName] = slotProps;\n } else {\n output[propName] = _extends({}, slotProps);\n Object.keys(defaultSlotProps).forEach(slotPropName => {\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n });\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n });\n return output;\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createWSOLAccountInstructions = void 0;\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst web3_js_1 = require(\"@solana/web3.js\");\n// TODO use native-mint instead\nfunction createWSOLAccountInstructions(walletAddress, amountIn, rentExemptLamports) {\n const tempAccount = new web3_js_1.Keypair();\n const createAccountInstruction = web3_js_1.SystemProgram.createAccount({\n fromPubkey: walletAddress,\n newAccountPubkey: tempAccount.publicKey,\n lamports: amountIn.toNumber() + rentExemptLamports,\n space: spl_token_1.AccountLayout.span,\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n });\n const initAccountInstruction = spl_token_1.Token.createInitAccountInstruction(spl_token_1.TOKEN_PROGRAM_ID, spl_token_1.NATIVE_MINT, tempAccount.publicKey, walletAddress);\n const closeWSOLAccountInstruction = spl_token_1.Token.createCloseAccountInstruction(spl_token_1.TOKEN_PROGRAM_ID, tempAccount.publicKey, walletAddress, walletAddress, []);\n return {\n address: tempAccount.publicKey,\n instructions: [createAccountInstruction, initAccountInstruction],\n cleanupInstructions: [closeWSOLAccountInstruction],\n signers: [tempAccount],\n };\n}\nexports.createWSOLAccountInstructions = createWSOLAccountInstructions;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./math\"), exports);\n__exportStar(require(\"./web3\"), exports);\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DecimalUtil = void 0;\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst decimal_js_1 = __importDefault(require(\"decimal.js\"));\nclass DecimalUtil {\n static adjustDecimals(input, shift = 0) {\n return input.div(decimal_js_1.default.pow(10, shift));\n }\n static fromU64(input, shift = 0) {\n return new decimal_js_1.default(input.toString()).div(new decimal_js_1.default(10).pow(shift));\n }\n static fromNumber(input, shift = 0) {\n return new decimal_js_1.default(input).div(new decimal_js_1.default(10).pow(shift));\n }\n static toU64(input, shift = 0) {\n if (input.isNeg()) {\n throw new Error(\"Negative decimal value ${input} cannot be converted to u64.\");\n }\n const shiftedValue = input.mul(new decimal_js_1.default(10).pow(shift));\n const zeroDecimalValue = shiftedValue.trunc();\n return new spl_token_1.u64(zeroDecimalValue.toString());\n }\n}\nexports.DecimalUtil = DecimalUtil;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./decimal-util\"), exports);\n__exportStar(require(\"./math-util\"), exports);\n__exportStar(require(\"./percentage\"), exports);\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MathUtil = exports.U64_MAX = exports.U128 = exports.TWO = exports.ONE = exports.ZERO = void 0;\nconst anchor_1 = require(\"@project-serum/anchor\");\nconst decimal_js_1 = __importDefault(require(\"decimal.js\"));\n/**\n * @category Math\n */\nexports.ZERO = new anchor_1.BN(0);\n/**\n * @category Math\n */\nexports.ONE = new anchor_1.BN(1);\n/**\n * @category Math\n */\nexports.TWO = new anchor_1.BN(2);\n/**\n * @category Math\n */\nexports.U128 = exports.TWO.pow(new anchor_1.BN(128));\n/**\n * @category Math\n */\nexports.U64_MAX = exports.TWO.pow(new anchor_1.BN(64)).sub(exports.ONE);\n/**\n * @category Math\n */\nclass MathUtil {\n static toX64_BN(num) {\n return num.mul(new anchor_1.BN(2).pow(new anchor_1.BN(64)));\n }\n static toX64_Decimal(num) {\n return num.mul(decimal_js_1.default.pow(2, 64));\n }\n static toX64(num) {\n return new anchor_1.BN(num.mul(decimal_js_1.default.pow(2, 64)).floor().toFixed());\n }\n static fromX64(num) {\n return new decimal_js_1.default(num.toString()).mul(decimal_js_1.default.pow(2, -64));\n }\n static fromX64_Decimal(num) {\n return num.mul(decimal_js_1.default.pow(2, -64));\n }\n static fromX64_BN(num) {\n return num.div(new anchor_1.BN(2).pow(new anchor_1.BN(64)));\n }\n static shiftRightRoundUp(n) {\n let result = n.shrn(64);\n if (n.mod(exports.U64_MAX).gt(exports.ZERO)) {\n result = result.add(exports.ONE);\n }\n return result;\n }\n static divRoundUp(n0, n1) {\n const hasRemainder = !n0.mod(n1).eq(exports.ZERO);\n if (hasRemainder) {\n return n0.div(n1).add(new anchor_1.BN(1));\n }\n else {\n return n0.div(n1);\n }\n }\n static subUnderflowU128(n0, n1) {\n return n0.add(exports.U128).sub(n1).mod(exports.U128);\n }\n}\nexports.MathUtil = MathUtil;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Percentage = void 0;\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst decimal_js_1 = __importDefault(require(\"decimal.js\"));\n/**\n * @category Math\n */\nclass Percentage {\n constructor(numerator, denominator) {\n this.toString = () => {\n return `${this.numerator.toString()}/${this.denominator.toString()}`;\n };\n this.numerator = numerator;\n this.denominator = denominator;\n }\n static fromDecimal(number) {\n return Percentage.fromFraction(number.toDecimalPlaces(1).mul(10).toNumber(), 1000);\n }\n static fromFraction(numerator, denominator) {\n const num = typeof numerator === \"number\" ? new spl_token_1.u64(numerator.toString()) : numerator;\n const denom = typeof denominator === \"number\" ? new spl_token_1.u64(denominator.toString()) : denominator;\n return new Percentage(num, denom);\n }\n toDecimal() {\n if (this.denominator.eq(new spl_token_1.u64(0))) {\n return new decimal_js_1.default(0);\n }\n return new decimal_js_1.default(this.numerator.toString()).div(new decimal_js_1.default(this.denominator.toString()));\n }\n add(p2) {\n const denomGcd = this.denominator.gcd(p2.denominator);\n const denomLcm = this.denominator.div(denomGcd).mul(p2.denominator);\n const p1DenomAdjustment = denomLcm.div(this.denominator);\n const p2DenomAdjustment = denomLcm.div(p2.denominator);\n const p1NumeratorAdjusted = this.numerator.mul(p1DenomAdjustment);\n const p2NumeratorAdjusted = p2.numerator.mul(p2DenomAdjustment);\n const newNumerator = p1NumeratorAdjusted.add(p2NumeratorAdjusted);\n return new Percentage(new spl_token_1.u64(newNumerator.toString()), new spl_token_1.u64(denomLcm.toString()));\n }\n}\nexports.Percentage = Percentage;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AddressUtil = void 0;\nconst anchor_1 = require(\"@project-serum/anchor\");\n/**\n * @category Util\n */\nclass AddressUtil {\n static toPubKey(address) {\n return (0, anchor_1.translateAddress)(address);\n }\n static toPubKeys(addresses) {\n return addresses.map((address) => AddressUtil.toPubKey(address));\n }\n static toString(address) {\n return AddressUtil.toPubKey(address).toBase58();\n }\n static toStrings(addresses) {\n return addresses.map((address) => AddressUtil.toString(address));\n }\n static findProgramAddress(seeds, programId) {\n const [publicKey, bump] = anchor_1.utils.publicKey.findProgramAddressSync(seeds, programId);\n return { publicKey, bump };\n }\n}\nexports.AddressUtil = AddressUtil;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deriveATA = exports.resolveOrCreateATAs = exports.resolveOrCreateATA = void 0;\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst token_instructions_1 = require(\"../helpers/token-instructions\");\nconst token_util_1 = require(\"./token-util\");\nconst types_1 = require(\"./transactions/types\");\n/**\n * IMPORTANT: wrappedSolAmountIn should only be used for input/source token that\n * could be SOL. This is because when SOL is the output, it is the end\n * destination, and thus does not need to be wrapped with an amount.\n *\n * @param connection Solana connection class\n * @param ownerAddress The user's public key\n * @param tokenMint Token mint address\n * @param wrappedSolAmountIn Optional. Only use for input/source token that could be SOL\n * @param payer Payer that would pay the rent for the creation of the ATAs\n * @param modeIdempotent Optional. Use CreateIdempotent instruction instead of Create instruction\n * @returns\n */\nfunction resolveOrCreateATA(connection, ownerAddress, tokenMint, getAccountRentExempt, wrappedSolAmountIn = new spl_token_1.u64(0), payer = ownerAddress, modeIdempotent = false) {\n return __awaiter(this, void 0, void 0, function* () {\n const instructions = yield resolveOrCreateATAs(connection, ownerAddress, [{ tokenMint, wrappedSolAmountIn }], getAccountRentExempt, payer, modeIdempotent);\n return instructions[0];\n });\n}\nexports.resolveOrCreateATA = resolveOrCreateATA;\n/**\n * IMPORTANT: wrappedSolAmountIn should only be used for input/source token that\n * could be SOL. This is because when SOL is the output, it is the end\n * destination, and thus does not need to be wrapped with an amount.\n *\n * @param connection Solana connection class\n * @param ownerAddress The user's public key\n * @param tokenMint Token mint address\n * @param wrappedSolAmountIn Optional. Only use for input/source token that could be SOL\n * @param payer Payer that would pay the rent for the creation of the ATAs\n * @param modeIdempotent Optional. Use CreateIdempotent instruction instead of Create instruction\n * @returns\n */\nfunction resolveOrCreateATAs(connection, ownerAddress, requests, getAccountRentExempt, payer = ownerAddress, modeIdempotent = false) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const nonNativeMints = requests.filter(({ tokenMint }) => !tokenMint.equals(spl_token_1.NATIVE_MINT));\n const nativeMints = requests.filter(({ tokenMint }) => tokenMint.equals(spl_token_1.NATIVE_MINT));\n if (nativeMints.length > 1) {\n throw new Error(\"Cannot resolve multiple WSolAccounts\");\n }\n let instructionMap = {};\n if (nonNativeMints.length > 0) {\n const nonNativeAddresses = yield Promise.all(nonNativeMints.map(({ tokenMint }) => deriveATA(ownerAddress, tokenMint)));\n const tokenAccountInfos = yield connection.getMultipleAccountsInfo(nonNativeAddresses);\n const tokenAccounts = tokenAccountInfos.map((tai) => token_util_1.TokenUtil.deserializeTokenAccount(tai === null || tai === void 0 ? void 0 : tai.data));\n tokenAccounts.forEach((tokenAccount, index) => {\n const ataAddress = nonNativeAddresses[index];\n let resolvedInstruction;\n if (tokenAccount) {\n // ATA whose owner has been changed is abnormal entity.\n // To prevent to send swap/withdraw/collect output to the ATA, an error should be thrown.\n if (!tokenAccount.owner.equals(ownerAddress)) {\n throw new Error(`ATA with change of ownership detected: ${ataAddress.toBase58()}`);\n }\n resolvedInstruction = Object.assign({ address: ataAddress }, types_1.EMPTY_INSTRUCTION);\n }\n else {\n const createAtaInstruction = createAssociatedTokenAccountInstruction(spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, spl_token_1.TOKEN_PROGRAM_ID, nonNativeMints[index].tokenMint, ataAddress, ownerAddress, payer, modeIdempotent);\n resolvedInstruction = {\n address: ataAddress,\n instructions: [createAtaInstruction],\n cleanupInstructions: [],\n signers: [],\n };\n }\n instructionMap[nonNativeMints[index].tokenMint.toBase58()] = resolvedInstruction;\n });\n }\n if (nativeMints.length > 0) {\n const accountRentExempt = yield getAccountRentExempt();\n const wrappedSolAmountIn = ((_a = nativeMints[0]) === null || _a === void 0 ? void 0 : _a.wrappedSolAmountIn) || new spl_token_1.u64(0);\n instructionMap[spl_token_1.NATIVE_MINT.toBase58()] = (0, token_instructions_1.createWSOLAccountInstructions)(ownerAddress, wrappedSolAmountIn, accountRentExempt);\n }\n // Preserve order of resolution\n return requests.map(({ tokenMint }) => instructionMap[tokenMint.toBase58()]);\n });\n}\nexports.resolveOrCreateATAs = resolveOrCreateATAs;\nfunction deriveATA(ownerAddress, tokenMint) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield spl_token_1.Token.getAssociatedTokenAddress(spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, spl_token_1.TOKEN_PROGRAM_ID, tokenMint, ownerAddress);\n });\n}\nexports.deriveATA = deriveATA;\nfunction createAssociatedTokenAccountInstruction(associatedTokenProgramId, tokenProgramId, mint, associatedAccount, owner, payer, modeIdempotent) {\n if (!modeIdempotent) {\n return spl_token_1.Token.createAssociatedTokenAccountInstruction(associatedTokenProgramId, tokenProgramId, mint, associatedAccount, owner, payer);\n }\n // create CreateIdempotent instruction\n // spl-token v0.1.8 doesn't have a method for CreateIdempotent.\n // https://github.com/solana-labs/solana-program-library/blob/master/associated-token-account/program/src/instruction.rs#L26\n const keys = [\n { pubkey: payer, isSigner: true, isWritable: true },\n { pubkey: associatedAccount, isSigner: false, isWritable: true },\n { pubkey: owner, isSigner: false, isWritable: false },\n { pubkey: mint, isSigner: false, isWritable: false },\n { pubkey: web3_js_1.SystemProgram.programId, isSigner: false, isWritable: false },\n { pubkey: tokenProgramId, isSigner: false, isWritable: false },\n ];\n const instructionData = Buffer.from([1]);\n return new web3_js_1.TransactionInstruction({\n keys,\n programId: associatedTokenProgramId,\n data: instructionData,\n });\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./address-util\"), exports);\n__exportStar(require(\"./ata-util\"), exports);\n__exportStar(require(\"./network\"), exports);\n__exportStar(require(\"./public-key-utils\"), exports);\n__exportStar(require(\"./token-util\"), exports);\n__exportStar(require(\"./transactions\"), exports);\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMultipleAccounts = exports.getMultipleParsedAccounts = exports.getParsedAccount = void 0;\nconst tiny_invariant_1 = __importDefault(require(\"tiny-invariant\"));\nconst address_util_1 = require(\"../address-util\");\nfunction getParsedAccount(connection, address, parser) {\n return __awaiter(this, void 0, void 0, function* () {\n const value = yield connection.getAccountInfo(address_util_1.AddressUtil.toPubKey(address));\n return parser.parse(value === null || value === void 0 ? void 0 : value.data);\n });\n}\nexports.getParsedAccount = getParsedAccount;\nfunction getMultipleParsedAccounts(connection, addresses, parser) {\n return __awaiter(this, void 0, void 0, function* () {\n if (addresses.length === 0) {\n return [];\n }\n const values = yield getMultipleAccounts(connection, address_util_1.AddressUtil.toPubKeys(addresses));\n const results = values\n .map((value) => parser.parse(value === null || value === void 0 ? void 0 : value.data))\n .filter((value) => value !== undefined);\n (0, tiny_invariant_1.default)(results.length === addresses.length, \"not enough results fetched\");\n return results;\n });\n}\nexports.getMultipleParsedAccounts = getMultipleParsedAccounts;\nfunction getMultipleAccounts(connection, addresses) {\n return __awaiter(this, void 0, void 0, function* () {\n if (addresses.length === 0) {\n return [];\n }\n const responses = [];\n const chunk = 100; // getMultipleAccounts has limitation of 100 accounts per request\n for (let i = 0; i < addresses.length; i += chunk) {\n const addressChunk = addresses.slice(i, i + chunk);\n const res = connection.getMultipleAccountsInfo(address_util_1.AddressUtil.toPubKeys(addressChunk), connection.commitment);\n responses.push(res);\n }\n const combinedResult = (yield Promise.all(responses)).flat();\n (0, tiny_invariant_1.default)(combinedResult.length === addresses.length, \"getMultipleAccounts not enough results\");\n return combinedResult;\n });\n}\nexports.getMultipleAccounts = getMultipleAccounts;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./account-requests\"), exports);\n__exportStar(require(\"./parsing\"), exports);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.staticImplements = exports.ParsableMintInfo = exports.ParsableTokenAccountInfo = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst token_util_1 = require(\"../token-util\");\n/**\n * @category Parsables\n */\nlet ParsableTokenAccountInfo = class ParsableTokenAccountInfo {\n constructor() { }\n static parse(data) {\n if (!data) {\n return null;\n }\n try {\n return token_util_1.TokenUtil.deserializeTokenAccount(data);\n }\n catch (e) {\n console.error(`error while parsing TokenAccount: ${e}`);\n return null;\n }\n }\n};\nParsableTokenAccountInfo = __decorate([\n staticImplements()\n], ParsableTokenAccountInfo);\nexports.ParsableTokenAccountInfo = ParsableTokenAccountInfo;\n/**\n * @category Parsables\n */\nlet ParsableMintInfo = class ParsableMintInfo {\n constructor() { }\n static parse(data) {\n if (!data) {\n return null;\n }\n try {\n if (data.byteLength !== spl_token_1.MintLayout.span) {\n throw new Error(\"Invalid data length for MintInfo\");\n }\n const buffer = spl_token_1.MintLayout.decode(data);\n const mintInfo = {\n mintAuthority: buffer.mintAuthorityOption === 0 ? null : new web3_js_1.PublicKey(buffer.mintAuthority),\n supply: spl_token_1.u64.fromBuffer(buffer.supply),\n decimals: buffer.decimals,\n isInitialized: buffer.isInitialized !== 0,\n freezeAuthority: buffer.freezeAuthorityOption === 0 ? null : new web3_js_1.PublicKey(buffer.freezeAuthority),\n };\n return mintInfo;\n }\n catch (e) {\n console.error(`error while parsing MintInfo: ${e}`);\n return null;\n }\n }\n};\nParsableMintInfo = __decorate([\n staticImplements()\n], ParsableMintInfo);\nexports.ParsableMintInfo = ParsableMintInfo;\n/**\n * Class decorator to define an interface with static methods\n * Reference: https://github.com/Microsoft/TypeScript/issues/13462#issuecomment-295685298\n */\nfunction staticImplements() {\n return (constructor) => {\n constructor;\n };\n}\nexports.staticImplements = staticImplements;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PublicKeyUtils = void 0;\nclass PublicKeyUtils {\n /**\n * Check whether a string is a Base58 string.\n * @param value\n * @returns Whether the string is a Base58 string.\n */\n static isBase58(value) {\n return /^[A-HJ-NP-Za-km-z1-9]*$/.test(value);\n }\n /**\n * Order a list of public keys by bytes.\n * @param keys a list of public keys to order\n * @returns an ordered array of public keys\n */\n static orderKeys(...keys) {\n return keys.sort(comparePublicKeys);\n }\n}\nexports.PublicKeyUtils = PublicKeyUtils;\nfunction comparePublicKeys(key1, key2) {\n const bytes1 = key1.toBytes();\n const bytes2 = key2.toBytes();\n // PublicKeys should be zero-padded 32 byte length\n if (bytes1.byteLength !== bytes2.byteLength) {\n return bytes1.byteLength - bytes2.byteLength;\n }\n for (let i = 0; i < bytes1.byteLength; i++) {\n let byte1 = bytes1[i];\n let byte2 = bytes2[i];\n if (byte1 !== byte2) {\n return byte1 - byte2;\n }\n }\n return 0;\n}\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TokenUtil = void 0;\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst tiny_invariant_1 = __importDefault(require(\"tiny-invariant\"));\nconst math_1 = require(\"../math\");\nconst web3_1 = require(\"../web3\");\n/**\n * @category Util\n */\nclass TokenUtil {\n static isNativeMint(mint) {\n return mint.equals(spl_token_1.NATIVE_MINT);\n }\n /**\n * Create an ix to send a spl-token / native-mint to another wallet.\n * This function will handle the associated token accounts internally for spl-token.\n * SOL is sent directly to the user's wallet.\n *\n * @param connection - Connection object\n * @param sourceWallet - PublicKey for the sender's wallet\n * @param destinationWallet - PublicKey for the receiver's wallet\n * @param tokenMint - Mint for the token that is being sent.\n * @param tokenDecimals - Decimal for the token that is being sent.\n * @param amount - Amount of token to send\n * @param getAccountRentExempt - Fn to fetch the account rent exempt value\n * @param payer - PublicKey for the payer that would fund the possibly new token-accounts. (must sign the txn)\n * @returns\n */\n static createSendTokensToWalletInstruction(connection, sourceWallet, destinationWallet, tokenMint, tokenDecimals, amount, getAccountRentExempt, payer) {\n return __awaiter(this, void 0, void 0, function* () {\n (0, tiny_invariant_1.default)(!amount.eq(math_1.ZERO), \"SendToken transaction must send more than 0 tokens.\");\n // Specifically handle SOL, which is not a spl-token.\n if (tokenMint.equals(spl_token_1.NATIVE_MINT)) {\n const sendSolTxn = web3_js_1.SystemProgram.transfer({\n fromPubkey: sourceWallet,\n toPubkey: destinationWallet,\n lamports: BigInt(amount.toString()),\n });\n return {\n instructions: [sendSolTxn],\n cleanupInstructions: [],\n signers: [],\n };\n }\n const sourceTokenAccount = yield (0, web3_1.deriveATA)(sourceWallet, tokenMint);\n const _a = yield (0, web3_1.resolveOrCreateATA)(connection, destinationWallet, tokenMint, getAccountRentExempt, amount, payer), { address: destinationTokenAccount } = _a, destinationAtaIx = __rest(_a, [\"address\"]);\n const transferIx = spl_token_1.Token.createTransferCheckedInstruction(spl_token_1.TOKEN_PROGRAM_ID, sourceTokenAccount, tokenMint, destinationTokenAccount, sourceWallet, [], new spl_token_1.u64(amount.toString()), tokenDecimals);\n return {\n instructions: destinationAtaIx.instructions.concat(transferIx),\n cleanupInstructions: destinationAtaIx.cleanupInstructions,\n signers: destinationAtaIx.signers,\n };\n });\n }\n}\nexports.TokenUtil = TokenUtil;\nTokenUtil.deserializeTokenAccount = (data) => {\n if (!data) {\n return null;\n }\n if (data.byteLength !== spl_token_1.AccountLayout.span) {\n throw new Error(\"Invalid data length for TokenAccount\");\n }\n const accountInfo = spl_token_1.AccountLayout.decode(data);\n accountInfo.mint = new web3_js_1.PublicKey(accountInfo.mint);\n accountInfo.owner = new web3_js_1.PublicKey(accountInfo.owner);\n accountInfo.amount = spl_token_1.u64.fromBuffer(accountInfo.amount);\n if (accountInfo.delegateOption === 0) {\n accountInfo.delegate = null;\n accountInfo.delegatedAmount = new spl_token_1.u64(0);\n }\n else {\n accountInfo.delegate = new web3_js_1.PublicKey(accountInfo.delegate);\n accountInfo.delegatedAmount = spl_token_1.u64.fromBuffer(accountInfo.delegatedAmount);\n }\n accountInfo.isInitialized = accountInfo.state !== 0;\n accountInfo.isFrozen = accountInfo.state === 2;\n if (accountInfo.isNativeOption === 1) {\n accountInfo.rentExemptReserve = spl_token_1.u64.fromBuffer(accountInfo.isNative);\n accountInfo.isNative = true;\n }\n else {\n accountInfo.rentExemptReserve = null;\n accountInfo.isNative = false;\n }\n if (accountInfo.closeAuthorityOption === 0) {\n accountInfo.closeAuthority = null;\n }\n else {\n accountInfo.closeAuthority = new web3_js_1.PublicKey(accountInfo.closeAuthority);\n }\n return accountInfo;\n};\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./transactions-builder\"), exports);\n__exportStar(require(\"./transactions-processor\"), exports);\n__exportStar(require(\"./types\"), exports);\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TransactionBuilder = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst transactions_processor_1 = require(\"./transactions-processor\");\n/**\n * @category Transactions Util\n */\nclass TransactionBuilder {\n constructor(connection, wallet) {\n this.connection = connection;\n this.wallet = wallet;\n this.instructions = [];\n this.signers = [];\n }\n /**\n * Append an instruction into this builder.\n * @param instruction - An Instruction\n * @returns Returns this transaction builder.\n */\n addInstruction(instruction) {\n this.instructions.push(instruction);\n return this;\n }\n /**\n * Append a list of instructions into this builder.\n * @param instructions - A list of Instructions\n * @returns Returns this transaction builder.\n */\n addInstructions(instructions) {\n this.instructions = this.instructions.concat(instructions);\n return this;\n }\n /**\n * Prepend a list of instructions into this builder.\n * @param instruction - An Instruction\n * @returns Returns this transaction builder.\n */\n prependInstruction(instruction) {\n this.instructions.unshift(instruction);\n return this;\n }\n /**\n * Prepend a list of instructions into this builder.\n * @param instructions - A list of Instructions\n * @returns Returns this transaction builder.\n */\n prependInstructions(instructions) {\n this.instructions = instructions.concat(this.instructions);\n return this;\n }\n addSigner(signer) {\n this.signers.push(signer);\n return this;\n }\n isEmpty() {\n return this.instructions.length == 0;\n }\n /**\n * Compresses all instructions & signers in this builder\n * into one single instruction\n * @param compressPost Compress all post instructions into the instructions field\n * @returns Instruction object containing all\n */\n compressIx(compressPost) {\n let instructions = [];\n let cleanupInstructions = [];\n let signers = [];\n this.instructions.forEach((curr) => {\n instructions = instructions.concat(curr.instructions);\n // Cleanup instructions should execute in reverse order\n cleanupInstructions = curr.cleanupInstructions.concat(cleanupInstructions);\n signers = signers.concat(curr.signers);\n });\n if (compressPost) {\n instructions = instructions.concat(cleanupInstructions);\n cleanupInstructions = [];\n }\n return {\n instructions: [...instructions],\n cleanupInstructions: [...cleanupInstructions],\n signers,\n };\n }\n /**\n * Returns the size of the current transaction in bytes.\n * @returns the size of the current transaction in bytes.\n * @throws error if transaction is over maximum package size.\n */\n txnSize(options = { latestBlockhash: undefined }) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.isEmpty()) {\n return 0;\n }\n const request = yield this.build(options);\n return request.transaction.serialize({ requireAllSignatures: false }).length;\n });\n }\n /**\n * Constructs a transaction payload with the gathered instructions\n * @returns a TransactionPayload object that can be excuted or agregated into other transactions\n */\n build(options = { latestBlockhash: undefined }) {\n return __awaiter(this, void 0, void 0, function* () {\n const { latestBlockhash } = options;\n let recentBlockhash = !latestBlockhash\n ? yield this.connection.getLatestBlockhash(\"singleGossip\")\n : latestBlockhash;\n const transaction = new web3_js_1.Transaction(Object.assign(Object.assign({}, recentBlockhash), { feePayer: this.wallet.publicKey }));\n const ix = this.compressIx(true);\n transaction.add(...ix.instructions);\n transaction.feePayer = this.wallet.publicKey;\n return {\n transaction: transaction,\n signers: ix.signers.concat(this.signers),\n };\n });\n }\n /**\n * Constructs a transaction payload with the gathered instructions, sign it with the provider and send it out\n * @returns the txId of the transaction\n */\n buildAndExecute() {\n return __awaiter(this, void 0, void 0, function* () {\n const tx = yield this.build();\n const tp = new transactions_processor_1.TransactionProcessor(this.connection, this.wallet);\n const { execute } = yield tp.signAndConstructTransaction(tx);\n return execute();\n });\n }\n /**\n * Send multiple transactions at once.\n * @deprecated This method is here for legacy reasons and we prefer the use of TransactionProcessor\n */\n static sendAll(provider, txns, opts) {\n return __awaiter(this, void 0, void 0, function* () {\n const txRequest = yield Promise.all(txns.map((txBuilder) => __awaiter(this, void 0, void 0, function* () {\n const { transaction, signers } = yield txBuilder.build();\n return { tx: transaction, signers };\n })));\n return yield provider.sendAll(txRequest, opts);\n });\n }\n}\nexports.TransactionBuilder = TransactionBuilder;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TransactionProcessor = void 0;\nclass TransactionProcessor {\n constructor(connection, wallet, commitment = \"confirmed\") {\n this.connection = connection;\n this.wallet = wallet;\n this.commitment = commitment;\n }\n signTransaction(txRequest) {\n return __awaiter(this, void 0, void 0, function* () {\n const { transactions, lastValidBlockHeight, blockhash } = yield this.signTransactions([\n txRequest,\n ]);\n return { transaction: transactions[0], lastValidBlockHeight, blockhash };\n });\n }\n signTransactions(txRequests) {\n return __awaiter(this, void 0, void 0, function* () {\n const { blockhash, lastValidBlockHeight } = yield this.connection.getLatestBlockhash(this.commitment);\n const feePayer = this.wallet.publicKey;\n const pSignedTxs = txRequests.map((txRequest) => {\n return rewriteTransaction(txRequest, feePayer, blockhash);\n });\n const transactions = yield this.wallet.signAllTransactions(pSignedTxs);\n return {\n transactions,\n lastValidBlockHeight,\n blockhash,\n };\n });\n }\n sendTransaction(transaction, lastValidBlockHeight, blockhash) {\n return __awaiter(this, void 0, void 0, function* () {\n const execute = this.constructSendTransactions([transaction], lastValidBlockHeight, blockhash);\n const txs = yield execute();\n const ex = txs[0];\n if (ex.status === \"fulfilled\") {\n return ex.value;\n }\n else {\n throw ex.reason;\n }\n });\n }\n constructSendTransactions(transactions, lastValidBlockHeight, blockhash, parallel = true) {\n const executeTx = (tx) => __awaiter(this, void 0, void 0, function* () {\n const rawTxs = tx.serialize();\n return this.connection.sendRawTransaction(rawTxs, {\n preflightCommitment: this.commitment,\n });\n });\n const confirmTx = (txId) => __awaiter(this, void 0, void 0, function* () {\n const result = yield this.connection.confirmTransaction({\n signature: txId,\n lastValidBlockHeight: lastValidBlockHeight,\n blockhash,\n }, this.commitment);\n if (result.value.err) {\n throw new Error(`Transaction failed: ${JSON.stringify(result.value)}`);\n }\n });\n return () => __awaiter(this, void 0, void 0, function* () {\n if (parallel) {\n const results = transactions.map((tx) => __awaiter(this, void 0, void 0, function* () {\n const txId = yield executeTx(tx);\n yield confirmTx(txId);\n return txId;\n }));\n return Promise.allSettled(results);\n }\n else {\n const results = [];\n for (const tx of transactions) {\n const txId = yield executeTx(tx);\n yield confirmTx(txId);\n results.push(txId);\n }\n return Promise.allSettled(results);\n }\n });\n }\n signAndConstructTransaction(txRequest) {\n return __awaiter(this, void 0, void 0, function* () {\n const { transaction, lastValidBlockHeight, blockhash } = yield this.signTransaction(txRequest);\n return {\n signedTx: transaction,\n execute: () => __awaiter(this, void 0, void 0, function* () { return this.sendTransaction(transaction, lastValidBlockHeight, blockhash); }),\n };\n });\n }\n signAndConstructTransactions(txRequests, parallel = true) {\n return __awaiter(this, void 0, void 0, function* () {\n const { transactions, lastValidBlockHeight, blockhash } = yield this.signTransactions(txRequests);\n const execute = this.constructSendTransactions(transactions, lastValidBlockHeight, blockhash, parallel);\n return { signedTxs: transactions, execute };\n });\n }\n}\nexports.TransactionProcessor = TransactionProcessor;\nfunction rewriteTransaction(txRequest, feePayer, blockhash) {\n var _a;\n const signers = (_a = txRequest.signers) !== null && _a !== void 0 ? _a : [];\n const tx = txRequest.transaction;\n tx.feePayer = feePayer;\n tx.recentBlockhash = blockhash;\n signers.filter((s) => s !== undefined).forEach((keypair) => tx.partialSign(keypair));\n return tx;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EMPTY_INSTRUCTION = void 0;\n/**\n * @category Transactions Util\n */\nexports.EMPTY_INSTRUCTION = {\n instructions: [],\n cleanupInstructions: [],\n signers: [],\n};\n","import{Buffer as t}from\"buffer\";import{PublicKey as e,Transaction as n,TransactionInstruction as r,SendTransactionError as o,NONCE_ACCOUNT_LENGTH as i,SystemProgram as s,SYSVAR_RENT_PUBKEY as a}from\"@solana/web3.js\";import*as c from\"@solana/web3.js\";export{c as web3};import u from\"bn.js\";export{default as BN}from\"bn.js\";import d from\"bs58\";import*as l from\"base64-js\";import h from\"camelcase\";import{sha256 as p}from\"js-sha256\";import*as f from\"@project-serum/borsh\";import{inflate as m}from\"pako\";import y from\"eventemitter3\";import*as g from\"assert\";var w=Object.freeze({__proto__:null,encode:function(t){return t.reduce(((t,e)=>t+e.toString(16).padStart(2,\"0\")),\"0x\")},decode:function(e){0===e.indexOf(\"0x\")&&(e=e.substr(2)),e.length%2==1&&(e=\"0\"+e);let n=e.match(/.{2}/g);return null===n?t.from([]):t.from(n.map((t=>parseInt(t,16))))}});function v(t){return new TextDecoder(\"utf-8\").decode(t)}function b(t){return(new TextEncoder).encode(t)}var A=Object.freeze({__proto__:null,decode:v,encode:b});function _(t){return d.encode(t)}var S=Object.freeze({__proto__:null,encode:_,decode:function(t){return d.decode(t)}});function E(e){return t.from(l.toByteArray(e))}var I=Object.freeze({__proto__:null,encode:function(t){return l.fromByteArray(t)},decode:E}),k=Object.freeze({__proto__:null,hex:w,utf8:A,bs58:S,base64:I});function M(t){const e=new Map;return t.errors&&t.errors.forEach((t=>{var n;let r=null!==(n=t.msg)&&void 0!==n?n:t.name;e.set(t.code,r)})),e}function x(t,...e){if(t.args.length!=e.length)throw new Error(\"Invalid argument length\");const n={};let r=0;return t.args.forEach((t=>{n[t.name]=e[r],r+=1})),n}function P(t,e={}){t.forEach((t=>{if(\"accounts\"in t)P(t.accounts,e[t.name]);else if(void 0===e[t.name])throw new Error(`Invalid arguments: ${t.name} not provided.`)}))}function L(t){return t instanceof e?t:new e(t)}class T extends TypeError{constructor(t,e){let n;const{message:r,...o}=t,{path:i}=t;super(0===i.length?r:\"At path: \"+i.join(\".\")+\" -- \"+r),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var r;return null!=(r=n)?r:n=[t,...e()]}}}function C(t){return\"object\"==typeof t&&null!=t}function z(t){return\"string\"==typeof t?JSON.stringify(t):\"\"+t}function B(t,e,n,r){if(!0===t)return;!1===t?t={}:\"string\"==typeof t&&(t={message:t});const{path:o,branch:i}=e,{type:s}=n,{refinement:a,message:c=\"Expected a value of type `\"+s+\"`\"+(a?\" with refinement `\"+a+\"`\":\"\")+\", but received: `\"+z(r)+\"`\"}=t;return{value:r,type:s,refinement:a,key:o[o.length-1],path:o,branch:i,...t,message:c}}function*O(t,e,n,r){var o;C(o=t)&&\"function\"==typeof o[Symbol.iterator]||(t=[t]);for(const o of t){const t=B(o,e,n,r);t&&(yield t)}}function*D(t,e,n){void 0===n&&(n={});const{path:r=[],branch:o=[t],coerce:i=!1,mask:s=!1}=n,a={path:r,branch:o};if(i&&(t=e.coercer(t,a),s&&\"type\"!==e.type&&C(e.schema)&&C(t)&&!Array.isArray(t)))for(const n in t)void 0===e.schema[n]&&delete t[n];let c=!0;for(const n of e.validator(t,a))c=!1,yield[n,void 0];for(let[n,u,d]of e.entries(t,a)){const e=D(u,d,{path:void 0===n?r:[...r,n],branch:void 0===n?o:[...o,u],coerce:i,mask:s});for(const r of e)r[0]?(c=!1,yield[r[0],void 0]):i&&(u=r[1],void 0===n?t=u:t instanceof Map?t.set(n,u):t instanceof Set?t.add(u):C(t)&&(t[n]=u))}if(c)for(const n of e.refiner(t,a))c=!1,yield[n,void 0];c&&(yield[void 0,t])}class N{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:e,schema:n,validator:r,refiner:o,coercer:i=(t=>t),entries:s=function*(){}}=t;this.type=e,this.schema=n,this.entries=s,this.coercer=i,this.validator=r?(t,e)=>O(r(t,e),e,this,t):()=>[],this.refiner=o?(t,e)=>O(o(t,e),e,this,t):()=>[]}assert(t){return function(t,e){const n=U(t,e);if(n[0])throw n[0]}(t,this)}create(t){return R(t,this)}is(t){return V(t,this)}mask(t){return function(t,e){const n=U(t,e,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}(t,this)}validate(t,e){return void 0===e&&(e={}),U(t,this,e)}}function R(t,e){const n=U(t,e,{coerce:!0});if(n[0])throw n[0];return n[1]}function V(t,e){return!U(t,e)[0]}function U(t,e,n){void 0===n&&(n={});const r=D(t,e,n),o=function(t){const{done:e,value:n}=t.next();return e?void 0:n}(r);if(o[0]){return[new T(o[0],(function*(){for(const t of r)t[0]&&(yield t[0])})),void 0]}return[void 0,o[1]]}function j(t,e){return new N({type:t,schema:null,validator:e})}function $(t){return new N({type:\"array\",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[n,r]of e.entries())yield[n,r,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||\"Expected an array value, but received: \"+z(t)})}function K(t){const e=z(t),n=typeof t;return new N({type:\"literal\",schema:\"string\"===n||\"number\"===n||\"boolean\"===n?t:null,validator:n=>n===t||\"Expected the literal `\"+e+\"`, but received: \"+z(n)})}function q(t){return new N({...t,validator:(e,n)=>null===e||t.validator(e,n),refiner:(e,n)=>null===e||t.refiner(e,n)})}function F(){return j(\"number\",(t=>\"number\"==typeof t&&!isNaN(t)||\"Expected a number, but received: \"+z(t)))}function W(t){return new N({...t,validator:(e,n)=>void 0===e||t.validator(e,n),refiner:(e,n)=>void 0===e||t.refiner(e,n)})}function G(){return j(\"string\",(t=>\"string\"==typeof t||\"Expected a string, but received: \"+z(t)))}function H(t){const e=Object.keys(t);return new N({type:\"type\",schema:t,*entries(n){if(C(n))for(const r of e)yield[r,n[r],t[r]]},validator:t=>C(t)||\"Expected an object, but received: \"+z(t)})}function J(t){const e=t.map((t=>t.type)).join(\" | \");return new N({type:\"union\",schema:null,coercer:(e,n)=>(t.find((t=>{const[n]=t.validate(e,{coerce:!0});return!n}))||Z()).coercer(e,n),validator(n,r){const o=[];for(const e of t){const[...t]=D(n,e,r),[i]=t;if(!i[0])return[];for(const[e]of t)e&&o.push(e)}return[\"Expected the value to satisfy a union of `\"+e+\"`, but received: \"+z(n),...o]}})}function Z(){return j(\"unknown\",(()=>!0))}async function X(t,e,n){if(e.length<=99)return await Q(t,e,n);{const r=function(t,e){return Array.apply(0,new Array(Math.ceil(t.length/e))).map(((n,r)=>t.slice(r*e,(r+1)*e)))}(e,99);return(await Promise.all(r.map((e=>Q(t,e,n))))).flat()}}async function Q(t,e,n){const r=null!=n?n:t.commitment;return(await t.getMultipleAccountsInfo(e,r)).map(((t,n)=>null===t?null:{publicKey:e[n],account:t}))}async function Y(t,e,n,r,i){n&&n.length>0&&e.sign(...n);const s=e._compile(),a=s.serialize(),c=e._serialize(a).toString(\"base64\"),u={encoding:\"base64\",commitment:null!=r?r:t.commitment};if(i){const t=(Array.isArray(i)?i:s.nonProgramIds()).map((t=>t.toBase58()));u.accounts={encoding:\"base64\",addresses:t}}n&&(u.sigVerify=!0);const d=[c,u],l=R(await t._rpcRequest(\"simulateTransaction\",d),rt);if(\"error\"in l){let t;if(\"data\"in l.error&&(t=l.error.data.logs,t&&Array.isArray(t))){const e=\"\\n \",n=e+t.join(e);console.error(l.error.message,n)}throw new o(\"failed to simulate transaction: \"+l.error.message,t)}return l.result}function tt(t){return function(t,e,n){return new N({...t,coercer:(r,o)=>V(r,e)?t.coercer(n(r,o),o):t.coercer(r,o)})}(nt(t),et,(e=>\"error\"in e?e:{...e,result:R(e.result,t)}))}const et=nt(Z());function nt(t){return J([H({jsonrpc:K(\"2.0\"),id:G(),result:t}),H({jsonrpc:K(\"2.0\"),id:G(),error:H({code:Z(),message:G(),data:W(j(\"any\",(()=>!0)))})})])}const rt=(ot=H({err:q(J([H({}),G()])),logs:q($(G())),accounts:W(q($(q(H({executable:j(\"boolean\",(t=>\"boolean\"==typeof t)),owner:G(),lamports:F(),data:$(G()),rentEpoch:W(F())}))))),unitsConsumed:W(F())}),tt(H({context:H({slot:F()}),value:ot})));var ot,it=Object.freeze({__proto__:null,invoke:async function(t,e,o,i){t=L(t),i||(i=lt());const s=new n;if(s.add(new r({programId:t,keys:null!=e?e:[],data:o})),void 0===i.sendAndConfirm)throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");return await i.sendAndConfirm(s,[])},getMultipleAccounts:X,simulateTransaction:Y});class st{constructor(t,e,n){this.connection=t,this.wallet=e,this.opts=n,this.publicKey=e.publicKey}static defaultOptions(){return{preflightCommitment:\"processed\",commitment:\"processed\"}}static local(t,e){throw new Error(\"Provider local is not available on browser.\")}static env(){throw new Error(\"Provider env is not available on browser.\")}async sendAndConfirm(t,e,n){var r;void 0===n&&(n=this.opts),t.feePayer=this.wallet.publicKey,t.recentBlockhash=(await this.connection.getRecentBlockhash(n.preflightCommitment)).blockhash,t=await this.wallet.signTransaction(t),(null!=e?e:[]).forEach((e=>{t.partialSign(e)}));const i=t.serialize();try{return await ct(this.connection,i,n)}catch(e){if(e instanceof ut){const n=await this.connection.getTransaction(_(t.signature),{commitment:\"confirmed\"});if(n){const t=null===(r=n.meta)||void 0===r?void 0:r.logMessages;throw t?new o(e.message,t):e}throw e}throw e}}async sendAll(t,e){void 0===e&&(e=this.opts);const n=await this.connection.getRecentBlockhash(e.preflightCommitment);let r=t.map((t=>{var e;let r=t.tx,o=null!==(e=t.signers)&&void 0!==e?e:[];return r.feePayer=this.wallet.publicKey,r.recentBlockhash=n.blockhash,o.forEach((t=>{r.partialSign(t)})),r}));const o=await this.wallet.signAllTransactions(r),i=[];for(let t=0;tt.startsWith(\"Program log: AnchorError\")));if(-1===n)return null;const r=t[n],o=[r];let i;if(n+11)return null;r=t[0].match(/([0-9]+)/g)[0]}try{o=parseInt(r)}catch(t){return null}let i=e.get(o);return void 0!==i?new bt(o,i,t.logs):(i=St.get(o),void 0!==i?new bt(o,i,t.logs):null)}get program(){var t;return null===(t=this._programErrorStack)||void 0===t?void 0:t.stack[this._programErrorStack.stack.length-1]}get programErrorStack(){var t;return null===(t=this._programErrorStack)||void 0===t?void 0:t.stack}toString(){return this.msg}}function At(t,e){mt(\"debug-logs\")&&console.log(\"Translating error:\",t);const n=vt.parse(t.logs);if(n)return n;const r=bt.parse(t,e);if(r)return r;if(t.logs){const e={get:function(e,n){return\"programErrorStack\"===n?e.programErrorStack.stack:\"program\"===n?e.programErrorStack.stack[t.programErrorStack.stack.length-1]:Reflect.get(...arguments)}};return t.programErrorStack=wt.parse(t.logs),new Proxy(t,e)}return t}const _t={InstructionMissing:100,InstructionFallbackNotFound:101,InstructionDidNotDeserialize:102,InstructionDidNotSerialize:103,IdlInstructionStub:1e3,IdlInstructionInvalidProgram:1001,ConstraintMut:2e3,ConstraintHasOne:2001,ConstraintSigner:2002,ConstraintRaw:2003,ConstraintOwner:2004,ConstraintRentExempt:2005,ConstraintSeeds:2006,ConstraintExecutable:2007,ConstraintState:2008,ConstraintAssociated:2009,ConstraintAssociatedInit:2010,ConstraintClose:2011,ConstraintAddress:2012,ConstraintZero:2013,ConstraintTokenMint:2014,ConstraintTokenOwner:2015,ConstraintMintMintAuthority:2016,ConstraintMintFreezeAuthority:2017,ConstraintMintDecimals:2018,ConstraintSpace:2019,RequireViolated:2500,RequireEqViolated:2501,RequireKeysEqViolated:2502,RequireNeqViolated:2503,RequireKeysNeqViolated:2504,RequireGtViolated:2505,RequireGteViolated:2506,AccountDiscriminatorAlreadySet:3e3,AccountDiscriminatorNotFound:3001,AccountDiscriminatorMismatch:3002,AccountDidNotDeserialize:3003,AccountDidNotSerialize:3004,AccountNotEnoughKeys:3005,AccountNotMutable:3006,AccountOwnedByWrongProgram:3007,InvalidProgramId:3008,InvalidProgramExecutable:3009,AccountNotSigner:3010,AccountNotSystemOwned:3011,AccountNotInitialized:3012,AccountNotProgramData:3013,AccountNotAssociatedTokenAccount:3014,AccountSysvarMismatch:3015,AccountReallocExceedsLimit:3016,AccountDuplicateReallocs:3017,StateInvalidAddress:4e3,DeclaredProgramIdMismatch:4100,Deprecated:5e3},St=new Map([[_t.InstructionMissing,\"8 byte instruction identifier not provided\"],[_t.InstructionFallbackNotFound,\"Fallback functions are not supported\"],[_t.InstructionDidNotDeserialize,\"The program could not deserialize the given instruction\"],[_t.InstructionDidNotSerialize,\"The program could not serialize the given instruction\"],[_t.IdlInstructionStub,\"The program was compiled without idl instructions\"],[_t.IdlInstructionInvalidProgram,\"The transaction was given an invalid program for the IDL instruction\"],[_t.ConstraintMut,\"A mut constraint was violated\"],[_t.ConstraintHasOne,\"A has_one constraint was violated\"],[_t.ConstraintSigner,\"A signer constraint was violated\"],[_t.ConstraintRaw,\"A raw constraint was violated\"],[_t.ConstraintOwner,\"An owner constraint was violated\"],[_t.ConstraintRentExempt,\"A rent exemption constraint was violated\"],[_t.ConstraintSeeds,\"A seeds constraint was violated\"],[_t.ConstraintExecutable,\"An executable constraint was violated\"],[_t.ConstraintState,\"A state constraint was violated\"],[_t.ConstraintAssociated,\"An associated constraint was violated\"],[_t.ConstraintAssociatedInit,\"An associated init constraint was violated\"],[_t.ConstraintClose,\"A close constraint was violated\"],[_t.ConstraintAddress,\"An address constraint was violated\"],[_t.ConstraintZero,\"Expected zero account discriminant\"],[_t.ConstraintTokenMint,\"A token mint constraint was violated\"],[_t.ConstraintTokenOwner,\"A token owner constraint was violated\"],[_t.ConstraintMintMintAuthority,\"A mint mint authority constraint was violated\"],[_t.ConstraintMintFreezeAuthority,\"A mint freeze authority constraint was violated\"],[_t.ConstraintMintDecimals,\"A mint decimals constraint was violated\"],[_t.ConstraintSpace,\"A space constraint was violated\"],[_t.RequireViolated,\"A require expression was violated\"],[_t.RequireEqViolated,\"A require_eq expression was violated\"],[_t.RequireKeysEqViolated,\"A require_keys_eq expression was violated\"],[_t.RequireNeqViolated,\"A require_neq expression was violated\"],[_t.RequireKeysNeqViolated,\"A require_keys_neq expression was violated\"],[_t.RequireGtViolated,\"A require_gt expression was violated\"],[_t.RequireGteViolated,\"A require_gte expression was violated\"],[_t.AccountDiscriminatorAlreadySet,\"The account discriminator was already set on this account\"],[_t.AccountDiscriminatorNotFound,\"No 8 byte discriminator was found on the account\"],[_t.AccountDiscriminatorMismatch,\"8 byte discriminator did not match what was expected\"],[_t.AccountDidNotDeserialize,\"Failed to deserialize the account\"],[_t.AccountDidNotSerialize,\"Failed to serialize the account\"],[_t.AccountNotEnoughKeys,\"Not enough account keys given to the instruction\"],[_t.AccountNotMutable,\"The given account is not mutable\"],[_t.AccountOwnedByWrongProgram,\"The given account is owned by a different program than expected\"],[_t.InvalidProgramId,\"Program ID was not as expected\"],[_t.InvalidProgramExecutable,\"Program account is not executable\"],[_t.AccountNotSigner,\"The given account did not sign\"],[_t.AccountNotSystemOwned,\"The given account is not owned by the system program\"],[_t.AccountNotInitialized,\"The program expected this account to be already initialized\"],[_t.AccountNotProgramData,\"The given account is not a program data account\"],[_t.AccountNotAssociatedTokenAccount,\"The given account is not the associated token account\"],[_t.AccountSysvarMismatch,\"The given public key does not match the required sysvar\"],[_t.AccountReallocExceedsLimit,\"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit\"],[_t.AccountDuplicateReallocs,\"The account was duplicated for more than one reallocation\"],[_t.StateInvalidAddress,\"The given state account does not have the correct address\"],[_t.DeclaredProgramIdMismatch,\"The declared program id does not match the actual program id\"],[_t.Deprecated,\"The API being used is deprecated and should no longer be used\"]]);\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nvar Et=function(){return Et=Object.assign||function(t){for(var e,n=1,r=arguments.length;nt.name===r));if(1!==o.length)throw new gt(`Type not found: ${JSON.stringify(t)}`);return Lt.typeDefLayout(o[0],e,n)}if(\"array\"in t.type){let r=t.type.array[0],o=t.type.array[1],i=Lt.fieldLayout({name:void 0,type:r},e);return f.array(i,o,n)}throw new Error(`Not yet implemented: ${t}`)}}static typeDefLayout(t,e=[],n){if(\"struct\"===t.type.kind){const r=t.type.fields.map((t=>Lt.fieldLayout(t,e)));return f.struct(r,n)}if(\"enum\"===t.type.kind){let r=t.type.variants.map((t=>{const n=h(t.name);if(void 0===t.fields)return f.struct([],n);const r=t.fields.map((t=>{if(!t.hasOwnProperty(\"name\"))throw new Error(\"Tuple enum variants not yet implemented.\");return Lt.fieldLayout(t,e)}));return f.struct(r,n)}));return void 0!==n?f.rustEnum(r).replicate(n):f.rustEnum(r,n)}throw new Error(`Unknown type kint: ${t}`)}}class Tt{constructor(t){this.idl=t,this.ixLayout=Tt.parseIxLayout(t);const e=new Map;t.instructions.forEach((t=>{const n=zt(\"global\",t.name);e.set(d.encode(n),{layout:this.ixLayout.get(t.name),name:t.name})})),t.state&&t.state.methods.map((t=>{const n=zt(\"state\",t.name);e.set(d.encode(n),{layout:this.ixLayout.get(t.name),name:t.name})})),this.sighashLayouts=e}encode(t,e){return this._encode(\"global\",t,e)}encodeState(t,e){return this._encode(\"state\",t,e)}_encode(e,n,r){const o=t.alloc(1e3),i=h(n),s=this.ixLayout.get(i);if(!s)throw new Error(`Unknown method: ${i}`);const a=s.encode(r,o),c=o.slice(0,a);return t.concat([zt(e,n),c])}static parseIxLayout(t){const e=(t.state?t.state.methods:[]).map((e=>{let n=e.args.map((e=>{var n,r;return Lt.fieldLayout(e,Array.from([...null!==(n=t.accounts)&&void 0!==n?n:[],...null!==(r=t.types)&&void 0!==r?r:[]]))}));const r=h(e.name);return[r,f.struct(n,r)]})).concat(t.instructions.map((e=>{let n=e.args.map((e=>{var n,r;return Lt.fieldLayout(e,Array.from([...null!==(n=t.accounts)&&void 0!==n?n:[],...null!==(r=t.types)&&void 0!==r?r:[]]))}));const r=h(e.name);return[r,f.struct(n,r)]})));return new Map(e)}decode(e,n=\"hex\"){\"string\"==typeof e&&(e=\"hex\"===n?t.from(e,\"hex\"):d.decode(e));let r=d.encode(e.slice(0,8)),o=e.slice(8);const i=this.sighashLayouts.get(r);return i?{data:i.layout.decode(o),name:i.name}:null}format(t,e){return Ct.format(t,e,this.idl)}}class Ct{static format(t,e,n){const r=n.instructions.filter((e=>t.name===e.name))[0];if(void 0===r)return console.error(\"Invalid instruction given\"),null;const o=r.args.map((e=>({name:e.name,type:Ct.formatIdlType(e.type),data:Ct.formatIdlData(e,t.data[e.name],n.types)}))),i=Ct.flattenIdlAccounts(r.accounts);return{args:o,accounts:e.map(((t,e)=>e`;if(\"option\"in t)return`Option<${this.formatIdlType(t.option)}>`;if(\"defined\"in t)return t.defined;if(\"array\"in t)return`Array<${t.array[0]}; ${t.array[1]}>`;throw new Error(`Unknown IDL type: ${t}`)}static formatIdlData(t,e,n){if(\"string\"==typeof t.type)return e.toString();if(t.type.hasOwnProperty(\"vec\"))return\"[\"+e.map((e=>this.formatIdlData({name:\"\",type:t.type.vec},e))).join(\", \")+\"]\";if(t.type.hasOwnProperty(\"option\"))return null===e?\"null\":this.formatIdlData({name:\"\",type:t.type.option},e,n);if(t.type.hasOwnProperty(\"defined\")){if(void 0===n)throw new Error(\"User defined types not provided\");const r=n.filter((e=>e.name===t.type.defined));if(1!==r.length)throw new Error(`Type not found: ${t.type.defined}`);return Ct.formatIdlDataDefined(r[0],e,n)}return\"unknown\"}static formatIdlDataDefined(t,e,n){if(\"struct\"===t.type.kind){const r=t.type;return\"{ \"+Object.keys(e).map((t=>{const o=r.fields.filter((e=>e.name===t))[0];if(void 0===o)throw new Error(\"Unable to find type\");return t+\": \"+Ct.formatIdlData(o,e[t],n)})).join(\", \")+\" }\"}if(0===t.type.variants.length)return\"{}\";if(t.type.variants[0].name){const r=t.type.variants,o=Object.keys(e)[0],i=e[o],s=Object.keys(i).map((t=>{var e;const s=i[t],a=null===(e=r[o])||void 0===e?void 0:e.filter((e=>e.name===t))[0];if(void 0===a)throw new Error(\"Unable to find variant\");return t+\": \"+Ct.formatIdlData(a,s,n)})).join(\", \"),a=h(o,{pascalCase:!0});return 0===s.length?a:`${a} { ${s} }`}return\"Tuple formatting not yet implemented\"}static flattenIdlAccounts(t,e){return t.map((t=>{const n=function(t){const e=t.replace(/([A-Z])/g,\" $1\");return e.charAt(0).toUpperCase()+e.slice(1)}(t.name);if(t.hasOwnProperty(\"accounts\")){const r=e?`${e} > ${n}`:n;return Ct.flattenIdlAccounts(t.accounts,r)}return{...t,name:e?`${e} > ${n}`:n}})).flat()}}function zt(e,n){var r;let o=`${e}:${void 0===r&&(r={}),Pt(n,Et({delimiter:\"_\"},r))}`;return t.from(p.digest(o)).slice(0,8)}function Bt(t,e){if(\"enum\"===e.type.kind){let n=e.type.variants.map((e=>void 0===e.fields?0:e.fields.map((e=>{if(\"object\"!=typeof e||!(\"name\"in e))throw new Error(\"Tuple enum variants not yet implemented.\");return Ot(t,e.type)})).reduce(((t,e)=>t+e))));return Math.max(...n)+1}return void 0===e.type.fields?0:e.type.fields.map((e=>Ot(t,e.type))).reduce(((t,e)=>t+e),0)}function Ot(t,e){var n,r;switch(e){case\"bool\":case\"u8\":case\"i8\":case\"bytes\":case\"string\":return 1;case\"i16\":case\"u16\":return 2;case\"u32\":case\"i32\":case\"f32\":return 4;case\"u64\":case\"i64\":case\"f64\":return 8;case\"u128\":case\"i128\":return 16;case\"publicKey\":return 32;default:if(\"vec\"in e)return 1;if(\"option\"in e)return 1+Ot(t,e.option);if(\"coption\"in e)return 4+Ot(t,e.coption);if(\"defined\"in e){const o=null!==(r=null===(n=t.types)||void 0===n?void 0:n.filter((t=>t.name===e.defined)))&&void 0!==r?r:[];if(1!==o.length)throw new gt(`Type not found: ${JSON.stringify(e)}`);return Bt(t,o[0])}if(\"array\"in e){let n=e.array[0],r=e.array[1];return Ot(t,n)*r}throw new Error(`Invalid type ${JSON.stringify(e)}`)}}const Dt=8;class Nt{constructor(t){if(void 0===t.accounts)return void(this.accountLayouts=new Map);const e=t.accounts.map((e=>[e.name,Lt.typeDefLayout(e,t.types)]));this.accountLayouts=new Map(e),this.idl=t}async encode(e,n){const r=t.alloc(1e3),o=this.accountLayouts.get(e);if(!o)throw new Error(`Unknown account: ${e}`);const i=o.encode(n,r);let s=r.slice(0,i),a=Nt.accountDiscriminator(e);return t.concat([a,s])}decode(t,e){if(Nt.accountDiscriminator(t).compare(e.slice(0,8)))throw new Error(\"Invalid account discriminator\");return this.decodeUnchecked(t,e)}decodeUnchecked(t,e){const n=e.slice(8),r=this.accountLayouts.get(t);if(!r)throw new Error(`Unknown account: ${t}`);return r.decode(n)}memcmp(e,n){const r=Nt.accountDiscriminator(e);return{offset:0,bytes:d.encode(n?t.concat([r,n]):r)}}size(t){var e;return 8+(null!==(e=Bt(this.idl,t))&&void 0!==e?e:0)}static accountDiscriminator(e){return t.from(p.digest(`account:${h(e,{pascalCase:!0})}`)).slice(0,8)}}class Rt{constructor(t){if(void 0===t.events)return void(this.layouts=new Map);const e=t.events.map((e=>{let n={name:e.name,type:{kind:\"struct\",fields:e.fields.map((t=>({name:t.name,type:t.type})))}};return[e.name,Lt.typeDefLayout(n,t.types)]}));this.layouts=new Map(e),this.discriminators=new Map(void 0===t.events?[]:t.events.map((t=>[l.fromByteArray(Vt(t.name)),t.name])))}decode(e){let n;try{n=t.from(l.toByteArray(e))}catch(t){return null}const r=l.fromByteArray(n.slice(0,8)),o=this.discriminators.get(r);if(void 0===o)return null;const i=this.layouts.get(o);if(!i)throw new Error(`Unknown event: ${o}`);return{data:i.decode(n.slice(8)),name:o}}}function Vt(e){return t.from(p.digest(`event:${e}`)).slice(0,8)}class Ut{constructor(t){if(void 0===t.state)throw new Error(\"Idl state not defined.\");this.layout=Lt.typeDefLayout(t.state.struct,t.types)}async encode(e,n){const r=t.alloc(1e3),o=this.layout.encode(n,r),i=await jt(e),s=r.slice(0,o);return t.concat([i,s])}decode(t){const e=t.slice(8);return this.layout.decode(e)}}async function jt(e){let n=mt(\"anchor-deprecated-state\")?\"account\":\"state\";return t.from(p.digest(`${n}:${e}`)).slice(0,8)}class $t{constructor(t){if(void 0===t.types)return void(this.typeLayouts=new Map);const e=t.types.map((e=>[e.name,Lt.typeDefLayout(e,t.types)]));this.typeLayouts=new Map(e),this.idl=t}encode(e,n){const r=t.alloc(1e3),o=this.typeLayouts.get(e);if(!o)throw new Error(`Unknown type: ${e}`);const i=o.encode(n,r);return r.slice(0,i)}decode(t,e){const n=this.typeLayouts.get(t);if(!n)throw new Error(`Unknown type: ${t}`);return n.decode(e)}}class Kt{constructor(t){this.instruction=new Tt(t),this.accounts=new Nt(t),this.events=new Rt(t),t.state&&(this.state=new Ut(t)),this.types=new $t(t)}}var qt=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function Ft(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,\"default\")?t.default:t}class Wt{constructor(t,e){if(!Number.isInteger(t))throw new TypeError(\"span must be an integer\");this.span=t,this.property=e}makeDestinationObject(){return{}}decode(t,e){throw new Error(\"Layout is abstract\")}encode(t,e,n){throw new Error(\"Layout is abstract\")}getSpan(t,e){if(0>this.span)throw new RangeError(\"indeterminate span\");return this.span}replicate(t){const e=Object.create(this.constructor.prototype);return Object.assign(e,this),e.property=t,e}fromArray(t){}}var Gt=Wt;class Ht extends Wt{isCount(){throw new Error(\"ExternalLayout is abstract\")}}class Jt extends Ht{constructor(t,e,n){if(!(t instanceof Wt))throw new TypeError(\"layout must be a Layout\");if(void 0===e)e=0;else if(!Number.isInteger(e))throw new TypeError(\"offset must be integer or undefined\");super(t.span,n||t.property),this.layout=t,this.offset=e}isCount(){return this.layout instanceof Zt||this.layout instanceof Xt}decode(t,e){return void 0===e&&(e=0),this.layout.decode(t,e+this.offset)}encode(t,e,n){return void 0===n&&(n=0),this.layout.encode(t,e,n+this.offset)}}class Zt extends Wt{constructor(t,e){if(super(t,e),6t&&e instanceof Wt),!0))throw new TypeError(\"fields must be array of Layout instances\");\"boolean\"==typeof e&&void 0===n&&(n=e,e=void 0);for(const e of t)if(0>e.span&&void 0===e.property)throw new Error(\"fields cannot contain unnamed variable-length layout\");let r=-1;try{r=t.reduce(((t,e)=>t+e.getSpan()),0)}catch(t){}super(r,e),this.fields=t,this.decodePrefixes=!!n}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let n=0;try{n=this.fields.reduce(((n,r)=>{const o=r.getSpan(t,e);return e+=o,n+o}),0)}catch(t){throw new RangeError(\"indeterminate span\")}return n}decode(t,e){void 0===e&&(e=0);const n=this.makeDestinationObject();for(const r of this.fields)if(void 0!==r.property&&(n[r.property]=r.decode(t,e)),e+=r.getSpan(t,e),this.decodePrefixes&&t.length===e)break;return n}encode(t,e,n){void 0===n&&(n=0);const r=n;let o=0,i=0;for(const r of this.fields){let s=r.span;if(i=0s&&(s=r.getSpan(e,n)))}o=n,n+=s}return o+i-r}fromArray(t){const e=this.makeDestinationObject();for(const n of this.fields)void 0!==n.property&&0n.span?e=-1:0<=e&&(e+=n.span)}}}class oe{constructor(t){this.property=t}decode(){throw new Error(\"UnionDiscriminator is abstract\")}encode(){throw new Error(\"UnionDiscriminator is abstract\")}}class ie extends oe{constructor(t,e){if(!(t instanceof Ht&&t.isCount()))throw new TypeError(\"layout must be an unsigned integer ExternalLayout\");super(e||t.property||\"variant\"),this.layout=t}decode(t,e){return this.layout.decode(t,e)}encode(t,e,n){return this.layout.encode(t,e,n)}}class se extends Wt{constructor(t,e,n){const r=t instanceof Zt||t instanceof Xt;if(r)t=new ie(new Jt(t));else if(t instanceof Ht&&t.isCount())t=new ie(t);else if(!(t instanceof oe))throw new TypeError(\"discr must be a UnionDiscriminator or an unsigned integer layout\");if(void 0===e&&(e=null),!(null===e||e instanceof Wt))throw new TypeError(\"defaultLayout must be null or a Layout\");if(null!==e){if(0>e.span)throw new Error(\"defaultLayout must have constant span\");void 0===e.property&&(e=e.replicate(\"content\"))}let o=-1;e&&(o=e.span,0<=o&&r&&(o+=t.layout.span)),super(o,n),this.discriminator=t,this.usesPrefixDiscriminator=r,this.defaultLayout=e,this.registry={};let i=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(t){return i(t)},this.configGetSourceVariant=function(t){i=t.bind(this)}}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);const n=this.getVariant(t,e);if(!n)throw new Error(\"unable to determine span for unrecognized variant\");return n.getSpan(t,e)}defaultGetSourceVariant(t){if(t.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&t.hasOwnProperty(this.defaultLayout.property))return;const e=this.registry[t[this.discriminator.property]];if(e&&(!e.layout||t.hasOwnProperty(e.property)))return e}else for(const e in this.registry){const n=this.registry[e];if(t.hasOwnProperty(n.property))return n}throw new Error(\"unable to infer src variant\")}decode(t,e){let n;void 0===e&&(e=0);const r=this.discriminator,o=r.decode(t,e);let i=this.registry[o];if(void 0===i){let s=0;i=this.defaultLayout,this.usesPrefixDiscriminator&&(s=r.layout.span),n=this.makeDestinationObject(),n[r.property]=o,n[i.property]=this.defaultLayout.decode(t,e+s)}else n=i.decode(t,e);return n}encode(t,e,n){void 0===n&&(n=0);const r=this.getSourceVariant(t);if(void 0===r){const r=this.discriminator,o=this.defaultLayout;let i=0;return this.usesPrefixDiscriminator&&(i=r.layout.span),r.encode(t[r.property],e,n),i+o.encode(t[o.property],e,n+i)}return r.encode(t,e,n)}addVariant(t,e,n){const r=new ae(this,t,e,n);return this.registry[t]=r,r}getVariant(t,e){let n=t;return Buffer.isBuffer(t)&&(void 0===e&&(e=0),n=this.discriminator.decode(t,e)),this.registry[n]}}class ae extends Wt{constructor(t,e,n,r){if(!(t instanceof se))throw new TypeError(\"union must be a Union\");if(!Number.isInteger(e)||0>e)throw new TypeError(\"variant must be a (non-negative) integer\");if(\"string\"==typeof n&&void 0===r&&(r=n,n=null),n){if(!(n instanceof Wt))throw new TypeError(\"layout must be a Layout\");if(null!==t.defaultLayout&&0<=n.span&&n.span>t.defaultLayout.span)throw new Error(\"variant span exceeds span of containing union\");if(\"string\"!=typeof r)throw new TypeError(\"variant must have a String property\")}let o=t.span;0>t.span&&(o=n?n.span:0,0<=o&&t.usesPrefixDiscriminator&&(o+=t.discriminator.layout.span)),super(o,r),this.union=t,this.variant=e,this.layout=n||null}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),n+this.layout.getSpan(t,e+n)}decode(t,e){const n=this.makeDestinationObject();if(void 0===e&&(e=0),this!==this.union.getVariant(t,e))throw new Error(\"variant mismatch\");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(t,e+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(t,e,n){void 0===n&&(n=0);let r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!t.hasOwnProperty(this.property))throw new TypeError(\"variant lacks property \"+this.property);this.union.discriminator.encode(this.variant,e,n);let o=r;if(this.layout&&(this.layout.encode(t[this.property],e,n+r),o+=this.layout.getSpan(e,n+r),0<=this.union.span&&o>this.union.span))throw new Error(\"encoded variant overruns containing union\");return o}fromArray(t){if(this.layout)return this.layout.fromArray(t)}}class ce extends Wt{constructor(t,e){if(!(t instanceof Ht&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError(\"length must be positive integer or an unsigned integer ExternalLayout\");let n=-1;t instanceof Ht||(n=t),super(n,e),this.length=t}getSpan(t,e){let n=this.span;return 0>n&&(n=this.length.decode(t,e)),n}decode(t,e){void 0===e&&(e=0);let n=this.span;return 0>n&&(n=this.length.decode(t,e)),t.slice(e,e+n)}encode(t,e,n){let r=this.length;if(this.length instanceof Ht&&(r=t.length),!Buffer.isBuffer(t)||r!==t.length)throw new TypeError((o=\"Blob.encode\",((i=this).property?o+\"[\"+i.property+\"]\":o)+\" requires (length \"+r+\") Buffer as src\"));var o,i;if(n+r>e.length)throw new RangeError(\"encoding overruns Buffer\");return e.write(t.toString(\"hex\"),n,r,\"hex\"),this.length instanceof Ht&&this.length.encode(r,e,n),r}}var ue=(t,e,n)=>new Jt(t,e,n),de=t=>new Zt(1,t),le=t=>new Zt(4,t),he=t=>new ee(t),pe=t=>new ne(t),fe=(t,e,n)=>new re(t,e,n),me=(t,e,n)=>new se(t,e,n),ye=(t,e)=>new ce(t,e);class ge{constructor(t){}encode(t,n){switch(h(t)){case\"initializeMint\":return function({decimals:t,mintAuthority:n,freezeAuthority:r}){return be({initializeMint:{decimals:t,mintAuthority:n.toBuffer(),freezeAuthorityOption:!!r,freezeAuthority:(r||e.default).toBuffer()}})}(n);case\"initializeAccount\":return be({initializeAccount:{}});case\"initializeMultisig\":return function({m:t}){return be({initializeMultisig:{m:t}})}(n);case\"transfer\":return function({amount:t}){return be({transfer:{amount:t}})}(n);case\"approve\":return function({amount:t}){return be({approve:{amount:t}})}(n);case\"revoke\":return be({revoke:{}});case\"setAuthority\":return function({authorityType:t,newAuthority:e}){return be({setAuthority:{authorityType:t,newAuthority:e}})}(n);case\"mintTo\":return function({amount:t}){return be({mintTo:{amount:t}})}(n);case\"burn\":return function({amount:t}){return be({burn:{amount:t}})}(n);case\"closeAccount\":return be({closeAccount:{}});case\"freezeAccount\":return be({freezeAccount:{}});case\"thawAccount\":return be({thawAccount:{}});case\"transferChecked\":return function({amount:t,decimals:e}){return be({transferChecked:{amount:t,decimals:e}})}(n);case\"approvedChecked\":return function({amount:t,decimals:e}){return be({approveChecked:{amount:t,decimals:e}})}(n);case\"mintToChecked\":return function({amount:t,decimals:e}){return be({mintToChecked:{amount:t,decimals:e}})}(n);case\"burnChecked\":return function({amount:t,decimals:e}){return be({burnChecked:{amount:t,decimals:e}})}(n);case\"intializeAccount2\":return function({authority:t}){return be({initilaizeAccount2:{authority:t}})}(n);case\"syncNative\":return be({syncNative:{}});case\"initializeAccount3\":return function({authority:t}){return be({initializeAccount3:{authority:t}})}(n);case\"initializeMultisig2\":return function({m:t}){return be({initializeMultisig2:{m:t}})}(n);case\"initializeMint2\":return function({decimals:t,mintAuthority:e,freezeAuthority:n}){return be({encodeInitializeMint2:{decimals:t,mintAuthority:e,freezeAuthority:n}})}(n);default:throw new Error(`Invalid instruction: ${t}`)}}encodeState(t,e){throw new Error(\"SPL token does not have state\")}}const we=me(de(\"instruction\"));function ve(t){return ye(32,t)}function be(t){let e=Buffer.alloc(Ae),n=we.encode(t,e);return e.slice(0,n)}we.addVariant(0,fe([de(\"decimals\"),ye(32,\"mintAuthority\"),de(\"freezeAuthorityOption\"),ve(\"freezeAuthority\")]),\"initializeMint\"),we.addVariant(1,fe([]),\"initializeAccount\"),we.addVariant(2,fe([de(\"m\")]),\"initializeMultisig\"),we.addVariant(3,fe([he(\"amount\")]),\"transfer\"),we.addVariant(4,fe([he(\"amount\")]),\"approve\"),we.addVariant(5,fe([]),\"revoke\"),we.addVariant(6,fe([de(\"authorityType\"),de(\"newAuthorityOption\"),ve(\"newAuthority\")]),\"setAuthority\"),we.addVariant(7,fe([he(\"amount\")]),\"mintTo\"),we.addVariant(8,fe([he(\"amount\")]),\"burn\"),we.addVariant(9,fe([]),\"closeAccount\"),we.addVariant(10,fe([]),\"freezeAccount\"),we.addVariant(11,fe([]),\"thawAccount\"),we.addVariant(12,fe([he(\"amount\"),de(\"decimals\")]),\"transferChecked\"),we.addVariant(13,fe([he(\"amount\"),de(\"decimals\")]),\"approvedChecked\"),we.addVariant(14,fe([he(\"amount\"),de(\"decimals\")]),\"mintToChecked\"),we.addVariant(15,fe([he(\"amount\"),de(\"decimals\")]),\"burnedChecked\"),we.addVariant(16,fe([ve(\"authority\")]),\"InitializeAccount2\"),we.addVariant(17,fe([]),\"syncNative\"),we.addVariant(18,fe([ve(\"authority\")]),\"initializeAccount3\"),we.addVariant(19,fe([de(\"m\")]),\"initializeMultisig2\"),we.addVariant(20,fe([de(\"decimals\"),ve(\"mintAuthority\"),de(\"freezeAuthorityOption\"),ve(\"freezeAuthority\")]),\"initializeMint2\");const Ae=Math.max(...Object.values(we.registry).map((t=>t.span)));class _e{constructor(t){}encode(t,e){throw new Error(\"SPL token does not have state\")}decode(t){throw new Error(\"SPL token does not have state\")}}function Se(t){return new ke(ye(8),(t=>Le.fromBuffer(t)),(t=>t.toBuffer()),t)}function Ee(t){return new ke(ye(32),(t=>new e(t)),(t=>t.toBuffer()),t)}function Ie(t,e){return new Me(t,e)}class ke extends Gt{constructor(t,e,n,r){super(t.span,r),this.layout=t,this.decoder=e,this.encoder=n}decode(t,e){return this.decoder(this.layout.decode(t,e))}encode(t,e,n){return this.layout.encode(this.encoder(t),e,n)}getSpan(t,e){return this.layout.getSpan(t,e)}}class Me extends Gt{constructor(t,e){super(-1,e),this.layout=t,this.discriminator=le()}encode(t,e,n=0){return null==t?this.layout.span+this.discriminator.encode(0,e,n):(this.discriminator.encode(1,e,n),this.layout.encode(t,e,n+4)+4)}decode(t,e=0){const n=this.discriminator.decode(t,e);if(0===n)return null;if(1===n)return this.layout.decode(t,e+4);throw new Error(\"Invalid coption \"+this.layout.property)}getSpan(t,e=0){return this.layout.getSpan(t,e+4)+4}}function xe(t){if(0===t)return!1;if(1===t)return!0;throw new Error(\"Invalid bool: \"+t)}function Pe(t){return t?1:0}class Le extends u{toBuffer(){const t=super.toArray().reverse(),e=Buffer.from(t);if(8===e.length)return e;if(e.length>=8)throw new Error(\"u64 too large\");const n=Buffer.alloc(8);return e.copy(n),n}static fromBuffer(t){if(8!==t.length)throw new Error(`Invalid buffer length: ${t.length}`);return new Le([...t].reverse().map((t=>`00${t.toString(16)}`.slice(-2))).join(\"\"),16)}}class Te{constructor(t){this.idl=t}async encode(t,e){switch(t){case\"token\":{const t=Buffer.alloc(165),n=Be.encode(e,t);return t.slice(0,n)}case\"mint\":{const t=Buffer.alloc(82),n=Ce.encode(e,t);return t.slice(0,n)}default:throw new Error(`Invalid account name: ${t}`)}}decode(t,e){return this.decodeUnchecked(t,e)}decodeUnchecked(t,e){switch(t){case\"token\":return function(t){return Be.decode(t)}(e);case\"mint\":return function(t){return Ce.decode(t)}(e);default:throw new Error(`Invalid account name: ${t}`)}}memcmp(t,e){switch(t){case\"token\":return{dataSize:165};case\"mint\":return{dataSize:82};default:throw new Error(`Invalid account name: ${t}`)}}size(t){var e;return null!==(e=Bt(this.idl,t))&&void 0!==e?e:0}}const Ce=fe([Ie(Ee(),\"mintAuthority\"),Se(\"supply\"),de(\"decimals\"),(ze=\"isInitialized\",new ke(de(),xe,Pe,ze)),Ie(Ee(),\"freezeAuthority\")]);var ze;const Be=fe([Ee(\"mint\"),Ee(\"authority\"),Se(\"amount\"),Ie(Ee(),\"delegate\"),de(\"state\"),Ie(Se(),\"isNative\"),Se(\"delegatedAmount\"),Ie(Ee(),\"closeAuthority\")]);class Oe{constructor(t){}decode(t){throw new Error(\"SPL token program does not have events\")}}class De{constructor(t){}encode(t,e){throw new Error(\"SPL token does not have user-defined types\")}decode(t,e){throw new Error(\"SPL token does not have user-defined types\")}}class Ne{constructor(t){this.instruction=new ge(t),this.accounts=new Te(t),this.events=new Oe(t),this.state=new _e(t),this.types=new De(t)}}class Re{constructor(t){}encode(t,e){switch(h(t)){case\"createAccount\":return function({lamports:t,space:e,owner:n}){return Ke({createAccount:{lamports:t,space:e,owner:n.toBuffer()}})}(e);case\"assign\":return function({owner:t}){return Ke({assign:{owner:t.toBuffer()}})}(e);case\"transfer\":return function({lamports:t}){return Ke({transfer:{lamports:t}})}(e);case\"createAccountWithSeed\":return function({base:t,seed:e,lamports:n,space:r,owner:o}){return Ke({createAccountWithSeed:{base:t.toBuffer(),seed:e,lamports:n,space:r,owner:o.toBuffer()}},$e.getVariant(3).span+e.length)}(e);case\"advanceNonceAccount\":return function({authorized:t}){return Ke({advanceNonceAccount:{authorized:t.toBuffer()}})}(e);case\"withdrawNonceAccount\":return function({lamports:t}){return Ke({withdrawNonceAccount:{lamports:t}})}(e);case\"initializeNonceAccount\":return function({authorized:t}){return Ke({initializeNonceAccount:{authorized:t.toBuffer()}})}(e);case\"authorizeNonceAccount\":return function({authorized:t}){return Ke({authorizeNonceAccount:{authorized:t.toBuffer()}})}(e);case\"allocate\":return function({space:t}){return Ke({allocate:{space:t}})}(e);case\"allocateWithSeed\":return function({base:t,seed:e,space:n,owner:r}){return Ke({allocateWithSeed:{base:t.toBuffer(),seed:e,space:n,owner:r.toBuffer()}},$e.getVariant(9).span+e.length)}(e);case\"assignWithSeed\":return function({base:t,seed:e,owner:n}){return Ke({assignWithSeed:{base:t.toBuffer(),seed:e,owner:n.toBuffer()}},$e.getVariant(10).span+e.length)}(e);case\"transferWithSeed\":return function({lamports:t,seed:e,owner:n}){return Ke({transferWithSeed:{lamports:t,seed:e,owner:n.toBuffer()}},$e.getVariant(11).span+e.length)}(e);default:throw new Error(`Invalid instruction: ${t}`)}}encodeState(t,e){throw new Error(\"System does not have state\")}}class Ve extends Gt{constructor(t){super(-1,t),this.property=t,this.layout=fe([le(\"length\"),le(\"lengthPadding\"),ye(ue(le(),-8),\"chars\")],this.property)}encode(t,e,n=0){if(null==t)return this.layout.span;const r={chars:Buffer.from(t,\"utf8\")};return this.layout.encode(r,e,n)}decode(t,e=0){return this.layout.decode(t,e).chars.toString()}getSpan(t,e=0){return le().span+le().span+new u(new Uint8Array(t).slice(e,e+4),10,\"le\").toNumber()}}function Ue(t){return new Ve(t)}function je(t){return ye(32,t)}const $e=me(le(\"instruction\"));function Ke(t,e){const n=Buffer.alloc(null!=e?e:qe),r=$e.encode(t,n);return void 0===e?n.slice(0,r):n}$e.addVariant(0,fe([pe(\"lamports\"),pe(\"space\"),je(\"owner\")]),\"createAccount\"),$e.addVariant(1,fe([je(\"owner\")]),\"assign\"),$e.addVariant(2,fe([pe(\"lamports\")]),\"transfer\"),$e.addVariant(3,fe([je(\"base\"),Ue(\"seed\"),pe(\"lamports\"),pe(\"space\"),je(\"owner\")]),\"createAccountWithSeed\"),$e.addVariant(4,fe([je(\"authorized\")]),\"advanceNonceAccount\"),$e.addVariant(5,fe([pe(\"lamports\")]),\"withdrawNonceAccount\"),$e.addVariant(6,fe([je(\"authorized\")]),\"initializeNonceAccount\"),$e.addVariant(7,fe([je(\"authorized\")]),\"authorizeNonceAccount\"),$e.addVariant(8,fe([pe(\"space\")]),\"allocate\"),$e.addVariant(9,fe([je(\"base\"),Ue(\"seed\"),pe(\"space\"),je(\"owner\")]),\"allocateWithSeed\"),$e.addVariant(10,fe([je(\"base\"),Ue(\"seed\"),je(\"owner\")]),\"assignWithSeed\"),$e.addVariant(11,fe([pe(\"lamports\"),Ue(\"seed\"),je(\"owner\")]),\"transferWithSeed\");const qe=Math.max(...Object.values($e.registry).map((t=>t.span)));class Fe{constructor(t){}encode(t,e){throw new Error(\"System does not have state\")}decode(t){throw new Error(\"System does not have state\")}}class We{constructor(t){this.idl=t}async encode(t,e){if(\"nonce\"===t){const t=Buffer.alloc(i),n=Je.encode(e,t);return t.slice(0,n)}throw new Error(`Invalid account name: ${t}`)}decode(t,e){return this.decodeUnchecked(t,e)}decodeUnchecked(t,e){if(\"nonce\"===t)return function(t){return Je.decode(t)}(e);throw new Error(`Invalid account name: ${t}`)}memcmp(t,e){if(\"nonce\"===t)return{dataSize:i};throw new Error(`Invalid account name: ${t}`)}size(t){var e;return null!==(e=Bt(this.idl,t))&&void 0!==e?e:0}}class Ge extends Gt{constructor(t,e,n,r){super(t.span,r),this.layout=t,this.decoder=e,this.encoder=n}decode(t,e){return this.decoder(this.layout.decode(t,e))}encode(t,e,n){return this.layout.encode(this.encoder(t),e,n)}getSpan(t,e){return this.layout.getSpan(t,e)}}function He(t){return new Ge(ye(32),(t=>new e(t)),(t=>t.toBuffer()),t)}const Je=fe([le(\"version\"),le(\"state\"),He(\"authorizedPubkey\"),He(\"nonce\"),fe([he(\"lamportsPerSignature\")],\"feeCalculator\")]);class Ze{constructor(t){}decode(t){throw new Error(\"System program does not have events\")}}class Xe{constructor(t){}encode(t,e){throw new Error(\"System does not have user-defined types\")}decode(t,e){throw new Error(\"System does not have user-defined types\")}}class Qe{constructor(t){this.instruction=new Re(t),this.accounts=new We(t),this.events=new Ze(t),this.state=new Fe(t),this.types=new Xe(t)}}var Ye=Object.freeze({__proto__:null,hash:function(t){return p(t)}});function tn(n,r,o){const i=t.concat([n.toBuffer(),t.from(r),o.toBuffer()]),s=p.digest(i);return new e(t.from(s))}function en(n,r){let o=t.alloc(0);n.forEach((function(e){if(e.length>32)throw new TypeError(\"Max seed length exceeded\");o=t.concat([o,rn(e)])})),o=t.concat([o,r.toBuffer(),t.from(\"ProgramDerivedAddress\")]);let i=p(new Uint8Array(o)),s=new u(i,16).toArray(void 0,32);if(e.isOnCurve(new Uint8Array(s)))throw new Error(\"Invalid seeds, address must fall off the curve\");return new e(s)}function nn(e,n){let r,o=255;for(;0!=o;){try{r=en(e.concat(t.from([o])),n)}catch(t){if(t instanceof TypeError)throw t;o--;continue}return[r,o]}throw new Error(\"Unable to find a viable program address nonce\")}const rn=e=>e instanceof t?e:e instanceof Uint8Array?t.from(e.buffer,e.byteOffset,e.byteLength):t.from(e);async function on(n,...r){let o=[t.from([97,110,99,104,111,114])];r.forEach((e=>{o.push(e instanceof t?e:L(e).toBuffer())}));const[i]=await e.findProgramAddress(o,L(n));return i}var sn=Object.freeze({__proto__:null,createWithSeedSync:tn,createProgramAddressSync:en,findProgramAddressSync:nn,associated:on});const an=new e(\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\"),cn=new e(\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\");var un=Object.freeze({__proto__:null,TOKEN_PROGRAM_ID:an,ASSOCIATED_PROGRAM_ID:cn,associatedAddress:async function({mint:t,owner:n}){return(await e.findProgramAddress([n.toBuffer(),an.toBuffer(),t.toBuffer()],cn))[0]}}),dn={exports:{}};!function(t,e){var n=\"undefined\"!=typeof self?self:qt,r=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){var n=\"URLSearchParams\"in t,r=\"Symbol\"in t&&\"iterator\"in Symbol,o=\"FileReader\"in t&&\"Blob\"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),i=\"FormData\"in t,s=\"ArrayBuffer\"in t;if(s)var a=[\"[object Int8Array]\",\"[object Uint8Array]\",\"[object Uint8ClampedArray]\",\"[object Int16Array]\",\"[object Uint16Array]\",\"[object Int32Array]\",\"[object Uint32Array]\",\"[object Float32Array]\",\"[object Float64Array]\"],c=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if(\"string\"!=typeof t&&(t=String(t)),/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError(\"Invalid character in header field name\");return t.toLowerCase()}function d(t){return\"string\"!=typeof t&&(t=String(t)),t}function l(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError(\"Already read\"));t.bodyUsed=!0}function f(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function m(t){var e=new FileReader,n=f(e);return e.readAsArrayBuffer(t),n}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?\"string\"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&o&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=y(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText=\"\",this.headers.get(\"content-type\")||(\"string\"==typeof t?this.headers.set(\"content-type\",\"text/plain;charset=UTF-8\"):this._bodyBlob&&this._bodyBlob.type?this.headers.set(\"content-type\",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set(\"content-type\",\"application/x-www-form-urlencoded;charset=UTF-8\"))},o&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error(\"could not read FormData body as blob\");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,n=f(e);return e.readAsText(t),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,(\"GET\"===this.method||\"HEAD\"===this.method)&&o)throw new TypeError(\"Body not allowed for GET or HEAD requests\");this._initBody(o)}function b(t){var e=new FormData;return t.trim().split(\"&\").forEach((function(t){if(t){var n=t.split(\"=\"),r=n.shift().replace(/\\+/g,\" \"),o=n.join(\"=\").replace(/\\+/g,\" \");e.append(decodeURIComponent(r),decodeURIComponent(o))}})),e}function A(t,e){e||(e={}),this.type=\"default\",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=\"statusText\"in e?e.statusText:\"OK\",this.headers=new h(e.headers),this.url=e.url||\"\",this._initBody(t)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},g.call(v.prototype),g.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},A.error=function(){var t=new A(null,{status:0,statusText:\"\"});return t.type=\"error\",t};var _=[301,302,303,307,308];A.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError(\"Invalid status code\");return new A(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function S(t,n){return new Promise((function(r,i){var s=new v(t,n);if(s.signal&&s.signal.aborted)return i(new e.DOMException(\"Aborted\",\"AbortError\"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var t,e,n={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||\"\",e=new h,t.replace(/\\r?\\n[\\t ]+/g,\" \").split(/\\r?\\n/).forEach((function(t){var n=t.split(\":\"),r=n.shift().trim();if(r){var o=n.join(\":\").trim();e.append(r,o)}})),e)};n.url=\"responseURL\"in a?a.responseURL:n.headers.get(\"X-Request-URL\");var o=\"response\"in a?a.response:a.responseText;r(new A(o,n))},a.onerror=function(){i(new TypeError(\"Network request failed\"))},a.ontimeout=function(){i(new TypeError(\"Network request failed\"))},a.onabort=function(){i(new e.DOMException(\"Aborted\",\"AbortError\"))},a.open(s.method,s.url,!0),\"include\"===s.credentials?a.withCredentials=!0:\"omit\"===s.credentials&&(a.withCredentials=!1),\"responseType\"in a&&o&&(a.responseType=\"blob\"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener(\"abort\",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener(\"abort\",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}S.polyfill=!0,t.fetch||(t.fetch=S,t.Headers=h,t.Request=v,t.Response=A),e.Headers=h,e.Request=v,e.Response=A,e.fetch=S,Object.defineProperty(e,\"__esModule\",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e}(dn,dn.exports);var ln=Ft(dn.exports);async function hn(t,e){const n=await t.getAccountInfo(e);if(null===n)throw new Error(\"program account not found\");const{program:r}=fn(n.data),o=await t.getAccountInfo(r.programdataAddress);if(null===o)throw new Error(\"program data account not found\");const{programData:i}=fn(o.data);return i}const pn=f.rustEnum([f.struct([],\"uninitialized\"),f.struct([f.option(f.publicKey(),\"authorityAddress\")],\"buffer\"),f.struct([f.publicKey(\"programdataAddress\")],\"program\"),f.struct([f.u64(\"slot\"),f.option(f.publicKey(),\"upgradeAuthorityAddress\")],\"programData\")],void 0,f.u32());function fn(t){return pn.decode(t)}var mn=Object.freeze({__proto__:null,verifiedBuild:async function(t,e,n=5){const r=`https://api.apr.dev/api/v0/program/${e.toString()}/latest?limit=${n}`,[o,i]=await Promise.all([hn(t,e),ln(r)]),s=(await i.json()).filter((t=>!t.aborted&&\"Built\"===t.state&&\"Verified\"===t.verified));if(0===s.length)return null;const a=s[0];return o.slot.toNumber()!==a.verified_slot?null:a},fetchData:hn,decodeUpgradeableLoaderState:fn}),yn=Object.freeze({__proto__:null,sha256:Ye,rpc:it,publicKey:sn,bytes:k,token:un,features:yt,registry:mn});const gn=f.struct([f.publicKey(\"authority\"),f.vecU8(\"data\")]);function wn(t,e){var n,r;let o={};const i=t.args?t.args.length:0;if(e.length>i){if(e.length!==i+1)throw new Error(`provided too many arguments ${e} to instruction ${null==t?void 0:t.name} expecting: ${null!==(r=null===(n=t.args)||void 0===n?void 0:n.map((t=>t.name)))&&void 0!==r?r:[]}`);o=e.pop()}return[e,o]}class vn{static build(t,e,n){if(\"_inner\"===t.name)throw new gt(\"the _inner name is reserved\");const o=(...i)=>{const[s,a]=wn(t,[...i]);P(t.accounts,a.accounts);const c=o.accounts(a.accounts);return void 0!==a.remainingAccounts&&c.push(...a.remainingAccounts),mt(\"debug-logs\")&&console.log(\"Outgoing account metas:\",c),new r({keys:c,programId:n,data:e(t.name,x(t,...s))})};return o.accounts=e=>vn.accountsArray(e,t.accounts,t.name),o}static accountsArray(t,e,n){return t?e.map((e=>{if(void 0!==(\"accounts\"in e?e.accounts:void 0)){const r=t[e.name];return vn.accountsArray(r,e.accounts,n).flat()}{const r=e;let o;try{o=L(t[e.name])}catch(t){throw new Error(`Wrong input type for account \"${e.name}\" in the instruction accounts object${void 0!==n?' for instruction \"'+n+'\"':\"\"}. Expected PublicKey or string.`)}return{pubkey:o,isWritable:r.isMut,isSigner:r.isSigner}}})).flat():[]}}class bn{static build(t,e,n,r){return async(...o)=>{var i;const s=e(...o),[,a]=wn(t,[...o]);if(void 0===r.sendAndConfirm)throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");try{return await r.sendAndConfirm(s,null!==(i=a.signers)&&void 0!==i?i:[],a.options)}catch(t){throw At(t,n)}}}}class An{static build(t,e){return(...r)=>{var o,i,s;const[,a]=wn(t,[...r]),c=new n;if(a.preInstructions&&a.instructions)throw new Error(\"instructions is deprecated, use preInstructions\");return null===(o=a.preInstructions)||void 0===o||o.forEach((t=>c.add(t))),null===(i=a.instructions)||void 0===i||i.forEach((t=>c.add(t))),c.add(e(...r)),null===(s=a.postInstructions)||void 0===s||s.forEach((t=>c.add(t))),c}}}class _n{constructor(t,e,n=lt(),r=new Kt(t)){this.provider=n,this.coder=r,this._idl=t,this._programId=e,this._address=Sn(e),this._sub=null;const[o,i,a]=(()=>{var o;let i={},a={},c={};return null===(o=t.state)||void 0===o||o.methods.forEach((o=>{const u=vn.build(o,((t,e)=>r.instruction.encodeState(t,e)),e);u.accounts=t=>{const r=function(t,e,n,r){if(\"new\"===n.name){const[n]=nn([],t);if(void 0===e.wallet)throw new Error(\"This function requires the Provider interface implementor to have a 'wallet' field.\");return[{pubkey:e.wallet.publicKey,isWritable:!1,isSigner:!0},{pubkey:Sn(t),isWritable:!0,isSigner:!1},{pubkey:n,isWritable:!1,isSigner:!1},{pubkey:s.programId,isWritable:!1,isSigner:!1},{pubkey:t,isWritable:!1,isSigner:!1}]}return P(n.accounts,r),[{pubkey:Sn(t),isWritable:!0,isSigner:!1}]}(e,n,o,t);return r.concat(vn.accountsArray(t,o.accounts,o.name))};const d=An.build(o,u),l=bn.build(o,d,M(t),n),p=h(o.name);i[p]=u,a[p]=d,c[p]=l})),[i,a,c]})();this.instruction=o,this.transaction=i,this.rpc=a}get programId(){return this._programId}async fetch(){const t=this.address(),e=await this.provider.connection.getAccountInfo(t);if(null===e)throw new Error(`Account does not exist ${t.toString()}`);const n=this._idl.state;if(!n)throw new Error(\"State is not specified in IDL.\");if((await jt(n.struct.name)).compare(e.data.slice(0,8)))throw new Error(\"Invalid account discriminator\");return this.coder.state.decode(e.data)}address(){return this._address}subscribe(t){if(null!==this._sub)return this._sub.ee;const e=new y,n=this.provider.connection.onAccountChange(this.address(),(t=>{const n=this.coder.state.decode(t.data);e.emit(\"change\",n)}),t);return this._sub={ee:e,listener:n},e}unsubscribe(){null!==this._sub&&this.provider.connection.removeAccountChangeListener(this._sub.listener).then((async()=>{this._sub=null})).catch(console.error)}}function Sn(t){let[e]=nn([],t);return tn(e,\"unversioned\",t)}class En{constructor(t,e,n,r,o){this._idlAccount=e,this._programId=n,this._provider=null!=r?r:lt(),this._coder=null!=o?o:new Kt(t),this._size=this._coder.accounts.size(e)}get size(){return this._size}get programId(){return this._programId}get provider(){return this._provider}get coder(){return this._coder}async fetchNullable(t,e){const n=await this.getAccountInfo(t,e);return null===n?null:this._coder.accounts.decode(this._idlAccount.name,n.data)}async fetch(t,e){const n=await this.fetchNullable(t,e);if(null===n)throw new Error(`Account does not exist ${t.toString()}`);return n}async fetchMultiple(t,e){return(await X(this._provider.connection,t.map((t=>L(t))),e)).map((t=>null==t?null:this._coder.accounts.decode(this._idlAccount.name,null==t?void 0:t.account.data)))}async all(t){return(await this._provider.connection.getProgramAccounts(this._programId,{commitment:this._provider.connection.commitment,filters:[{memcmp:this.coder.accounts.memcmp(this._idlAccount.name,t instanceof Buffer?t:void 0)},...Array.isArray(t)?t:[]]})).map((({pubkey:t,account:e})=>({publicKey:t,account:this._coder.accounts.decode(this._idlAccount.name,e.data)})))}subscribe(t,e){const n=In.get(t.toString());if(n)return n.ee;const r=new y;t=L(t);const o=this._provider.connection.onAccountChange(t,(t=>{const e=this._coder.accounts.decode(this._idlAccount.name,t.data);r.emit(\"change\",e)}),e);return In.set(t.toString(),{ee:r,listener:o}),r}async unsubscribe(t){let e=In.get(t.toString());e?In&&await this._provider.connection.removeAccountChangeListener(e.listener).then((()=>{In.delete(t.toString())})).catch(console.error):console.warn(\"Address is not subscribed\")}async createInstruction(t,e){const n=this.size;if(void 0===this._provider.wallet)throw new Error(\"This function requires the Provider interface implementor to have a 'wallet' field.\");return s.createAccount({fromPubkey:this._provider.wallet.publicKey,newAccountPubkey:t.publicKey,space:null!=e?e:n,lamports:await this._provider.connection.getMinimumBalanceForRentExemption(null!=e?e:n),programId:this._programId})}async associated(...t){const e=await this.associatedAddress(...t);return await this.fetch(e)}async associatedAddress(...t){return await on(this._programId,...t)}async getAccountInfo(t,e){return await this._provider.connection.getAccountInfo(L(t),e)}}const In=new Map,kn=\"Program log: \".length,Mn=\"Program data: \".length;class xn{constructor(t,e,n){this._programId=t,this._provider=e,this._eventParser=new Pn(t,n),this._eventCallbacks=new Map,this._eventListeners=new Map,this._listenerIdCount=0}addEventListener(t,e){var n;let r=this._listenerIdCount;return this._listenerIdCount+=1,t in this._eventCallbacks||this._eventListeners.set(t,[]),this._eventListeners.set(t,(null!==(n=this._eventListeners.get(t))&&void 0!==n?n:[]).concat(r)),this._eventCallbacks.set(r,[t,e]),void 0!==this._onLogsSubscriptionId||(this._onLogsSubscriptionId=this._provider.connection.onLogs(this._programId,((t,e)=>{if(!t.err)for(const n of this._eventParser.parseLogs(t.logs)){const r=this._eventListeners.get(n.name);r&&r.forEach((r=>{const o=this._eventCallbacks.get(r);if(o){const[,r]=o;r(n.data,e.slot,t.signature)}}))}}))),r}async removeEventListener(t){const e=this._eventCallbacks.get(t);if(!e)throw new Error(`Event listener ${t} doesn't exist!`);const[n]=e;let r=this._eventListeners.get(n);if(!r)throw new Error(`Event listeners don't exist for ${n}!`);this._eventCallbacks.delete(t),r=r.filter((e=>e!==t)),0===r.length&&this._eventListeners.delete(n),0==this._eventCallbacks.size&&(g.ok(0===this._eventListeners.size),void 0!==this._onLogsSubscriptionId&&(await this._provider.connection.removeOnLogsListener(this._onLogsSubscriptionId),this._onLogsSubscriptionId=void 0))}}class Pn{constructor(t,e){this.coder=e,this.programId=t}*parseLogs(t){const e=new Tn(t),n=new Ln;let r=e.next();for(;null!==r;){let[t,o,i]=this.handleLog(n,r);t&&(yield t),o&&n.push(o),i&&n.pop(),r=e.next()}}handleLog(t,e){return t.stack.length>0&&t.program()===this.programId.toString()?this.handleProgramLog(e):[null,...this.handleSystemLog(e)]}handleProgramLog(t){if(t.startsWith(\"Program log: \")||t.startsWith(\"Program data: \")){const e=t.startsWith(\"Program log: \")?t.slice(kn):t.slice(Mn);return[this.coder.events.decode(e),null,!1]}return[null,...this.handleSystemLog(t)]}handleSystemLog(t){const e=t.split(\":\")[0];return null!==e.match(/^Program (.*) success/g)?[null,!0]:e.startsWith(`Program ${this.programId.toString()} invoke`)?[this.programId.toString(),!1]:e.includes(\"invoke\")?[\"cpi\",!1]:[null,!1]}}class Ln{constructor(){this.stack=[]}program(){return g.ok(this.stack.length>0),this.stack[this.stack.length-1]}push(t){this.stack.push(t)}pop(){g.ok(this.stack.length>0),this.stack.pop()}}class Tn{constructor(t){this.logs=t}next(){if(0===this.logs.length)return null;let t=this.logs[0];return this.logs=this.logs.slice(1),t}}const Cn=new e(\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\");function zn(){return new Ne(Bn)}const Bn={version:\"0.1.0\",name:\"spl_token\",instructions:[{name:\"initializeMint\",accounts:[{name:\"mint\",isMut:!0,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[{name:\"decimals\",type:\"u8\"},{name:\"mintAuthority\",type:\"publicKey\"},{name:\"freezeAuthority\",type:{coption:\"publicKey\"}}]},{name:\"initializeAccount\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[]},{name:\"initializeMultisig\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[{name:\"m\",type:\"u8\"}]},{name:\"transfer\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"destination\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"}]},{name:\"approve\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"delegate\",isMut:!1,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"}]},{name:\"revoke\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[]},{name:\"setAuthority\",accounts:[{name:\"mint\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"authorityType\",type:\"u8\"},{name:\"newAuthority\",type:{coption:\"publicKey\"}}]},{name:\"mintTo\",accounts:[{name:\"mint\",isMut:!0,isSigner:!1},{name:\"to\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"}]},{name:\"burn\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"}]},{name:\"closeAccount\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"destination\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!1}],args:[]},{name:\"freezeAccount\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[]},{name:\"thawAccount\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[]},{name:\"transferChecked\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"destination\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"},{name:\"decimals\",type:\"u8\"}]},{name:\"approveChecked\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"delegate\",isMut:!1,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"},{name:\"decimals\",type:\"u8\"}]},{name:\"mintToChecked\",accounts:[{name:\"mint\",isMut:!0,isSigner:!1},{name:\"to\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"},{name:\"decimals\",type:\"u8\"}]},{name:\"burnChecked\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"},{name:\"decimals\",type:\"u8\"}]},{name:\"initializeAccount2\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[{name:\"authority\",type:\"publicKey\"}]},{name:\"syncNative\",accounts:[{name:\"account\",isMut:!0,isSigner:!1}],args:[]},{name:\"initializeAccount3\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1}],args:[{name:\"authority\",type:\"publicKey\"}]},{name:\"initializeMultisig2\",accounts:[{name:\"account\",isMut:!0,isSigner:!1}],args:[{name:\"m\",type:\"u8\"}]},{name:\"initializeMint2\",accounts:[{name:\"mint\",isMut:!0,isSigner:!1}],args:[{name:\"decimals\",type:\"u8\"},{name:\"mintAuthority\",type:\"publicKey\"},{name:\"freezeAuthority\",type:{coption:\"publicKey\"}}]}],accounts:[{name:\"mint\",type:{kind:\"struct\",fields:[{name:\"mintAuthority\",type:{coption:\"publicKey\"}},{name:\"supply\",type:\"u64\"},{name:\"decimals\",type:\"u8\"},{name:\"isInitialized\",type:\"bool\"},{name:\"freezeAuthority\",type:{coption:\"publicKey\"}}]}},{name:\"token\",type:{kind:\"struct\",fields:[{name:\"mint\",type:\"publicKey\"},{name:\"authority\",type:\"publicKey\"},{name:\"amount\",type:\"u64\"},{name:\"delegate\",type:{coption:\"publicKey\"}},{name:\"state\",type:\"u8\"},{name:\"isNative\",type:{coption:\"u64\"}},{name:\"delegatedAmount\",type:\"u64\"},{name:\"closeAuthority\",type:{coption:\"publicKey\"}}]}}]};class On{constructor(t,e,n,r,o,i){this._args=t,this._accounts=e,this._provider=n,this._programId=r,this._idlIx=o,this._accountStore=new Dn(n,i)}async resolve(){for(let t=0;t0&&!this._accounts[n]&&await this.autoPopulatePda(e)}}async autoPopulatePda(t){if(!t.pda||!t.pda.seeds)throw new Error(\"Must have seeds\");const n=await Promise.all(t.pda.seeds.map((t=>this.toBuffer(t)))),r=await this.parseProgramId(t),[o]=await e.findProgramAddress(n,r);this._accounts[h(t.name)]=o}async parseProgramId(t){var n;if(!(null===(n=t.pda)||void 0===n?void 0:n.programId))return this._programId;switch(t.pda.programId.kind){case\"const\":return new e(this.toBufferConst(t.pda.programId.value));case\"arg\":return this.argValue(t.pda.programId);case\"account\":return await this.accountValue(t.pda.programId);default:throw new Error(`Unexpected program seed kind: ${t.pda.programId.kind}`)}}async toBuffer(t){switch(t.kind){case\"const\":return this.toBufferConst(t);case\"arg\":return await this.toBufferArg(t);case\"account\":return await this.toBufferAccount(t);default:throw new Error(`Unexpected seed kind: ${t.kind}`)}}toBufferConst(t){return this.toBufferValue(t.type,t.value)}async toBufferArg(t){const e=this.argValue(t);return this.toBufferValue(t.type,e)}argValue(t){const e=h(t.path.split(\".\")[0]),n=this._idlIx.args.findIndex((t=>t.name===e));if(-1===n)throw new Error(`Unable to find argument for seed: ${e}`);return this._args[n]}async toBufferAccount(t){const e=await this.accountValue(t);return this.toBufferValue(t.type,e)}async accountValue(t){const e=t.path.split(\".\"),n=e[0],r=this._accounts[h(n)];if(1===e.length)return r;const o=await this._accountStore.fetchAccount(t.account,r);return this.parseAccountValue(o,e.slice(1))}parseAccountValue(t,e){let n;for(;e.length>0;)n=t[h(e[0])],e=e.slice(1);return n}toBufferValue(t,e){switch(t){case\"u8\":return Buffer.from([e]);case\"u16\":let n=Buffer.alloc(2);return n.writeUInt16LE(e),n;case\"u32\":let r=Buffer.alloc(4);return r.writeUInt32LE(e),r;case\"u64\":let o=Buffer.alloc(8);return o.writeBigUInt64LE(BigInt(e)),o;case\"string\":return Buffer.from(b(e));case\"publicKey\":return e.toBuffer();default:if(t.array)return Buffer.from(e);throw new Error(`Unexpected seed type: ${t}`)}}}On.CONST_ACCOUNTS={associatedTokenProgram:cn,rent:a,systemProgram:s.programId,tokenProgram:an};class Dn{constructor(t,e){this._provider=t,this._accounts=e,this._cache=new Map}async fetchAccount(t,e){const n=e.toString();if(!this._cache.has(n))if(\"TokenAccount\"===t){const t=await this._provider.connection.getAccountInfo(e);if(null===t)throw new Error(`invalid account info for ${n}`);const r=zn().accounts.decode(\"token\",t.data);this._cache.set(n,r)}else{const r=this._accounts[h(t)].fetch(e);this._cache.set(n,r)}return this._cache.get(n)}}class Nn{static build(t,e,n,r,o,i,s,a,c){return(...u)=>new Rn(u,r,o,i,s,a,t,e,n,c)}}class Rn{constructor(t,e,n,r,o,i,s,a,c,u){this._args=t,this._ixFn=e,this._txFn=n,this._rpcFn=r,this._simulateFn=o,this._viewFn=i,this._accounts={},this._remainingAccounts=[],this._signers=[],this._preInstructions=[],this._postInstructions=[],this._autoResolveAccounts=!0,this._accountsResolver=new On(t,this._accounts,s,a,c,u)}async pubkeys(){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._accounts}accounts(t){return this._autoResolveAccounts=!0,Object.assign(this._accounts,t),this}accountsStrict(t){return this._autoResolveAccounts=!1,Object.assign(this._accounts,t),this}signers(t){return this._signers=this._signers.concat(t),this}remainingAccounts(t){return this._remainingAccounts=this._remainingAccounts.concat(t),this}preInstructions(t){return this._preInstructions=this._preInstructions.concat(t),this}postInstructions(t){return this._postInstructions=this._postInstructions.concat(t),this}async rpc(t){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._rpcFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:t})}async view(t){if(this._autoResolveAccounts&&await this._accountsResolver.resolve(),!this._viewFn)throw new Error(\"Method does not support views\");return this._viewFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:t})}async simulate(t){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._simulateFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:t})}async instruction(){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._ixFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions})}async transaction(){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._txFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions})}}class Vn{constructor(t,e,n,r){e=L(e),n||(n=lt()),this._idl=t,this._provider=n,this._programId=e,this._coder=null!=r?r:new Kt(t),this._events=new xn(this._programId,n,this._coder);const[o,i,s,a,c,u,d,l]=class{static build(t,e,n,r){const o={},i={},s={},a={},c={},u={},d=M(t),l=t.accounts?class{static build(t,e,n,r){var o;const i={};return null===(o=t.accounts)||void 0===o||o.forEach((o=>{const s=h(o.name);i[s]=new En(t,o,n,r,e)})),i}}.build(t,e,n,r):{},p=class{static build(t,e,n,r){if(void 0!==t.state)return new _n(t,n,r,e)}}.build(t,e,n,r);return t.instructions.forEach((p=>{const f=vn.build(p,((t,n)=>e.instruction.encode(t,n)),n),m=An.build(p,f),y=bn.build(p,m,d,r),g=class{static build(t,e,n,r,o,i,s){return async(...a)=>{var c;const u=e(...a),[,d]=wn(t,[...a]);let l;if(void 0===r.simulate)throw new Error(\"This function requires 'Provider.simulate' to be implemented.\");try{l=await r.simulate(u,d.signers,null===(c=d.options)||void 0===c?void 0:c.commitment)}catch(t){throw At(t,n)}if(void 0===l)throw new Error(\"Unable to simulate transaction\");const h=l.logs;if(!h)throw new Error(\"Simulated logs not found\");const p=[];if(s.events){let t=new Pn(i,o);for(const e of t.parseLogs(h))p.push(e)}return{events:p,raw:h}}}}.build(p,m,d,r,e,n,t),w=class{static build(t,e,n,r){const o=e.accounts.find((t=>t.isMut)),i=!!e.returns;if(!o&&i)return async(...o)=>{var i,s;let a=await n(...o);const c=`Program return: ${t} `;let u=a.raw.find((t=>t.startsWith(c)));if(!u)throw new Error(\"View expected return log\");let d=E(u.slice(c.length)),l=e.returns;if(!l)throw new Error(\"View expected return type\");return Lt.fieldLayout({type:l},Array.from([...null!==(i=r.accounts)&&void 0!==i?i:[],...null!==(s=r.types)&&void 0!==s?s:[]])).decode(d)}}}.build(n,p,g,t),v=Nn.build(r,n,p,f,m,y,g,w,l),b=h(p.name);i[b]=f,s[b]=m,o[b]=y,a[b]=g,c[b]=v,w&&(u[b]=w)})),[o,i,s,l,a,c,p,u]}}.build(t,this._coder,e,n);this.rpc=o,this.instruction=i,this.transaction=s,this.account=a,this.simulate=c,this.methods=u,this.state=d,this.views=l}get programId(){return this._programId}get idl(){return this._idl}get coder(){return this._coder}get provider(){return this._provider}static async at(t,e){const n=L(t),r=await Vn.fetchIdl(n,e);if(!r)throw new Error(`IDL not found for program: ${t.toString()}`);return new Vn(r,n,e)}static async fetchIdl(t,n){n=null!=n?n:lt();const r=L(t),o=await async function(t){const n=(await e.findProgramAddress([],t))[0];return await e.createWithSeed(n,\"anchor:idl\",t)}(r),i=await n.connection.getAccountInfo(o);if(!i)return null;let s=(a=i.data.slice(8),gn.decode(a));var a;const c=m(s.data);return JSON.parse(v(c))}addEventListener(t,e){return this._events.addEventListener(t,e)}async removeEventListener(t){return await this._events.removeEventListener(t)}}class Un{constructor(t){}encode(t,e){if(\"create\"===h(t))return Buffer.alloc(0);throw new Error(`Invalid instruction: ${t}`)}encodeState(t,e){throw new Error(\"SPL associated token does not have state\")}}class jn{constructor(t){}encode(t,e){throw new Error(\"SPL associated token does not have state\")}decode(t){throw new Error(\"SPL associated token does not have state\")}}class $n{constructor(t){this.idl=t}async encode(t,e){throw new Error(`Invalid account name: ${t}`)}decode(t,e){return this.decodeUnchecked(t,e)}decodeUnchecked(t,e){throw new Error(`Invalid account name: ${t}`)}memcmp(t,e){throw new Error(`Invalid account name: ${t}`)}size(t){var e;return null!==(e=Bt(this.idl,t))&&void 0!==e?e:0}}class Kn{constructor(t){}decode(t){throw new Error(\"SPL associated token program does not have events\")}}class qn{constructor(t){}encode(t,e){throw new Error(\"SPL associated token does not have user-defined types\")}decode(t,e){throw new Error(\"SPL associated token does not have user-defined types\")}}class Fn{constructor(t){this.instruction=new Un(t),this.accounts=new $n(t),this.events=new Kn(t),this.state=new jn(t),this.types=new qn(t)}}const Wn=new e(\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\");function Gn(t){return new Vn(Hn,Wn,t,new Fn(Hn))}const Hn={version:\"0.1.0\",name:\"spl_associated_token\",instructions:[{name:\"create\",accounts:[{name:\"authority\",isMut:!0,isSigner:!0},{name:\"associatedAccount\",isMut:!0,isSigner:!1},{name:\"owner\",isMut:!1,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"systemProgram\",isMut:!1,isSigner:!1},{name:\"tokenProgram\",isMut:!1,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[]}]};class Jn{static token(t){return function(t){return new Vn(Bn,Cn,t,zn())}(t)}static associatedToken(t){return Gn(t)}}const Zn=new e(\"11111111111111111111111111111111\");function Xn(t){return new Vn(Qn,Zn,t,new Qe(Qn))}const Qn={version:\"0.1.0\",name:\"system_program\",instructions:[{name:\"createAccount\",accounts:[{name:\"from\",isMut:!0,isSigner:!0},{name:\"to\",isMut:!0,isSigner:!0}],args:[{name:\"lamports\",type:\"u64\"},{name:\"space\",type:\"u64\"},{name:\"owner\",type:\"publicKey\"}]},{name:\"assign\",accounts:[{name:\"pubkey\",isMut:!0,isSigner:!0}],args:[{name:\"owner\",type:\"publicKey\"}]},{name:\"transfer\",accounts:[{name:\"from\",isMut:!0,isSigner:!0},{name:\"to\",isMut:!0,isSigner:!1}],args:[{name:\"lamports\",type:\"u64\"}]},{name:\"createAccountWithSeed\",accounts:[{name:\"from\",isMut:!0,isSigner:!0},{name:\"to\",isMut:!0,isSigner:!1},{name:\"base\",isMut:!1,isSigner:!0}],args:[{name:\"base\",type:\"publicKey\"},{name:\"seed\",type:\"string\"},{name:\"lamports\",type:\"u64\"},{name:\"space\",type:\"u64\"},{name:\"owner\",type:\"publicKey\"}]},{name:\"advanceNonceAccount\",accounts:[{name:\"nonce\",isMut:!0,isSigner:!1},{name:\"recentBlockhashes\",isMut:!1,isSigner:!1},{name:\"authorized\",isMut:!1,isSigner:!0}],args:[{name:\"authorized\",type:\"publicKey\"}]},{name:\"withdrawNonceAccount\",accounts:[{name:\"nonce\",isMut:!0,isSigner:!1},{name:\"to\",isMut:!0,isSigner:!1},{name:\"recentBlockhashes\",isMut:!1,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1},{name:\"authorized\",isMut:!1,isSigner:!0}],args:[{name:\"lamports\",type:\"u64\"}]},{name:\"initializeNonceAccount\",accounts:[{name:\"nonce\",isMut:!0,isSigner:!0},{name:\"recentBlockhashes\",isMut:!1,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[{name:\"authorized\",type:\"publicKey\"}]},{name:\"authorizeNonceAccount\",accounts:[{name:\"nonce\",isMut:!0,isSigner:!1},{name:\"authorized\",isMut:!1,isSigner:!0}],args:[{name:\"authorized\",type:\"publicKey\"}]},{name:\"allocate\",accounts:[{name:\"pubkey\",isMut:!0,isSigner:!0}],args:[{name:\"space\",type:\"u64\"}]},{name:\"allocateWithSeed\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"base\",isMut:!1,isSigner:!0}],args:[{name:\"base\",type:\"publicKey\"},{name:\"seed\",type:\"string\"},{name:\"space\",type:\"u64\"},{name:\"owner\",type:\"publicKey\"}]},{name:\"assignWithSeed\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"base\",isMut:!1,isSigner:!0}],args:[{name:\"base\",type:\"publicKey\"},{name:\"seed\",type:\"string\"},{name:\"owner\",type:\"publicKey\"}]},{name:\"transferWithSeed\",accounts:[{name:\"from\",isMut:!0,isSigner:!1},{name:\"base\",isMut:!1,isSigner:!0},{name:\"to\",isMut:!0,isSigner:!1}],args:[{name:\"lamports\",type:\"u64\"},{name:\"seed\",type:\"string\"},{name:\"owner\",type:\"publicKey\"}]}],accounts:[{name:\"nonce\",type:{kind:\"struct\",fields:[{name:\"version\",type:\"u32\"},{name:\"state\",type:\"u32\"},{name:\"authorizedPubkey\",type:\"publicKey\"},{name:\"nonce\",type:\"publicKey\"},{name:\"feeCalculator\",type:{defined:\"FeeCalculator\"}}]}}],types:[{name:\"FeeCalculator\",type:{kind:\"struct\",fields:[{name:\"lamportsPerSignature\",type:\"u64\"}]}}]};class Yn{static system(t){return Xn(t)}}export{Dt as ACCOUNT_DISCRIMINATOR_SIZE,En as AccountClient,vt as AnchorError,st as AnchorProvider,Nt as BorshAccountsCoder,Kt as BorshCoder,Rt as BorshEventCoder,Tt as BorshInstructionCoder,Ut as BorshStateCoder,xn as EventManager,Pn as EventParser,gt as IdlError,_t as LangErrorCode,St as LangErrorMessage,Nn as MethodsBuilderFactory,Yn as Native,Vn as Program,bt as ProgramError,wt as ProgramErrorStack,Jn as Spl,Ne as SplTokenCoder,_n as StateClient,Qe as SystemCoder,Vt as eventDiscriminator,lt as getProvider,M as parseIdlErrors,dt as setProvider,wn as splitArgsAndCtx,jt as stateDiscriminator,x as toInstruction,L as translateAddress,At as translateError,yn as utils,P as validateAccounts};\n//# sourceMappingURL=index.js.map\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.map = exports.array = exports.rustEnum = exports.str = exports.vecU8 = exports.tagged = exports.vec = exports.bool = exports.option = exports.publicKey = exports.i128 = exports.u128 = exports.i64 = exports.u64 = exports.struct = exports.f64 = exports.f32 = exports.i32 = exports.u32 = exports.i16 = exports.u16 = exports.i8 = exports.u8 = void 0;\nconst buffer_layout_1 = require(\"buffer-layout\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nvar buffer_layout_2 = require(\"buffer-layout\");\nObject.defineProperty(exports, \"u8\", { enumerable: true, get: function () { return buffer_layout_2.u8; } });\nObject.defineProperty(exports, \"i8\", { enumerable: true, get: function () { return buffer_layout_2.s8; } });\nObject.defineProperty(exports, \"u16\", { enumerable: true, get: function () { return buffer_layout_2.u16; } });\nObject.defineProperty(exports, \"i16\", { enumerable: true, get: function () { return buffer_layout_2.s16; } });\nObject.defineProperty(exports, \"u32\", { enumerable: true, get: function () { return buffer_layout_2.u32; } });\nObject.defineProperty(exports, \"i32\", { enumerable: true, get: function () { return buffer_layout_2.s32; } });\nObject.defineProperty(exports, \"f32\", { enumerable: true, get: function () { return buffer_layout_2.f32; } });\nObject.defineProperty(exports, \"f64\", { enumerable: true, get: function () { return buffer_layout_2.f64; } });\nObject.defineProperty(exports, \"struct\", { enumerable: true, get: function () { return buffer_layout_2.struct; } });\nclass BNLayout extends buffer_layout_1.Layout {\n constructor(span, signed, property) {\n super(span, property);\n this.blob = buffer_layout_1.blob(span);\n this.signed = signed;\n }\n decode(b, offset = 0) {\n const num = new bn_js_1.default(this.blob.decode(b, offset), 10, 'le');\n if (this.signed) {\n return num.fromTwos(this.span * 8).clone();\n }\n return num;\n }\n encode(src, b, offset = 0) {\n if (this.signed) {\n src = src.toTwos(this.span * 8);\n }\n return this.blob.encode(src.toArrayLike(Buffer, 'le', this.span), b, offset);\n }\n}\nfunction u64(property) {\n return new BNLayout(8, false, property);\n}\nexports.u64 = u64;\nfunction i64(property) {\n return new BNLayout(8, true, property);\n}\nexports.i64 = i64;\nfunction u128(property) {\n return new BNLayout(16, false, property);\n}\nexports.u128 = u128;\nfunction i128(property) {\n return new BNLayout(16, true, property);\n}\nexports.i128 = i128;\nclass WrappedLayout extends buffer_layout_1.Layout {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nfunction publicKey(property) {\n return new WrappedLayout(buffer_layout_1.blob(32), (b) => new web3_js_1.PublicKey(b), (key) => key.toBuffer(), property);\n}\nexports.publicKey = publicKey;\nclass OptionLayout extends buffer_layout_1.Layout {\n constructor(layout, property) {\n super(-1, property);\n this.layout = layout;\n this.discriminator = buffer_layout_1.u8();\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.discriminator.encode(0, b, offset);\n }\n this.discriminator.encode(1, b, offset);\n return this.layout.encode(src, b, offset + 1) + 1;\n }\n decode(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return null;\n }\n else if (discriminator === 1) {\n return this.layout.decode(b, offset + 1);\n }\n throw new Error('Invalid option ' + this.property);\n }\n getSpan(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return 1;\n }\n else if (discriminator === 1) {\n return this.layout.getSpan(b, offset + 1) + 1;\n }\n throw new Error('Invalid option ' + this.property);\n }\n}\nfunction option(layout, property) {\n return new OptionLayout(layout, property);\n}\nexports.option = option;\nfunction bool(property) {\n return new WrappedLayout(buffer_layout_1.u8(), decodeBool, encodeBool, property);\n}\nexports.bool = bool;\nfunction decodeBool(value) {\n if (value === 0) {\n return false;\n }\n else if (value === 1) {\n return true;\n }\n throw new Error('Invalid bool: ' + value);\n}\nfunction encodeBool(value) {\n return value ? 1 : 0;\n}\nfunction vec(elementLayout, property) {\n const length = buffer_layout_1.u32('length');\n const layout = buffer_layout_1.struct([\n length,\n buffer_layout_1.seq(elementLayout, buffer_layout_1.offset(length, -length.span), 'values'),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, values => ({ values }), property);\n}\nexports.vec = vec;\nfunction tagged(tag, layout, property) {\n const wrappedLayout = buffer_layout_1.struct([\n u64('tag'),\n layout.replicate('data'),\n ]);\n function decodeTag({ tag: receivedTag, data }) {\n if (!receivedTag.eq(tag)) {\n throw new Error('Invalid tag, expected: ' +\n tag.toString('hex') +\n ', got: ' +\n receivedTag.toString('hex'));\n }\n return data;\n }\n return new WrappedLayout(wrappedLayout, decodeTag, data => ({ tag, data }), property);\n}\nexports.tagged = tagged;\nfunction vecU8(property) {\n const length = buffer_layout_1.u32('length');\n const layout = buffer_layout_1.struct([\n length,\n buffer_layout_1.blob(buffer_layout_1.offset(length, -length.span), 'data'),\n ]);\n return new WrappedLayout(layout, ({ data }) => data, data => ({ data }), property);\n}\nexports.vecU8 = vecU8;\nfunction str(property) {\n return new WrappedLayout(vecU8(), data => data.toString('utf-8'), s => Buffer.from(s, 'utf-8'), property);\n}\nexports.str = str;\nfunction rustEnum(variants, property, discriminant) {\n const unionLayout = buffer_layout_1.union(discriminant !== null && discriminant !== void 0 ? discriminant : buffer_layout_1.u8(), property);\n variants.forEach((variant, index) => unionLayout.addVariant(index, variant, variant.property));\n return unionLayout;\n}\nexports.rustEnum = rustEnum;\nfunction array(elementLayout, length, property) {\n const layout = buffer_layout_1.struct([\n buffer_layout_1.seq(elementLayout, length, 'values'),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, values => ({ values }), property);\n}\nexports.array = array;\nclass MapEntryLayout extends buffer_layout_1.Layout {\n constructor(keyLayout, valueLayout, property) {\n super(keyLayout.span + valueLayout.span, property);\n this.keyLayout = keyLayout;\n this.valueLayout = valueLayout;\n }\n decode(b, offset) {\n offset = offset || 0;\n const key = this.keyLayout.decode(b, offset);\n const value = this.valueLayout.decode(b, offset + this.keyLayout.getSpan(b, offset));\n return [key, value];\n }\n encode(src, b, offset) {\n offset = offset || 0;\n const keyBytes = this.keyLayout.encode(src[0], b, offset);\n const valueBytes = this.valueLayout.encode(src[1], b, offset + keyBytes);\n return keyBytes + valueBytes;\n }\n getSpan(b, offset) {\n return (this.keyLayout.getSpan(b, offset) + this.valueLayout.getSpan(b, offset));\n }\n}\nfunction map(keyLayout, valueLayout, property) {\n const length = buffer_layout_1.u32('length');\n const layout = buffer_layout_1.struct([\n length,\n buffer_layout_1.seq(new MapEntryLayout(keyLayout, valueLayout), buffer_layout_1.offset(length, -length.span), 'values'),\n ]);\n return new WrappedLayout(layout, ({ values }) => new Map(values), values => ({ values: Array.from(values.entries()) }), property);\n}\nexports.map = map;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IDL = void 0;\nexports.IDL = {\n \"version\": \"0.0.1\",\n \"name\": \"merkle_distributor\",\n \"instructions\": [\n {\n \"name\": \"newDistributor\",\n \"docs\": [\n \"READ THE FOLLOWING:\",\n \"\",\n \"This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.\",\n \"\",\n \"An attack could look like:\",\n \"- A legitimate user opens a new distributor.\",\n \"- Someone observes the call to this instruction.\",\n \"- They replace the clawback_receiver, admin, or time parameters with their own.\",\n \"\",\n \"One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own.\",\n \"Then the attacker can steal all funds from the distributor to their own clawback_receiver account.\",\n \"\",\n \"HOW TO AVOID:\",\n \"- When you call into this instruction, ensure your transaction succeeds.\",\n \"- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and\",\n \"assert the parameters are what you expect, most importantly the clawback_receiver and admin.\",\n \"- If your transaction fails, double check the value on-chain matches what you expect.\"\n ],\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"[MerkleDistributor].\"\n ],\n \"pda\": {\n \"seeds\": [\n {\n \"kind\": \"const\",\n \"type\": \"string\",\n \"value\": \"MerkleDistributor\"\n },\n {\n \"kind\": \"account\",\n \"type\": \"publicKey\",\n \"account\": \"Mint\",\n \"path\": \"mint\"\n },\n {\n \"kind\": \"arg\",\n \"type\": \"u64\",\n \"path\": \"version\"\n }\n ]\n }\n },\n {\n \"name\": \"clawbackReceiver\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"Clawback receiver token account\"\n ]\n },\n {\n \"name\": \"mint\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The mint to distribute.\"\n ]\n },\n {\n \"name\": \"tokenVault\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"Token vault\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin wallet, responsible for creating the distributor and paying for the transaction.\",\n \"Also has the authority to set the clawback receiver and change itself.\"\n ]\n },\n {\n \"name\": \"systemProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The [System] program.\"\n ]\n },\n {\n \"name\": \"associatedTokenProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The [Associated Token] program.\"\n ]\n },\n {\n \"name\": \"tokenProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The [Token] program.\"\n ]\n }\n ],\n \"args\": [\n {\n \"name\": \"version\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"root\",\n \"type\": {\n \"array\": [\n \"u8\",\n 32\n ]\n }\n },\n {\n \"name\": \"maxTotalClaim\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"maxNumNodes\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"startTs\",\n \"type\": \"i64\"\n },\n {\n \"name\": \"endTs\",\n \"type\": \"i64\"\n }\n ]\n },\n {\n \"name\": \"newClaim\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"claimStatus\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"Claim status PDA\"\n ],\n \"pda\": {\n \"seeds\": [\n {\n \"kind\": \"const\",\n \"type\": \"string\",\n \"value\": \"ClaimStatus\"\n },\n {\n \"kind\": \"account\",\n \"type\": \"publicKey\",\n \"path\": \"claimant\"\n },\n {\n \"kind\": \"account\",\n \"type\": \"publicKey\",\n \"account\": \"MerkleDistributor\",\n \"path\": \"distributor\"\n }\n ]\n }\n },\n {\n \"name\": \"from\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"Distributor ATA containing the tokens to distribute.\"\n ]\n },\n {\n \"name\": \"to\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"Account to send the claimed tokens to.\"\n ]\n },\n {\n \"name\": \"claimant\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Who is claiming the tokens.\"\n ]\n },\n {\n \"name\": \"tokenProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"SPL [Token] program.\"\n ]\n },\n {\n \"name\": \"systemProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The [System] program.\"\n ]\n }\n ],\n \"args\": [\n {\n \"name\": \"index\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"proof\",\n \"type\": {\n \"vec\": {\n \"array\": [\n \"u8\",\n 32\n ]\n }\n }\n }\n ]\n },\n {\n \"name\": \"clawback\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"from\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"Distributor ATA containing the tokens to distribute.\"\n ]\n },\n {\n \"name\": \"to\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The Clawback token account.\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin account\"\n ]\n },\n {\n \"name\": \"systemProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The [System] program.\"\n ]\n },\n {\n \"name\": \"tokenProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"SPL [Token] program.\"\n ]\n }\n ],\n \"args\": [\n {\n \"name\": \"amount\",\n \"type\": \"u64\"\n }\n ]\n },\n {\n \"name\": \"setClawbackReceiver\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"newClawbackAccount\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"New clawback account\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin signer\"\n ]\n }\n ],\n \"args\": []\n },\n {\n \"name\": \"setAdmin\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin signer\"\n ]\n },\n {\n \"name\": \"newAdmin\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"New admin account\"\n ]\n }\n ],\n \"args\": []\n },\n {\n \"name\": \"setTimestamp\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin signer\"\n ]\n }\n ],\n \"args\": [\n {\n \"name\": \"startTs\",\n \"type\": \"i64\"\n },\n {\n \"name\": \"endTs\",\n \"type\": \"i64\"\n }\n ]\n },\n {\n \"name\": \"setMerkleRoot\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin signer\"\n ]\n }\n ],\n \"args\": [\n {\n \"name\": \"root\",\n \"type\": {\n \"array\": [\n \"u8\",\n 32\n ]\n }\n },\n {\n \"name\": \"maxTotalClaim\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"maxNumNodes\",\n \"type\": \"u64\"\n }\n ]\n }\n ],\n \"accounts\": [\n {\n \"name\": \"claimStatus\",\n \"docs\": [\n \"Holds whether or not a claimant has claimed tokens.\"\n ],\n \"type\": {\n \"kind\": \"struct\",\n \"fields\": [\n {\n \"name\": \"isClaimed\",\n \"docs\": [\n \"If true, the tokens have been claimed.\"\n ],\n \"type\": \"bool\"\n },\n {\n \"name\": \"claimant\",\n \"docs\": [\n \"Authority that claimed the tokens.\"\n ],\n \"type\": \"publicKey\"\n },\n {\n \"name\": \"claimedAt\",\n \"docs\": [\n \"When the tokens were claimed.\"\n ],\n \"type\": \"i64\"\n },\n {\n \"name\": \"amount\",\n \"docs\": [\n \"Amount of tokens claimed.\"\n ],\n \"type\": \"u64\"\n }\n ]\n }\n },\n {\n \"name\": \"merkleDistributor\",\n \"docs\": [\n \"State for the account which distributes tokens.\"\n ],\n \"type\": {\n \"kind\": \"struct\",\n \"fields\": [\n {\n \"name\": \"bump\",\n \"docs\": [\n \"Bump seed.\"\n ],\n \"type\": \"u8\"\n },\n {\n \"name\": \"version\",\n \"docs\": [\n \"Version of the airdrop\"\n ],\n \"type\": \"u64\"\n },\n {\n \"name\": \"root\",\n \"docs\": [\n \"The 256-bit merkle root.\"\n ],\n \"type\": {\n \"array\": [\n \"u8\",\n 32\n ]\n }\n },\n {\n \"name\": \"mint\",\n \"docs\": [\n \"[Mint] of the token to be distributed.\"\n ],\n \"type\": \"publicKey\"\n },\n {\n \"name\": \"tokenVault\",\n \"docs\": [\n \"Token Address of the vault\"\n ],\n \"type\": \"publicKey\"\n },\n {\n \"name\": \"maxTotalClaim\",\n \"docs\": [\n \"Maximum number of tokens that can ever be claimed from this [MerkleDistributor].\"\n ],\n \"type\": \"u64\"\n },\n {\n \"name\": \"maxNumNodes\",\n \"docs\": [\n \"Maximum number of nodes in [MerkleDistributor].\"\n ],\n \"type\": \"u64\"\n },\n {\n \"name\": \"totalAmountClaimed\",\n \"docs\": [\n \"Total amount of tokens that have been claimed.\"\n ],\n \"type\": \"u64\"\n },\n {\n \"name\": \"numNodesClaimed\",\n \"docs\": [\n \"Number of nodes that have been claimed.\"\n ],\n \"type\": \"u64\"\n },\n {\n \"name\": \"startTs\",\n \"docs\": [\n \"Claim time start (Unix Timestamp)\"\n ],\n \"type\": \"i64\"\n },\n {\n \"name\": \"endTs\",\n \"docs\": [\n \"Claim time end (Unix Timestamp)\"\n ],\n \"type\": \"i64\"\n },\n {\n \"name\": \"clawbackReceiver\",\n \"docs\": [\n \"Clawback receiver\"\n ],\n \"type\": \"publicKey\"\n },\n {\n \"name\": \"admin\",\n \"docs\": [\n \"Admin wallet\"\n ],\n \"type\": \"publicKey\"\n }\n ]\n }\n }\n ],\n \"events\": [\n {\n \"name\": \"NewClaimEvent\",\n \"fields\": [\n {\n \"name\": \"claimant\",\n \"type\": \"publicKey\",\n \"index\": false\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"i64\",\n \"index\": false\n }\n ]\n },\n {\n \"name\": \"ClaimedEvent\",\n \"fields\": [\n {\n \"name\": \"claimant\",\n \"type\": \"publicKey\",\n \"index\": false\n },\n {\n \"name\": \"amount\",\n \"type\": \"u64\",\n \"index\": false\n }\n ]\n }\n ],\n \"errors\": [\n {\n \"code\": 6000,\n \"name\": \"InvalidProof\",\n \"msg\": \"Invalid Merkle proof\"\n },\n {\n \"code\": 6001,\n \"name\": \"ExceededMaxClaim\",\n \"msg\": \"Exceeded maximum claim amount\"\n },\n {\n \"code\": 6002,\n \"name\": \"MaxNodesExceeded\",\n \"msg\": \"Exceeded maximum node count\"\n },\n {\n \"code\": 6003,\n \"name\": \"Unauthorized\",\n \"msg\": \"Account is not authorized to execute this instruction\"\n },\n {\n \"code\": 6004,\n \"name\": \"OwnerMismatch\",\n \"msg\": \"Token account owner did not match intended owner\"\n },\n {\n \"code\": 6005,\n \"name\": \"SameClawbackReceiver\",\n \"msg\": \"New and old Clawback receivers are identical\"\n },\n {\n \"code\": 6006,\n \"name\": \"SameAdmin\",\n \"msg\": \"New and old admin are identical\"\n },\n {\n \"code\": 6007,\n \"name\": \"ClaimExpired\",\n \"msg\": \"Claim window expired\"\n },\n {\n \"code\": 6008,\n \"name\": \"ArithmeticError\",\n \"msg\": \"Arithmetic Error (overflow/underflow)\"\n },\n {\n \"code\": 6009,\n \"name\": \"StartTimestampAfterEnd\",\n \"msg\": \"Start Timestamp cannot be after end Timestamp\"\n },\n {\n \"code\": 6010,\n \"name\": \"TimestampsNotInFuture\",\n \"msg\": \"Timestamps cannot be in the past\"\n },\n {\n \"code\": 6011,\n \"name\": \"DistributionAlreadyStarted\",\n \"msg\": \"Distribution already started\"\n },\n {\n \"code\": 6012,\n \"name\": \"InsufficientClawbackAmount\",\n \"msg\": \"Insufficient clawback amount\"\n }\n ]\n};\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DistributorClient = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst anchor_1 = require(\"@project-serum/anchor\");\nconst common_sdk_1 = require(\"@orca-so/common-sdk\");\nconst token_utils_1 = require(\"@saberhq/token-utils\");\nconst utils_1 = require(\"../utils\");\nconst buffer_layout_1 = require(\"@solana/buffer-layout\");\nconst buffer_layout_utils_1 = require(\"@solana/buffer-layout-utils\");\nconst spl_token_1 = require(\"@solana/spl-token\");\nclass DistributorClient {\n constructor(ctx, pda) {\n this.ctx = ctx;\n this.pda = pda;\n }\n newDistributor(mint, root, clawbackReceiver, maxTotalClaim, maxNumNodes, startTs, endTs, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const clawbackReceiverATA = (0, token_utils_1.getATAAddressSync)({ mint, owner: clawbackReceiver });\n const tx = new common_sdk_1.TransactionBuilder(this.ctx.provider.connection, this.ctx.provider.wallet);\n const clawbackTokenAccountInfo = yield this.ctx.connection.getAccountInfo(clawbackReceiverATA);\n if (clawbackTokenAccountInfo === null) {\n tx.addInstruction({\n instructions: [\n spl_token_1.Token.createAssociatedTokenAccountInstruction(token_utils_1.ASSOCIATED_TOKEN_PROGRAM_ID, token_utils_1.TOKEN_PROGRAM_ID, mint, clawbackReceiverATA, clawbackReceiver, this.ctx.wallet.publicKey)\n ],\n cleanupInstructions: [],\n signers: [],\n });\n }\n const tokenVault = (0, token_utils_1.getATAAddressSync)({ mint, owner: distributor.key });\n const newDistributorIx = yield this.ctx.methods.newDistributor({\n accounts: {\n distributor: distributor.key,\n clawbackReceiver: clawbackReceiverATA,\n mint,\n tokenVault,\n admin: this.ctx.wallet.publicKey,\n },\n inputs: {\n version,\n root: (0, utils_1.toBytes32Array)(root),\n maxTotalClaim,\n maxNumNodes,\n startTs,\n endTs,\n },\n });\n if (newDistributorIx.ix) {\n tx.addInstruction(newDistributorIx.ix);\n }\n return tx;\n });\n }\n setAdmin(mint, newAdmin, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const distributorData = yield this.ctx.program.account.merkleDistributor.fetch(distributor.key);\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n const tx = (yield this.ctx.methods.setAdmin({\n accounts: {\n distributor: distributor.key,\n admin: this.ctx.wallet.publicKey,\n newAdmin\n },\n inputs: {},\n })).toTx();\n return tx;\n });\n }\n setClawbackReceiver(mint, clawbackReceiver, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const distributorData = yield this.ctx.program.account.merkleDistributor.fetch(distributor.key);\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n const clawbackReceiverATA = (0, token_utils_1.getATAAddressSync)({ mint, owner: clawbackReceiver });\n const tx = new common_sdk_1.TransactionBuilder(this.ctx.provider.connection, this.ctx.provider.wallet);\n const clawbackTokenAccountInfo = yield this.ctx.connection.getAccountInfo(clawbackReceiverATA);\n if (clawbackTokenAccountInfo === null) {\n tx.addInstruction({\n instructions: [\n spl_token_1.Token.createAssociatedTokenAccountInstruction(token_utils_1.ASSOCIATED_TOKEN_PROGRAM_ID, token_utils_1.TOKEN_PROGRAM_ID, mint, clawbackReceiverATA, clawbackReceiver, this.ctx.wallet.publicKey)\n ],\n cleanupInstructions: [],\n signers: [],\n });\n }\n const setClawbackReceiverIx = yield this.ctx.methods.setClawbackReceiver({\n accounts: {\n distributor: distributor.key,\n admin: this.ctx.wallet.publicKey,\n newClawbackAccount: clawbackReceiverATA,\n },\n inputs: {},\n });\n if (setClawbackReceiverIx.ix) {\n tx.addInstruction(setClawbackReceiverIx.ix);\n }\n return tx;\n });\n }\n setMerkleRoot(mint, root, maxTotalClaim, maxNumNodes, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const distributorData = yield this.ctx.program.account.merkleDistributor.fetch(distributor.key);\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n const tx = (yield this.ctx.methods.setMerkleRoot({\n accounts: {\n distributor: distributor.key,\n admin: this.ctx.wallet.publicKey,\n },\n inputs: {\n root: (0, utils_1.toBytes32Array)(root),\n maxTotalClaim,\n maxNumNodes,\n },\n })).toTx();\n return tx;\n });\n }\n setTimestamp(mint, startTs, endTs, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const distributorData = yield this.ctx.program.account.merkleDistributor.fetch(distributor.key);\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n const tx = (yield this.ctx.methods.setTimestamp({\n accounts: {\n distributor: distributor.key,\n admin: this.ctx.wallet.publicKey,\n },\n inputs: {\n startTs,\n endTs,\n },\n })).toTx();\n return tx;\n });\n }\n deposit(mint, amount, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n let distributorData;\n try {\n distributorData = yield this.ctx.fetcher.getOneMerkleDistributor(distributor.key);\n }\n catch (error) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n const fromAssociatedTokenAccount = (0, token_utils_1.getATAAddressSync)({\n mint,\n owner: this.ctx.wallet.publicKey\n });\n // tokenVault is initialized when creating the distributor\n const tokenVault = distributorData.tokenVault;\n const tx = new common_sdk_1.TransactionBuilder(this.ctx.provider.connection, this.ctx.provider.wallet);\n const keys = (0, utils_1.addSigners)([\n { pubkey: fromAssociatedTokenAccount, isSigner: false, isWritable: true },\n { pubkey: tokenVault, isSigner: false, isWritable: true },\n ], this.ctx.wallet.publicKey, []);\n const transferInstructionData = (0, buffer_layout_1.struct)([(0, buffer_layout_1.u8)('instruction'), (0, buffer_layout_utils_1.u64)('amount')]);\n const data = Buffer.alloc(transferInstructionData.span);\n transferInstructionData.encode({ instruction: utils_1.TokenInstruction.Transfer, amount: BigInt(amount.toString()) }, data);\n tx.addInstruction({\n instructions: [new web3_js_1.TransactionInstruction({\n keys,\n programId: token_utils_1.TOKEN_PROGRAM_ID,\n data\n })],\n cleanupInstructions: [],\n signers: []\n });\n return tx;\n });\n }\n newClaim(mint, index, amount, proof, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n if (proof.length === 0) {\n throw new Error(\"Proof is empty\");\n }\n const distributor = this.pda.distributor(mint, version);\n const claimStatus = this.pda.claim_status(this.ctx.wallet.publicKey, distributor.key);\n try {\n yield this.ctx.program.account.claimStatus.fetch(claimStatus.key);\n throw Error(`Already claimed`);\n }\n catch (error) {\n if (!error.message.includes(\"Account does not exist\")) {\n throw error;\n }\n }\n const from = (0, token_utils_1.getATAAddressSync)({ mint, owner: distributor.key });\n const to = (0, token_utils_1.getATAAddressSync)({ mint, owner: this.ctx.wallet.publicKey });\n const toTokenAccountInfo = yield this.ctx.connection.getAccountInfo(to);\n const tx = new common_sdk_1.TransactionBuilder(this.ctx.provider.connection, this.ctx.provider.wallet);\n if (toTokenAccountInfo === null) {\n tx.addInstruction({\n instructions: [(0, token_utils_1.createATAInstruction)({ address: to, mint, owner: this.ctx.wallet.publicKey, payer: this.ctx.wallet.publicKey })],\n cleanupInstructions: [],\n signers: [],\n });\n }\n const newClaimIx = yield this.ctx.methods.newClaim({\n accounts: {\n distributor: distributor.key,\n claimStatus: claimStatus.key,\n from,\n to,\n claimant: this.ctx.wallet.publicKey,\n },\n inputs: {\n index,\n amount,\n proof: proof.map((p) => (0, utils_1.toBytes32Array)(p)),\n },\n });\n if (newClaimIx.ix) {\n tx.addInstruction(newClaimIx.ix);\n }\n return tx;\n });\n }\n clawback(mint, amount, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const distributorData = yield this.ctx.program.account.merkleDistributor.fetch(distributor.key);\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n amount = amount.gt(new anchor_1.BN(0)) ? amount : new anchor_1.BN(0);\n const from = (0, token_utils_1.getATAAddressSync)({ mint, owner: distributor.key });\n const tx = (yield this.ctx.methods.clawback({\n accounts: {\n distributor: distributor.key,\n from,\n to: distributorData.clawbackReceiver,\n claimant: this.ctx.wallet.publicKey,\n },\n inputs: { amount },\n })).toTx();\n return tx;\n });\n }\n}\nexports.DistributorClient = DistributorClient;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./distributor-client\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MERKLE_DISTRIBUTOR_PROGRAM_ID = exports.PROGRAM_ID = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\nexports.PROGRAM_ID = new web3_js_1.PublicKey(\"EqaUmBqKuUsS8C1HwvckQymErozrmzzivxkP9CazU2mX\");\nexports.MERKLE_DISTRIBUTOR_PROGRAM_ID = exports.PROGRAM_ID;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nconst anchor_1 = require(\"@project-serum/anchor\");\nconst types_1 = require(\"./types\");\nconst fetcher_1 = require(\"./fetcher\");\nconst methods_1 = require(\"./methods\");\n/**\n * @category Core\n */\nclass Context {\n static from(connection, wallet, programId, fetcher = new fetcher_1.AccountFetcher(connection), opts = anchor_1.AnchorProvider.defaultOptions()) {\n const anchorProvider = new anchor_1.AnchorProvider(connection, wallet, opts);\n const program = new anchor_1.Program(types_1.MerkleDistributorIDL, programId, anchorProvider);\n return new Context(anchorProvider, anchorProvider.wallet, program, fetcher, opts);\n }\n static fromWorkspace(provider, program, fetcher = new fetcher_1.AccountFetcher(provider.connection), opts = anchor_1.AnchorProvider.defaultOptions()) {\n return new Context(provider, provider.wallet, program, fetcher, opts);\n }\n static withProvider(provider, programId, fetcher = new fetcher_1.AccountFetcher(provider.connection), opts = anchor_1.AnchorProvider.defaultOptions()) {\n const program = new anchor_1.Program(types_1.MerkleDistributorIDL, programId, provider);\n return new Context(provider, provider.wallet, program, fetcher, opts);\n }\n constructor(provider, wallet, program, fetcher, opts) {\n this.connection = provider.connection;\n this.wallet = wallet;\n this.opts = opts;\n // It's a hack but it works on Anchor workspace *shrug*\n this.program = program;\n this.provider = provider;\n this.fetcher = fetcher;\n this.methods = new methods_1.Methods(this);\n }\n}\nexports.Context = Context;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AccountFetcher = void 0;\nconst anchor_1 = require(\"@project-serum/anchor\");\nconst tiny_invariant_1 = __importDefault(require(\"tiny-invariant\"));\nconst parsing_1 = require(\"./parsing\");\nclass AccountFetcher {\n constructor(connection, cache) {\n this._cache = {};\n this.connection = connection;\n this._cache = cache !== null && cache !== void 0 ? cache : {};\n }\n /*** Public Methods ***/\n /**\n * Update the cached value of all entities currently in the cache.\n * Uses batched rpc request for network efficient fetch.\n */\n refreshAll() {\n return __awaiter(this, void 0, void 0, function* () {\n const addresses = Object.keys(this._cache);\n const data = yield this.bulkRequest(addresses);\n for (const [idx, [key, cachedContent]] of Object.entries(this._cache).entries()) {\n const entity = cachedContent.entity;\n const value = entity.parse(data[idx]);\n this._cache[key] = { entity, value };\n }\n });\n }\n /*** Private Methods ***/\n /**\n * Retrieve from cache or fetch from rpc, an account\n */\n get(address, entity, refresh) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const key = address.toBase58();\n const cachedValue = (_a = this._cache[key]) === null || _a === void 0 ? void 0 : _a.value;\n if (cachedValue !== undefined && !refresh) {\n return cachedValue;\n }\n const accountInfo = yield this.connection.getAccountInfo(address);\n const accountData = accountInfo === null || accountInfo === void 0 ? void 0 : accountInfo.data;\n const value = entity.parse(accountData);\n this._cache[key] = { entity, value };\n return value;\n });\n }\n /**\n * Retrieve from cache or fetch from rpc, a list of accounts\n */\n list(addresses, entity, refresh) {\n return __awaiter(this, void 0, void 0, function* () {\n const keys = addresses.map((address) => address.toBase58());\n const cachedValues = keys.map((key) => {\n var _a;\n return [\n key,\n refresh ? undefined : (_a = this._cache[key]) === null || _a === void 0 ? void 0 : _a.value,\n ];\n });\n /* Look for accounts not found in cache */\n const undefinedAccounts = [];\n cachedValues.forEach(([key, value], cacheIndex) => {\n if (value === undefined) {\n undefinedAccounts.push({ cacheIndex, key });\n }\n });\n /* Fetch accounts not found in cache */\n if (undefinedAccounts.length > 0) {\n const data = yield this.bulkRequest(undefinedAccounts.map((account) => account.key));\n undefinedAccounts.forEach(({ cacheIndex, key }, dataIndex) => {\n var _a;\n const value = entity.parse(data[dataIndex]);\n (0, tiny_invariant_1.default)(((_a = cachedValues[cacheIndex]) === null || _a === void 0 ? void 0 : _a[1]) === undefined, \"unexpected non-undefined value\");\n cachedValues[cacheIndex] = [key, value];\n this._cache[key] = { entity, value };\n });\n }\n const result = cachedValues\n .map(([_, value]) => value)\n .filter((value) => value !== undefined);\n (0, tiny_invariant_1.default)(result.length === addresses.length, \"not enough results fetched\");\n return result;\n });\n }\n /**\n * Make batch rpc request\n */\n bulkRequest(addresses) {\n return __awaiter(this, void 0, void 0, function* () {\n const responses = [];\n const chunk = 100; // getMultipleAccounts has limitation of 100 accounts per request\n for (let i = 0; i < addresses.length; i += chunk) {\n const addressesSubset = addresses.slice(i, i + chunk);\n const res = this.connection._rpcRequest(\"getMultipleAccounts\", [\n addressesSubset,\n { commitment: this.connection.commitment },\n ]);\n responses.push(res);\n }\n const combinedResult = [];\n (yield Promise.all(responses)).forEach((res) => {\n var _a;\n (0, tiny_invariant_1.default)(!res.error, `bulkRequest result error: ${res.error}`);\n (0, tiny_invariant_1.default)(!!((_a = res.result) === null || _a === void 0 ? void 0 : _a.value), \"bulkRequest no value\");\n res.result.value.forEach((account) => {\n if (!account || account.data[1] !== \"base64\") {\n combinedResult.push(null);\n }\n else {\n combinedResult.push(Buffer.from(account.data[0], account.data[1]));\n }\n });\n });\n (0, tiny_invariant_1.default)(combinedResult.length === addresses.length, \"bulkRequest not enough results\");\n return combinedResult;\n });\n }\n // YOUR CODE:\n getOneMerkleDistributor(address, refresh = false) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.get((0, anchor_1.translateAddress)(address), parsing_1.ParsableMerkleDistributor, refresh);\n });\n }\n getOneClaimStatus(address, refresh = false) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.get((0, anchor_1.translateAddress)(address), parsing_1.ParsableClaimStatus, refresh);\n });\n }\n}\nexports.AccountFetcher = AccountFetcher;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./fetcher\"), exports);\n__exportStar(require(\"./parsing\"), exports);\n","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParsableClaimStatus = exports.ParsableMerkleDistributor = void 0;\nconst anchor_1 = require(\"@project-serum/anchor\");\nconst types_1 = require(\"../types\");\n/**\n * Class decorator to define an interface with static methods\n * Reference: https://github.com/Microsoft/TypeScript/issues/13462#issuecomment-295685298\n */\nfunction staticImplements() {\n return (constructor) => {\n constructor;\n };\n}\nfunction parseAnchorAccount(accountName, data) {\n const discriminator = anchor_1.BorshAccountsCoder.accountDiscriminator(accountName);\n if (discriminator.compare(data.subarray(0, 8))) {\n console.error(\"incorrect account name during parsing\");\n return null;\n }\n try {\n return types_1.accountsCoder.decode(accountName, data);\n }\n catch (_e) {\n console.error(\"unknown account name during parsing\");\n return null;\n }\n}\n// YOUR ACCOUNTS\nlet ParsableMerkleDistributor = class ParsableMerkleDistributor {\n constructor() { }\n static parse(data) {\n if (!data) {\n return null;\n }\n try {\n return parseAnchorAccount(types_1.AccountName.MerkleDistributor, data);\n }\n catch (e) {\n console.error(`error while parsing MerkleDistributor: ${e}`);\n return null;\n }\n }\n};\nParsableMerkleDistributor = __decorate([\n staticImplements()\n], ParsableMerkleDistributor);\nexports.ParsableMerkleDistributor = ParsableMerkleDistributor;\nlet ParsableClaimStatus = class ParsableClaimStatus {\n constructor() { }\n static parse(data) {\n if (!data) {\n return null;\n }\n try {\n return parseAnchorAccount(types_1.AccountName.ClaimStatus, data);\n }\n catch (e) {\n console.error(`error while parsing ClaimStatus: ${e}`);\n return null;\n }\n }\n};\nParsableClaimStatus = __decorate([\n staticImplements()\n], ParsableClaimStatus);\nexports.ParsableClaimStatus = ParsableClaimStatus;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./context\"), exports);\n__exportStar(require(\"./methods\"), exports);\n__exportStar(require(\"./pda\"), exports);\n__exportStar(require(\"./clients\"), exports);\n__exportStar(require(\"./constants\"), exports);\n__exportStar(require(\"./utils\"), exports);\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clawback = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst token_utils_1 = require(\"@saberhq/token-utils\");\nfunction clawback(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .clawback(inputs.amount)\n .accounts(Object.assign(Object.assign({}, accounts), { systemProgram: web3_js_1.SystemProgram.programId, tokenProgram: token_utils_1.TOKEN_PROGRAM_ID }))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.clawback = clawback;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./clawback\"), exports);\n__exportStar(require(\"./newClaim\"), exports);\n__exportStar(require(\"./newDistributor\"), exports);\n__exportStar(require(\"./setAdmin\"), exports);\n__exportStar(require(\"./setClawbackReceiver\"), exports);\n__exportStar(require(\"./setMerkleRoot\"), exports);\n__exportStar(require(\"./setTimestamp\"), exports);\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.newClaim = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst token_utils_1 = require(\"@saberhq/token-utils\");\nfunction newClaim(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .newClaim(inputs.index, inputs.amount, inputs.proof)\n .accounts(Object.assign(Object.assign({}, accounts), { tokenProgram: token_utils_1.TOKEN_PROGRAM_ID, systemProgram: web3_js_1.SystemProgram.programId }))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.newClaim = newClaim;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.newDistributor = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst token_utils_1 = require(\"@saberhq/token-utils\");\nfunction newDistributor(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .newDistributor(inputs.version, inputs.root, inputs.maxTotalClaim, inputs.maxNumNodes, inputs.startTs, inputs.endTs)\n .accounts(Object.assign(Object.assign({}, accounts), { systemProgram: web3_js_1.SystemProgram.programId, associatedTokenProgram: token_utils_1.ASSOCIATED_TOKEN_PROGRAM_ID, tokenProgram: token_utils_1.TOKEN_PROGRAM_ID }))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.newDistributor = newDistributor;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setAdmin = void 0;\nfunction setAdmin(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .setAdmin()\n .accounts(Object.assign({}, accounts))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.setAdmin = setAdmin;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setClawbackReceiver = void 0;\nfunction setClawbackReceiver(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, } = params;\n const ix = yield program.methods\n .setClawbackReceiver()\n .accounts(Object.assign({}, accounts))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.setClawbackReceiver = setClawbackReceiver;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setMerkleRoot = void 0;\nfunction setMerkleRoot(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .setMerkleRoot(inputs.root, inputs.maxTotalClaim, inputs.maxNumNodes)\n .accounts(Object.assign({}, accounts))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.setMerkleRoot = setMerkleRoot;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setTimestamp = void 0;\nfunction setTimestamp(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .setTimestamp(inputs.startTs, inputs.endTs)\n .accounts(Object.assign({}, accounts))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.setTimestamp = setTimestamp;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Methods = void 0;\nconst common_sdk_1 = require(\"@orca-so/common-sdk\");\nconst ixs = __importStar(require(\"./instructions\"));\nclass Methods {\n constructor(ctx, ix) {\n this.ctx = ctx;\n this.ix = ix;\n }\n newDistributor(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.newDistributor(this.ctx.program, params);\n return this;\n });\n }\n setAdmin(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.setAdmin(this.ctx.program, params);\n return this;\n });\n }\n setTimestamp(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.setTimestamp(this.ctx.program, params);\n return this;\n });\n }\n setMerkleRoot(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.setMerkleRoot(this.ctx.program, params);\n return this;\n });\n }\n setClawbackReceiver(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.setClawbackReceiver(this.ctx.program, params);\n return this;\n });\n }\n newClaim(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.newClaim(this.ctx.program, params);\n return this;\n });\n }\n clawback(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.clawback(this.ctx.program, params);\n return this;\n });\n }\n toTx() {\n const tx = new common_sdk_1.TransactionBuilder(this.ctx.provider.connection, this.ctx.provider.wallet);\n return this.ix ? tx.addInstruction(this.ix) : tx;\n }\n}\nexports.Methods = Methods;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PDA = void 0;\nconst anchor_1 = require(\"@project-serum/anchor\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst constants_1 = require(\"./constants\");\nclass PDA {\n constructor(programId) {\n this.distributor = (mint, version = new anchor_1.BN(1)) => {\n const [pda, bump] = web3_js_1.PublicKey.findProgramAddressSync([anchor_1.utils.bytes.utf8.encode(\"MerkleDistributor\"), mint.toBytes(), version.toArrayLike(Buffer, \"le\", 8)], constants_1.PROGRAM_ID);\n return {\n key: pda,\n bump,\n };\n };\n this.claim_status = (claimant, distributor) => {\n const [pda, bump] = web3_js_1.PublicKey.findProgramAddressSync([\n anchor_1.utils.bytes.utf8.encode(\"ClaimStatus\"),\n claimant.toBytes(),\n distributor.toBytes(),\n ], constants_1.PROGRAM_ID);\n return {\n key: pda,\n bump,\n };\n };\n this.programId = programId;\n }\n}\nexports.PDA = PDA;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./type\"), exports);\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AccountName = exports.accountsCoder = exports.MerkleDistributorIDL = void 0;\nconst anchor_1 = require(\"@project-serum/anchor\");\nconst IDL = __importStar(require(\"../artifacts/merkle_distributor.json\"));\nexports.MerkleDistributorIDL = IDL;\nexports.accountsCoder = new anchor_1.BorshAccountsCoder(exports.MerkleDistributorIDL);\nvar AccountName;\n(function (AccountName) {\n AccountName[\"MerkleDistributor\"] = \"MerkleDistributor\";\n AccountName[\"ClaimStatus\"] = \"ClaimStatus\";\n})(AccountName = exports.AccountName || (exports.AccountName = {}));\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BalanceTree = void 0;\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst js_sha3_1 = require(\"js-sha3\");\nconst merkle_tree_1 = require(\"./merkle-tree\");\nclass BalanceTree {\n constructor(balances) {\n this._tree = new merkle_tree_1.MerkleTree(balances.map(({ account, amount }, index) => {\n return BalanceTree.toNode(index, account, amount);\n }));\n }\n static verifyProof(index, account, amount, proof, root) {\n let pair = BalanceTree.toNode(index, account, amount);\n for (const item of proof) {\n pair = merkle_tree_1.MerkleTree.combinedHash(pair, item);\n }\n return pair.equals(root);\n }\n // keccak256(abi.encode(index, account, amount))\n static toNode(index, account, amount) {\n let buf = Buffer.concat([\n new bn_js_1.default(index).toArrayLike(Buffer, \"le\", 8),\n account.toBuffer(),\n new bn_js_1.default(amount).toArrayLike(Buffer, \"le\", 8),\n ]);\n buf = Buffer.from((0, js_sha3_1.keccak_256)(buf), \"hex\");\n const LEAF_PREFIX = Buffer.from([0]);\n buf = Buffer.concat([LEAF_PREFIX, buf]);\n return Buffer.from((0, js_sha3_1.keccak_256)(buf), \"hex\");\n }\n getHexRoot() {\n return this._tree.getHexRoot();\n }\n // returns the hex bytes32 values of the proof\n getHexProof(index, account, amount) {\n return this._tree.getHexProof(BalanceTree.toNode(index, account, amount));\n }\n getRoot() {\n return this._tree.getRoot();\n }\n getProof(index, account, amount) {\n return this._tree.getProof(BalanceTree.toNode(index, account, amount));\n }\n}\nexports.BalanceTree = BalanceTree;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toBytes32Array = void 0;\nconst tiny_invariant_1 = __importDefault(require(\"tiny-invariant\"));\nconst toBytes32Array = (b) => {\n (0, tiny_invariant_1.default)(b.length <= 32, `invalid length ${b.length}`);\n const buf = Buffer.alloc(32);\n b.copy(buf, 32 - b.length);\n return Array.from(buf);\n};\nexports.toBytes32Array = toBytes32Array;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOrCreateATAInstruction = exports.deriveClaimStatus = void 0;\nconst anchor_1 = require(\"@coral-xyz/anchor\");\nconst spl_token_1 = require(\"@solana/spl-token\");\nfunction deriveClaimStatus(claimant, distributor, programId) {\n return anchor_1.web3.PublicKey.findProgramAddressSync([Buffer.from('ClaimStatus'), claimant.toBytes(), distributor.toBytes()], programId);\n}\nexports.deriveClaimStatus = deriveClaimStatus;\nconst getOrCreateATAInstruction = (tokenMint, owner, connection, allowOwnerOffCurve = true, payer = owner) => __awaiter(void 0, void 0, void 0, function* () {\n let toAccount;\n try {\n toAccount = yield spl_token_1.Token.getAssociatedTokenAddress(spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, spl_token_1.TOKEN_PROGRAM_ID, tokenMint, owner, allowOwnerOffCurve);\n const account = yield connection.getAccountInfo(toAccount);\n if (!account) {\n const ix = spl_token_1.Token.createAssociatedTokenAccountInstruction(spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, spl_token_1.TOKEN_PROGRAM_ID, tokenMint, toAccount, owner, payer);\n return [toAccount, ix];\n }\n return [toAccount, undefined];\n }\n catch (e) {\n /* handle error */\n console.error('Error::getOrCreateATAInstruction', e);\n throw e;\n }\n});\nexports.getOrCreateATAInstruction = getOrCreateATAInstruction;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./balance-tree\"), exports);\n__exportStar(require(\"./bytes32\"), exports);\n__exportStar(require(\"./helper\"), exports);\n__exportStar(require(\"./merkle-tree\"), exports);\n__exportStar(require(\"./program\"), exports);\n__exportStar(require(\"./spl\"), exports);\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MerkleTree = void 0;\nconst js_sha3_1 = require(\"js-sha3\");\nconst tiny_invariant_1 = __importDefault(require(\"tiny-invariant\"));\nconst INTERMEDIATE_PREFIX = Buffer.from([1]);\nfunction getPairElement(idx, layer) {\n const pairIdx = idx % 2 === 0 ? idx + 1 : idx - 1;\n if (pairIdx < layer.length) {\n const pairEl = layer[pairIdx];\n (0, tiny_invariant_1.default)(pairEl, \"pairEl\");\n return pairEl;\n }\n else {\n return null;\n }\n}\nfunction bufDedup(elements) {\n return elements.filter((el, idx) => {\n var _a;\n return idx === 0 || !((_a = elements[idx - 1]) === null || _a === void 0 ? void 0 : _a.equals(el));\n });\n}\nfunction bufArrToHexArr(arr) {\n if (arr.some((el) => !Buffer.isBuffer(el))) {\n throw new Error(\"Array is not an array of buffers\");\n }\n return arr.map((el) => \"0x\" + el.toString(\"hex\"));\n}\nfunction sortAndConcat(...args) {\n const sorted = [...args].sort(Buffer.compare.bind(null));\n const buf = [INTERMEDIATE_PREFIX];\n for (const arg of sorted) {\n buf.push(arg);\n }\n return Buffer.concat(buf);\n}\nclass MerkleTree {\n constructor(elements) {\n this._elements = [...elements];\n // Sort elements\n this._elements.sort(Buffer.compare.bind(null));\n // Deduplicate elements\n this._elements = bufDedup(this._elements);\n this._bufferElementPositionIndex = this._elements.reduce((memo, el, index) => {\n memo[el.toString(\"hex\")] = index;\n return memo;\n }, {});\n // Create layers\n this._layers = this.getLayers(this._elements);\n }\n getLayers(elements) {\n var _a, _b;\n if (elements.length === 0) {\n throw new Error(\"empty tree\");\n }\n const layers = [];\n layers.push(elements);\n // Get next layer until we reach the root\n while (((_b = (_a = layers[layers.length - 1]) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 1) {\n const nextLayerIndex = layers[layers.length - 1];\n (0, tiny_invariant_1.default)(nextLayerIndex, \"nextLayerIndex\");\n layers.push(this.getNextLayer(nextLayerIndex));\n }\n return layers;\n }\n getNextLayer(elements) {\n return elements.reduce((layer, el, idx, arr) => {\n if (idx % 2 === 0) {\n // Hash the current element with its pair element\n const pairEl = arr[idx + 1];\n layer.push(MerkleTree.combinedHash(el, pairEl));\n }\n return layer;\n }, []);\n }\n static combinedHash(first, second) {\n if (!first) {\n (0, tiny_invariant_1.default)(second, \"second element of pair must exist\");\n return second;\n }\n if (!second) {\n (0, tiny_invariant_1.default)(first, \"first element of pair must exist\");\n return first;\n }\n return Buffer.from(js_sha3_1.keccak_256.digest(sortAndConcat(first, second)));\n }\n getRoot() {\n var _a;\n const root = (_a = this._layers[this._layers.length - 1]) === null || _a === void 0 ? void 0 : _a[0];\n (0, tiny_invariant_1.default)(root, \"root\");\n return root;\n }\n getHexRoot() {\n return this.getRoot().toString(\"hex\");\n }\n getProof(el) {\n const initialIdx = this._bufferElementPositionIndex[el.toString(\"hex\")];\n if (typeof initialIdx !== \"number\") {\n throw new Error(\"Element does not exist in Merkle tree\");\n }\n let idx = initialIdx;\n return this._layers.reduce((proof, layer) => {\n const pairElement = getPairElement(idx, layer);\n if (pairElement) {\n proof.push(pairElement);\n }\n idx = Math.floor(idx / 2);\n return proof;\n }, []);\n }\n getHexProof(el) {\n const proof = this.getProof(el);\n return bufArrToHexArr(proof);\n }\n}\nexports.MerkleTree = MerkleTree;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createMerkleDistributorProgram = void 0;\nconst anchor_1 = require(\"@coral-xyz/anchor\");\nconst merkle_distributor_1 = require(\"../artifacts/merkle_distributor\");\nfunction createMerkleDistributorProgram(provider, programId) {\n const program = new anchor_1.Program(merkle_distributor_1.IDL, programId, provider);\n return program;\n}\nexports.createMerkleDistributorProgram = createMerkleDistributorProgram;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TokenInstruction = exports.addSigners = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\n/** @internal */\nfunction addSigners(keys, ownerOrAuthority, multiSigners) {\n keys.push({\n pubkey: ownerOrAuthority,\n isSigner: multiSigners.length === 0,\n isWritable: false\n });\n for (const signer of multiSigners) {\n keys.push({\n pubkey: signer instanceof web3_js_1.PublicKey ? signer : signer.publicKey,\n isSigner: true,\n isWritable: false\n });\n }\n return keys;\n}\nexports.addSigners = addSigners;\n/** Instructions defined by the program */\nvar TokenInstruction;\n(function (TokenInstruction) {\n TokenInstruction[TokenInstruction[\"InitializeMint\"] = 0] = \"InitializeMint\";\n TokenInstruction[TokenInstruction[\"InitializeAccount\"] = 1] = \"InitializeAccount\";\n TokenInstruction[TokenInstruction[\"InitializeMultisig\"] = 2] = \"InitializeMultisig\";\n TokenInstruction[TokenInstruction[\"Transfer\"] = 3] = \"Transfer\";\n TokenInstruction[TokenInstruction[\"Approve\"] = 4] = \"Approve\";\n TokenInstruction[TokenInstruction[\"Revoke\"] = 5] = \"Revoke\";\n TokenInstruction[TokenInstruction[\"SetAuthority\"] = 6] = \"SetAuthority\";\n TokenInstruction[TokenInstruction[\"MintTo\"] = 7] = \"MintTo\";\n TokenInstruction[TokenInstruction[\"Burn\"] = 8] = \"Burn\";\n TokenInstruction[TokenInstruction[\"CloseAccount\"] = 9] = \"CloseAccount\";\n TokenInstruction[TokenInstruction[\"FreezeAccount\"] = 10] = \"FreezeAccount\";\n TokenInstruction[TokenInstruction[\"ThawAccount\"] = 11] = \"ThawAccount\";\n TokenInstruction[TokenInstruction[\"TransferChecked\"] = 12] = \"TransferChecked\";\n TokenInstruction[TokenInstruction[\"ApproveChecked\"] = 13] = \"ApproveChecked\";\n TokenInstruction[TokenInstruction[\"MintToChecked\"] = 14] = \"MintToChecked\";\n TokenInstruction[TokenInstruction[\"BurnChecked\"] = 15] = \"BurnChecked\";\n TokenInstruction[TokenInstruction[\"InitializeAccount2\"] = 16] = \"InitializeAccount2\";\n TokenInstruction[TokenInstruction[\"SyncNative\"] = 17] = \"SyncNative\";\n TokenInstruction[TokenInstruction[\"InitializeAccount3\"] = 18] = \"InitializeAccount3\";\n TokenInstruction[TokenInstruction[\"InitializeMultisig2\"] = 19] = \"InitializeMultisig2\";\n TokenInstruction[TokenInstruction[\"InitializeMint2\"] = 20] = \"InitializeMint2\";\n TokenInstruction[TokenInstruction[\"GetAccountDataSize\"] = 21] = \"GetAccountDataSize\";\n TokenInstruction[TokenInstruction[\"InitializeImmutableOwner\"] = 22] = \"InitializeImmutableOwner\";\n TokenInstruction[TokenInstruction[\"AmountToUiAmount\"] = 23] = \"AmountToUiAmount\";\n TokenInstruction[TokenInstruction[\"UiAmountToAmount\"] = 24] = \"UiAmountToAmount\";\n TokenInstruction[TokenInstruction[\"InitializeMintCloseAuthority\"] = 25] = \"InitializeMintCloseAuthority\";\n TokenInstruction[TokenInstruction[\"TransferFeeExtension\"] = 26] = \"TransferFeeExtension\";\n TokenInstruction[TokenInstruction[\"ConfidentialTransferExtension\"] = 27] = \"ConfidentialTransferExtension\";\n TokenInstruction[TokenInstruction[\"DefaultAccountStateExtension\"] = 28] = \"DefaultAccountStateExtension\";\n TokenInstruction[TokenInstruction[\"Reallocate\"] = 29] = \"Reallocate\";\n TokenInstruction[TokenInstruction[\"MemoTransferExtension\"] = 30] = \"MemoTransferExtension\";\n TokenInstruction[TokenInstruction[\"CreateNativeMint\"] = 31] = \"CreateNativeMint\";\n TokenInstruction[TokenInstruction[\"InitializeNonTransferableMint\"] = 32] = \"InitializeNonTransferableMint\";\n TokenInstruction[TokenInstruction[\"InterestBearingMintExtension\"] = 33] = \"InterestBearingMintExtension\";\n TokenInstruction[TokenInstruction[\"CpiGuardExtension\"] = 34] = \"CpiGuardExtension\";\n TokenInstruction[TokenInstruction[\"InitializePermanentDelegate\"] = 35] = \"InitializePermanentDelegate\";\n TokenInstruction[TokenInstruction[\"TransferHookExtension\"] = 36] = \"TransferHookExtension\";\n // ConfidentialTransferFeeExtension = 37,\n // WithdrawalExcessLamports = 38,\n TokenInstruction[TokenInstruction[\"MetadataPointerExtension\"] = 39] = \"MetadataPointerExtension\";\n TokenInstruction[TokenInstruction[\"GroupPointerExtension\"] = 40] = \"GroupPointerExtension\";\n TokenInstruction[TokenInstruction[\"GroupMemberPointerExtension\"] = 41] = \"GroupMemberPointerExtension\";\n})(TokenInstruction = exports.TokenInstruction || (exports.TokenInstruction = {}));\n","import { Buffer as Buffer$1 } from 'buffer';\nimport { PublicKey, Transaction, TransactionInstruction, SendTransactionError, NONCE_ACCOUNT_LENGTH, SystemProgram, SYSVAR_RENT_PUBKEY, SYSVAR_CLOCK_PUBKEY } from '@solana/web3.js';\nimport * as web3_js from '@solana/web3.js';\nexport { web3_js as web3 };\nimport BN from 'bn.js';\nexport { default as BN } from 'bn.js';\nimport bs58$1 from 'bs58';\nimport camelCase from 'camelcase';\nimport * as borsh from '@coral-xyz/borsh';\nimport { sha256 as sha256$1 } from '@noble/hashes/sha256';\nimport { inflate } from 'pako';\nimport EventEmitter from 'eventemitter3';\n\n/**\n * Splits an array into chunks\n *\n * @param array Array of objects to chunk.\n * @param size The max size of a chunk.\n * @returns A two dimensional array where each T[] length is < the provided size.\n */\nfunction chunks(array, size) {\n return Array.apply(0, new Array(Math.ceil(array.length / size))).map((_, index) => array.slice(index * size, (index + 1) * size));\n}\n/**\n * Check if a transaction object is a VersionedTransaction or not\n *\n * @param tx\n * @returns bool\n */\nconst isVersionedTransaction = (tx) => {\n return \"version\" in tx;\n};\n\nfunction encode$3(data) {\n return data.reduce((str, byte) => str + byte.toString(16).padStart(2, \"0\"), \"0x\");\n}\nfunction decode$3(data) {\n if (data.indexOf(\"0x\") === 0) {\n data = data.substr(2);\n }\n if (data.length % 2 === 1) {\n data = \"0\" + data;\n }\n let key = data.match(/.{2}/g);\n if (key === null) {\n return Buffer$1.from([]);\n }\n return Buffer$1.from(key.map((byte) => parseInt(byte, 16)));\n}\n\nvar hex = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode$3,\n decode: decode$3\n});\n\nfunction decode$2(array) {\n const decoder = new TextDecoder(\"utf-8\") // Browser https://caniuse.com/textencoder.\n ; // Node.\n return decoder.decode(array);\n}\nfunction encode$2(input) {\n const encoder = new TextEncoder() // Browser.\n ; // Node.\n return encoder.encode(input);\n}\n\nvar utf8 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n decode: decode$2,\n encode: encode$2\n});\n\nfunction encode$1(data) {\n return bs58$1.encode(data);\n}\nfunction decode$1(data) {\n return bs58$1.decode(data);\n}\n\nvar bs58 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode$1,\n decode: decode$1\n});\n\nfunction encode(data) {\n return data.toString(\"base64\");\n}\nfunction decode(data) {\n return Buffer$1.from(data, \"base64\");\n}\n\nvar base64 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode,\n decode: decode\n});\n\nvar index$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hex: hex,\n utf8: utf8,\n bs58: bs58,\n base64: base64\n});\n\nfunction parseIdlErrors(idl) {\n const errors = new Map();\n if (idl.errors) {\n idl.errors.forEach((e) => {\n var _a;\n let msg = (_a = e.msg) !== null && _a !== void 0 ? _a : e.name;\n errors.set(e.code, msg);\n });\n }\n return errors;\n}\n// Allow either IdLInstruction or IdlStateMethod since the types share fields.\nfunction toInstruction(idlIx, ...args) {\n if (idlIx.args.length != args.length) {\n throw new Error(\"Invalid argument length\");\n }\n const ix = {};\n let idx = 0;\n idlIx.args.forEach((ixArg) => {\n ix[ixArg.name] = args[idx];\n idx += 1;\n });\n return ix;\n}\n// Throws error if any account required for the `ix` is not given.\nfunction validateAccounts(ixAccounts, accounts = {}) {\n ixAccounts.forEach((acc) => {\n if (\"accounts\" in acc) {\n validateAccounts(acc.accounts, accounts[acc.name]);\n }\n else {\n if (accounts[acc.name] === undefined) {\n throw new Error(`Invalid arguments: ${acc.name} not provided.`);\n }\n }\n });\n}\n// Translates an address to a Pubkey.\nfunction translateAddress(address) {\n return address instanceof PublicKey ? address : new PublicKey(address);\n}\n\n/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n this.value = void 0;\n this.key = void 0;\n this.type = void 0;\n this.refinement = void 0;\n this.path = void 0;\n this.branch = void 0;\n this.failures = void 0;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options) {\n if (options === void 0) {\n options = {};\n }\n\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n this.TYPE = void 0;\n this.type = void 0;\n this.schema = void 0;\n this.coercer = void 0;\n this.validator = void 0;\n this.refiner = void 0;\n this.entries = void 0;\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options) {\n if (options === void 0) {\n options = {};\n }\n\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options) {\n if (options === void 0) {\n options = {};\n }\n\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value matches one of a set of types.\n */\n\nfunction union$1(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n coercer(value, ctx) {\n const firstMatch = Structs.find(s => {\n const [e] = s.validate(value, {\n coerce: true\n });\n return !e;\n }) || unknown();\n return firstMatch.coercer(value, ctx);\n },\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n\n/**\n * Sends a transaction to a program with the given accounts and instruction\n * data.\n */\nasync function invoke(programId, accounts, data, provider) {\n programId = translateAddress(programId);\n if (!provider) {\n provider = getProvider();\n }\n const tx = new Transaction();\n tx.add(new TransactionInstruction({\n programId,\n keys: accounts !== null && accounts !== void 0 ? accounts : [],\n data,\n }));\n if (provider.sendAndConfirm === undefined) {\n throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");\n }\n return await provider.sendAndConfirm(tx, []);\n}\nconst GET_MULTIPLE_ACCOUNTS_LIMIT = 99;\nasync function getMultipleAccounts(connection, publicKeys, commitment) {\n const results = await getMultipleAccountsAndContext(connection, publicKeys, commitment);\n return results.map((result) => {\n return result\n ? { publicKey: result.publicKey, account: result.account }\n : null;\n });\n}\nasync function getMultipleAccountsAndContext(connection, publicKeys, commitment) {\n if (publicKeys.length <= GET_MULTIPLE_ACCOUNTS_LIMIT) {\n return await getMultipleAccountsAndContextCore(connection, publicKeys, commitment);\n }\n else {\n const batches = chunks(publicKeys, GET_MULTIPLE_ACCOUNTS_LIMIT);\n const results = await Promise.all(batches.map((batch) => getMultipleAccountsAndContextCore(connection, batch, commitment)));\n return results.flat();\n }\n}\nasync function getMultipleAccountsAndContextCore(connection, publicKeys, commitmentOverride) {\n const commitment = commitmentOverride !== null && commitmentOverride !== void 0 ? commitmentOverride : connection.commitment;\n const { value: accountInfos, context } = await connection.getMultipleAccountsInfoAndContext(publicKeys, commitment);\n const accounts = accountInfos.map((account, idx) => {\n if (account === null) {\n return null;\n }\n return {\n publicKey: publicKeys[idx],\n account,\n context,\n };\n });\n return accounts;\n}\n// copy from @solana/web3.js that has a commitment param\nasync function simulateTransaction(connection, transaction, signers, commitment, includeAccounts) {\n var _a;\n if (signers && signers.length > 0) {\n transaction.sign(...signers);\n }\n // @ts-expect-error\n const message = transaction._compile();\n const signData = message.serialize();\n // @ts-expect-error\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString(\"base64\");\n const config = {\n encoding: \"base64\",\n commitment: commitment !== null && commitment !== void 0 ? commitment : connection.commitment,\n };\n if (includeAccounts) {\n const addresses = (Array.isArray(includeAccounts) ? includeAccounts : message.nonProgramIds()).map((key) => key.toBase58());\n config[\"accounts\"] = {\n encoding: \"base64\",\n addresses,\n };\n }\n if (signers) {\n config.sigVerify = true;\n }\n const args = [encodedTransaction, config];\n // @ts-expect-error\n const unsafeRes = await connection._rpcRequest(\"simulateTransaction\", args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if (\"error\" in res) {\n let logs;\n if (\"data\" in res.error) {\n logs = (_a = res.error.data) === null || _a === void 0 ? void 0 : _a.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = \"\\n \";\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError(\"failed to simulate transaction: \" + res.error.message, logs);\n }\n return res.result;\n}\n// copy from @solana/web3.js\nfunction jsonRpcResult(schema) {\n return coerce(createRpcResult(schema), UnknownRpcResult, (value) => {\n if (\"error\" in value) {\n return value;\n }\n else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n// copy from @solana/web3.js\nconst UnknownRpcResult = createRpcResult(unknown());\n// copy from @solana/web3.js\nfunction createRpcResult(result) {\n return union$1([\n type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n result,\n }),\n type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n error: type({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n// copy from @solana/web3.js\nfunction jsonRpcResultAndContext(value) {\n return jsonRpcResult(type({\n context: type({\n slot: number(),\n }),\n value,\n }));\n}\n// copy from @solana/web3.js\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({\n err: nullable(union$1([type({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(nullable(array(nullable(type({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }))))),\n unitsConsumed: optional(number()),\n}));\n\nvar rpc = /*#__PURE__*/Object.freeze({\n __proto__: null,\n invoke: invoke,\n getMultipleAccounts: getMultipleAccounts,\n getMultipleAccountsAndContext: getMultipleAccountsAndContext,\n simulateTransaction: simulateTransaction\n});\n\n/**\n * The network and wallet context used to send transactions paid for and signed\n * by the provider.\n */\nclass AnchorProvider {\n /**\n * @param connection The cluster connection where the program is deployed.\n * @param wallet The wallet used to pay for and sign all transactions.\n * @param opts Transaction confirmation options to use by default.\n */\n constructor(connection, wallet, opts) {\n this.connection = connection;\n this.wallet = wallet;\n this.opts = opts;\n this.publicKey = wallet === null || wallet === void 0 ? void 0 : wallet.publicKey;\n }\n static defaultOptions() {\n return {\n preflightCommitment: \"processed\",\n commitment: \"processed\",\n };\n }\n /**\n * Returns a `Provider` with a wallet read from the local filesystem.\n *\n * @param url The network cluster url.\n * @param opts The default transaction confirmation options.\n *\n * (This api is for Node only.)\n */\n static local(url, opts) {\n {\n throw new Error(`Provider local is not available on browser.`);\n }\n }\n /**\n * Returns a `Provider` read from the `ANCHOR_PROVIDER_URL` environment\n * variable\n *\n * (This api is for Node only.)\n */\n static env() {\n {\n throw new Error(`Provider env is not available on browser.`);\n }\n }\n /**\n * Sends the given transaction, paid for and signed by the provider's wallet.\n *\n * @param tx The transaction to send.\n * @param signers The signers of the transaction.\n * @param opts Transaction confirmation options.\n */\n async sendAndConfirm(tx, signers, opts) {\n var _a, _b, _c, _d;\n if (opts === undefined) {\n opts = this.opts;\n }\n if (isVersionedTransaction(tx)) {\n if (signers) {\n tx.sign(signers);\n }\n }\n else {\n tx.feePayer = (_a = tx.feePayer) !== null && _a !== void 0 ? _a : this.wallet.publicKey;\n tx.recentBlockhash = (await this.connection.getLatestBlockhash(opts.preflightCommitment)).blockhash;\n if (signers) {\n for (const signer of signers) {\n tx.partialSign(signer);\n }\n }\n }\n tx = await this.wallet.signTransaction(tx);\n const rawTx = tx.serialize();\n try {\n return await sendAndConfirmRawTransaction(this.connection, rawTx, opts);\n }\n catch (err) {\n // thrown if the underlying 'confirmTransaction' encounters a failed tx\n // the 'confirmTransaction' error does not return logs so we make another rpc call to get them\n if (err instanceof ConfirmError) {\n // choose the shortest available commitment for 'getTransaction'\n // (the json RPC does not support any shorter than \"confirmed\" for 'getTransaction')\n // because that will see the tx sent with `sendAndConfirmRawTransaction` no matter which\n // commitment `sendAndConfirmRawTransaction` used\n const txSig = encode$1(isVersionedTransaction(tx)\n ? ((_b = tx.signatures) === null || _b === void 0 ? void 0 : _b[0]) || new Uint8Array()\n : (_c = tx.signature) !== null && _c !== void 0 ? _c : new Uint8Array());\n const failedTx = await this.connection.getTransaction(txSig, {\n commitment: \"confirmed\",\n });\n if (!failedTx) {\n throw err;\n }\n else {\n const logs = (_d = failedTx.meta) === null || _d === void 0 ? void 0 : _d.logMessages;\n throw !logs ? err : new SendTransactionError(err.message, logs);\n }\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Similar to `send`, but for an array of transactions and signers.\n * All transactions need to be of the same type, it doesn't support a mix of `VersionedTransaction`s and `Transaction`s.\n *\n * @param txWithSigners Array of transactions and signers.\n * @param opts Transaction confirmation options.\n */\n async sendAll(txWithSigners, opts) {\n var _a, _b, _c;\n if (opts === undefined) {\n opts = this.opts;\n }\n const recentBlockhash = (await this.connection.getLatestBlockhash(opts.preflightCommitment)).blockhash;\n let txs = txWithSigners.map((r) => {\n var _a, _b;\n if (isVersionedTransaction(r.tx)) {\n let tx = r.tx;\n if (r.signers) {\n tx.sign(r.signers);\n }\n return tx;\n }\n else {\n let tx = r.tx;\n let signers = (_a = r.signers) !== null && _a !== void 0 ? _a : [];\n tx.feePayer = (_b = tx.feePayer) !== null && _b !== void 0 ? _b : this.wallet.publicKey;\n tx.recentBlockhash = recentBlockhash;\n signers.forEach((kp) => {\n tx.partialSign(kp);\n });\n return tx;\n }\n });\n const signedTxs = await this.wallet.signAllTransactions(txs);\n const sigs = [];\n for (let k = 0; k < txs.length; k += 1) {\n const tx = signedTxs[k];\n const rawTx = tx.serialize();\n try {\n sigs.push(await sendAndConfirmRawTransaction(this.connection, rawTx, opts));\n }\n catch (err) {\n // thrown if the underlying 'confirmTransaction' encounters a failed tx\n // the 'confirmTransaction' error does not return logs so we make another rpc call to get them\n if (err instanceof ConfirmError) {\n // choose the shortest available commitment for 'getTransaction'\n // (the json RPC does not support any shorter than \"confirmed\" for 'getTransaction')\n // because that will see the tx sent with `sendAndConfirmRawTransaction` no matter which\n // commitment `sendAndConfirmRawTransaction` used\n const txSig = encode$1(isVersionedTransaction(tx)\n ? ((_a = tx.signatures) === null || _a === void 0 ? void 0 : _a[0]) || new Uint8Array()\n : (_b = tx.signature) !== null && _b !== void 0 ? _b : new Uint8Array());\n const failedTx = await this.connection.getTransaction(txSig, {\n commitment: \"confirmed\",\n });\n if (!failedTx) {\n throw err;\n }\n else {\n const logs = (_c = failedTx.meta) === null || _c === void 0 ? void 0 : _c.logMessages;\n throw !logs ? err : new SendTransactionError(err.message, logs);\n }\n }\n else {\n throw err;\n }\n }\n }\n return sigs;\n }\n /**\n * Simulates the given transaction, returning emitted logs from execution.\n *\n * @param tx The transaction to send.\n * @param signers The signers of the transaction. If unset, the transaction\n * will be simulated with the \"sigVerify: false\" option. This\n * allows for simulation of transactions without asking the\n * wallet for a signature.\n * @param opts Transaction confirmation options.\n */\n async simulate(tx, signers, commitment, includeAccounts) {\n let recentBlockhash = (await this.connection.getLatestBlockhash(commitment !== null && commitment !== void 0 ? commitment : this.connection.commitment)).blockhash;\n let result;\n if (isVersionedTransaction(tx)) {\n if (signers) {\n tx.sign(signers);\n tx = await this.wallet.signTransaction(tx);\n }\n // Doesn't support includeAccounts which has been changed to something\n // else in later versions of this function.\n result = await this.connection.simulateTransaction(tx, { commitment });\n }\n else {\n tx.feePayer = tx.feePayer || this.wallet.publicKey;\n tx.recentBlockhash = recentBlockhash;\n if (signers) {\n tx = await this.wallet.signTransaction(tx);\n }\n result = await simulateTransaction(this.connection, tx, signers, commitment, includeAccounts);\n }\n if (result.value.err) {\n throw new SimulateError(result.value);\n }\n return result.value;\n }\n}\nclass SimulateError extends Error {\n constructor(simulationResponse, message) {\n super(message);\n this.simulationResponse = simulationResponse;\n }\n}\n// Copy of Connection.sendAndConfirmRawTransaction that throws\n// a better error if 'confirmTransaction` returns an error status\nasync function sendAndConfirmRawTransaction(connection, rawTransaction, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n };\n const signature = await connection.sendRawTransaction(rawTransaction, sendOptions);\n const status = (await connection.confirmTransaction(signature, options && options.commitment)).value;\n if (status.err) {\n throw new ConfirmError(`Raw transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n}\nclass ConfirmError extends Error {\n constructor(message) {\n super(message);\n }\n}\n/**\n * Sets the default provider on the client.\n */\nfunction setProvider(provider) {\n _provider = provider;\n}\n/**\n * Returns the default provider being used by the client.\n */\nfunction getProvider() {\n if (_provider === null) {\n return AnchorProvider.local();\n }\n return _provider;\n}\n// Global provider used as the default when a provider is not given.\nlet _provider = null;\n\nconst _AVAILABLE_FEATURES = new Set([\"anchor-deprecated-state\", \"debug-logs\"]);\nconst _FEATURES = new Map();\nfunction set(key) {\n if (!_AVAILABLE_FEATURES.has(key)) {\n throw new Error(\"Invalid feature\");\n }\n _FEATURES.set(key, true);\n}\nfunction isSet(key) {\n return _FEATURES.get(key) !== undefined;\n}\n\nvar features = /*#__PURE__*/Object.freeze({\n __proto__: null,\n set: set,\n isSet: isSet\n});\n\nclass IdlError extends Error {\n constructor(message) {\n super(message);\n this.name = \"IdlError\";\n }\n}\nclass ProgramErrorStack {\n constructor(stack) {\n this.stack = stack;\n }\n static parse(logs) {\n var _a;\n const programKeyRegex = /^Program (\\w*) invoke/;\n const successRegex = /^Program \\w* success/;\n const programStack = [];\n for (let i = 0; i < logs.length; i++) {\n if (successRegex.exec(logs[i])) {\n programStack.pop();\n continue;\n }\n const programKey = (_a = programKeyRegex.exec(logs[i])) === null || _a === void 0 ? void 0 : _a[1];\n if (!programKey) {\n continue;\n }\n programStack.push(new PublicKey(programKey));\n }\n return new ProgramErrorStack(programStack);\n }\n}\nclass AnchorError extends Error {\n constructor(errorCode, errorMessage, errorLogs, logs, origin, comparedValues) {\n super(errorLogs.join(\"\\n\").replace(\"Program log: \", \"\"));\n this.errorLogs = errorLogs;\n this.logs = logs;\n this.error = { errorCode, errorMessage, comparedValues, origin };\n this._programErrorStack = ProgramErrorStack.parse(logs);\n }\n static parse(logs) {\n if (!logs) {\n return null;\n }\n const anchorErrorLogIndex = logs.findIndex((log) => log.startsWith(\"Program log: AnchorError\"));\n if (anchorErrorLogIndex === -1) {\n return null;\n }\n const anchorErrorLog = logs[anchorErrorLogIndex];\n const errorLogs = [anchorErrorLog];\n let comparedValues;\n if (anchorErrorLogIndex + 1 < logs.length) {\n // This catches the comparedValues where the following is logged\n // \n // Left:\n // \n // Right:\n // \n if (logs[anchorErrorLogIndex + 1] === \"Program log: Left:\") {\n const pubkeyRegex = /^Program log: (.*)$/;\n const leftPubkey = pubkeyRegex.exec(logs[anchorErrorLogIndex + 2])[1];\n const rightPubkey = pubkeyRegex.exec(logs[anchorErrorLogIndex + 4])[1];\n comparedValues = [\n new PublicKey(leftPubkey),\n new PublicKey(rightPubkey),\n ];\n errorLogs.push(...logs.slice(anchorErrorLogIndex + 1, anchorErrorLogIndex + 5));\n }\n // This catches the comparedValues where the following is logged\n // \n // Left: \n // Right: \n else if (logs[anchorErrorLogIndex + 1].startsWith(\"Program log: Left:\")) {\n const valueRegex = /^Program log: (Left|Right): (.*)$/;\n const leftValue = valueRegex.exec(logs[anchorErrorLogIndex + 1])[2];\n const rightValue = valueRegex.exec(logs[anchorErrorLogIndex + 2])[2];\n errorLogs.push(...logs.slice(anchorErrorLogIndex + 1, anchorErrorLogIndex + 3));\n comparedValues = [leftValue, rightValue];\n }\n }\n const regexNoInfo = /^Program log: AnchorError occurred\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const noInfoAnchorErrorLog = regexNoInfo.exec(anchorErrorLog);\n const regexFileLine = /^Program log: AnchorError thrown in (.*):(\\d*)\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const fileLineAnchorErrorLog = regexFileLine.exec(anchorErrorLog);\n const regexAccountName = /^Program log: AnchorError caused by account: (.*)\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const accountNameAnchorErrorLog = regexAccountName.exec(anchorErrorLog);\n if (noInfoAnchorErrorLog) {\n const [errorCodeString, errorNumber, errorMessage] = noInfoAnchorErrorLog.slice(1, 4);\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, undefined, comparedValues);\n }\n else if (fileLineAnchorErrorLog) {\n const [file, line, errorCodeString, errorNumber, errorMessage] = fileLineAnchorErrorLog.slice(1, 6);\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n const fileLine = { file, line: parseInt(line) };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, fileLine, comparedValues);\n }\n else if (accountNameAnchorErrorLog) {\n const [accountName, errorCodeString, errorNumber, errorMessage] = accountNameAnchorErrorLog.slice(1, 5);\n const origin = accountName;\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, origin, comparedValues);\n }\n else {\n return null;\n }\n }\n get program() {\n return this._programErrorStack.stack[this._programErrorStack.stack.length - 1];\n }\n get programErrorStack() {\n return this._programErrorStack.stack;\n }\n toString() {\n return this.message;\n }\n}\n// An error from a user defined program.\nclass ProgramError extends Error {\n constructor(code, msg, logs) {\n super();\n this.code = code;\n this.msg = msg;\n this.logs = logs;\n if (logs) {\n this._programErrorStack = ProgramErrorStack.parse(logs);\n }\n }\n static parse(err, idlErrors) {\n const errString = err.toString();\n // TODO: don't rely on the error string. web3.js should preserve the error\n // code information instead of giving us an untyped string.\n let unparsedErrorCode;\n if (errString.includes(\"custom program error:\")) {\n let components = errString.split(\"custom program error: \");\n if (components.length !== 2) {\n return null;\n }\n else {\n unparsedErrorCode = components[1];\n }\n }\n else {\n const matches = errString.match(/\"Custom\":([0-9]+)}/g);\n if (!matches || matches.length > 1) {\n return null;\n }\n unparsedErrorCode = matches[0].match(/([0-9]+)/g)[0];\n }\n let errorCode;\n try {\n errorCode = parseInt(unparsedErrorCode);\n }\n catch (parseErr) {\n return null;\n }\n // Parse user error.\n let errorMsg = idlErrors.get(errorCode);\n if (errorMsg !== undefined) {\n return new ProgramError(errorCode, errorMsg, err.logs);\n }\n // Parse framework internal error.\n errorMsg = LangErrorMessage.get(errorCode);\n if (errorMsg !== undefined) {\n return new ProgramError(errorCode, errorMsg, err.logs);\n }\n // Unable to parse the error. Just return the untranslated error.\n return null;\n }\n get program() {\n var _a;\n return (_a = this._programErrorStack) === null || _a === void 0 ? void 0 : _a.stack[this._programErrorStack.stack.length - 1];\n }\n get programErrorStack() {\n var _a;\n return (_a = this._programErrorStack) === null || _a === void 0 ? void 0 : _a.stack;\n }\n toString() {\n return this.msg;\n }\n}\nfunction translateError(err, idlErrors) {\n if (isSet(\"debug-logs\")) {\n console.log(\"Translating error:\", err);\n }\n const anchorError = AnchorError.parse(err.logs);\n if (anchorError) {\n return anchorError;\n }\n const programError = ProgramError.parse(err, idlErrors);\n if (programError) {\n return programError;\n }\n if (err.logs) {\n const handler = {\n get: function (target, prop) {\n if (prop === \"programErrorStack\") {\n return target.programErrorStack.stack;\n }\n else if (prop === \"program\") {\n return target.programErrorStack.stack[err.programErrorStack.stack.length - 1];\n }\n else {\n // this is the normal way to return all other props\n // without modifying them.\n // @ts-expect-error\n return Reflect.get(...arguments);\n }\n },\n };\n err.programErrorStack = ProgramErrorStack.parse(err.logs);\n return new Proxy(err, handler);\n }\n return err;\n}\nconst LangErrorCode = {\n // Instructions.\n InstructionMissing: 100,\n InstructionFallbackNotFound: 101,\n InstructionDidNotDeserialize: 102,\n InstructionDidNotSerialize: 103,\n // IDL instructions.\n IdlInstructionStub: 1000,\n IdlInstructionInvalidProgram: 1001,\n // Constraints.\n ConstraintMut: 2000,\n ConstraintHasOne: 2001,\n ConstraintSigner: 2002,\n ConstraintRaw: 2003,\n ConstraintOwner: 2004,\n ConstraintRentExempt: 2005,\n ConstraintSeeds: 2006,\n ConstraintExecutable: 2007,\n ConstraintState: 2008,\n ConstraintAssociated: 2009,\n ConstraintAssociatedInit: 2010,\n ConstraintClose: 2011,\n ConstraintAddress: 2012,\n ConstraintZero: 2013,\n ConstraintTokenMint: 2014,\n ConstraintTokenOwner: 2015,\n ConstraintMintMintAuthority: 2016,\n ConstraintMintFreezeAuthority: 2017,\n ConstraintMintDecimals: 2018,\n ConstraintSpace: 2019,\n ConstraintAccountIsNone: 2020,\n // Require.\n RequireViolated: 2500,\n RequireEqViolated: 2501,\n RequireKeysEqViolated: 2502,\n RequireNeqViolated: 2503,\n RequireKeysNeqViolated: 2504,\n RequireGtViolated: 2505,\n RequireGteViolated: 2506,\n // Accounts.\n AccountDiscriminatorAlreadySet: 3000,\n AccountDiscriminatorNotFound: 3001,\n AccountDiscriminatorMismatch: 3002,\n AccountDidNotDeserialize: 3003,\n AccountDidNotSerialize: 3004,\n AccountNotEnoughKeys: 3005,\n AccountNotMutable: 3006,\n AccountOwnedByWrongProgram: 3007,\n InvalidProgramId: 3008,\n InvalidProgramExecutable: 3009,\n AccountNotSigner: 3010,\n AccountNotSystemOwned: 3011,\n AccountNotInitialized: 3012,\n AccountNotProgramData: 3013,\n AccountNotAssociatedTokenAccount: 3014,\n AccountSysvarMismatch: 3015,\n AccountReallocExceedsLimit: 3016,\n AccountDuplicateReallocs: 3017,\n // Miscellaneous\n DeclaredProgramIdMismatch: 4100,\n // Used for APIs that shouldn't be used anymore.\n Deprecated: 5000,\n};\nconst LangErrorMessage = new Map([\n // Instructions.\n [\n LangErrorCode.InstructionMissing,\n \"8 byte instruction identifier not provided\",\n ],\n [\n LangErrorCode.InstructionFallbackNotFound,\n \"Fallback functions are not supported\",\n ],\n [\n LangErrorCode.InstructionDidNotDeserialize,\n \"The program could not deserialize the given instruction\",\n ],\n [\n LangErrorCode.InstructionDidNotSerialize,\n \"The program could not serialize the given instruction\",\n ],\n // Idl instructions.\n [\n LangErrorCode.IdlInstructionStub,\n \"The program was compiled without idl instructions\",\n ],\n [\n LangErrorCode.IdlInstructionInvalidProgram,\n \"The transaction was given an invalid program for the IDL instruction\",\n ],\n // Constraints.\n [LangErrorCode.ConstraintMut, \"A mut constraint was violated\"],\n [LangErrorCode.ConstraintHasOne, \"A has one constraint was violated\"],\n [LangErrorCode.ConstraintSigner, \"A signer constraint was violated\"],\n [LangErrorCode.ConstraintRaw, \"A raw constraint was violated\"],\n [LangErrorCode.ConstraintOwner, \"An owner constraint was violated\"],\n [\n LangErrorCode.ConstraintRentExempt,\n \"A rent exemption constraint was violated\",\n ],\n [LangErrorCode.ConstraintSeeds, \"A seeds constraint was violated\"],\n [LangErrorCode.ConstraintExecutable, \"An executable constraint was violated\"],\n [\n LangErrorCode.ConstraintState,\n \"Deprecated Error, feel free to replace with something else\",\n ],\n [LangErrorCode.ConstraintAssociated, \"An associated constraint was violated\"],\n [\n LangErrorCode.ConstraintAssociatedInit,\n \"An associated init constraint was violated\",\n ],\n [LangErrorCode.ConstraintClose, \"A close constraint was violated\"],\n [LangErrorCode.ConstraintAddress, \"An address constraint was violated\"],\n [LangErrorCode.ConstraintZero, \"Expected zero account discriminant\"],\n [LangErrorCode.ConstraintTokenMint, \"A token mint constraint was violated\"],\n [LangErrorCode.ConstraintTokenOwner, \"A token owner constraint was violated\"],\n [\n LangErrorCode.ConstraintMintMintAuthority,\n \"A mint mint authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintFreezeAuthority,\n \"A mint freeze authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintDecimals,\n \"A mint decimals constraint was violated\",\n ],\n [LangErrorCode.ConstraintSpace, \"A space constraint was violated\"],\n [\n LangErrorCode.ConstraintAccountIsNone,\n \"A required account for the constraint is None\",\n ],\n // Require.\n [LangErrorCode.RequireViolated, \"A require expression was violated\"],\n [LangErrorCode.RequireEqViolated, \"A require_eq expression was violated\"],\n [\n LangErrorCode.RequireKeysEqViolated,\n \"A require_keys_eq expression was violated\",\n ],\n [LangErrorCode.RequireNeqViolated, \"A require_neq expression was violated\"],\n [\n LangErrorCode.RequireKeysNeqViolated,\n \"A require_keys_neq expression was violated\",\n ],\n [LangErrorCode.RequireGtViolated, \"A require_gt expression was violated\"],\n [LangErrorCode.RequireGteViolated, \"A require_gte expression was violated\"],\n // Accounts.\n [\n LangErrorCode.AccountDiscriminatorAlreadySet,\n \"The account discriminator was already set on this account\",\n ],\n [\n LangErrorCode.AccountDiscriminatorNotFound,\n \"No 8 byte discriminator was found on the account\",\n ],\n [\n LangErrorCode.AccountDiscriminatorMismatch,\n \"8 byte discriminator did not match what was expected\",\n ],\n [LangErrorCode.AccountDidNotDeserialize, \"Failed to deserialize the account\"],\n [LangErrorCode.AccountDidNotSerialize, \"Failed to serialize the account\"],\n [\n LangErrorCode.AccountNotEnoughKeys,\n \"Not enough account keys given to the instruction\",\n ],\n [LangErrorCode.AccountNotMutable, \"The given account is not mutable\"],\n [\n LangErrorCode.AccountOwnedByWrongProgram,\n \"The given account is owned by a different program than expected\",\n ],\n [LangErrorCode.InvalidProgramId, \"Program ID was not as expected\"],\n [LangErrorCode.InvalidProgramExecutable, \"Program account is not executable\"],\n [LangErrorCode.AccountNotSigner, \"The given account did not sign\"],\n [\n LangErrorCode.AccountNotSystemOwned,\n \"The given account is not owned by the system program\",\n ],\n [\n LangErrorCode.AccountNotInitialized,\n \"The program expected this account to be already initialized\",\n ],\n [\n LangErrorCode.AccountNotProgramData,\n \"The given account is not a program data account\",\n ],\n [\n LangErrorCode.AccountNotAssociatedTokenAccount,\n \"The given account is not the associated token account\",\n ],\n [\n LangErrorCode.AccountSysvarMismatch,\n \"The given public key does not match the required sysvar\",\n ],\n [\n LangErrorCode.AccountReallocExceedsLimit,\n \"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit\",\n ],\n [\n LangErrorCode.AccountDuplicateReallocs,\n \"The account was duplicated for more than one reallocation\",\n ],\n // Miscellaneous\n [\n LangErrorCode.DeclaredProgramIdMismatch,\n \"The declared program id does not match the actual program id\",\n ],\n // Deprecated\n [\n LangErrorCode.Deprecated,\n \"The API being used is deprecated and should no longer be used\",\n ],\n]);\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __assign$1 = function() {\r\n __assign$1 = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign$1.apply(this, arguments);\r\n};\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\n\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\n/**\n * Lower case as a function.\n */\nfunction lowerCase(str) {\n return str.toLowerCase();\n}\n\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nvar DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n// Remove all non-word characters.\nvar DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nfunction noCase(input, options) {\n if (options === void 0) { options = {}; }\n var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? \" \" : _d;\n var result = replace(replace(input, splitRegexp, \"$1\\0$2\"), stripRegexp, \"\\0\");\n var start = 0;\n var end = result.length;\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\")\n start++;\n while (result.charAt(end - 1) === \"\\0\")\n end--;\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input, re, value) {\n if (re instanceof RegExp)\n return input.replace(re, value);\n return re.reduce(function (input, re) { return input.replace(re, value); }, input);\n}\n\nfunction dotCase(input, options) {\n if (options === void 0) { options = {}; }\n return noCase(input, __assign({ delimiter: \".\" }, options));\n}\n\nfunction snakeCase(input, options) {\n if (options === void 0) { options = {}; }\n return dotCase(input, __assign$1({ delimiter: \"_\" }, options));\n}\n\nclass IdlCoder {\n static fieldLayout(field, types) {\n const fieldName = field.name !== undefined ? camelCase(field.name) : undefined;\n switch (field.type) {\n case \"bool\": {\n return borsh.bool(fieldName);\n }\n case \"u8\": {\n return borsh.u8(fieldName);\n }\n case \"i8\": {\n return borsh.i8(fieldName);\n }\n case \"u16\": {\n return borsh.u16(fieldName);\n }\n case \"i16\": {\n return borsh.i16(fieldName);\n }\n case \"u32\": {\n return borsh.u32(fieldName);\n }\n case \"i32\": {\n return borsh.i32(fieldName);\n }\n case \"f32\": {\n return borsh.f32(fieldName);\n }\n case \"u64\": {\n return borsh.u64(fieldName);\n }\n case \"i64\": {\n return borsh.i64(fieldName);\n }\n case \"f64\": {\n return borsh.f64(fieldName);\n }\n case \"u128\": {\n return borsh.u128(fieldName);\n }\n case \"i128\": {\n return borsh.i128(fieldName);\n }\n case \"u256\": {\n return borsh.u256(fieldName);\n }\n case \"i256\": {\n return borsh.i256(fieldName);\n }\n case \"bytes\": {\n return borsh.vecU8(fieldName);\n }\n case \"string\": {\n return borsh.str(fieldName);\n }\n case \"publicKey\": {\n return borsh.publicKey(fieldName);\n }\n default: {\n if (\"vec\" in field.type) {\n return borsh.vec(IdlCoder.fieldLayout({\n name: undefined,\n type: field.type.vec,\n }, types), fieldName);\n }\n else if (\"option\" in field.type) {\n return borsh.option(IdlCoder.fieldLayout({\n name: undefined,\n type: field.type.option,\n }, types), fieldName);\n }\n else if (\"defined\" in field.type) {\n // User defined type.\n if (!types) {\n throw new IdlError(\"User defined types not provided\");\n }\n const defined = field.type.defined;\n const filtered = types.filter((t) => t.name === defined);\n if (filtered.length !== 1) {\n throw new IdlError(`Type not found: ${JSON.stringify(field)}`);\n }\n return IdlCoder.typeDefLayout(filtered[0], types, fieldName);\n }\n else if (\"array\" in field.type) {\n let arrayTy = field.type.array[0];\n let arrayLen = field.type.array[1];\n let innerLayout = IdlCoder.fieldLayout({\n name: undefined,\n type: arrayTy,\n }, types);\n return borsh.array(innerLayout, arrayLen, fieldName);\n }\n else {\n throw new Error(`Not yet implemented: ${field}`);\n }\n }\n }\n }\n static typeDefLayout(typeDef, types = [], name) {\n switch (typeDef.type.kind) {\n case \"struct\": {\n const fieldLayouts = typeDef.type.fields.map((field) => {\n return IdlCoder.fieldLayout(field, types);\n });\n return borsh.struct(fieldLayouts, name);\n }\n case \"enum\": {\n let variants = typeDef.type.variants.map((variant) => {\n const name = camelCase(variant.name);\n if (!variant.fields) {\n return borsh.struct([], name);\n }\n const fieldLayouts = variant.fields.map((f, i) => {\n if (f === null || f === void 0 ? void 0 : f.name) {\n return IdlCoder.fieldLayout(f, types);\n }\n return IdlCoder.fieldLayout({ type: f, name: i.toString() }, types);\n });\n return borsh.struct(fieldLayouts, name);\n });\n if (name !== undefined) {\n // Buffer-layout lib requires the name to be null (on construction)\n // when used as a field.\n return borsh.rustEnum(variants).replicate(name);\n }\n return borsh.rustEnum(variants, name);\n }\n case \"alias\": {\n return IdlCoder.fieldLayout({ type: typeDef.type.value, name: typeDef.name }, types);\n }\n }\n }\n}\n\n/**\n * Namespace for global instruction function signatures (i.e. functions\n * that aren't namespaced by the state or any of its trait implementations).\n */\nconst SIGHASH_GLOBAL_NAMESPACE = \"global\";\n/**\n * Encodes and decodes program instructions.\n */\nclass BorshInstructionCoder {\n constructor(idl) {\n this.idl = idl;\n this.ixLayout = BorshInstructionCoder.parseIxLayout(idl);\n const sighashLayouts = new Map();\n idl.instructions.forEach((ix) => {\n const sh = sighash(SIGHASH_GLOBAL_NAMESPACE, ix.name);\n sighashLayouts.set(bs58$1.encode(sh), {\n layout: this.ixLayout.get(ix.name),\n name: ix.name,\n });\n });\n this.sighashLayouts = sighashLayouts;\n }\n /**\n * Encodes a program instruction.\n */\n encode(ixName, ix) {\n return this._encode(SIGHASH_GLOBAL_NAMESPACE, ixName, ix);\n }\n _encode(nameSpace, ixName, ix) {\n const buffer = Buffer$1.alloc(1000); // TODO: use a tighter buffer.\n const methodName = camelCase(ixName);\n const layout = this.ixLayout.get(methodName);\n if (!layout) {\n throw new Error(`Unknown method: ${methodName}`);\n }\n const len = layout.encode(ix, buffer);\n const data = buffer.slice(0, len);\n return Buffer$1.concat([sighash(nameSpace, ixName), data]);\n }\n static parseIxLayout(idl) {\n const ixLayouts = idl.instructions.map((ix) => {\n let fieldLayouts = ix.args.map((arg) => {\n var _a, _b;\n return IdlCoder.fieldLayout(arg, Array.from([...((_a = idl.accounts) !== null && _a !== void 0 ? _a : []), ...((_b = idl.types) !== null && _b !== void 0 ? _b : [])]));\n });\n const name = camelCase(ix.name);\n return [name, borsh.struct(fieldLayouts, name)];\n });\n return new Map(ixLayouts);\n }\n /**\n * Decodes a program instruction.\n */\n decode(ix, encoding = \"hex\") {\n if (typeof ix === \"string\") {\n ix = encoding === \"hex\" ? Buffer$1.from(ix, \"hex\") : bs58$1.decode(ix);\n }\n let sighash = bs58$1.encode(ix.slice(0, 8));\n let data = ix.slice(8);\n const decoder = this.sighashLayouts.get(sighash);\n if (!decoder) {\n return null;\n }\n return {\n data: decoder.layout.decode(data),\n name: decoder.name,\n };\n }\n /**\n * Returns a formatted table of all the fields in the given instruction data.\n */\n format(ix, accountMetas) {\n return InstructionFormatter.format(ix, accountMetas, this.idl);\n }\n}\nclass InstructionFormatter {\n static format(ix, accountMetas, idl) {\n const idlIx = idl.instructions.filter((i) => ix.name === i.name)[0];\n if (idlIx === undefined) {\n console.error(\"Invalid instruction given\");\n return null;\n }\n const args = idlIx.args.map((idlField) => {\n return {\n name: idlField.name,\n type: InstructionFormatter.formatIdlType(idlField.type),\n data: InstructionFormatter.formatIdlData(idlField, ix.data[idlField.name], idl.types),\n };\n });\n const flatIdlAccounts = InstructionFormatter.flattenIdlAccounts(idlIx.accounts);\n const accounts = accountMetas.map((meta, idx) => {\n if (idx < flatIdlAccounts.length) {\n return {\n name: flatIdlAccounts[idx].name,\n ...meta,\n };\n }\n // \"Remaining accounts\" are unnamed in Anchor.\n else {\n return {\n name: undefined,\n ...meta,\n };\n }\n });\n return {\n args,\n accounts,\n };\n }\n static formatIdlType(idlType) {\n if (typeof idlType === \"string\") {\n return idlType;\n }\n if (\"vec\" in idlType) {\n return `Vec<${this.formatIdlType(idlType.vec)}>`;\n }\n if (\"option\" in idlType) {\n return `Option<${this.formatIdlType(idlType.option)}>`;\n }\n if (\"defined\" in idlType) {\n return idlType.defined;\n }\n if (\"array\" in idlType) {\n return `Array<${idlType.array[0]}; ${idlType.array[1]}>`;\n }\n throw new Error(`Unknown IDL type: ${idlType}`);\n }\n static formatIdlData(idlField, data, types) {\n if (typeof idlField.type === \"string\") {\n return data.toString();\n }\n if (idlField.type.hasOwnProperty(\"vec\")) {\n return (\"[\" +\n data\n .map((d) => this.formatIdlData({ name: \"\", type: idlField.type.vec }, d))\n .join(\", \") +\n \"]\");\n }\n if (idlField.type.hasOwnProperty(\"option\")) {\n return data === null\n ? \"null\"\n : this.formatIdlData({ name: \"\", type: idlField.type.option }, data, types);\n }\n if (idlField.type.hasOwnProperty(\"defined\")) {\n if (types === undefined) {\n throw new Error(\"User defined types not provided\");\n }\n const filtered = types.filter((t) => t.name === idlField.type.defined);\n if (filtered.length !== 1) {\n throw new Error(`Type not found: ${idlField.type.defined}`);\n }\n return InstructionFormatter.formatIdlDataDefined(filtered[0], data, types);\n }\n return \"unknown\";\n }\n static formatIdlDataDefined(typeDef, data, types) {\n switch (typeDef.type.kind) {\n case \"struct\": {\n const struct = typeDef.type;\n const fields = Object.keys(data)\n .map((k) => {\n const field = struct.fields.find((f) => f.name === k);\n if (!field) {\n throw new Error(\"Unable to find type\");\n }\n return (k +\n \": \" +\n InstructionFormatter.formatIdlData(field, data[k], types));\n })\n .join(\", \");\n return \"{ \" + fields + \" }\";\n }\n case \"enum\": {\n if (typeDef.type.variants.length === 0) {\n return \"{}\";\n }\n // Struct enum.\n if (typeDef.type.variants[0].name) {\n const variants = typeDef.type.variants;\n const variant = Object.keys(data)[0];\n const enumType = data[variant];\n const namedFields = Object.keys(enumType)\n .map((f) => {\n var _a;\n const fieldData = enumType[f];\n const idlField = (_a = variants[variant]) === null || _a === void 0 ? void 0 : _a.find((v) => v.name === f);\n if (!idlField) {\n throw new Error(\"Unable to find variant\");\n }\n return (f +\n \": \" +\n InstructionFormatter.formatIdlData(idlField, fieldData, types));\n })\n .join(\", \");\n const variantName = camelCase(variant, { pascalCase: true });\n if (namedFields.length === 0) {\n return variantName;\n }\n return `${variantName} { ${namedFields} }`;\n }\n // Tuple enum.\n else {\n // TODO.\n return \"Tuple formatting not yet implemented\";\n }\n }\n case \"alias\": {\n return InstructionFormatter.formatIdlType(typeDef.type.value);\n }\n }\n }\n static flattenIdlAccounts(accounts, prefix) {\n return accounts\n .map((account) => {\n const accName = sentenceCase(account.name);\n if (account.hasOwnProperty(\"accounts\")) {\n const newPrefix = prefix ? `${prefix} > ${accName}` : accName;\n return InstructionFormatter.flattenIdlAccounts(account.accounts, newPrefix);\n }\n else {\n return {\n ...account,\n name: prefix ? `${prefix} > ${accName}` : accName,\n };\n }\n })\n .flat();\n }\n}\nfunction sentenceCase(field) {\n const result = field.replace(/([A-Z])/g, \" $1\");\n return result.charAt(0).toUpperCase() + result.slice(1);\n}\n// Not technically sighash, since we don't include the arguments, as Rust\n// doesn't allow function overloading.\nfunction sighash(nameSpace, ixName) {\n let name = snakeCase(ixName);\n let preimage = `${nameSpace}:${name}`;\n return Buffer$1.from(sha256$1(preimage).slice(0, 8));\n}\n\nfunction accountSize(idl, idlAccount) {\n switch (idlAccount.type.kind) {\n case \"struct\": {\n return idlAccount.type.fields\n .map((f) => typeSize(idl, f.type))\n .reduce((acc, size) => acc + size, 0);\n }\n case \"enum\": {\n const variantSizes = idlAccount.type.variants.map((variant) => {\n if (!variant.fields) {\n return 0;\n }\n return variant.fields\n .map((f) => {\n // Unnamed enum variant\n if (!(typeof f === \"object\" && \"name\" in f)) {\n return typeSize(idl, f);\n }\n // Named enum variant\n return typeSize(idl, f.type);\n })\n .reduce((acc, size) => acc + size, 0);\n });\n return Math.max(...variantSizes) + 1;\n }\n case \"alias\": {\n return typeSize(idl, idlAccount.type.value);\n }\n }\n}\n// Returns the size of the type in bytes. For variable length types, just return\n// 1. Users should override this value in such cases.\nfunction typeSize(idl, ty) {\n var _a, _b;\n switch (ty) {\n case \"bool\":\n return 1;\n case \"u8\":\n return 1;\n case \"i8\":\n return 1;\n case \"i16\":\n return 2;\n case \"u16\":\n return 2;\n case \"u32\":\n return 4;\n case \"i32\":\n return 4;\n case \"f32\":\n return 4;\n case \"u64\":\n return 8;\n case \"i64\":\n return 8;\n case \"f64\":\n return 8;\n case \"u128\":\n return 16;\n case \"i128\":\n return 16;\n case \"u256\":\n return 32;\n case \"i256\":\n return 32;\n case \"bytes\":\n return 1;\n case \"string\":\n return 1;\n case \"publicKey\":\n return 32;\n default:\n if (\"vec\" in ty) {\n return 1;\n }\n if (\"option\" in ty) {\n return 1 + typeSize(idl, ty.option);\n }\n if (\"coption\" in ty) {\n return 4 + typeSize(idl, ty.coption);\n }\n if (\"defined\" in ty) {\n const filtered = (_b = (_a = idl.types) === null || _a === void 0 ? void 0 : _a.filter((t) => t.name === ty.defined)) !== null && _b !== void 0 ? _b : [];\n if (filtered.length !== 1) {\n throw new IdlError(`Type not found: ${JSON.stringify(ty)}`);\n }\n let typeDef = filtered[0];\n return accountSize(idl, typeDef);\n }\n if (\"array\" in ty) {\n let arrayTy = ty.array[0];\n let arraySize = ty.array[1];\n return typeSize(idl, arrayTy) * arraySize;\n }\n throw new Error(`Invalid type ${JSON.stringify(ty)}`);\n }\n}\n\n/**\n * Number of bytes in anchor discriminators\n */\nconst DISCRIMINATOR_SIZE = 8;\nfunction discriminator(preimage) {\n return Buffer.from(sha256$1(preimage).slice(0, DISCRIMINATOR_SIZE));\n}\n\n/**\n * Encodes and decodes account objects.\n */\nclass BorshAccountsCoder {\n constructor(idl) {\n if (idl.accounts === undefined) {\n this.accountLayouts = new Map();\n return;\n }\n const layouts = idl.accounts.map((acc) => {\n return [acc.name, IdlCoder.typeDefLayout(acc, idl.types)];\n });\n this.accountLayouts = new Map(layouts);\n this.idl = idl;\n }\n async encode(accountName, account) {\n const buffer = Buffer$1.alloc(1000); // TODO: use a tighter buffer.\n const layout = this.accountLayouts.get(accountName);\n if (!layout) {\n throw new Error(`Unknown account: ${accountName}`);\n }\n const len = layout.encode(account, buffer);\n let accountData = buffer.slice(0, len);\n let discriminator = BorshAccountsCoder.accountDiscriminator(accountName);\n return Buffer$1.concat([discriminator, accountData]);\n }\n decode(accountName, data) {\n // Assert the account discriminator is correct.\n const discriminator = BorshAccountsCoder.accountDiscriminator(accountName);\n if (discriminator.compare(data.slice(0, 8))) {\n throw new Error(\"Invalid account discriminator\");\n }\n return this.decodeUnchecked(accountName, data);\n }\n decodeAny(data) {\n const accountDescriminator = data.slice(0, 8);\n const accountName = Array.from(this.accountLayouts.keys()).find((key) => BorshAccountsCoder.accountDiscriminator(key).equals(accountDescriminator));\n if (!accountName) {\n throw new Error(\"Account descriminator not found\");\n }\n return this.decodeUnchecked(accountName, data);\n }\n decodeUnchecked(accountName, ix) {\n // Chop off the discriminator before decoding.\n const data = ix.subarray(DISCRIMINATOR_SIZE);\n const layout = this.accountLayouts.get(accountName);\n if (!layout) {\n throw new Error(`Unknown account: ${accountName}`);\n }\n return layout.decode(data);\n }\n memcmp(accountName, appendData) {\n const discriminator = BorshAccountsCoder.accountDiscriminator(accountName);\n return {\n offset: 0,\n bytes: bs58$1.encode(appendData ? Buffer$1.concat([discriminator, appendData]) : discriminator),\n };\n }\n size(idlAccount) {\n var _a;\n return DISCRIMINATOR_SIZE + ((_a = accountSize(this.idl, idlAccount)) !== null && _a !== void 0 ? _a : 0);\n }\n /**\n * Calculates and returns a unique 8 byte discriminator prepended to all anchor accounts.\n *\n * @param name The name of the account to calculate the discriminator.\n */\n static accountDiscriminator(name) {\n const discriminatorPreimage = `account:${camelCase(name, {\n pascalCase: true,\n preserveConsecutiveUppercase: true,\n })}`;\n return discriminator(discriminatorPreimage);\n }\n}\n\nclass BorshEventCoder {\n constructor(idl) {\n if (idl.events === undefined) {\n this.layouts = new Map();\n return;\n }\n const layouts = idl.events.map((event) => {\n let eventTypeDef = {\n name: event.name,\n type: {\n kind: \"struct\",\n fields: event.fields.map((f) => {\n return { name: f.name, type: f.type };\n }),\n },\n };\n return [event.name, IdlCoder.typeDefLayout(eventTypeDef, idl.types)];\n });\n this.layouts = new Map(layouts);\n this.discriminators = new Map(idl.events === undefined\n ? []\n : idl.events.map((e) => [\n encode(eventDiscriminator(e.name)),\n e.name,\n ]));\n }\n decode(log) {\n let logArr;\n // This will throw if log length is not a multiple of 4.\n try {\n logArr = decode(log);\n }\n catch (e) {\n return null;\n }\n const disc = encode(logArr.slice(0, 8));\n // Only deserialize if the discriminator implies a proper event.\n const eventName = this.discriminators.get(disc);\n if (eventName === undefined) {\n return null;\n }\n const layout = this.layouts.get(eventName);\n if (!layout) {\n throw new Error(`Unknown event: ${eventName}`);\n }\n const data = layout.decode(logArr.slice(8));\n return { data, name: eventName };\n }\n}\nfunction eventDiscriminator(name) {\n return discriminator(`event:${name}`);\n}\n\n/**\n * Encodes and decodes user-defined types.\n */\nclass BorshTypesCoder {\n constructor(idl) {\n if (idl.types === undefined) {\n this.typeLayouts = new Map();\n return;\n }\n const layouts = idl.types.map((acc) => {\n return [acc.name, IdlCoder.typeDefLayout(acc, idl.types)];\n });\n this.typeLayouts = new Map(layouts);\n this.idl = idl;\n }\n encode(typeName, type) {\n const buffer = Buffer$1.alloc(1000); // TODO: use a tighter buffer.\n const layout = this.typeLayouts.get(typeName);\n if (!layout) {\n throw new Error(`Unknown type: ${typeName}`);\n }\n const len = layout.encode(type, buffer);\n return buffer.slice(0, len);\n }\n decode(typeName, typeData) {\n const layout = this.typeLayouts.get(typeName);\n if (!layout) {\n throw new Error(`Unknown type: ${typeName}`);\n }\n return layout.decode(typeData);\n }\n}\n\n/**\n * BorshCoder is the default Coder for Anchor programs implementing the\n * borsh based serialization interface.\n */\nclass BorshCoder {\n constructor(idl) {\n this.instruction = new BorshInstructionCoder(idl);\n this.accounts = new BorshAccountsCoder(idl);\n this.events = new BorshEventCoder(idl);\n this.types = new BorshTypesCoder(idl);\n }\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\n/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n\n /**\n * Decode from a Buffer into an JavaScript value.\n *\n * @param {Buffer} b - the buffer from which encoded data is read.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {(Number|Array|Object)} - the value of the decoded data.\n *\n * @abstract\n */\n decode(b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Encode a JavaScript value into a Buffer.\n *\n * @param {(Number|Array|Object)} src - the value to be encoded into\n * the buffer. The type accepted depends on the (sub-)type of {@link\n * Layout}.\n *\n * @param {Buffer} b - the buffer into which encoded data will be\n * written.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {Number} - the number of bytes encoded, including the\n * space skipped for internal padding, but excluding data such as\n * {@link Sequence#count|lengths} when stored {@link\n * ExternalLayout|externally}. This is the adjustment to `offset`\n * producing the offset where data for the next layout would be\n * written.\n *\n * @abstract\n */\n encode(src, b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Buffer} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nvar Layout_2 = Layout;\n\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\n\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\n\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n\n if (undefined === offset) {\n offset = 0;\n } else if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n\n super(layout.span, property || layout.property);\n\n /** The subordinated layout. */\n this.layout = layout;\n\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Buffer\n * being accessed. */\n this.offset = offset;\n }\n\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.decode(b, offset + this.offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\n\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super( span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\nconst V2E32 = Math.pow(2, 32);\n\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return {hi32, lo32};\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n } else if (0 <= offset) {\n offset += fd.span;\n }\n }\n }\n}\n\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\n\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n\n super(property || layout.property || 'variant');\n\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\n\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n const upv = ((discr instanceof UInt)\n || (discr instanceof UIntBE));\n if (upv) {\n discr = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discr = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && upv) {\n span += discr.layout.span;\n }\n }\n super(span, property);\n\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discr;\n\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = upv;\n\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisified rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (src.hasOwnProperty(this.discriminator.property)) {\n if (this.defaultLayout\n && src.hasOwnProperty(this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || src.hasOwnProperty(vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (src.hasOwnProperty(vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n let clo = this.registry[discr];\n if (undefined === clo) {\n let contentOffset = 0;\n clo = this.defaultLayout;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[clo.property] = this.defaultLayout.decode(b, offset + contentOffset);\n } else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n return contentOffset + clo.encode(src[clo.property], b,\n offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Buffer)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Buffer}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset) {\n let variant = vb;\n if (Buffer.isBuffer(vb)) {\n if (undefined === offset) {\n offset = 0;\n }\n variant = this.discriminator.decode(vb, offset);\n }\n return this.registry[variant];\n }\n}\n\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n return contentOffset + this.layout.getSpan(b, offset + contentOffset);\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!src.hasOwnProperty(this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n }\n}\n/* eslint-enable no-extend-native */\n\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Buffer.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob$1 extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return b.slice(offset, offset + span);\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(Buffer.isBuffer(src)\n && (span === src.length))) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Buffer as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n b.write(src.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\n\n/** Factory for {@link OffsetLayout}. */\nvar offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nvar u8 = (property => new UInt(1, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nvar u32 = (property => new UInt(4, property));\n\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nvar nu64 = (property => new NearUInt64(property));\n\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nvar ns64 = (property => new NearInt64(property));\n\n/** Factory for {@link Structure} values. */\nvar struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n\n/** Factory for {@link Union} values. */\nvar union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n\n/** Factory for {@link Blob} values. */\nvar blob = ((length, property) => new Blob$1(length, property));\n\nclass SystemInstructionCoder {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n constructor(_) { }\n encode(ixName, ix) {\n switch (camelCase(ixName)) {\n case \"createAccount\": {\n return encodeCreateAccount(ix);\n }\n case \"assign\": {\n return encodeAssign(ix);\n }\n case \"transfer\": {\n return encodeTransfer(ix);\n }\n case \"createAccountWithSeed\": {\n return encodeCreateAccountWithSeed(ix);\n }\n case \"advanceNonceAccount\": {\n return encodeAdvanceNonceAccount(ix);\n }\n case \"withdrawNonceAccount\": {\n return encodeWithdrawNonceAccount(ix);\n }\n case \"initializeNonceAccount\": {\n return encodeInitializeNonceAccount(ix);\n }\n case \"authorizeNonceAccount\": {\n return encodeAuthorizeNonceAccount(ix);\n }\n case \"allocate\": {\n return encodeAllocate(ix);\n }\n case \"allocateWithSeed\": {\n return encodeAllocateWithSeed(ix);\n }\n case \"assignWithSeed\": {\n return encodeAssignWithSeed(ix);\n }\n case \"transferWithSeed\": {\n return encodeTransferWithSeed(ix);\n }\n default: {\n throw new Error(`Invalid instruction: ${ixName}`);\n }\n }\n }\n encodeState(_ixName, _ix) {\n throw new Error(\"System does not have state\");\n }\n}\nclass RustStringLayout extends Layout_2 {\n constructor(property) {\n super(-1, property);\n this.property = property;\n this.layout = struct([\n u32(\"length\"),\n u32(\"lengthPadding\"),\n blob(offset(u32(), -8), \"chars\"),\n ], this.property);\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.layout.span;\n }\n const data = {\n chars: Buffer.from(src, \"utf8\"),\n };\n return this.layout.encode(data, b, offset);\n }\n decode(b, offset = 0) {\n const data = this.layout.decode(b, offset);\n return data[\"chars\"].toString();\n }\n getSpan(b, offset = 0) {\n return (u32().span +\n u32().span +\n new BN(new Uint8Array(b).slice(offset, offset + 4), 10, \"le\").toNumber());\n }\n}\nfunction rustStringLayout(property) {\n return new RustStringLayout(property);\n}\nfunction publicKey$2(property) {\n return blob(32, property);\n}\nfunction encodeCreateAccount({ lamports, space, owner }) {\n return encodeData({\n createAccount: { lamports, space, owner: owner.toBuffer() },\n });\n}\nfunction encodeAssign({ owner }) {\n return encodeData({\n assign: { owner: owner.toBuffer() },\n });\n}\nfunction encodeTransfer({ lamports }) {\n return encodeData({\n transfer: { lamports },\n });\n}\nfunction encodeCreateAccountWithSeed({ base, seed, lamports, space, owner, }) {\n return encodeData({\n createAccountWithSeed: {\n base: base.toBuffer(),\n seed,\n lamports,\n space,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(3).span + seed.length);\n}\nfunction encodeInitializeNonceAccount({ authorized }) {\n return encodeData({\n initializeNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeAdvanceNonceAccount({ authorized }) {\n return encodeData({\n advanceNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeWithdrawNonceAccount({ lamports }) {\n return encodeData({\n withdrawNonceAccount: { lamports },\n });\n}\nfunction encodeAuthorizeNonceAccount({ authorized }) {\n return encodeData({\n authorizeNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeAllocate({ space }) {\n return encodeData({\n allocate: { space },\n });\n}\nfunction encodeAllocateWithSeed({ base, seed, space, owner }) {\n return encodeData({\n allocateWithSeed: {\n base: base.toBuffer(),\n seed,\n space,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(9).span + seed.length);\n}\nfunction encodeAssignWithSeed({ base, seed, owner }) {\n return encodeData({\n assignWithSeed: {\n base: base.toBuffer(),\n seed,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(10).span + seed.length);\n}\nfunction encodeTransferWithSeed({ lamports, seed, owner }) {\n return encodeData({\n transferWithSeed: {\n lamports,\n seed,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(11).span + seed.length);\n}\nconst LAYOUT = union(u32(\"instruction\"));\nLAYOUT.addVariant(0, struct([\n ns64(\"lamports\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"createAccount\");\nLAYOUT.addVariant(1, struct([publicKey$2(\"owner\")]), \"assign\");\nLAYOUT.addVariant(2, struct([ns64(\"lamports\")]), \"transfer\");\nLAYOUT.addVariant(3, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n ns64(\"lamports\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"createAccountWithSeed\");\nLAYOUT.addVariant(4, struct([publicKey$2(\"authorized\")]), \"advanceNonceAccount\");\nLAYOUT.addVariant(5, struct([ns64(\"lamports\")]), \"withdrawNonceAccount\");\nLAYOUT.addVariant(6, struct([publicKey$2(\"authorized\")]), \"initializeNonceAccount\");\nLAYOUT.addVariant(7, struct([publicKey$2(\"authorized\")]), \"authorizeNonceAccount\");\nLAYOUT.addVariant(8, struct([ns64(\"space\")]), \"allocate\");\nLAYOUT.addVariant(9, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"allocateWithSeed\");\nLAYOUT.addVariant(10, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n publicKey$2(\"owner\"),\n]), \"assignWithSeed\");\nLAYOUT.addVariant(11, struct([\n ns64(\"lamports\"),\n rustStringLayout(\"seed\"),\n publicKey$2(\"owner\"),\n]), \"transferWithSeed\");\nfunction encodeData(instruction, maxSpan) {\n const b = Buffer.alloc(maxSpan !== null && maxSpan !== void 0 ? maxSpan : instructionMaxSpan);\n const span = LAYOUT.encode(instruction, b);\n if (maxSpan === undefined) {\n return b.slice(0, span);\n }\n return b;\n}\nconst instructionMaxSpan = Math.max(...Object.values(LAYOUT.registry).map((r) => r.span));\n\nclass SystemAccountsCoder {\n constructor(idl) {\n this.idl = idl;\n }\n async encode(accountName, account) {\n switch (accountName) {\n case \"nonce\": {\n const buffer = Buffer.alloc(NONCE_ACCOUNT_LENGTH);\n const len = NONCE_ACCOUNT_LAYOUT.encode(account, buffer);\n return buffer.slice(0, len);\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n decode(accountName, ix) {\n return this.decodeUnchecked(accountName, ix);\n }\n decodeUnchecked(accountName, ix) {\n switch (accountName) {\n case \"nonce\": {\n return decodeNonceAccount(ix);\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n // TODO: this won't use the appendData.\n memcmp(accountName, _appendData) {\n switch (accountName) {\n case \"nonce\": {\n return {\n dataSize: NONCE_ACCOUNT_LENGTH,\n };\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n size(idlAccount) {\n var _a;\n return (_a = accountSize(this.idl, idlAccount)) !== null && _a !== void 0 ? _a : 0;\n }\n}\nfunction decodeNonceAccount(ix) {\n return NONCE_ACCOUNT_LAYOUT.decode(ix);\n}\nclass WrappedLayout$1 extends Layout_2 {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nfunction publicKey$1(property) {\n return new WrappedLayout$1(blob(32), (b) => new PublicKey(b), (key) => key.toBuffer(), property);\n}\nconst NONCE_ACCOUNT_LAYOUT = struct([\n u32(\"version\"),\n u32(\"state\"),\n publicKey$1(\"authorizedPubkey\"),\n publicKey$1(\"nonce\"),\n struct([nu64(\"lamportsPerSignature\")], \"feeCalculator\"),\n]);\n\nclass SystemEventsCoder {\n constructor(_idl) { }\n decode(_log) {\n throw new Error(\"System program does not have events\");\n }\n}\n\nclass SystemTypesCoder {\n constructor(_idl) { }\n encode(_name, _type) {\n throw new Error(\"System does not have user-defined types\");\n }\n decode(_name, _typeData) {\n throw new Error(\"System does not have user-defined types\");\n }\n}\n\n/**\n * Coder for the System program.\n */\nclass SystemCoder {\n constructor(idl) {\n this.instruction = new SystemInstructionCoder(idl);\n this.accounts = new SystemAccountsCoder(idl);\n this.events = new SystemEventsCoder(idl);\n this.types = new SystemTypesCoder(idl);\n }\n}\n\nfunction hash(data) {\n return new TextDecoder().decode(sha256$1(data));\n}\n\nvar sha256 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hash: hash\n});\n\n// Sync version of web3.PublicKey.createWithSeed.\nfunction createWithSeedSync(fromPublicKey, seed, programId) {\n const buffer = Buffer$1.concat([\n fromPublicKey.toBuffer(),\n Buffer$1.from(seed),\n programId.toBuffer(),\n ]);\n return new PublicKey(sha256$1(buffer));\n}\nfunction associated(programId, ...args) {\n let seeds = [Buffer$1.from([97, 110, 99, 104, 111, 114])]; // b\"anchor\".\n args.forEach((arg) => {\n seeds.push(arg instanceof Buffer$1 ? arg : translateAddress(arg).toBuffer());\n });\n const [assoc] = PublicKey.findProgramAddressSync(seeds, translateAddress(programId));\n return assoc;\n}\n\nvar pubkey = /*#__PURE__*/Object.freeze({\n __proto__: null,\n createWithSeedSync: createWithSeedSync,\n associated: associated\n});\n\nconst TOKEN_PROGRAM_ID = new PublicKey(\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\");\nconst ASSOCIATED_PROGRAM_ID = new PublicKey(\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\");\nfunction associatedAddress({ mint, owner, }) {\n return PublicKey.findProgramAddressSync([owner.toBuffer(), TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], ASSOCIATED_PROGRAM_ID)[0];\n}\n\nvar token = /*#__PURE__*/Object.freeze({\n __proto__: null,\n TOKEN_PROGRAM_ID: TOKEN_PROGRAM_ID,\n ASSOCIATED_PROGRAM_ID: ASSOCIATED_PROGRAM_ID,\n associatedAddress: associatedAddress\n});\n\nvar browserPonyfill = {exports: {}};\n\n(function (module, exports) {\nvar global = typeof self !== 'undefined' ? self : commonjsGlobal;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException;\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\n((function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n}))({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch; // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch; // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers;\nexports.Request = ctx.Request;\nexports.Response = ctx.Response;\nmodule.exports = exports;\n}(browserPonyfill, browserPonyfill.exports));\n\nvar fetch = /*@__PURE__*/getDefaultExportFromCjs(browserPonyfill.exports);\n\n/**\n * Returns a verified build from the anchor registry. null if no such\n * verified build exists, e.g., if the program has been upgraded since the\n * last verified build.\n */\nasync function verifiedBuild(connection, programId, limit = 5) {\n const url = `https://api.apr.dev/api/v0/program/${programId.toString()}/latest?limit=${limit}`;\n const [programData, latestBuildsResp] = await Promise.all([\n fetchData(connection, programId),\n fetch(url),\n ]);\n // Filter out all non successful builds.\n const latestBuilds = (await latestBuildsResp.json()).filter((b) => !b.aborted && b.state === \"Built\" && b.verified === \"Verified\");\n if (latestBuilds.length === 0) {\n return null;\n }\n // Get the latest build.\n const build = latestBuilds[0];\n // Has the program been upgraded since the last build?\n if (programData.slot.toNumber() !== build.verified_slot) {\n return null;\n }\n // Success.\n return build;\n}\n/**\n * Returns the program data account for this program, containing the\n * metadata for this program, e.g., the upgrade authority.\n */\nasync function fetchData(connection, programId) {\n const accountInfo = await connection.getAccountInfo(programId);\n if (accountInfo === null) {\n throw new Error(\"program account not found\");\n }\n const { program } = decodeUpgradeableLoaderState(accountInfo.data);\n const programdataAccountInfo = await connection.getAccountInfo(program.programdataAddress);\n if (programdataAccountInfo === null) {\n throw new Error(\"program data account not found\");\n }\n const { programData } = decodeUpgradeableLoaderState(programdataAccountInfo.data);\n return programData;\n}\nconst UPGRADEABLE_LOADER_STATE_LAYOUT = borsh.rustEnum([\n borsh.struct([], \"uninitialized\"),\n borsh.struct([borsh.option(borsh.publicKey(), \"authorityAddress\")], \"buffer\"),\n borsh.struct([borsh.publicKey(\"programdataAddress\")], \"program\"),\n borsh.struct([\n borsh.u64(\"slot\"),\n borsh.option(borsh.publicKey(), \"upgradeAuthorityAddress\"),\n ], \"programData\"),\n], undefined, borsh.u32());\nfunction decodeUpgradeableLoaderState(data) {\n return UPGRADEABLE_LOADER_STATE_LAYOUT.decode(data);\n}\n\nvar registry = /*#__PURE__*/Object.freeze({\n __proto__: null,\n verifiedBuild: verifiedBuild,\n fetchData: fetchData,\n decodeUpgradeableLoaderState: decodeUpgradeableLoaderState\n});\n\nvar index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n sha256: sha256,\n rpc: rpc,\n publicKey: pubkey,\n bytes: index$1,\n token: token,\n features: features,\n registry: registry\n});\n\nfunction isIdlAccounts(accountItem) {\n return \"accounts\" in accountItem;\n}\n// Deterministic IDL address as a function of the program id.\nasync function idlAddress(programId) {\n const base = (await PublicKey.findProgramAddress([], programId))[0];\n return await PublicKey.createWithSeed(base, seed(), programId);\n}\n// Seed for generating the idlAddress.\nfunction seed() {\n return \"anchor:idl\";\n}\nconst IDL_ACCOUNT_LAYOUT = borsh.struct([\n borsh.publicKey(\"authority\"),\n borsh.vecU8(\"data\"),\n]);\nfunction decodeIdlAccount(data) {\n return IDL_ACCOUNT_LAYOUT.decode(data);\n}\n\nfunction splitArgsAndCtx(idlIx, args) {\n var _a, _b;\n let options = {};\n const inputLen = idlIx.args ? idlIx.args.length : 0;\n if (args.length > inputLen) {\n if (args.length !== inputLen + 1) {\n throw new Error(`provided too many arguments ${args} to instruction ${idlIx === null || idlIx === void 0 ? void 0 : idlIx.name} expecting: ${(_b = (_a = idlIx.args) === null || _a === void 0 ? void 0 : _a.map((a) => a.name)) !== null && _b !== void 0 ? _b : []}`);\n }\n options = args.pop();\n }\n return [args, options];\n}\n\nclass InstructionNamespaceFactory {\n static build(idlIx, encodeFn, programId) {\n if (idlIx.name === \"_inner\") {\n throw new IdlError(\"the _inner name is reserved\");\n }\n const ix = (...args) => {\n const [ixArgs, ctx] = splitArgsAndCtx(idlIx, [...args]);\n validateAccounts(idlIx.accounts, ctx.accounts);\n validateInstruction(idlIx, ...args);\n const keys = ix.accounts(ctx.accounts);\n if (ctx.remainingAccounts !== undefined) {\n keys.push(...ctx.remainingAccounts);\n }\n if (isSet(\"debug-logs\")) {\n console.log(\"Outgoing account metas:\", keys);\n }\n return new TransactionInstruction({\n keys,\n programId,\n data: encodeFn(idlIx.name, toInstruction(idlIx, ...ixArgs)),\n });\n };\n // Utility fn for ordering the accounts for this instruction.\n ix[\"accounts\"] = (accs) => {\n return InstructionNamespaceFactory.accountsArray(accs, idlIx.accounts, programId, idlIx.name);\n };\n return ix;\n }\n static accountsArray(ctx, accounts, programId, ixName) {\n if (!ctx) {\n return [];\n }\n return accounts\n .map((acc) => {\n // Nested accounts.\n const nestedAccounts = \"accounts\" in acc ? acc.accounts : undefined;\n if (nestedAccounts !== undefined) {\n const rpcAccs = ctx[acc.name];\n return InstructionNamespaceFactory.accountsArray(rpcAccs, acc.accounts, programId, ixName).flat();\n }\n else {\n const account = acc;\n let pubkey;\n try {\n pubkey = translateAddress(ctx[acc.name]);\n }\n catch (err) {\n throw new Error(`Wrong input type for account \"${acc.name}\" in the instruction accounts object${ixName !== undefined ? ' for instruction \"' + ixName + '\"' : \"\"}. Expected PublicKey or string.`);\n }\n const optional = account.isOptional && pubkey.equals(programId);\n const isWritable = account.isMut && !optional;\n const isSigner = account.isSigner && !optional;\n return {\n pubkey,\n isWritable,\n isSigner,\n };\n }\n })\n .flat();\n }\n}\n// Throws error if any argument required for the `ix` is not given.\nfunction validateInstruction(ix, ...args) {\n // todo\n}\n\nclass TransactionFactory {\n static build(idlIx, ixFn) {\n const txFn = (...args) => {\n var _a, _b, _c;\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n const tx = new Transaction();\n if (ctx.preInstructions && ctx.instructions) {\n throw new Error(\"instructions is deprecated, use preInstructions\");\n }\n (_a = ctx.preInstructions) === null || _a === void 0 ? void 0 : _a.forEach((ix) => tx.add(ix));\n (_b = ctx.instructions) === null || _b === void 0 ? void 0 : _b.forEach((ix) => tx.add(ix));\n tx.add(ixFn(...args));\n (_c = ctx.postInstructions) === null || _c === void 0 ? void 0 : _c.forEach((ix) => tx.add(ix));\n return tx;\n };\n return txFn;\n }\n}\n\nclass RpcFactory {\n static build(idlIx, txFn, idlErrors, provider) {\n const rpc = async (...args) => {\n var _a;\n const tx = txFn(...args);\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n if (provider.sendAndConfirm === undefined) {\n throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");\n }\n try {\n return await provider.sendAndConfirm(tx, (_a = ctx.signers) !== null && _a !== void 0 ? _a : [], ctx.options);\n }\n catch (err) {\n throw translateError(err, idlErrors);\n }\n };\n return rpc;\n }\n}\n\nclass AccountFactory {\n static build(idl, coder, programId, provider) {\n var _a;\n const accountFns = {};\n (_a = idl.accounts) === null || _a === void 0 ? void 0 : _a.forEach((idlAccount) => {\n const name = camelCase(idlAccount.name);\n accountFns[name] = new AccountClient(idl, idlAccount, programId, provider, coder);\n });\n return accountFns;\n }\n}\nclass AccountClient {\n /**\n * Returns the number of bytes in this account.\n */\n get size() {\n return this._size;\n }\n /**\n * Returns the program ID owning all accounts.\n */\n get programId() {\n return this._programId;\n }\n /**\n * Returns the client's wallet and network provider.\n */\n get provider() {\n return this._provider;\n }\n /**\n * Returns the coder.\n */\n get coder() {\n return this._coder;\n }\n /**\n * Returns the idl account.\n */\n get idlAccount() {\n return this._idlAccount;\n }\n constructor(idl, idlAccount, programId, provider, coder) {\n this._idlAccount = idlAccount;\n this._programId = programId;\n this._provider = provider !== null && provider !== void 0 ? provider : getProvider();\n this._coder = coder !== null && coder !== void 0 ? coder : new BorshCoder(idl);\n this._size = this._coder.accounts.size(idlAccount);\n }\n /**\n * Returns a deserialized account, returning null if it doesn't exist.\n *\n * @param address The address of the account to fetch.\n */\n async fetchNullable(address, commitment) {\n const { data } = await this.fetchNullableAndContext(address, commitment);\n return data;\n }\n /**\n * Returns a deserialized account along with the associated rpc response context, returning null if it doesn't exist.\n *\n * @param address The address of the account to fetch.\n */\n async fetchNullableAndContext(address, commitment) {\n const accountInfo = await this.getAccountInfoAndContext(address, commitment);\n const { value, context } = accountInfo;\n return {\n data: value && value.data.length !== 0\n ? this._coder.accounts.decode(this._idlAccount.name, value.data)\n : null,\n context,\n };\n }\n /**\n * Returns a deserialized account.\n *\n * @param address The address of the account to fetch.\n */\n async fetch(address, commitment) {\n const { data } = await this.fetchNullableAndContext(address, commitment);\n if (data === null) {\n throw new Error(`Account does not exist or has no data ${address.toString()}`);\n }\n return data;\n }\n /**\n * Returns a deserialized account along with the associated rpc response context.\n *\n * @param address The address of the account to fetch.\n */\n async fetchAndContext(address, commitment) {\n const { data, context } = await this.fetchNullableAndContext(address, commitment);\n if (data === null) {\n throw new Error(`Account does not exist ${address.toString()}`);\n }\n return { data, context };\n }\n /**\n * Returns multiple deserialized accounts.\n * Accounts not found or with wrong discriminator are returned as null.\n *\n * @param addresses The addresses of the accounts to fetch.\n */\n async fetchMultiple(addresses, commitment) {\n const accounts = await this.fetchMultipleAndContext(addresses, commitment);\n return accounts.map((account) => (account ? account.data : null));\n }\n /**\n * Returns multiple deserialized accounts.\n * Accounts not found or with wrong discriminator are returned as null.\n *\n * @param addresses The addresses of the accounts to fetch.\n */\n async fetchMultipleAndContext(addresses, commitment) {\n const accounts = await getMultipleAccountsAndContext(this._provider.connection, addresses.map((address) => translateAddress(address)), commitment);\n // Decode accounts where discriminator is correct, null otherwise\n return accounts.map((result) => {\n if (result == null) {\n return null;\n }\n const { account, context } = result;\n return {\n data: this._coder.accounts.decode(this._idlAccount.name, account.data),\n context,\n };\n });\n }\n /**\n * Returns all instances of this account type for the program.\n *\n * @param filters User-provided filters to narrow the results from `connection.getProgramAccounts`.\n *\n * When filters are not defined this method returns all\n * the account instances.\n *\n * When filters are of type `Buffer`, the filters are appended\n * after the discriminator.\n *\n * When filters are of type `GetProgramAccountsFilter[]`,\n * filters are appended after the discriminator filter.\n */\n async all(filters) {\n const filter = this.coder.accounts.memcmp(this._idlAccount.name, filters instanceof Buffer ? filters : undefined);\n const coderFilters = [];\n if ((filter === null || filter === void 0 ? void 0 : filter.offset) != undefined && (filter === null || filter === void 0 ? void 0 : filter.bytes) != undefined) {\n coderFilters.push({\n memcmp: { offset: filter.offset, bytes: filter.bytes },\n });\n }\n if ((filter === null || filter === void 0 ? void 0 : filter.dataSize) != undefined) {\n coderFilters.push({ dataSize: filter.dataSize });\n }\n let resp = await this._provider.connection.getProgramAccounts(this._programId, {\n commitment: this._provider.connection.commitment,\n filters: [...coderFilters, ...(Array.isArray(filters) ? filters : [])],\n });\n return resp.map(({ pubkey, account }) => {\n return {\n publicKey: pubkey,\n account: this._coder.accounts.decode(this._idlAccount.name, account.data),\n };\n });\n }\n /**\n * Returns an `EventEmitter` emitting a \"change\" event whenever the account\n * changes.\n */\n subscribe(address, commitment) {\n const sub = subscriptions.get(address.toString());\n if (sub) {\n return sub.ee;\n }\n const ee = new EventEmitter();\n address = translateAddress(address);\n const listener = this._provider.connection.onAccountChange(address, (acc) => {\n const account = this._coder.accounts.decode(this._idlAccount.name, acc.data);\n ee.emit(\"change\", account);\n }, commitment);\n subscriptions.set(address.toString(), {\n ee,\n listener,\n });\n return ee;\n }\n /**\n * Unsubscribes from the account at the given address.\n */\n async unsubscribe(address) {\n let sub = subscriptions.get(address.toString());\n if (!sub) {\n console.warn(\"Address is not subscribed\");\n return;\n }\n if (subscriptions) {\n await this._provider.connection\n .removeAccountChangeListener(sub.listener)\n .then(() => {\n subscriptions.delete(address.toString());\n })\n .catch(console.error);\n }\n }\n /**\n * Returns an instruction for creating this account.\n */\n async createInstruction(signer, sizeOverride) {\n const size = this.size;\n if (this._provider.publicKey === undefined) {\n throw new Error(\"This function requires the Provider interface implementor to have a 'publicKey' field.\");\n }\n return SystemProgram.createAccount({\n fromPubkey: this._provider.publicKey,\n newAccountPubkey: signer.publicKey,\n space: sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size,\n lamports: await this._provider.connection.getMinimumBalanceForRentExemption(sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size),\n programId: this._programId,\n });\n }\n /**\n * @deprecated since version 14.0.\n *\n * Function returning the associated account. Args are keys to associate.\n * Order matters.\n */\n async associated(...args) {\n const addr = await this.associatedAddress(...args);\n return await this.fetch(addr);\n }\n /**\n * @deprecated since version 14.0.\n *\n * Function returning the associated address. Args are keys to associate.\n * Order matters.\n */\n async associatedAddress(...args) {\n return await associated(this._programId, ...args);\n }\n async getAccountInfo(address, commitment) {\n return await this._provider.connection.getAccountInfo(translateAddress(address), commitment);\n }\n async getAccountInfoAndContext(address, commitment) {\n return await this._provider.connection.getAccountInfoAndContext(translateAddress(address), commitment);\n }\n}\n// Tracks all subscriptions.\nconst subscriptions = new Map();\n\nconst PROGRAM_LOG = \"Program log: \";\nconst PROGRAM_DATA = \"Program data: \";\nconst PROGRAM_LOG_START_INDEX = PROGRAM_LOG.length;\nconst PROGRAM_DATA_START_INDEX = PROGRAM_DATA.length;\nclass EventManager {\n constructor(programId, provider, coder) {\n this._programId = programId;\n this._provider = provider;\n this._eventParser = new EventParser(programId, coder);\n this._eventCallbacks = new Map();\n this._eventListeners = new Map();\n this._listenerIdCount = 0;\n }\n addEventListener(eventName, callback) {\n var _a;\n let listener = this._listenerIdCount;\n this._listenerIdCount += 1;\n // Store the listener into the event map.\n if (!this._eventListeners.has(eventName)) {\n this._eventListeners.set(eventName, []);\n }\n this._eventListeners.set(eventName, ((_a = this._eventListeners.get(eventName)) !== null && _a !== void 0 ? _a : []).concat(listener));\n // Store the callback into the listener map.\n this._eventCallbacks.set(listener, [eventName, callback]);\n // Create the subscription singleton, if needed.\n if (this._onLogsSubscriptionId !== undefined) {\n return listener;\n }\n this._onLogsSubscriptionId = this._provider.connection.onLogs(this._programId, (logs, ctx) => {\n if (logs.err) {\n return;\n }\n for (const event of this._eventParser.parseLogs(logs.logs)) {\n const allListeners = this._eventListeners.get(event.name);\n if (allListeners) {\n allListeners.forEach((listener) => {\n const listenerCb = this._eventCallbacks.get(listener);\n if (listenerCb) {\n const [, callback] = listenerCb;\n callback(event.data, ctx.slot, logs.signature);\n }\n });\n }\n }\n });\n return listener;\n }\n async removeEventListener(listener) {\n // Get the callback.\n const callback = this._eventCallbacks.get(listener);\n if (!callback) {\n throw new Error(`Event listener ${listener} doesn't exist!`);\n }\n const [eventName] = callback;\n // Get the listeners.\n let listeners = this._eventListeners.get(eventName);\n if (!listeners) {\n throw new Error(`Event listeners don't exist for ${eventName}!`);\n }\n // Update both maps.\n this._eventCallbacks.delete(listener);\n listeners = listeners.filter((l) => l !== listener);\n this._eventListeners.set(eventName, listeners);\n if (listeners.length === 0) {\n this._eventListeners.delete(eventName);\n }\n // Kill the websocket connection if all listeners have been removed.\n if (this._eventCallbacks.size === 0) {\n if (this._eventListeners.size !== 0) {\n throw new Error(`Expected event listeners size to be 0 but got ${this._eventListeners.size}`);\n }\n if (this._onLogsSubscriptionId !== undefined) {\n await this._provider.connection.removeOnLogsListener(this._onLogsSubscriptionId);\n this._onLogsSubscriptionId = undefined;\n }\n }\n }\n}\nclass EventParser {\n constructor(programId, coder) {\n this.coder = coder;\n this.programId = programId;\n }\n // Each log given, represents an array of messages emitted by\n // a single transaction, which can execute many different programs across\n // CPI boundaries. However, the subscription is only interested in the\n // events emitted by *this* program. In achieving this, we keep track of the\n // program execution context by parsing each log and looking for a CPI\n // `invoke` call. If one exists, we know a new program is executing. So we\n // push the programId onto a stack and switch the program context. This\n // allows us to track, for a given log, which program was executing during\n // its emission, thereby allowing us to know if a given log event was\n // emitted by *this* program. If it was, then we parse the raw string and\n // emit the event if the string matches the event being subscribed to.\n *parseLogs(logs, errorOnDecodeFailure = false) {\n const logScanner = new LogScanner(logs);\n const execution = new ExecutionContext();\n let log = logScanner.next();\n while (log !== null) {\n let [event, newProgram, didPop] = this.handleLog(execution, log, errorOnDecodeFailure);\n if (event) {\n yield event;\n }\n if (newProgram) {\n execution.push(newProgram);\n }\n if (didPop) {\n execution.pop();\n }\n log = logScanner.next();\n }\n }\n // Main log handler. Returns a three element array of the event, the\n // next program that was invoked for CPI, and a boolean indicating if\n // a program has completed execution (and thus should be popped off the\n // execution stack).\n handleLog(execution, log, errorOnDecodeFailure) {\n // Executing program is this program.\n if (execution.stack.length > 0 &&\n execution.program() === this.programId.toString()) {\n return this.handleProgramLog(log, errorOnDecodeFailure);\n }\n // Executing program is not this program.\n else {\n return [null, ...this.handleSystemLog(log)];\n }\n }\n // Handles logs from *this* program.\n handleProgramLog(log, errorOnDecodeFailure) {\n // This is a `msg!` log or a `sol_log_data` log.\n if (log.startsWith(PROGRAM_LOG) || log.startsWith(PROGRAM_DATA)) {\n const logStr = log.startsWith(PROGRAM_LOG)\n ? log.slice(PROGRAM_LOG_START_INDEX)\n : log.slice(PROGRAM_DATA_START_INDEX);\n const event = this.coder.events.decode(logStr);\n if (errorOnDecodeFailure && event === null) {\n throw new Error(`Unable to decode event ${logStr}`);\n }\n return [event, null, false];\n }\n // System log.\n else {\n return [null, ...this.handleSystemLog(log)];\n }\n }\n // Handles logs when the current program being executing is *not* this.\n handleSystemLog(log) {\n // System component.\n const logStart = log.split(\":\")[0];\n // Did the program finish executing?\n if (logStart.match(/^Program (.*) success/g) !== null) {\n return [null, true];\n // Recursive call.\n }\n else if (logStart.startsWith(`Program ${this.programId.toString()} invoke`)) {\n return [this.programId.toString(), false];\n }\n // CPI call.\n else if (logStart.includes(\"invoke\")) {\n return [\"cpi\", false]; // Any string will do.\n }\n else {\n return [null, false];\n }\n }\n}\n// Stack frame execution context, allowing one to track what program is\n// executing for a given log.\nclass ExecutionContext {\n constructor() {\n this.stack = [];\n }\n program() {\n if (!this.stack.length) {\n throw new Error(\"Expected the stack to have elements\");\n }\n return this.stack[this.stack.length - 1];\n }\n push(newProgram) {\n this.stack.push(newProgram);\n }\n pop() {\n if (!this.stack.length) {\n throw new Error(\"Expected the stack to have elements\");\n }\n this.stack.pop();\n }\n}\nclass LogScanner {\n constructor(logs) {\n this.logs = logs;\n }\n next() {\n if (this.logs.length === 0) {\n return null;\n }\n let l = this.logs[0];\n this.logs = this.logs.slice(1);\n return l;\n }\n}\n\nclass SimulateFactory {\n static build(idlIx, txFn, idlErrors, provider, coder, programId, idl) {\n const simulate = async (...args) => {\n var _a;\n const tx = txFn(...args);\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n let resp = undefined;\n if (provider.simulate === undefined) {\n throw new Error(\"This function requires 'Provider.simulate' to be implemented.\");\n }\n try {\n resp = await provider.simulate(tx, ctx.signers, (_a = ctx.options) === null || _a === void 0 ? void 0 : _a.commitment);\n }\n catch (err) {\n throw translateError(err, idlErrors);\n }\n if (resp === undefined) {\n throw new Error(\"Unable to simulate transaction\");\n }\n const logs = resp.logs;\n if (!logs) {\n throw new Error(\"Simulated logs not found\");\n }\n const events = [];\n if (idl.events) {\n let parser = new EventParser(programId, coder);\n for (const event of parser.parseLogs(logs)) {\n events.push(event);\n }\n }\n return { events, raw: logs };\n };\n return simulate;\n }\n}\n\nfunction uint64(property) {\n return new WrappedLayout(blob(8), (b) => u64.fromBuffer(b), (n) => n.toBuffer(), property);\n}\nfunction publicKey(property) {\n return new WrappedLayout(blob(32), (b) => new PublicKey(b), (key) => key.toBuffer(), property);\n}\nfunction coption(layout, property) {\n return new COptionLayout(layout, property);\n}\nclass WrappedLayout extends Layout_2 {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nclass COptionLayout extends Layout_2 {\n constructor(layout, property) {\n super(-1, property);\n this.layout = layout;\n this.discriminator = u32();\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.layout.span + this.discriminator.encode(0, b, offset);\n }\n this.discriminator.encode(1, b, offset);\n return this.layout.encode(src, b, offset + 4) + 4;\n }\n decode(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return null;\n }\n else if (discriminator === 1) {\n return this.layout.decode(b, offset + 4);\n }\n throw new Error(\"Invalid coption \" + this.layout.property);\n }\n getSpan(b, offset = 0) {\n return this.layout.getSpan(b, offset + 4) + 4;\n }\n}\nclass u64 extends BN {\n /**\n * Convert to Buffer representation\n */\n toBuffer() {\n const a = super.toArray().reverse();\n const b = Buffer.from(a);\n if (b.length === 8) {\n return b;\n }\n if (b.length >= 8) {\n throw new Error(\"u64 too large\");\n }\n const zeroPad = Buffer.alloc(8);\n b.copy(zeroPad);\n return zeroPad;\n }\n /**\n * Construct a u64 from Buffer representation\n */\n static fromBuffer(buffer) {\n if (buffer.length !== 8) {\n throw new Error(`Invalid buffer length: ${buffer.length}`);\n }\n return new u64([...buffer]\n .reverse()\n .map((i) => `00${i.toString(16)}`.slice(-2))\n .join(\"\"), 16);\n }\n}\nconst TOKEN_ACCOUNT_LAYOUT = struct([\n publicKey(\"mint\"),\n publicKey(\"owner\"),\n uint64(\"amount\"),\n coption(publicKey(), \"delegate\"),\n ((p) => {\n const U = union(u8(\"discriminator\"), null, p);\n U.addVariant(0, struct([]), \"uninitialized\");\n U.addVariant(1, struct([]), \"initialized\");\n U.addVariant(2, struct([]), \"frozen\");\n return U;\n })(\"state\"),\n coption(uint64(), \"isNative\"),\n uint64(\"delegatedAmount\"),\n coption(publicKey(), \"closeAuthority\"),\n]);\nfunction decodeTokenAccount(b) {\n return TOKEN_ACCOUNT_LAYOUT.decode(b);\n}\n\n// Populates a given accounts context with PDAs and common missing accounts.\nclass AccountsResolver {\n constructor(_args, _accounts, _provider, _programId, _idlIx, _accountNamespace, _idlTypes, _customResolver) {\n this._accounts = _accounts;\n this._provider = _provider;\n this._programId = _programId;\n this._idlIx = _idlIx;\n this._idlTypes = _idlTypes;\n this._customResolver = _customResolver;\n this._args = _args;\n this._accountStore = new AccountStore(_provider, _accountNamespace, this._programId);\n }\n args(_args) {\n this._args = _args;\n }\n // Note: We serially resolve PDAs one by one rather than doing them\n // in parallel because there can be dependencies between\n // addresses. That is, one PDA can be used as a seed in another.\n async resolve() {\n await this.resolveConst(this._idlIx.accounts);\n this._resolveEventCpi(this._idlIx.accounts);\n // Auto populate pdas and relations until we stop finding new accounts\n while ((await this.resolvePdas(this._idlIx.accounts)) +\n (await this.resolveRelations(this._idlIx.accounts)) +\n (await this.resolveCustom()) >\n 0) { }\n }\n async resolveCustom() {\n if (this._customResolver) {\n const { accounts, resolved } = await this._customResolver({\n args: this._args,\n accounts: this._accounts,\n provider: this._provider,\n programId: this._programId,\n idlIx: this._idlIx,\n });\n this._accounts = accounts;\n return resolved;\n }\n return 0;\n }\n resolveOptionalsHelper(partialAccounts, accountItems) {\n const nestedAccountsGeneric = {};\n // Looping through accountItem array instead of on partialAccounts, so\n // we only traverse array once\n for (const accountItem of accountItems) {\n const accountName = accountItem.name;\n const partialAccount = partialAccounts[accountName];\n // Skip if the account isn't included (thus would be undefined)\n if (partialAccount === undefined)\n continue;\n if (isPartialAccounts(partialAccount)) {\n // is compound accounts, recurse one level deeper\n if (isIdlAccounts(accountItem)) {\n nestedAccountsGeneric[accountName] = this.resolveOptionalsHelper(partialAccount, accountItem[\"accounts\"]);\n }\n else {\n // Here we try our best to recover gracefully. If there are optionals we can't check, we will fail then.\n nestedAccountsGeneric[accountName] = flattenPartialAccounts(partialAccount, true);\n }\n }\n else {\n // if not compound accounts, do null/optional check and proceed\n if (partialAccount !== null) {\n nestedAccountsGeneric[accountName] = translateAddress(partialAccount);\n }\n else if (accountItem[\"isOptional\"]) {\n nestedAccountsGeneric[accountName] = this._programId;\n }\n }\n }\n return nestedAccountsGeneric;\n }\n resolveOptionals(accounts) {\n Object.assign(this._accounts, this.resolveOptionalsHelper(accounts, this._idlIx.accounts));\n }\n get(path) {\n // Only return if pubkey\n const ret = path.reduce((acc, subPath) => acc && acc[subPath], this._accounts);\n if (ret && ret.toBase58) {\n return ret;\n }\n }\n set(path, value) {\n let curr = this._accounts;\n path.forEach((p, idx) => {\n const isLast = idx == path.length - 1;\n if (isLast) {\n curr[p] = value;\n }\n curr[p] = curr[p] || {};\n curr = curr[p];\n });\n }\n async resolveConst(accounts, path = []) {\n for (let k = 0; k < accounts.length; k += 1) {\n const accountDescOrAccounts = accounts[k];\n const subAccounts = accountDescOrAccounts.accounts;\n if (subAccounts) {\n await this.resolveConst(subAccounts, [\n ...path,\n camelCase(accountDescOrAccounts.name),\n ]);\n }\n const accountDesc = accountDescOrAccounts;\n const accountDescName = camelCase(accountDescOrAccounts.name);\n // Signers default to the provider.\n if (accountDesc.isSigner && !this.get([...path, accountDescName])) {\n // @ts-expect-error\n if (this._provider.wallet === undefined) {\n throw new Error(\"This function requires the Provider interface implementor to have a 'wallet' field.\");\n }\n // @ts-expect-error\n this.set([...path, accountDescName], this._provider.wallet.publicKey);\n }\n // Common accounts are auto populated with magic names by convention.\n if (Reflect.has(AccountsResolver.CONST_ACCOUNTS, accountDescName) &&\n !this.get([...path, accountDescName])) {\n this.set([...path, accountDescName], AccountsResolver.CONST_ACCOUNTS[accountDescName]);\n }\n }\n }\n /**\n * Resolve event CPI accounts `eventAuthority` and `program`.\n *\n * Accounts will only be resolved if they are declared next to each other to\n * reduce the chance of name collision.\n */\n _resolveEventCpi(accounts, path = []) {\n for (const i in accounts) {\n const accountDescOrAccounts = accounts[i];\n const subAccounts = accountDescOrAccounts.accounts;\n if (subAccounts) {\n this._resolveEventCpi(subAccounts, [\n ...path,\n camelCase(accountDescOrAccounts.name),\n ]);\n }\n // Validate next index exists\n const nextIndex = +i + 1;\n if (nextIndex === accounts.length)\n return;\n const currentName = camelCase(accounts[i].name);\n const nextName = camelCase(accounts[nextIndex].name);\n // Populate event CPI accounts if they exist\n if (currentName === \"eventAuthority\" && nextName === \"program\") {\n const currentPath = [...path, currentName];\n const nextPath = [...path, nextName];\n if (!this.get(currentPath)) {\n this.set(currentPath, PublicKey.findProgramAddressSync([Buffer.from(\"__event_authority\")], this._programId)[0]);\n }\n if (!this.get(nextPath)) {\n this.set(nextPath, this._programId);\n }\n return;\n }\n }\n }\n async resolvePdas(accounts, path = []) {\n let found = 0;\n for (let k = 0; k < accounts.length; k += 1) {\n const accountDesc = accounts[k];\n const subAccounts = accountDesc.accounts;\n if (subAccounts) {\n found += await this.resolvePdas(subAccounts, [\n ...path,\n camelCase(accountDesc.name),\n ]);\n }\n const accountDescCasted = accountDesc;\n const accountDescName = camelCase(accountDesc.name);\n // PDA derived from IDL seeds.\n if (accountDescCasted.pda &&\n accountDescCasted.pda.seeds.length > 0 &&\n !this.get([...path, accountDescName])) {\n if (Boolean(await this.autoPopulatePda(accountDescCasted, path))) {\n found += 1;\n }\n }\n }\n return found;\n }\n async resolveRelations(accounts, path = []) {\n let found = 0;\n for (let k = 0; k < accounts.length; k += 1) {\n const accountDesc = accounts[k];\n const subAccounts = accountDesc.accounts;\n if (subAccounts) {\n found += await this.resolveRelations(subAccounts, [\n ...path,\n camelCase(accountDesc.name),\n ]);\n }\n const relations = accountDesc.relations || [];\n const accountDescName = camelCase(accountDesc.name);\n const newPath = [...path, accountDescName];\n // If we have this account and there's some missing accounts that are relations to this account, fetch them\n const accountKey = this.get(newPath);\n if (accountKey) {\n const matching = relations.filter((rel) => !this.get([...path, camelCase(rel)]));\n found += matching.length;\n if (matching.length > 0) {\n const account = await this._accountStore.fetchAccount({\n publicKey: accountKey,\n });\n await Promise.all(matching.map(async (rel) => {\n const relName = camelCase(rel);\n this.set([...path, relName], account[relName]);\n return account[relName];\n }));\n }\n }\n }\n return found;\n }\n async autoPopulatePda(accountDesc, path = []) {\n if (!accountDesc.pda || !accountDesc.pda.seeds)\n throw new Error(\"Must have seeds\");\n const seeds = await Promise.all(accountDesc.pda.seeds.map((seedDesc) => this.toBuffer(seedDesc, path)));\n if (seeds.some((seed) => typeof seed == \"undefined\")) {\n return;\n }\n const programId = await this.parseProgramId(accountDesc, path);\n if (!programId) {\n return;\n }\n const [pubkey] = await PublicKey.findProgramAddress(seeds, programId);\n this.set([...path, camelCase(accountDesc.name)], pubkey);\n }\n async parseProgramId(accountDesc, path = []) {\n var _a;\n if (!((_a = accountDesc.pda) === null || _a === void 0 ? void 0 : _a.programId)) {\n return this._programId;\n }\n switch (accountDesc.pda.programId.kind) {\n case \"const\":\n return new PublicKey(this.toBufferConst(accountDesc.pda.programId.value));\n case \"arg\":\n return this.argValue(accountDesc.pda.programId);\n case \"account\":\n return await this.accountValue(accountDesc.pda.programId, path);\n default:\n throw new Error(`Unexpected program seed kind: ${accountDesc.pda.programId.kind}`);\n }\n }\n async toBuffer(seedDesc, path = []) {\n switch (seedDesc.kind) {\n case \"const\":\n return this.toBufferConst(seedDesc);\n case \"arg\":\n return await this.toBufferArg(seedDesc);\n case \"account\":\n return await this.toBufferAccount(seedDesc, path);\n default:\n throw new Error(`Unexpected seed kind: ${seedDesc.kind}`);\n }\n }\n /**\n * Recursively get the type at some path of either a primitive or a user defined struct.\n */\n getType(type, path = []) {\n if (path.length > 0 && type.defined) {\n const subType = this._idlTypes.find((t) => t.name === type.defined);\n if (!subType) {\n throw new Error(`Cannot find type ${type.defined}`);\n }\n const structType = subType.type; // enum not supported yet\n const field = structType.fields.find((field) => field.name === path[0]);\n return this.getType(field.type, path.slice(1));\n }\n return type;\n }\n toBufferConst(seedDesc) {\n return this.toBufferValue(this.getType(seedDesc.type, (seedDesc.path || \"\").split(\".\").slice(1)), seedDesc.value);\n }\n async toBufferArg(seedDesc) {\n const argValue = this.argValue(seedDesc);\n if (typeof argValue === \"undefined\") {\n return;\n }\n return this.toBufferValue(this.getType(seedDesc.type, (seedDesc.path || \"\").split(\".\").slice(1)), argValue);\n }\n argValue(seedDesc) {\n const split = seedDesc.path.split(\".\");\n const seedArgName = camelCase(split[0]);\n const idlArgPosition = this._idlIx.args.findIndex((argDesc) => argDesc.name === seedArgName);\n if (idlArgPosition === -1) {\n throw new Error(`Unable to find argument for seed: ${seedArgName}`);\n }\n return split\n .slice(1)\n .reduce((curr, path) => (curr || {})[path], this._args[idlArgPosition]);\n }\n async toBufferAccount(seedDesc, path = []) {\n const accountValue = await this.accountValue(seedDesc, path);\n if (!accountValue) {\n return;\n }\n return this.toBufferValue(seedDesc.type, accountValue);\n }\n async accountValue(seedDesc, path = []) {\n const pathComponents = seedDesc.path.split(\".\");\n const fieldName = pathComponents[0];\n const fieldPubkey = this.get([...path, camelCase(fieldName)]);\n if (fieldPubkey === null) {\n throw new Error(`fieldPubkey is null`);\n }\n // The seed is a pubkey of the account.\n if (pathComponents.length === 1) {\n return fieldPubkey;\n }\n // The key is account data.\n //\n // Fetch and deserialize it.\n const account = await this._accountStore.fetchAccount({\n publicKey: fieldPubkey,\n name: seedDesc.account,\n });\n // Dereference all fields in the path to get the field value\n // used in the seed.\n const fieldValue = this.parseAccountValue(account, pathComponents.slice(1));\n return fieldValue;\n }\n parseAccountValue(account, path) {\n let accountField;\n while (path.length > 0) {\n accountField = account[camelCase(path[0])];\n path = path.slice(1);\n }\n return accountField;\n }\n // Converts the given idl valaue into a Buffer. The values here must be\n // primitives. E.g. no structs.\n //\n // TODO: add more types here as needed.\n toBufferValue(type, value) {\n switch (type) {\n case \"u8\":\n return Buffer.from([value]);\n case \"u16\":\n let b = Buffer.alloc(2);\n b.writeUInt16LE(value);\n return b;\n case \"u32\":\n let buf = Buffer.alloc(4);\n buf.writeUInt32LE(value);\n return buf;\n case \"u64\":\n let bU64 = Buffer.alloc(8);\n bU64.writeBigUInt64LE(BigInt(value));\n return bU64;\n case \"string\":\n return Buffer.from(encode$2(value));\n case \"publicKey\":\n return value.toBuffer();\n default:\n if (type.array) {\n return Buffer.from(value);\n }\n throw new Error(`Unexpected seed type: ${type}`);\n }\n }\n}\nAccountsResolver.CONST_ACCOUNTS = {\n associatedTokenProgram: ASSOCIATED_PROGRAM_ID,\n rent: SYSVAR_RENT_PUBKEY,\n systemProgram: SystemProgram.programId,\n tokenProgram: TOKEN_PROGRAM_ID,\n clock: SYSVAR_CLOCK_PUBKEY,\n};\n// TODO: this should be configureable to avoid unnecessary requests.\nclass AccountStore {\n // todo: don't use the progrma use the account namespace.\n constructor(_provider, _accounts, _programId) {\n this._provider = _provider;\n this._programId = _programId;\n this._cache = new Map();\n this._idls = {};\n this._idls[_programId.toBase58()] = _accounts;\n }\n async ensureIdl(programId) {\n if (!this._idls[programId.toBase58()]) {\n const idl = await Program.fetchIdl(programId, this._provider);\n if (idl) {\n const program = new Program(idl, programId, this._provider);\n this._idls[programId.toBase58()] = program.account;\n }\n }\n return this._idls[programId.toBase58()];\n }\n async fetchAccount({ publicKey, name, programId = this._programId, }) {\n const address = publicKey.toString();\n if (!this._cache.has(address)) {\n if (name === \"TokenAccount\") {\n const accountInfo = await this._provider.connection.getAccountInfo(publicKey);\n if (accountInfo === null) {\n throw new Error(`invalid account info for ${address}`);\n }\n const data = decodeTokenAccount(accountInfo.data);\n this._cache.set(address, data);\n }\n else if (name) {\n const accounts = await this.ensureIdl(programId);\n if (accounts) {\n const accountFetcher = accounts[camelCase(name)];\n if (accountFetcher) {\n const account = await accountFetcher.fetch(publicKey);\n this._cache.set(address, account);\n }\n }\n }\n else {\n const account = await this._provider.connection.getAccountInfo(publicKey);\n if (account === null) {\n throw new Error(`invalid account info for ${address}`);\n }\n const data = account.data;\n const accounts = await this.ensureIdl(account.owner);\n if (accounts) {\n const firstAccountLayout = Object.values(accounts)[0];\n if (!firstAccountLayout) {\n throw new Error(\"No accounts for this program\");\n }\n const result = firstAccountLayout.coder.accounts.decodeAny(data);\n this._cache.set(address, result);\n }\n }\n }\n return this._cache.get(address);\n }\n}\n\nclass MethodsBuilderFactory {\n static build(provider, programId, idlIx, ixFn, txFn, rpcFn, simulateFn, viewFn, accountNamespace, idlTypes, customResolver) {\n return (...args) => new MethodsBuilder(args, ixFn, txFn, rpcFn, simulateFn, viewFn, provider, programId, idlIx, accountNamespace, idlTypes, customResolver);\n }\n}\nfunction isPartialAccounts(partialAccount) {\n return (typeof partialAccount === \"object\" &&\n partialAccount !== null &&\n !(\"_bn\" in partialAccount) // Ensures not a pubkey\n );\n}\nfunction flattenPartialAccounts(partialAccounts, throwOnNull) {\n const toReturn = {};\n for (const accountName in partialAccounts) {\n const account = partialAccounts[accountName];\n if (account === null) {\n if (throwOnNull)\n throw new Error(\"Failed to resolve optionals due to IDL type mismatch with input accounts!\");\n continue;\n }\n toReturn[accountName] = isPartialAccounts(account)\n ? flattenPartialAccounts(account, true)\n : translateAddress(account);\n }\n return toReturn;\n}\nclass MethodsBuilder {\n constructor(_args, _ixFn, _txFn, _rpcFn, _simulateFn, _viewFn, _provider, _programId, _idlIx, _accountNamespace, _idlTypes, _customResolver) {\n this._ixFn = _ixFn;\n this._txFn = _txFn;\n this._rpcFn = _rpcFn;\n this._simulateFn = _simulateFn;\n this._viewFn = _viewFn;\n this._programId = _programId;\n this._accounts = {};\n this._remainingAccounts = [];\n this._signers = [];\n this._preInstructions = [];\n this._postInstructions = [];\n this._autoResolveAccounts = true;\n this._args = _args;\n this._accountsResolver = new AccountsResolver(_args, this._accounts, _provider, _programId, _idlIx, _accountNamespace, _idlTypes, _customResolver);\n }\n args(_args) {\n this._args = _args;\n this._accountsResolver.args(_args);\n }\n async pubkeys() {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n return this._accounts;\n }\n accounts(accounts) {\n this._autoResolveAccounts = true;\n this._accountsResolver.resolveOptionals(accounts);\n return this;\n }\n accountsStrict(accounts) {\n this._autoResolveAccounts = false;\n this._accountsResolver.resolveOptionals(accounts);\n return this;\n }\n signers(signers) {\n this._signers = this._signers.concat(signers);\n return this;\n }\n remainingAccounts(accounts) {\n this._remainingAccounts = this._remainingAccounts.concat(accounts);\n return this;\n }\n preInstructions(ixs) {\n this._preInstructions = this._preInstructions.concat(ixs);\n return this;\n }\n postInstructions(ixs) {\n this._postInstructions = this._postInstructions.concat(ixs);\n return this;\n }\n async rpc(options) {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._rpcFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options: options,\n });\n }\n async rpcAndKeys(options) {\n const pubkeys = await this.pubkeys();\n return {\n pubkeys,\n signature: await this.rpc(options),\n };\n }\n async view(options) {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n if (!this._viewFn) {\n throw new Error(\"Method does not support views\");\n }\n // @ts-ignore\n return this._viewFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options: options,\n });\n }\n async simulate(options) {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._simulateFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options: options,\n });\n }\n async instruction() {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._ixFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n });\n }\n /**\n * Convenient shortcut to get instructions and pubkeys via\n * const { pubkeys, instructions } = await prepare();\n */\n async prepare() {\n return {\n instruction: await this.instruction(),\n pubkeys: await this.pubkeys(),\n signers: await this._signers,\n };\n }\n async transaction() {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._txFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n });\n }\n}\n\nclass ViewFactory {\n static build(programId, idlIx, simulateFn, idl) {\n const isMut = idlIx.accounts.find((a) => a.isMut);\n const hasReturn = !!idlIx.returns;\n if (isMut || !hasReturn)\n return;\n const view = async (...args) => {\n var _a, _b;\n let simulationResult = await simulateFn(...args);\n const returnPrefix = `Program return: ${programId} `;\n let returnLog = simulationResult.raw.find((l) => l.startsWith(returnPrefix));\n if (!returnLog) {\n throw new Error(\"View expected return log\");\n }\n let returnData = decode(returnLog.slice(returnPrefix.length));\n let returnType = idlIx.returns;\n if (!returnType) {\n throw new Error(\"View expected return type\");\n }\n const coder = IdlCoder.fieldLayout({ type: returnType }, Array.from([...((_a = idl.accounts) !== null && _a !== void 0 ? _a : []), ...((_b = idl.types) !== null && _b !== void 0 ? _b : [])]));\n return coder.decode(returnData);\n };\n return view;\n }\n}\n\nclass NamespaceFactory {\n /**\n * Generates all namespaces for a given program.\n */\n static build(idl, coder, programId, provider, getCustomResolver) {\n const rpc = {};\n const instruction = {};\n const transaction = {};\n const simulate = {};\n const methods = {};\n const view = {};\n const idlErrors = parseIdlErrors(idl);\n const account = idl.accounts\n ? AccountFactory.build(idl, coder, programId, provider)\n : {};\n idl.instructions.forEach((idlIx) => {\n const ixItem = InstructionNamespaceFactory.build(idlIx, (ixName, ix) => coder.instruction.encode(ixName, ix), programId);\n const txItem = TransactionFactory.build(idlIx, ixItem);\n const rpcItem = RpcFactory.build(idlIx, txItem, idlErrors, provider);\n const simulateItem = SimulateFactory.build(idlIx, txItem, idlErrors, provider, coder, programId, idl);\n const viewItem = ViewFactory.build(programId, idlIx, simulateItem, idl);\n const methodItem = MethodsBuilderFactory.build(provider, programId, idlIx, ixItem, txItem, rpcItem, simulateItem, viewItem, account, idl.types || [], getCustomResolver && getCustomResolver(idlIx));\n const name = camelCase(idlIx.name);\n instruction[name] = ixItem;\n transaction[name] = txItem;\n rpc[name] = rpcItem;\n simulate[name] = simulateItem;\n methods[name] = methodItem;\n if (viewItem) {\n view[name] = viewItem;\n }\n });\n return [\n rpc,\n instruction,\n transaction,\n account,\n simulate,\n methods,\n view,\n ];\n }\n}\n\n/**\n * ## Program\n *\n * Program provides the IDL deserialized client representation of an Anchor\n * program.\n *\n * This API is the one stop shop for all things related to communicating with\n * on-chain programs. Among other things, one can send transactions, fetch\n * deserialized accounts, decode instruction data, subscribe to account\n * changes, and listen to events.\n *\n * In addition to field accessors and methods, the object provides a set of\n * dynamically generated properties, also known as namespaces, that\n * map one-to-one to program methods and accounts. These namespaces generally\n * can be used as follows:\n *\n * ## Usage\n *\n * ```javascript\n * program..\n * ```\n *\n * API specifics are namespace dependent. The examples used in the documentation\n * below will refer to the two counter examples found\n * [here](https://github.com/coral-xyz/anchor#examples).\n */\nclass Program {\n /**\n * Address of the program.\n */\n get programId() {\n return this._programId;\n }\n /**\n * IDL defining the program's interface.\n */\n get idl() {\n return this._idl;\n }\n /**\n * Coder for serializing requests.\n */\n get coder() {\n return this._coder;\n }\n /**\n * Wallet and network provider.\n */\n get provider() {\n return this._provider;\n }\n /**\n * @param idl The interface definition.\n * @param programId The on-chain address of the program.\n * @param provider The network and wallet context to use. If not provided\n * then uses [[getProvider]].\n * @param getCustomResolver A function that returns a custom account resolver\n * for the given instruction. This is useful for resolving\n * public keys of missing accounts when building instructions\n */\n constructor(idl, programId, provider, coder, getCustomResolver) {\n programId = translateAddress(programId);\n if (!provider) {\n provider = getProvider();\n }\n // Fields.\n this._idl = idl;\n this._provider = provider;\n this._programId = programId;\n this._coder = coder !== null && coder !== void 0 ? coder : new BorshCoder(idl);\n this._events = new EventManager(this._programId, provider, this._coder);\n // Dynamic namespaces.\n const [rpc, instruction, transaction, account, simulate, methods, views] = NamespaceFactory.build(idl, this._coder, programId, provider, getCustomResolver !== null && getCustomResolver !== void 0 ? getCustomResolver : (() => undefined));\n this.rpc = rpc;\n this.instruction = instruction;\n this.transaction = transaction;\n this.account = account;\n this.simulate = simulate;\n this.methods = methods;\n this.views = views;\n }\n /**\n * Generates a Program client by fetching the IDL from the network.\n *\n * In order to use this method, an IDL must have been previously initialized\n * via the anchor CLI's `anchor idl init` command.\n *\n * @param programId The on-chain address of the program.\n * @param provider The network and wallet context.\n */\n static async at(address, provider) {\n const programId = translateAddress(address);\n const idl = await Program.fetchIdl(programId, provider);\n if (!idl) {\n throw new Error(`IDL not found for program: ${address.toString()}`);\n }\n return new Program(idl, programId, provider);\n }\n /**\n * Fetches an idl from the blockchain.\n *\n * In order to use this method, an IDL must have been previously initialized\n * via the anchor CLI's `anchor idl init` command.\n *\n * @param programId The on-chain address of the program.\n * @param provider The network and wallet context.\n */\n static async fetchIdl(address, provider) {\n provider = provider !== null && provider !== void 0 ? provider : getProvider();\n const programId = translateAddress(address);\n const idlAddr = await idlAddress(programId);\n const accountInfo = await provider.connection.getAccountInfo(idlAddr);\n if (!accountInfo) {\n return null;\n }\n // Chop off account discriminator.\n let idlAccount = decodeIdlAccount(accountInfo.data.slice(8));\n const inflatedIdl = inflate(idlAccount.data);\n return JSON.parse(decode$2(inflatedIdl));\n }\n /**\n * Invokes the given callback every time the given event is emitted.\n *\n * @param eventName The PascalCase name of the event, provided by the IDL.\n * @param callback The function to invoke whenever the event is emitted from\n * program logs.\n */\n addEventListener(eventName, callback) {\n return this._events.addEventListener(eventName, callback);\n }\n /**\n * Unsubscribes from the given eventName.\n */\n async removeEventListener(listener) {\n return await this._events.removeEventListener(listener);\n }\n}\n\nconst SYSTEM_PROGRAM_ID = new PublicKey(\"11111111111111111111111111111111\");\nfunction program(provider) {\n return new Program(IDL, SYSTEM_PROGRAM_ID, provider, coder());\n}\nfunction coder() {\n return new SystemCoder(IDL);\n}\nconst IDL = {\n version: \"0.1.0\",\n name: \"system_program\",\n instructions: [\n {\n name: \"createAccount\",\n accounts: [\n {\n name: \"from\",\n isMut: true,\n isSigner: true,\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"assign\",\n accounts: [\n {\n name: \"pubkey\",\n isMut: true,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"transfer\",\n accounts: [\n {\n name: \"from\",\n isMut: true,\n isSigner: true,\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: false,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n ],\n },\n {\n name: \"createAccountWithSeed\",\n accounts: [\n {\n name: \"from\",\n isMut: true,\n isSigner: true,\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"base\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"publicKey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"advanceNonceAccount\",\n accounts: [\n {\n name: \"nonce\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"recentBlockhashes\",\n isMut: false,\n isSigner: false,\n },\n {\n name: \"authorized\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"withdrawNonceAccount\",\n accounts: [\n {\n name: \"nonce\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"recentBlockhashes\",\n isMut: false,\n isSigner: false,\n },\n {\n name: \"rent\",\n isMut: false,\n isSigner: false,\n },\n {\n name: \"authorized\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n ],\n },\n {\n name: \"initializeNonceAccount\",\n accounts: [\n {\n name: \"nonce\",\n isMut: true,\n isSigner: true,\n },\n {\n name: \"recentBlockhashes\",\n isMut: false,\n isSigner: false,\n },\n {\n name: \"rent\",\n isMut: false,\n isSigner: false,\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"authorizeNonceAccount\",\n accounts: [\n {\n name: \"nonce\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"authorized\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"allocate\",\n accounts: [\n {\n name: \"pubkey\",\n isMut: true,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"space\",\n type: \"u64\",\n },\n ],\n },\n {\n name: \"allocateWithSeed\",\n accounts: [\n {\n name: \"account\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"base\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"publicKey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"assignWithSeed\",\n accounts: [\n {\n name: \"account\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"base\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"publicKey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"transferWithSeed\",\n accounts: [\n {\n name: \"from\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"base\",\n isMut: false,\n isSigner: true,\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: false,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n ],\n accounts: [\n {\n name: \"nonce\",\n type: {\n kind: \"struct\",\n fields: [\n {\n name: \"version\",\n type: \"u32\",\n },\n {\n name: \"state\",\n type: \"u32\",\n },\n {\n name: \"authorizedPubkey\",\n type: \"publicKey\",\n },\n {\n name: \"nonce\",\n type: \"publicKey\",\n },\n {\n name: \"feeCalculator\",\n type: {\n defined: \"FeeCalculator\",\n },\n },\n ],\n },\n },\n ],\n types: [\n {\n name: \"FeeCalculator\",\n type: {\n kind: \"struct\",\n fields: [\n {\n name: \"lamportsPerSignature\",\n type: \"u64\",\n },\n ],\n },\n },\n ],\n};\n\nclass Native {\n static system(provider) {\n return program(provider);\n }\n}\n\nexport { AccountClient, AnchorError, AnchorProvider, BorshAccountsCoder, BorshCoder, BorshEventCoder, BorshInstructionCoder, DISCRIMINATOR_SIZE, EventManager, EventParser, IdlError, LangErrorCode, LangErrorMessage, MethodsBuilderFactory, Native, Program, ProgramError, ProgramErrorStack, SystemCoder, eventDiscriminator, getProvider, parseIdlErrors, setProvider, splitArgsAndCtx, toInstruction, translateAddress, translateError, index as utils, validateAccounts };\n//# sourceMappingURL=index.js.map\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.map = exports.array = exports.rustEnum = exports.str = exports.vecU8 = exports.tagged = exports.vec = exports.bool = exports.option = exports.publicKey = exports.i256 = exports.u256 = exports.i128 = exports.u128 = exports.i64 = exports.u64 = exports.struct = exports.f64 = exports.f32 = exports.i32 = exports.u32 = exports.i16 = exports.u16 = exports.i8 = exports.u8 = void 0;\nconst buffer_layout_1 = require(\"buffer-layout\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nvar buffer_layout_2 = require(\"buffer-layout\");\nObject.defineProperty(exports, \"u8\", { enumerable: true, get: function () { return buffer_layout_2.u8; } });\nObject.defineProperty(exports, \"i8\", { enumerable: true, get: function () { return buffer_layout_2.s8; } });\nObject.defineProperty(exports, \"u16\", { enumerable: true, get: function () { return buffer_layout_2.u16; } });\nObject.defineProperty(exports, \"i16\", { enumerable: true, get: function () { return buffer_layout_2.s16; } });\nObject.defineProperty(exports, \"u32\", { enumerable: true, get: function () { return buffer_layout_2.u32; } });\nObject.defineProperty(exports, \"i32\", { enumerable: true, get: function () { return buffer_layout_2.s32; } });\nObject.defineProperty(exports, \"f32\", { enumerable: true, get: function () { return buffer_layout_2.f32; } });\nObject.defineProperty(exports, \"f64\", { enumerable: true, get: function () { return buffer_layout_2.f64; } });\nObject.defineProperty(exports, \"struct\", { enumerable: true, get: function () { return buffer_layout_2.struct; } });\nclass BNLayout extends buffer_layout_1.Layout {\n constructor(span, signed, property) {\n super(span, property);\n this.blob = (0, buffer_layout_1.blob)(span);\n this.signed = signed;\n }\n decode(b, offset = 0) {\n const num = new bn_js_1.default(this.blob.decode(b, offset), 10, \"le\");\n if (this.signed) {\n return num.fromTwos(this.span * 8).clone();\n }\n return num;\n }\n encode(src, b, offset = 0) {\n if (this.signed) {\n src = src.toTwos(this.span * 8);\n }\n return this.blob.encode(src.toArrayLike(Buffer, \"le\", this.span), b, offset);\n }\n}\nfunction u64(property) {\n return new BNLayout(8, false, property);\n}\nexports.u64 = u64;\nfunction i64(property) {\n return new BNLayout(8, true, property);\n}\nexports.i64 = i64;\nfunction u128(property) {\n return new BNLayout(16, false, property);\n}\nexports.u128 = u128;\nfunction i128(property) {\n return new BNLayout(16, true, property);\n}\nexports.i128 = i128;\nfunction u256(property) {\n return new BNLayout(32, false, property);\n}\nexports.u256 = u256;\nfunction i256(property) {\n return new BNLayout(32, true, property);\n}\nexports.i256 = i256;\nclass WrappedLayout extends buffer_layout_1.Layout {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nfunction publicKey(property) {\n return new WrappedLayout((0, buffer_layout_1.blob)(32), (b) => new web3_js_1.PublicKey(b), (key) => key.toBuffer(), property);\n}\nexports.publicKey = publicKey;\nclass OptionLayout extends buffer_layout_1.Layout {\n constructor(layout, property) {\n super(-1, property);\n this.layout = layout;\n this.discriminator = (0, buffer_layout_1.u8)();\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.discriminator.encode(0, b, offset);\n }\n this.discriminator.encode(1, b, offset);\n return this.layout.encode(src, b, offset + 1) + 1;\n }\n decode(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return null;\n }\n else if (discriminator === 1) {\n return this.layout.decode(b, offset + 1);\n }\n throw new Error(\"Invalid option \" + this.property);\n }\n getSpan(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return 1;\n }\n else if (discriminator === 1) {\n return this.layout.getSpan(b, offset + 1) + 1;\n }\n throw new Error(\"Invalid option \" + this.property);\n }\n}\nfunction option(layout, property) {\n return new OptionLayout(layout, property);\n}\nexports.option = option;\nfunction bool(property) {\n return new WrappedLayout((0, buffer_layout_1.u8)(), decodeBool, encodeBool, property);\n}\nexports.bool = bool;\nfunction decodeBool(value) {\n if (value === 0) {\n return false;\n }\n else if (value === 1) {\n return true;\n }\n throw new Error(\"Invalid bool: \" + value);\n}\nfunction encodeBool(value) {\n return value ? 1 : 0;\n}\nfunction vec(elementLayout, property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.seq)(elementLayout, (0, buffer_layout_1.offset)(length, -length.span), \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, (values) => ({ values }), property);\n}\nexports.vec = vec;\nfunction tagged(tag, layout, property) {\n const wrappedLayout = (0, buffer_layout_1.struct)([\n u64(\"tag\"),\n layout.replicate(\"data\"),\n ]);\n function decodeTag({ tag: receivedTag, data }) {\n if (!receivedTag.eq(tag)) {\n throw new Error(\"Invalid tag, expected: \" +\n tag.toString(\"hex\") +\n \", got: \" +\n receivedTag.toString(\"hex\"));\n }\n return data;\n }\n return new WrappedLayout(wrappedLayout, decodeTag, (data) => ({ tag, data }), property);\n}\nexports.tagged = tagged;\nfunction vecU8(property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.blob)((0, buffer_layout_1.offset)(length, -length.span), \"data\"),\n ]);\n return new WrappedLayout(layout, ({ data }) => data, (data) => ({ data }), property);\n}\nexports.vecU8 = vecU8;\nfunction str(property) {\n return new WrappedLayout(vecU8(), (data) => data.toString(\"utf-8\"), (s) => Buffer.from(s, \"utf-8\"), property);\n}\nexports.str = str;\nfunction rustEnum(variants, property, discriminant) {\n const unionLayout = (0, buffer_layout_1.union)(discriminant !== null && discriminant !== void 0 ? discriminant : (0, buffer_layout_1.u8)(), property);\n variants.forEach((variant, index) => unionLayout.addVariant(index, variant, variant.property));\n return unionLayout;\n}\nexports.rustEnum = rustEnum;\nfunction array(elementLayout, length, property) {\n const layout = (0, buffer_layout_1.struct)([\n (0, buffer_layout_1.seq)(elementLayout, length, \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, (values) => ({ values }), property);\n}\nexports.array = array;\nclass MapEntryLayout extends buffer_layout_1.Layout {\n constructor(keyLayout, valueLayout, property) {\n super(keyLayout.span + valueLayout.span, property);\n this.keyLayout = keyLayout;\n this.valueLayout = valueLayout;\n }\n decode(b, offset) {\n offset = offset || 0;\n const key = this.keyLayout.decode(b, offset);\n const value = this.valueLayout.decode(b, offset + this.keyLayout.getSpan(b, offset));\n return [key, value];\n }\n encode(src, b, offset) {\n offset = offset || 0;\n const keyBytes = this.keyLayout.encode(src[0], b, offset);\n const valueBytes = this.valueLayout.encode(src[1], b, offset + keyBytes);\n return keyBytes + valueBytes;\n }\n getSpan(b, offset) {\n return (this.keyLayout.getSpan(b, offset) + this.valueLayout.getSpan(b, offset));\n }\n}\nfunction map(keyLayout, valueLayout, property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.seq)(new MapEntryLayout(keyLayout, valueLayout), (0, buffer_layout_1.offset)(length, -length.span), \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => new Map(values), (values) => ({ values: Array.from(values.entries()) }), property);\n}\nexports.map = map;\n//# sourceMappingURL=index.js.map","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","'use strict';\n\nconst UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\n\tfor (let i = 0; i < string.length; i++) {\n\t\tconst character = string[i];\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i) + '-' + string.slice(i);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\ti++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replace(LEADING_CAPITAL, m1 => toLowerCase(m1));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier))\n\t\t.replace(NUMBERS_AND_IDENTIFIER, m => toUpperCase(m));\n};\n\nconst camelCase = (input, options) => {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false ?\n\t\tstring => string.toLowerCase() :\n\t\tstring => string.toLocaleLowerCase(options.locale);\n\tconst toUpperCase = options.locale === false ?\n\t\tstring => string.toUpperCase() :\n\t\tstring => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\n\tif (options.preserveConsecutiveUppercase) {\n\t\tinput = preserveConsecutiveUppercase(input, toLowerCase);\n\t} else {\n\t\tinput = toLowerCase(input);\n\t}\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n};\n\nmodule.exports = camelCase;\n// TODO: Remove this for the next major release\nmodule.exports.default = camelCase;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getATAAddressesSync = exports.getATAAddresses = exports.getATAAddressSync = exports.getATAAddress = void 0;\nconst solana_contrib_1 = require(\"@saberhq/solana-contrib\");\nconst spl_token_1 = require(\"@solana/spl-token\");\n/**\n * Gets an associated token account address.\n *\n * @deprecated use {@link getATAAddressSync}\n */\nconst getATAAddress = async ({ mint, owner, }) => {\n return Promise.resolve((0, exports.getATAAddressSync)({ mint, owner }));\n};\nexports.getATAAddress = getATAAddress;\n/**\n * Gets an associated token account address synchronously.\n */\nconst getATAAddressSync = ({ mint, owner, }) => {\n return (0, solana_contrib_1.getProgramAddress)([owner.toBuffer(), spl_token_1.TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID);\n};\nexports.getATAAddressSync = getATAAddressSync;\n/**\n * Gets multiple associated token account addresses.\n *\n * @deprecated use {@link getATAAddressesSync}\n */\nconst getATAAddresses = ({ mints, owner, }) => {\n return Promise.resolve((0, exports.getATAAddressesSync)({ mints, owner }));\n};\nexports.getATAAddresses = getATAAddresses;\n/**\n * Gets multiple associated token account addresses.\n */\nconst getATAAddressesSync = ({ mints, owner, }) => {\n const result = Object.entries(mints).map((args) => {\n const [name, mint] = args;\n const result = (0, exports.getATAAddressSync)({\n mint,\n owner: owner,\n });\n return {\n address: result,\n name,\n mint,\n };\n });\n const deduped = result.reduce((acc, { address, name, mint }) => {\n return {\n accounts: {\n ...acc.accounts,\n [name]: { address, mint },\n },\n };\n }, { accounts: {} });\n return {\n accounts: deduped.accounts,\n };\n};\nexports.getATAAddressesSync = getATAAddressesSync;\n//# sourceMappingURL=ata.js.map","\"use strict\";\n/**\n * This file is a port of serum-common, which was built for web3.js 0.x.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sleep = exports.getTokenAccount = exports.getMintInfo = exports.createAccountRentExempt = exports.createTokenAccountInstrs = exports.createMintAndVault = exports.createMintInstructions = exports.createToken = exports.createMint = exports.SPL_SHARED_MEMORY_ID = exports.DEFAULT_TOKEN_DECIMALS = exports.token = void 0;\nconst tslib_1 = require(\"tslib\");\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst index_js_1 = require(\"./index.js\");\nexports.token = tslib_1.__importStar(require(\"./token.js\"));\n/**\n * Default number of decimals of a token.\n */\nexports.DEFAULT_TOKEN_DECIMALS = 6;\nexports.SPL_SHARED_MEMORY_ID = new web3_js_1.PublicKey(\"shmem4EWT2sPdVGvTZCzXXRAURL9G5vpPxNwSeKhHUL\");\nasync function createMint(provider, authority, decimals) {\n if (authority === undefined) {\n authority = provider.wallet.publicKey;\n }\n const mint = web3_js_1.Keypair.generate();\n const instructions = await createMintInstructions(provider, authority, mint.publicKey, decimals);\n const tx = new web3_js_1.Transaction();\n tx.add(...instructions);\n await provider.send(tx, [mint]);\n return mint.publicKey;\n}\nexports.createMint = createMint;\n/**\n * Creates a Token.\n *\n * @param provider\n * @param authority The mint authority.\n * @param decimals Number of decimals.\n * @returns\n */\nasync function createToken(provider, authority, decimals = 6) {\n return index_js_1.Token.fromMint(await createMint(provider, authority, decimals), decimals);\n}\nexports.createToken = createToken;\nasync function createMintInstructions(provider, authority, mint, decimals = 6) {\n const instructions = [\n web3_js_1.SystemProgram.createAccount({\n fromPubkey: provider.wallet.publicKey,\n newAccountPubkey: mint,\n space: index_js_1.MintLayout.span,\n lamports: await provider.connection.getMinimumBalanceForRentExemption(index_js_1.MintLayout.span),\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n }),\n spl_token_1.Token.createInitMintInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint, decimals, authority, null),\n ];\n return instructions;\n}\nexports.createMintInstructions = createMintInstructions;\nasync function createMintAndVault(provider, amount, owner, decimals) {\n if (owner === undefined) {\n owner = provider.wallet.publicKey;\n }\n const mint = web3_js_1.Keypair.generate();\n const vault = web3_js_1.Keypair.generate();\n const tx = new web3_js_1.Transaction();\n tx.add(...(await createMintInstructions(provider, provider.wallet.publicKey, mint.publicKey, decimals)), web3_js_1.SystemProgram.createAccount({\n fromPubkey: provider.wallet.publicKey,\n newAccountPubkey: vault.publicKey,\n space: 165,\n lamports: await provider.connection.getMinimumBalanceForRentExemption(165),\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n }), spl_token_1.Token.createInitAccountInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint.publicKey, vault.publicKey, owner), spl_token_1.Token.createMintToInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint.publicKey, vault.publicKey, provider.wallet.publicKey, [], amount));\n await provider.send(tx, [mint, vault]);\n return [mint.publicKey, vault.publicKey];\n}\nexports.createMintAndVault = createMintAndVault;\nasync function createTokenAccountInstrs(provider, newAccountPubkey, mint, owner, lamports) {\n if (lamports === undefined) {\n lamports = await provider.connection.getMinimumBalanceForRentExemption(165);\n }\n return [\n web3_js_1.SystemProgram.createAccount({\n fromPubkey: provider.wallet.publicKey,\n newAccountPubkey,\n space: 165,\n lamports,\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n }),\n spl_token_1.Token.createInitAccountInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint, newAccountPubkey, owner),\n ];\n}\nexports.createTokenAccountInstrs = createTokenAccountInstrs;\nasync function createAccountRentExempt(provider, programId, size) {\n const acc = web3_js_1.Keypair.generate();\n const tx = new web3_js_1.Transaction();\n tx.add(web3_js_1.SystemProgram.createAccount({\n fromPubkey: provider.wallet.publicKey,\n newAccountPubkey: acc.publicKey,\n space: size,\n lamports: await provider.connection.getMinimumBalanceForRentExemption(size),\n programId,\n }));\n await provider.send(tx, [acc]);\n return acc;\n}\nexports.createAccountRentExempt = createAccountRentExempt;\nasync function getMintInfo(provider, addr) {\n const depositorAccInfo = await provider.getAccountInfo(addr);\n if (depositorAccInfo === null) {\n throw new Error(\"Failed to find token mint account\");\n }\n return (0, index_js_1.deserializeMint)(depositorAccInfo.accountInfo.data);\n}\nexports.getMintInfo = getMintInfo;\nasync function getTokenAccount(provider, addr) {\n const depositorAccInfo = await provider.getAccountInfo(addr);\n if (depositorAccInfo === null) {\n throw new Error(\"Failed to find token account\");\n }\n return (0, index_js_1.deserializeAccount)(depositorAccInfo.accountInfo.data);\n}\nexports.getTokenAccount = getTokenAccount;\nfunction sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\nexports.sleep = sleep;\n//# sourceMappingURL=common.js.map","\"use strict\";\n/**\n * [[include:token-utils/README.md]]\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.u64 = exports.TOKEN_PROGRAM_ID = exports.SPLToken = exports.NATIVE_MINT = exports.ASSOCIATED_TOKEN_PROGRAM_ID = exports.ZERO = exports.validateU256 = exports.validateU64 = exports.TEN = exports.Rounding = exports.Percent = exports.parseBigintIsh = exports.ONE = exports.MAX_U256 = exports.MAX_U64 = exports.makeDecimalMultiplier = exports.Fraction = void 0;\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./ata.js\"), exports);\ntslib_1.__exportStar(require(\"./instructions/index.js\"), exports);\ntslib_1.__exportStar(require(\"./layout.js\"), exports);\ntslib_1.__exportStar(require(\"./price.js\"), exports);\ntslib_1.__exportStar(require(\"./splTokenRegistry.js\"), exports);\ntslib_1.__exportStar(require(\"./token.js\"), exports);\ntslib_1.__exportStar(require(\"./tokenAmount.js\"), exports);\ntslib_1.__exportStar(require(\"./tokenList.js\"), exports);\ntslib_1.__exportStar(require(\"./tokenOwner.js\"), exports);\ntslib_1.__exportStar(require(\"./tokenProvider.js\"), exports);\nvar token_math_1 = require(\"@ubeswap/token-math\");\nObject.defineProperty(exports, \"Fraction\", { enumerable: true, get: function () { return token_math_1.Fraction; } });\nObject.defineProperty(exports, \"makeDecimalMultiplier\", { enumerable: true, get: function () { return token_math_1.makeDecimalMultiplier; } });\nObject.defineProperty(exports, \"MAX_U64\", { enumerable: true, get: function () { return token_math_1.MAX_U64; } });\nObject.defineProperty(exports, \"MAX_U256\", { enumerable: true, get: function () { return token_math_1.MAX_U256; } });\nObject.defineProperty(exports, \"ONE\", { enumerable: true, get: function () { return token_math_1.ONE; } });\nObject.defineProperty(exports, \"parseBigintIsh\", { enumerable: true, get: function () { return token_math_1.parseBigintIsh; } });\nObject.defineProperty(exports, \"Percent\", { enumerable: true, get: function () { return token_math_1.Percent; } });\nObject.defineProperty(exports, \"Rounding\", { enumerable: true, get: function () { return token_math_1.Rounding; } });\nObject.defineProperty(exports, \"TEN\", { enumerable: true, get: function () { return token_math_1.TEN; } });\nObject.defineProperty(exports, \"validateU64\", { enumerable: true, get: function () { return token_math_1.validateU64; } });\nObject.defineProperty(exports, \"validateU256\", { enumerable: true, get: function () { return token_math_1.validateU256; } });\nObject.defineProperty(exports, \"ZERO\", { enumerable: true, get: function () { return token_math_1.ZERO; } });\n// serum common\ntslib_1.__exportStar(require(\"./common.js\"), exports);\nvar spl_token_1 = require(\"@solana/spl-token\");\nObject.defineProperty(exports, \"ASSOCIATED_TOKEN_PROGRAM_ID\", { enumerable: true, get: function () { return spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID; } });\nObject.defineProperty(exports, \"NATIVE_MINT\", { enumerable: true, get: function () { return spl_token_1.NATIVE_MINT; } });\nObject.defineProperty(exports, \"SPLToken\", { enumerable: true, get: function () { return spl_token_1.Token; } });\nObject.defineProperty(exports, \"TOKEN_PROGRAM_ID\", { enumerable: true, get: function () { return spl_token_1.TOKEN_PROGRAM_ID; } });\nObject.defineProperty(exports, \"u64\", { enumerable: true, get: function () { return spl_token_1.u64; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildCreateTokenAccountTX = exports.createTokenAccount = void 0;\nconst solana_contrib_1 = require(\"@saberhq/solana-contrib\");\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst layout_js_1 = require(\"../layout.js\");\nconst createTokenAccount = async ({ provider, mint, owner = provider.wallet.publicKey, payer = provider.wallet.publicKey, accountSigner = web3_js_1.Keypair.generate(), }) => {\n // Allocate memory for the account\n const rentExemptAccountBalance = await spl_token_1.Token.getMinBalanceRentForExemptAccount(provider.connection);\n return (0, exports.buildCreateTokenAccountTX)({\n provider,\n mint,\n rentExemptAccountBalance,\n owner,\n payer,\n accountSigner,\n });\n};\nexports.createTokenAccount = createTokenAccount;\nconst buildCreateTokenAccountTX = ({ provider, mint, rentExemptAccountBalance, owner = provider.wallet.publicKey, payer = provider.wallet.publicKey, accountSigner = web3_js_1.Keypair.generate(), }) => {\n const tokenAccount = accountSigner.publicKey;\n return {\n key: tokenAccount,\n tx: new solana_contrib_1.TransactionEnvelope(provider, [\n web3_js_1.SystemProgram.createAccount({\n fromPubkey: payer,\n newAccountPubkey: accountSigner.publicKey,\n lamports: rentExemptAccountBalance,\n space: layout_js_1.TokenAccountLayout.span,\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n }),\n spl_token_1.Token.createInitAccountInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint, tokenAccount, owner),\n ], [accountSigner]),\n };\n};\nexports.buildCreateTokenAccountTX = buildCreateTokenAccountTX;\n//# sourceMappingURL=account.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createATAInstruction = exports.getOrCreateATAs = exports.getOrCreateATA = void 0;\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst ata_js_1 = require(\"../ata.js\");\n/**\n * Gets an associated token account, returning a create instruction if it doesn't exist.\n * @param param0\n * @returns\n */\nconst getOrCreateATA = async ({ provider, mint, owner = provider.wallet.publicKey, payer = provider.wallet.publicKey, }) => {\n const address = (0, ata_js_1.getATAAddressSync)({ mint, owner });\n if (await provider.getAccountInfo(address)) {\n return { address, instruction: null };\n }\n else {\n return {\n address,\n instruction: (0, exports.createATAInstruction)({\n mint,\n address,\n owner,\n payer,\n }),\n };\n }\n};\nexports.getOrCreateATA = getOrCreateATA;\n/**\n * Gets ATAs and creates them if they don't exist.\n * @param param0\n * @returns\n */\nconst getOrCreateATAs = async ({ provider, mints, owner = provider.wallet.publicKey, }) => {\n const result = await Promise.all(Object.entries(mints).map(async ([name, mint]) => {\n const mintKey = new web3_js_1.PublicKey(mint);\n const result = await (0, exports.getOrCreateATA)({\n provider,\n mint: mintKey,\n owner: owner,\n payer: provider.wallet.publicKey,\n });\n return {\n address: result.address,\n instruction: result.instruction,\n name,\n mintKey,\n };\n }));\n const deduped = result.reduce((acc, { address, name, instruction }) => {\n return {\n accounts: {\n ...acc.accounts,\n [name]: address,\n },\n createAccountInstructions: {\n ...acc.createAccountInstructions,\n [name]: instruction,\n },\n instructions: instruction\n ? {\n ...acc.instructions,\n [address.toString()]: instruction,\n }\n : acc.instructions,\n };\n }, { accounts: {}, instructions: {}, createAccountInstructions: {} });\n return {\n accounts: deduped.accounts,\n createAccountInstructions: deduped.createAccountInstructions,\n instructions: Object.values(deduped.instructions),\n };\n};\nexports.getOrCreateATAs = getOrCreateATAs;\n/**\n * Instruction for creating an ATA.\n * @returns\n */\nconst createATAInstruction = ({ address, mint, owner, payer, }) => spl_token_1.Token.createAssociatedTokenAccountInstruction(spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, spl_token_1.TOKEN_PROGRAM_ID, mint, address, owner, payer);\nexports.createATAInstruction = createATAInstruction;\n//# sourceMappingURL=ata.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./account.js\"), exports);\ntslib_1.__exportStar(require(\"./ata.js\"), exports);\ntslib_1.__exportStar(require(\"./mint.js\"), exports);\ntslib_1.__exportStar(require(\"./nft.js\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createMintToInstruction = exports.createInitMintTX = exports.createInitMintInstructions = void 0;\nconst solana_contrib_1 = require(\"@saberhq/solana-contrib\");\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst layout_js_1 = require(\"../layout.js\");\n/**\n * Creates instructions for initializing a mint.\n * @param param0\n * @returns\n */\nconst createInitMintInstructions = async ({ provider, mintKP, decimals, mintAuthority = provider.wallet.publicKey, freezeAuthority = null, }) => {\n return (0, exports.createInitMintTX)({\n provider,\n mintKP,\n decimals,\n rentExemptMintBalance: await spl_token_1.Token.getMinBalanceRentForExemptMint(provider.connection),\n mintAuthority,\n freezeAuthority,\n });\n};\nexports.createInitMintInstructions = createInitMintInstructions;\n/**\n * Creates instructions for initializing a mint.\n * @param param0\n * @returns\n */\nconst createInitMintTX = ({ provider, mintKP, decimals, rentExemptMintBalance, mintAuthority = provider.wallet.publicKey, freezeAuthority = null, }) => {\n const from = provider.wallet.publicKey;\n return new solana_contrib_1.TransactionEnvelope(provider, [\n web3_js_1.SystemProgram.createAccount({\n fromPubkey: from,\n newAccountPubkey: mintKP.publicKey,\n space: layout_js_1.MintLayout.span,\n lamports: rentExemptMintBalance,\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n }),\n spl_token_1.Token.createInitMintInstruction(spl_token_1.TOKEN_PROGRAM_ID, mintKP.publicKey, decimals, mintAuthority, freezeAuthority),\n ], [mintKP]);\n};\nexports.createInitMintTX = createInitMintTX;\nconst createMintToInstruction = ({ provider, mint, mintAuthorityKP, to, amount, }) => {\n return new solana_contrib_1.TransactionEnvelope(provider, [\n spl_token_1.Token.createMintToInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint, to, mintAuthorityKP.publicKey, [], amount),\n ], [mintAuthorityKP]);\n};\nexports.createMintToInstruction = createMintToInstruction;\n//# sourceMappingURL=mint.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mintNFT = void 0;\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst ata_js_1 = require(\"./ata.js\");\nconst mint_js_1 = require(\"./mint.js\");\nconst mintNFT = async (provider, mintKP, owner = provider.wallet.publicKey) => {\n // Temporary mint authority\n const tempMintAuthority = provider.wallet.publicKey;\n // Mint for the NFT\n const tx = await (0, mint_js_1.createInitMintInstructions)({\n provider,\n mintKP,\n decimals: 0,\n mintAuthority: tempMintAuthority,\n });\n // Token account for the NFT\n const { address, instruction } = await (0, ata_js_1.getOrCreateATA)({\n provider,\n mint: mintKP.publicKey,\n owner: owner,\n payer: provider.wallet.publicKey,\n });\n if (instruction) {\n tx.instructions.push(instruction);\n }\n // Mint to owner's ATA\n tx.instructions.push(spl_token_1.Token.createMintToInstruction(spl_token_1.TOKEN_PROGRAM_ID, mintKP.publicKey, address, tempMintAuthority, [], new spl_token_1.u64(1)));\n // Set mint authority of the NFT to NULL\n tx.instructions.push(spl_token_1.Token.createSetAuthorityInstruction(spl_token_1.TOKEN_PROGRAM_ID, mintKP.publicKey, null, \"MintTokens\", tempMintAuthority, []));\n return tx;\n};\nexports.mintNFT = mintNFT;\n//# sourceMappingURL=nft.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserializeMint = exports.deserializeAccount = exports.MintLayout = exports.TokenAccountLayout = exports.Uint64Layout = exports.PublicKeyLayout = exports.structLayout = exports.TypedStructure = exports.TypedLayout = void 0;\nconst tslib_1 = require(\"tslib\");\nconst solana_contrib_1 = require(\"@saberhq/solana-contrib\");\nconst BufferLayout = tslib_1.__importStar(require(\"@solana/buffer-layout\"));\nconst spl_token_1 = require(\"@solana/spl-token\");\nvar buffer_layout_1 = require(\"@solana/buffer-layout\");\nObject.defineProperty(exports, \"TypedLayout\", { enumerable: true, get: function () { return buffer_layout_1.Layout; } });\nObject.defineProperty(exports, \"TypedStructure\", { enumerable: true, get: function () { return buffer_layout_1.Structure; } });\n/**\n * Typed struct buffer layout\n * @param fields\n * @param property\n * @param decodePrefixes\n * @returns\n */\nconst structLayout = (fields, property, decodePrefixes) => BufferLayout.struct(fields, property, decodePrefixes);\nexports.structLayout = structLayout;\n/**\n * Layout for a public key\n */\nconst PublicKeyLayout = (property = \"publicKey\") => {\n return BufferLayout.blob(32, property);\n};\nexports.PublicKeyLayout = PublicKeyLayout;\n/**\n * Layout for a 64bit unsigned value\n */\nconst Uint64Layout = (property = \"uint64\") => {\n return BufferLayout.blob(8, property);\n};\nexports.Uint64Layout = Uint64Layout;\n/**\n * Layout for a TokenAccount.\n */\nexports.TokenAccountLayout = spl_token_1.AccountLayout;\n/**\n * Layout for a Mint.\n */\nexports.MintLayout = spl_token_1.MintLayout;\n/**\n * Deserializes a token account.\n * @param address\n * @param data\n * @returns\n */\nconst deserializeAccount = (data) => {\n const accountInfo = exports.TokenAccountLayout.decode(data);\n const mint = new solana_contrib_1.PublicKey(accountInfo.mint);\n const owner = new solana_contrib_1.PublicKey(accountInfo.owner);\n const amount = spl_token_1.u64.fromBuffer(accountInfo.amount);\n let delegate;\n let delegatedAmount;\n if (accountInfo.delegateOption === 0) {\n delegate = null;\n delegatedAmount = new spl_token_1.u64(0);\n }\n else {\n delegate = new solana_contrib_1.PublicKey(accountInfo.delegate);\n delegatedAmount = spl_token_1.u64.fromBuffer(accountInfo.delegatedAmount);\n }\n const isInitialized = accountInfo.state !== 0;\n const isFrozen = accountInfo.state === 2;\n let rentExemptReserve;\n let isNative;\n if (accountInfo.isNativeOption === 1) {\n rentExemptReserve = spl_token_1.u64.fromBuffer(accountInfo.isNative);\n isNative = true;\n }\n else {\n rentExemptReserve = null;\n isNative = false;\n }\n let closeAuthority;\n if (accountInfo.closeAuthorityOption === 0) {\n closeAuthority = null;\n }\n else {\n closeAuthority = new solana_contrib_1.PublicKey(accountInfo.closeAuthority);\n }\n return {\n mint,\n owner,\n amount,\n delegate,\n delegatedAmount,\n isInitialized,\n isFrozen,\n rentExemptReserve,\n isNative,\n closeAuthority,\n };\n};\nexports.deserializeAccount = deserializeAccount;\n/**\n * Deserialize a {@link Buffer} into a {@link MintInfo}.\n * @param data\n * @returns\n */\nconst deserializeMint = (data) => {\n if (data.length !== exports.MintLayout.span) {\n throw new Error(\"Not a valid Mint\");\n }\n const mintInfo = exports.MintLayout.decode(data);\n let mintAuthority;\n if (mintInfo.mintAuthorityOption === 0) {\n mintAuthority = null;\n }\n else {\n mintAuthority = new solana_contrib_1.PublicKey(mintInfo.mintAuthority);\n }\n const supply = spl_token_1.u64.fromBuffer(mintInfo.supply);\n const isInitialized = mintInfo.isInitialized !== 0;\n let freezeAuthority;\n if (mintInfo.freezeAuthorityOption === 0) {\n freezeAuthority = null;\n }\n else {\n freezeAuthority = new solana_contrib_1.PublicKey(mintInfo.freezeAuthority);\n }\n return {\n mintAuthority,\n supply,\n decimals: mintInfo.decimals,\n isInitialized,\n freezeAuthority,\n };\n};\nexports.deserializeMint = deserializeMint;\n//# sourceMappingURL=layout.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Price = void 0;\nconst token_math_1 = require(\"@ubeswap/token-math\");\n/**\n * A price of one token relative to another.\n */\nclass Price extends token_math_1.Price {\n /**\n * Constructs a price.\n * @param baseCurrency\n * @param quoteCurrency\n * @param denominator\n * @param numerator\n */\n constructor(baseCurrency, quoteCurrency, denominator, numerator) {\n super(baseCurrency, quoteCurrency, denominator, numerator);\n }\n new(baseCurrency, quoteCurrency, denominator, numerator) {\n return new Price(baseCurrency, quoteCurrency, denominator, numerator);\n }\n static fromUPrice(price) {\n return new Price(price.baseCurrency, price.quoteCurrency, price.denominator, price.numerator);\n }\n}\nexports.Price = Price;\n//# sourceMappingURL=price.js.map","\"use strict\";\n/**\n * These types all come from the @solana/spl-token-registry package.\n *\n * We re-export them here so we do not have to have a hard dependency on\n * that package, which is massive.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ENV = void 0;\n/**\n * Chain ID.\n */\nvar ENV;\n(function (ENV) {\n ENV[ENV[\"MainnetBeta\"] = 101] = \"MainnetBeta\";\n ENV[ENV[\"Testnet\"] = 102] = \"Testnet\";\n ENV[ENV[\"Devnet\"] = 103] = \"Devnet\";\n})(ENV || (exports.ENV = ENV = {}));\n//# sourceMappingURL=splTokenRegistry.js.map","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WRAPPED_SOL = exports.RAW_SOL = exports.chainIdToNetwork = exports.networkToChainId = exports.CHAIN_ID_TO_NETWORK = exports.NETWORK_TO_CHAIN_ID = exports.ChainId = exports.makeTokenForAllNetworks = exports.tokensEqual = exports.Token = exports.RAW_SOL_MINT = void 0;\nconst solana_contrib_1 = require(\"@saberhq/solana-contrib\");\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst layout_js_1 = require(\"./layout.js\");\n/**\n * Magic value representing the raw, underlying Solana native asset.\n */\nexports.RAW_SOL_MINT = new solana_contrib_1.PublicKey(\"RawSo11111111111111111111111111111111111112\");\n/**\n * Token information.\n */\nclass Token {\n constructor(info) {\n var _b;\n this.info = info;\n this._mintAccount = null;\n this.network = (_b = (0, exports.chainIdToNetwork)(info.chainId)) !== null && _b !== void 0 ? _b : \"localnet\";\n }\n /**\n * The mint PublicKey of the token.\n *\n * Avoid using this value to print it to a string, as base58\n * strings are relatively slow to create since they require the use\n * of hash functions.\n */\n get mintAccount() {\n if (this._mintAccount) {\n return this._mintAccount;\n }\n this._mintAccount = new solana_contrib_1.PublicKey(this.info.address);\n return this._mintAccount;\n }\n /**\n * If true, this token represents unwrapped, native, \"raw\" SOL.\n */\n get isRawSOL() {\n return this.mintAccount.equals(exports.RAW_SOL_MINT);\n }\n /**\n * The Base58 string representation of the mint address.\n */\n get address() {\n return this.info.address;\n }\n /**\n * The chain ID of the token.\n */\n get chainId() {\n return this.info.chainId;\n }\n /**\n * Number of decimals of the token.\n */\n get decimals() {\n return this.info.decimals;\n }\n /**\n * The name of the token.\n */\n get name() {\n return this.info.name;\n }\n /**\n * The symbol of the token.\n */\n get symbol() {\n return this.info.symbol;\n }\n /**\n * The token's icon to render.\n */\n get icon() {\n return this.info.logoURI;\n }\n equals(other) {\n return (0, exports.tokensEqual)(this, other);\n }\n toString() {\n return `Token[mint=${this.address}, decimals=${this.decimals}, network=${this.network}]`;\n }\n toJSON() {\n return this.info;\n }\n /**\n * Returns true if the given tag is present.\n * @param tag The tag to check.\n * @returns\n */\n hasTag(tag) {\n var _b;\n return !!((_b = this.info.tags) === null || _b === void 0 ? void 0 : _b.includes(tag));\n }\n}\nexports.Token = Token;\n_a = Token;\n/**\n * Loads a token from a Mint.\n * @param mint\n * @param opts\n * @returns\n */\nToken.fromMint = (mint, decimals, opts = {}) => {\n var _b, _c, _d;\n return new _a({\n ...opts,\n // required\n address: mint.toString(),\n decimals,\n // optional\n name: (_b = opts.name) !== null && _b !== void 0 ? _b : `Token ${mint.toString().slice(0, 4)}`,\n symbol: (_c = opts.symbol) !== null && _c !== void 0 ? _c : mint.toString().slice(0, 5),\n chainId: (_d = opts.chainId) !== null && _d !== void 0 ? _d : ChainId.Localnet,\n });\n};\n/**\n * Loads a token from a Connection.\n *\n * @param connection\n * @param mint\n * @param info\n */\nToken.load = async (connection, mint, info = {}) => {\n if (typeof info.decimals === \"number\") {\n return _a.fromMint(mint, info.decimals, info);\n }\n const mintAccountInfo = await connection.getAccountInfo(mint);\n if (!mintAccountInfo) {\n return null;\n }\n const mintInfo = (0, layout_js_1.deserializeMint)(mintAccountInfo.data);\n return _a.fromMint(mint, mintInfo.decimals, info);\n};\n/**\n * Checks if two tokens are equal.\n * @param a\n * @param b\n * @returns\n */\nconst tokensEqual = (a, b) => a !== undefined &&\n b !== undefined &&\n a.address === b.address &&\n a.network === b.network;\nexports.tokensEqual = tokensEqual;\nconst rawSol = {\n address: exports.RAW_SOL_MINT.toString(),\n name: \"Solana\",\n symbol: \"SOL\",\n decimals: 9,\n logoURI: \"https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png\",\n};\nconst wrappedSol = {\n address: spl_token_1.NATIVE_MINT.toString(),\n name: \"Wrapped SOL\",\n symbol: \"SOL\",\n decimals: 9,\n logoURI: \"https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png\",\n};\n/**\n * Creates a Token for all networks.\n */\nconst makeTokenForAllNetworks = (token) => ({\n \"mainnet-beta\": new Token({ ...token, chainId: ChainId.MainnetBeta }),\n devnet: new Token({ ...token, chainId: ChainId.Devnet }),\n testnet: new Token({ ...token, chainId: ChainId.Testnet }),\n localnet: new Token({ ...token, chainId: ChainId.Localnet }),\n});\nexports.makeTokenForAllNetworks = makeTokenForAllNetworks;\n// comes from @solana/spl-token-registry, except we've added localnet\nvar ChainId;\n(function (ChainId) {\n ChainId[ChainId[\"MainnetBeta\"] = 101] = \"MainnetBeta\";\n ChainId[ChainId[\"Testnet\"] = 102] = \"Testnet\";\n ChainId[ChainId[\"Devnet\"] = 103] = \"Devnet\";\n ChainId[ChainId[\"Localnet\"] = 104] = \"Localnet\";\n})(ChainId || (exports.ChainId = ChainId = {}));\nexports.NETWORK_TO_CHAIN_ID = {\n \"mainnet-beta\": ChainId.MainnetBeta,\n devnet: ChainId.Devnet,\n testnet: ChainId.Testnet,\n localnet: 104,\n};\nexports.CHAIN_ID_TO_NETWORK = Object.entries(exports.NETWORK_TO_CHAIN_ID).reduce((acc, [network, env]) => ({ ...acc, [env]: network }), {});\n/**\n * Gets the chain id associated with a network.\n * @param network\n * @returns\n */\nconst networkToChainId = (network) => exports.NETWORK_TO_CHAIN_ID[network];\nexports.networkToChainId = networkToChainId;\n/**\n * Gets the Network associated with a chain id.\n * @param network\n * @returns\n */\nconst chainIdToNetwork = (env) => exports.CHAIN_ID_TO_NETWORK[env];\nexports.chainIdToNetwork = chainIdToNetwork;\n/**\n * Raw Solana token.\n *\n * This is a magic value. This is not a real token.\n */\nexports.RAW_SOL = (0, exports.makeTokenForAllNetworks)(rawSol);\n/**\n * Wrapped Solana token.\n */\nexports.WRAPPED_SOL = (0, exports.makeTokenForAllNetworks)(wrappedSol);\n//# sourceMappingURL=token.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TokenAmount = void 0;\nconst tslib_1 = require(\"tslib\");\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst token_math_1 = require(\"@ubeswap/token-math\");\nconst bn_js_1 = tslib_1.__importDefault(require(\"bn.js\"));\nclass TokenAmount extends token_math_1.TokenAmount {\n // amount _must_ be raw, i.e. in the native representation\n constructor(token, amount) {\n super(token, amount, token_math_1.validateU64);\n }\n new(token, amount) {\n // unsafe but nobody will be extending this anyway probably\n return new TokenAmount(token, amount);\n }\n /**\n * Parses a token amount from a decimal representation.\n * @param token\n * @param uiAmount\n * @returns\n */\n static parse(token, uiAmount) {\n const prev = (0, token_math_1.parseAmountFromString)(token, uiAmount, \".\", \",\");\n return new TokenAmount(token, prev);\n }\n /**\n * Divides this TokenAmount by a raw integer.\n * @param other\n * @returns\n */\n divideByInteger(other) {\n return new TokenAmount(this.token, this.toU64().div(new bn_js_1.default((0, token_math_1.parseBigintIsh)(other).toString())));\n }\n /**\n * String representation of this token amount.\n */\n toString() {\n return `TokenAmount[Token=(${this.token.toString()}), amount=${this.toExact()}`;\n }\n /**\n * JSON representation of the token amount.\n */\n toJSON() {\n return {\n ...super.toJSON(),\n _isTA: true,\n mint: this.token.address,\n uiAmount: this.toExact(),\n };\n }\n /**\n * Converts this to the raw u64 used by the SPL library\n * @returns\n */\n toU64() {\n return new spl_token_1.u64(this.raw.toString());\n }\n}\nexports.TokenAmount = TokenAmount;\n//# sourceMappingURL=tokenAmount.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dedupeTokens = exports.makeTokenMap = exports.ORIGIN_CHAINS = void 0;\nconst token_js_1 = require(\"./token.js\");\n/**\n * Known origin chains.\n */\nexports.ORIGIN_CHAINS = [\n \"bitcoin\",\n \"ethereum\",\n \"terra\",\n \"avalanche\",\n \"binance\",\n \"celo\",\n \"polygon\",\n \"fantom\",\n \"polygon\",\n \"heco\",\n];\n/**\n * Creates a token map from a TokenList.\n * @param tokens\n * @returns\n */\nconst makeTokenMap = (tokenList) => {\n const ret = {};\n tokenList.tokens.forEach((item) => {\n ret[item.address] = new token_js_1.Token(item);\n });\n return ret;\n};\nexports.makeTokenMap = makeTokenMap;\n/**\n * Dedupes a list of tokens, picking the first instance of the token in a list.\n * @param tokens\n * @returns\n */\nconst dedupeTokens = (tokens) => {\n const seen = new Set();\n return tokens.filter((token) => {\n const tokenID = `${token.address}_${token.chainId}`;\n if (seen.has(tokenID)) {\n return false;\n }\n else {\n seen.add(tokenID);\n return true;\n }\n });\n};\nexports.dedupeTokens = dedupeTokens;\n//# sourceMappingURL=tokenList.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TokenOwner = void 0;\nconst index_js_1 = require(\"./index.js\");\n/**\n * Wrapper around a token account owner to create token instructions.\n */\nclass TokenOwner {\n constructor(owner) {\n this.owner = owner;\n }\n /**\n * Gets the user's ATA.\n * @param mint\n * @returns\n */\n async getATA(mint) {\n return await (0, index_js_1.getATAAddress)({ mint, owner: this.owner });\n }\n /**\n * Gets the user's ATA.\n * @param mint\n * @returns\n */\n getATASync(mint) {\n return (0, index_js_1.getATAAddressSync)({ mint, owner: this.owner });\n }\n /**\n * Transfers tokens to a token account.\n * @param amount Amount of tokens to transfer.\n * @param to Token account to transfer to.\n * @returns The transaction instruction.\n */\n async transfer(amount, to) {\n return index_js_1.SPLToken.createTransferInstruction(index_js_1.TOKEN_PROGRAM_ID, await this.getATA(amount.token.mintAccount), to, this.owner, [], amount.toU64());\n }\n /**\n * Transfers tokens to a token account, checked..\n * @param amount Amount of tokens to transfer.\n * @param to Token account to transfer to.\n * @returns The transaction instruction.\n */\n async transferChecked(amount, to) {\n return index_js_1.SPLToken.createTransferCheckedInstruction(index_js_1.TOKEN_PROGRAM_ID, await this.getATA(amount.token.mintAccount), amount.token.mintAccount, to, this.owner, [], amount.toU64(), amount.token.decimals);\n }\n /**\n * Mints tokens to a token account.\n * @param amount Amount of tokens to transfer.\n * @param to Token account to transfer to.\n * @returns The transaction instruction.\n */\n mintTo(amount, to) {\n return index_js_1.SPLToken.createMintToInstruction(index_js_1.TOKEN_PROGRAM_ID, amount.token.mintAccount, to, this.owner, [], amount.toU64());\n }\n /**\n * Creates an associated token account instruction.\n * @param mint Mint of the ATA.\n * @param payer Payer to create the ATA. Defaults to the owner.\n * @returns The transaction instruction.\n */\n async createATA(mint, payer = this.owner) {\n return index_js_1.SPLToken.createAssociatedTokenAccountInstruction(index_js_1.ASSOCIATED_TOKEN_PROGRAM_ID, index_js_1.TOKEN_PROGRAM_ID, mint, await this.getATA(mint), this.owner, payer);\n }\n}\nexports.TokenOwner = TokenOwner;\n//# sourceMappingURL=tokenOwner.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TokenAugmentedProvider = void 0;\nconst solana_contrib_1 = require(\"@saberhq/solana-contrib\");\nconst spl_token_1 = require(\"@solana/spl-token\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst ata_js_1 = require(\"./ata.js\");\nconst common_js_1 = require(\"./common.js\");\nconst index_js_1 = require(\"./index.js\");\nconst ata_js_2 = require(\"./instructions/ata.js\");\nconst layout_js_1 = require(\"./layout.js\");\nconst token_js_1 = require(\"./token.js\");\n/**\n * Augmented provider with token utilities.\n */\nclass TokenAugmentedProvider extends solana_contrib_1.SolanaAugmentedProvider {\n constructor(provider) {\n super(provider);\n }\n /**\n * Creates a transaction to create a {@link Token}.\n */\n async createTokenTX({ mintKP = web3_js_1.Keypair.generate(), authority = this.walletKey, decimals = common_js_1.DEFAULT_TOKEN_DECIMALS, } = {}) {\n const instructions = await (0, common_js_1.createMintInstructions)(this.provider, authority, mintKP.publicKey, decimals);\n return {\n token: token_js_1.Token.fromMint(mintKP.publicKey, decimals),\n tx: this.newTX(instructions, [mintKP]),\n };\n }\n /**\n * Transfers tokens from the provider's ATA to a `TokenAccount`.\n */\n async transferTo({ amount, source, destination, }) {\n const txEnv = this.newTX();\n if (!source) {\n const sourceATA = await this.getOrCreateATA({\n mint: amount.token.mintAccount,\n });\n txEnv.append(sourceATA.instruction);\n source = sourceATA.address;\n }\n txEnv.append(index_js_1.SPLToken.createTransferInstruction(spl_token_1.TOKEN_PROGRAM_ID, source, destination, this.walletKey, [], amount.toU64()));\n return txEnv;\n }\n /**\n * Transfers tokens to a recipient's ATA.\n */\n async transfer({ amount, source, to, }) {\n const toATA = await this.getOrCreateATA({\n mint: amount.token.mintAccount,\n owner: to,\n });\n const txEnv = await this.transferTo({\n amount,\n source,\n destination: toATA.address,\n });\n txEnv.prepend(toATA.instruction);\n return txEnv;\n }\n /**\n * Creates a {@link Token}.\n */\n async createToken({ mintKP = web3_js_1.Keypair.generate(), authority = this.walletKey, decimals = common_js_1.DEFAULT_TOKEN_DECIMALS, } = {}) {\n const { token, tx } = await this.createTokenTX({\n mintKP,\n authority,\n decimals,\n });\n await tx.confirm();\n return token;\n }\n /**\n * Gets an ATA address.\n * @returns\n */\n async getATAAddress({ mint, owner = this.walletKey, }) {\n return await (0, ata_js_1.getATAAddress)({ mint, owner });\n }\n /**\n * Gets an ATA address.\n * @returns\n */\n async getATAAddresses({ mints, owner = this.walletKey, }) {\n return await (0, ata_js_1.getATAAddresses)({ mints, owner });\n }\n /**\n * Gets an ATA, creating it if it doesn't exist.\n * @returns\n */\n async getOrCreateATA({ mint, owner = this.walletKey, }) {\n return await (0, ata_js_2.getOrCreateATA)({ provider: this.provider, mint, owner });\n }\n /**\n * Get or create multiple ATAs.\n * @returns\n */\n async getOrCreateATAs({ mints, owner = this.walletKey, }) {\n return await (0, ata_js_2.getOrCreateATAs)({ provider: this.provider, mints, owner });\n }\n /**\n * Loads a token from the blockchain, only if the decimals are not provided.\n * @param mint\n * @returns\n */\n async loadToken(mint, info = {}) {\n return token_js_1.Token.load(this.provider.connection, mint, info);\n }\n /**\n * Mints tokens to a token account.\n * @param mint\n * @returns\n */\n mintToAccount({ amount, destination, }) {\n return this.newTX([\n index_js_1.SPLToken.createMintToInstruction(spl_token_1.TOKEN_PROGRAM_ID, amount.token.mintAccount, destination, this.walletKey, [], amount.toU64()),\n ]);\n }\n /**\n * Mints tokens to the ATA of the `to` account.\n * @param amount The amount of tokens to mint.\n * @param to The owner of the ATA that may be created.\n * @returns\n */\n async mintTo({ amount, to = this.walletKey, }) {\n const toATA = await this.getOrCreateATA({\n mint: amount.token.mintAccount,\n owner: to,\n });\n const txEnv = this.mintToAccount({\n amount,\n destination: toATA.address,\n });\n txEnv.prepend(toATA.instruction);\n return txEnv;\n }\n /**\n * Fetches a mint.\n * @param address\n * @returns\n */\n async fetchMint(address) {\n const accountInfo = await this.getAccountInfo(address);\n if (accountInfo === null) {\n return null;\n }\n return (0, layout_js_1.deserializeMint)(accountInfo.accountInfo.data);\n }\n /**\n * Fetches a token account.\n * @param address\n * @returns\n */\n async fetchTokenAccount(address) {\n const tokenAccountInfo = await this.getAccountInfo(address);\n if (tokenAccountInfo === null) {\n return null;\n }\n return (0, layout_js_1.deserializeAccount)(tokenAccountInfo.accountInfo.data);\n }\n /**\n * Fetches an ATA.\n * @param mint\n * @param owner\n * @returns\n */\n async fetchATA(mint, owner = this.walletKey) {\n const taAddress = await (0, ata_js_1.getATAAddress)({ mint, owner });\n return await this.fetchTokenAccount(taAddress);\n }\n}\nexports.TokenAugmentedProvider = TokenAugmentedProvider;\n//# sourceMappingURL=tokenProvider.js.map","\"use strict\";\n/**\n * [[include:option-utils/README.md]]\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exists = exports.isNotUndefined = exports.isNotNull = exports.mapSome = exports.mapN = void 0;\n/**\n * Applies a function to a list of null/undefined values, unwrapping the null/undefined value or passing it through.\n */\nconst mapN = (fn, ...args) => {\n if (!args.every((arg) => arg !== undefined)) {\n return undefined;\n }\n if (!args.every((arg) => arg !== null)) {\n return null;\n }\n return fn(...args);\n};\nexports.mapN = mapN;\n/**\n * Applies a function to a null/undefined inner value if it is null or undefined,\n * otherwise returns null/undefined.\n *\n * For consistency reasons, we recommend just using {@link mapN} in all cases.\n *\n * @deprecated use {@link mapN}\n * @param obj\n * @param fn\n * @returns\n */\nconst mapSome = (obj, fn) => ((0, exports.exists)(obj) ? fn(obj) : obj);\nexports.mapSome = mapSome;\n/**\n * Checks to see if the provided value is not null.\n *\n * Useful for preserving types in filtering out non-null values.\n *\n * @param value\n * @returns\n */\nconst isNotNull = (value) => {\n return value !== null;\n};\nexports.isNotNull = isNotNull;\n/**\n * Checks to see if the provided value is not undefined.\n *\n * @param value\n * @returns\n */\nconst isNotUndefined = (value) => {\n return value !== undefined;\n};\nexports.isNotUndefined = isNotUndefined;\n/**\n * Checks to see if the provided value is not null or undefined.\n *\n * @param value\n * @returns\n */\nconst exists = (value) => {\n return value !== null && value !== undefined;\n};\nexports.exists = exists;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MultipleConnectionBroadcaster = exports.SingleConnectionBroadcaster = exports.DEFAULT_FALLBACK_RETRY_OPTIONS = exports.DEFAULT_RETRY_OPTIONS = void 0;\nconst tslib_1 = require(\"tslib\");\nconst error_js_1 = require(\"../error.js\");\nconst provider_js_1 = require(\"../provider.js\");\nconst index_js_1 = require(\"../transaction/index.js\");\nconst index_js_2 = require(\"../utils/index.js\");\nconst simulateTransactionWithCommitment_js_1 = require(\"../utils/simulateTransactionWithCommitment.js\");\nconst sendAndSpamRawTx_js_1 = require(\"./sendAndSpamRawTx.js\");\ntslib_1.__exportStar(require(\"./tiered.js\"), exports);\n/**\n * Default retry parameters.\n */\nexports.DEFAULT_RETRY_OPTIONS = {\n retryTimes: 3,\n retryInterval: 1000,\n};\n/**\n * Default retry parameters for fallbacks.\n */\nexports.DEFAULT_FALLBACK_RETRY_OPTIONS = {\n retryTimes: 10,\n retryInterval: 300,\n};\n/**\n * Broadcasts transactions to a single connection.\n */\nclass SingleConnectionBroadcaster {\n constructor(sendConnection, opts = provider_js_1.DEFAULT_PROVIDER_OPTIONS) {\n this.sendConnection = sendConnection;\n this.opts = opts;\n }\n /**\n * @inheritdoc\n */\n async getLatestBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.commitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n return await this.sendConnection.getLatestBlockhash(commitment);\n }\n /**\n * @inheritdoc\n */\n async getRecentBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.commitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n const result = await this.sendConnection.getLatestBlockhash(commitment);\n return result.blockhash;\n }\n /**\n * @inheritdoc\n */\n async broadcast(tx, { printLogs = true, ...opts } = this.opts) {\n if (tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before broadcasting.\");\n }\n const rawTx = tx.serialize();\n if (printLogs) {\n return new index_js_1.PendingTransaction(this.sendConnection, await (0, sendAndSpamRawTx_js_1.sendAndSpamRawTx)(this.sendConnection, rawTx, opts, opts));\n }\n return await (0, index_js_2.suppressConsoleErrorAsync)(async () => {\n // hide the logs of TX errors if printLogs = false\n return new index_js_1.PendingTransaction(this.sendConnection, await (0, sendAndSpamRawTx_js_1.sendAndSpamRawTx)(this.sendConnection, rawTx, opts, opts));\n });\n }\n /**\n * @inheritdoc\n */\n async simulate(tx, _a) {\n var _b, _c;\n var { commitment = (_b = this.opts.preflightCommitment) !== null && _b !== void 0 ? _b : \"confirmed\", verifySigners = true, } = _a === void 0 ? {\n commitment: (_c = this.opts.preflightCommitment) !== null && _c !== void 0 ? _c : \"confirmed\",\n verifySigners: true,\n } : _a;\n if (verifySigners && tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before simulating.\");\n }\n return await (0, simulateTransactionWithCommitment_js_1.simulateTransactionWithCommitment)(this.sendConnection, tx, commitment);\n }\n}\nexports.SingleConnectionBroadcaster = SingleConnectionBroadcaster;\n/**\n * Broadcasts transactions to multiple connections simultaneously.\n */\nclass MultipleConnectionBroadcaster {\n constructor(connections, opts = provider_js_1.DEFAULT_PROVIDER_OPTIONS) {\n this.connections = connections;\n this.opts = opts;\n }\n async getLatestBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.preflightCommitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n try {\n const result = await Promise.any(this.connections.map((conn) => conn.getLatestBlockhash(commitment)));\n return result;\n }\n catch (e) {\n if (e instanceof AggregateError) {\n throw (0, error_js_1.firstAggregateError)(e);\n }\n else {\n throw e;\n }\n }\n }\n async getRecentBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.preflightCommitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n try {\n const result = await Promise.any(this.connections.map((conn) => conn.getLatestBlockhash(commitment)));\n return result.blockhash;\n }\n catch (e) {\n if (e instanceof AggregateError) {\n throw (0, error_js_1.firstAggregateError)(e);\n }\n else {\n throw e;\n }\n }\n }\n async _sendRawTransaction(encoded, options) {\n try {\n return await Promise.any(this.connections.map(async (connection) => {\n return new index_js_1.PendingTransaction(connection, await (0, sendAndSpamRawTx_js_1.sendAndSpamRawTx)(connection, encoded, options !== null && options !== void 0 ? options : this.opts));\n }));\n }\n catch (e) {\n if (e instanceof AggregateError) {\n throw (0, error_js_1.firstAggregateError)(e);\n }\n else {\n throw e;\n }\n }\n }\n /**\n * Broadcasts a signed transaction.\n *\n * @param tx\n * @param confirm\n * @param opts\n * @returns\n */\n async broadcast(tx, { printLogs = true, ...opts } = this.opts) {\n if (tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before broadcasting.\");\n }\n const rawTx = tx.serialize();\n if (printLogs) {\n return await this._sendRawTransaction(rawTx, opts);\n }\n return await (0, index_js_2.suppressConsoleErrorAsync)(async () => {\n // hide the logs of TX errors if printLogs = false\n return await this._sendRawTransaction(rawTx, opts);\n });\n }\n /**\n * Simulates a transaction with a commitment.\n * @param tx\n * @param commitment\n * @returns\n */\n async simulate(tx, _a) {\n var _b, _c, _d, _e;\n var { commitment = (_c = (_b = this.opts.preflightCommitment) !== null && _b !== void 0 ? _b : this.opts.commitment) !== null && _c !== void 0 ? _c : \"confirmed\", verifySigners = true, } = _a === void 0 ? {\n commitment: (_e = (_d = this.opts.preflightCommitment) !== null && _d !== void 0 ? _d : this.opts.commitment) !== null && _e !== void 0 ? _e : \"confirmed\",\n verifySigners: true,\n } : _a;\n if (verifySigners && tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before simulating.\");\n }\n try {\n return await Promise.any(this.connections.map(async (connection) => {\n return await (0, simulateTransactionWithCommitment_js_1.simulateTransactionWithCommitment)(connection, tx, commitment);\n }));\n }\n catch (e) {\n if (e instanceof AggregateError) {\n throw (0, error_js_1.firstAggregateError)(e);\n }\n else {\n throw e;\n }\n }\n }\n}\nexports.MultipleConnectionBroadcaster = MultipleConnectionBroadcaster;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAndSpamRawTx = void 0;\nconst index_js_1 = require(\"../utils/index.js\");\nconst index_js_2 = require(\"./index.js\");\n/**\n * Sends and spams a raw transaction multiple times.\n * @param connection Connection to send the transaction to. We recommend using a public endpoint such as GenesysGo.\n * @param rawTx\n * @param opts\n */\nconst sendAndSpamRawTx = async (connection, rawTx, sendOptions, { retryTimes = index_js_2.DEFAULT_RETRY_OPTIONS.retryTimes, retryInterval = index_js_2.DEFAULT_RETRY_OPTIONS.retryInterval, } = index_js_2.DEFAULT_RETRY_OPTIONS) => {\n const result = await connection.sendRawTransaction(rawTx, sendOptions);\n // if we could send the TX with preflight, let's spam it.\n void (async () => {\n // technique stolen from Mango.\n for (let i = 0; i < retryTimes; i++) {\n try {\n await (0, index_js_1.sleep)(retryInterval);\n await connection.sendRawTransaction(rawTx, {\n ...sendOptions,\n skipPreflight: true,\n });\n }\n catch (e) {\n console.warn(`[Broadcaster] sendAndSpamRawTx error`, e);\n }\n }\n })();\n return result;\n};\nexports.sendAndSpamRawTx = sendAndSpamRawTx;\n//# sourceMappingURL=sendAndSpamRawTx.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TieredBroadcaster = void 0;\nconst provider_js_1 = require(\"../provider.js\");\nconst index_js_1 = require(\"../transaction/index.js\");\nconst index_js_2 = require(\"../utils/index.js\");\nconst index_js_3 = require(\"./index.js\");\nconst sendAndSpamRawTx_js_1 = require(\"./sendAndSpamRawTx.js\");\n/**\n * Broadcasts transactions to multiple connections simultaneously.\n */\nclass TieredBroadcaster {\n constructor(primaryConnection, \n /**\n * Connections to send to in addition to the primary.\n */\n fallbackConnections, opts = provider_js_1.DEFAULT_PROVIDER_OPTIONS) {\n this.primaryConnection = primaryConnection;\n this.fallbackConnections = fallbackConnections;\n this.opts = opts;\n this.premiumBroadcaster = new index_js_3.SingleConnectionBroadcaster(primaryConnection, opts);\n }\n async getLatestBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.preflightCommitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n return await this.premiumBroadcaster.getLatestBlockhash(commitment);\n }\n async getRecentBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.preflightCommitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n return await this.premiumBroadcaster.getRecentBlockhash(commitment);\n }\n async _sendRawTransaction(encoded, options) {\n const pending = new index_js_1.PendingTransaction(this.primaryConnection, await (0, sendAndSpamRawTx_js_1.sendAndSpamRawTx)(this.primaryConnection, encoded, options !== null && options !== void 0 ? options : this.opts, options !== null && options !== void 0 ? options : index_js_3.DEFAULT_RETRY_OPTIONS));\n void (async () => {\n await Promise.all(this.fallbackConnections.map(async (fc) => {\n var _a;\n try {\n await (0, sendAndSpamRawTx_js_1.sendAndSpamRawTx)(fc, encoded, options !== null && options !== void 0 ? options : this.opts, (_a = options === null || options === void 0 ? void 0 : options.fallbackRetryOptions) !== null && _a !== void 0 ? _a : index_js_3.DEFAULT_FALLBACK_RETRY_OPTIONS);\n }\n catch (e) {\n console.warn(`[Broadcaster] _sendRawTransaction error`, e);\n }\n }));\n })();\n return pending;\n }\n /**\n * Broadcasts a signed transaction.\n *\n * @param tx\n * @param confirm\n * @param opts\n * @returns\n */\n async broadcast(tx, { printLogs = true, ...opts } = this.opts) {\n if (tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before broadcasting.\");\n }\n const rawTx = tx.serialize();\n if (printLogs) {\n return await this._sendRawTransaction(rawTx, opts);\n }\n return await (0, index_js_2.suppressConsoleErrorAsync)(async () => {\n // hide the logs of TX errors if printLogs = false\n return await this._sendRawTransaction(rawTx, opts);\n });\n }\n /**\n * Simulates a transaction with a commitment.\n * @param tx\n * @param commitment\n * @returns\n */\n async simulate(tx, _a) {\n var _b, _c;\n var { commitment = (_b = this.opts.preflightCommitment) !== null && _b !== void 0 ? _b : \"confirmed\", verifySigners = true, } = _a === void 0 ? {\n commitment: (_c = this.opts.preflightCommitment) !== null && _c !== void 0 ? _c : \"confirmed\",\n verifySigners: true,\n } : _a;\n if (verifySigners && tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before simulating.\");\n }\n return this.premiumBroadcaster.simulate(tx, {\n commitment,\n verifySigners,\n });\n }\n}\nexports.TieredBroadcaster = TieredBroadcaster;\n//# sourceMappingURL=tiered.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.COMPUTE_BUDGET_PROGRAM = void 0;\nconst tslib_1 = require(\"tslib\");\nconst web3_js_1 = require(\"@solana/web3.js\");\n/**\n * The compute budget program.\n * Source: https://github.com/solana-labs/solana/blob/master/program-runtime/src/compute_budget.rs#L101\n */\nexports.COMPUTE_BUDGET_PROGRAM = new web3_js_1.PublicKey(\"ComputeBudget111111111111111111111111111111\");\ntslib_1.__exportStar(require(\"./instructions.js\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.requestHeapFrameInstruction = exports.requestComputeUnitsInstruction = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst index_js_1 = require(\"./index.js\");\nconst layouts_js_1 = require(\"./layouts.js\");\n/**\n * Request a specific maximum number of compute units the transaction is\n * allowed to consume and an additional fee to pay.\n */\nconst requestComputeUnitsInstruction = (units, additionalFee) => {\n const data = Buffer.alloc(layouts_js_1.RequestUnitsLayout.span);\n layouts_js_1.RequestUnitsLayout.encode({ instruction: 0, units, additionalFee }, data);\n return new web3_js_1.TransactionInstruction({\n data,\n keys: [],\n programId: index_js_1.COMPUTE_BUDGET_PROGRAM,\n });\n};\nexports.requestComputeUnitsInstruction = requestComputeUnitsInstruction;\n/**\n * Request a specific transaction-wide program heap region size in bytes.\n * The value requested must be a multiple of 1024. This new heap region\n * size applies to each program executed, including all calls to CPIs.\n */\nconst requestHeapFrameInstruction = (bytes) => {\n const data = Buffer.alloc(layouts_js_1.RequestHeapFrameLayout.span);\n layouts_js_1.RequestHeapFrameLayout.encode({ instruction: 1, bytes }, data);\n return new web3_js_1.TransactionInstruction({\n data,\n keys: [],\n programId: index_js_1.COMPUTE_BUDGET_PROGRAM,\n });\n};\nexports.requestHeapFrameInstruction = requestHeapFrameInstruction;\n//# sourceMappingURL=instructions.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RequestHeapFrameLayout = exports.RequestUnitsLayout = void 0;\nconst tslib_1 = require(\"tslib\");\nconst BufferLayout = tslib_1.__importStar(require(\"@solana/buffer-layout\"));\nexports.RequestUnitsLayout = BufferLayout.struct([\n BufferLayout.u8(\"instruction\"),\n BufferLayout.u32(\"units\"),\n BufferLayout.u32(\"additionalFee\"),\n]);\nexports.RequestHeapFrameLayout = BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"bytes\")]);\n//# sourceMappingURL=layouts.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_NETWORK_CONFIG_MAP = exports.formatNetwork = void 0;\n/**\n * Formats the network as a string.\n * @param network\n * @returns\n */\nconst formatNetwork = (network) => {\n if (network === \"mainnet-beta\") {\n return \"mainnet\";\n }\n return network;\n};\nexports.formatNetwork = formatNetwork;\n/**\n * Default configuration for all networks.\n */\nexports.DEFAULT_NETWORK_CONFIG_MAP = {\n \"mainnet-beta\": {\n name: \"Mainnet Beta\",\n endpoint: \"https://api.mainnet-beta.solana.com/\",\n },\n devnet: {\n name: \"Devnet\",\n endpoint: \"https://api.devnet.solana.com/\",\n },\n testnet: {\n name: \"Testnet\",\n endpoint: \"https://api.testnet.solana.com/\",\n },\n localnet: {\n name: \"Localnet\",\n endpoint: \"http://127.0.0.1:8899\",\n },\n};\n//# sourceMappingURL=constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.firstAggregateError = void 0;\nconst firstAggregateError = (err) => {\n const errors = err.errors;\n const [firstError, ...remErrors] = [errors.pop(), ...errors];\n if (remErrors.length > 0) {\n console.error(remErrors);\n }\n return firstError;\n};\nexports.firstAggregateError = firstAggregateError;\n//# sourceMappingURL=error.js.map","\"use strict\";\n/**\n * [[include:solana-contrib/README.md]]\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./broadcaster/index.js\"), exports);\ntslib_1.__exportStar(require(\"./constants.js\"), exports);\ntslib_1.__exportStar(require(\"./interfaces.js\"), exports);\ntslib_1.__exportStar(require(\"./provider.js\"), exports);\ntslib_1.__exportStar(require(\"./transaction/index.js\"), exports);\ntslib_1.__exportStar(require(\"./utils/index.js\"), exports);\ntslib_1.__exportStar(require(\"./wallet.js\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=interfaces.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SolanaAugmentedProvider = exports.SolanaProvider = exports.SolanaTransactionSigner = exports.doSignAndBroadcastTransaction = exports.SolanaReadonlyProvider = exports.DEFAULT_READONLY_PUBLIC_KEY = exports.DEFAULT_PROVIDER_OPTIONS = void 0;\nconst tslib_1 = require(\"tslib\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst tiny_invariant_1 = tslib_1.__importDefault(require(\"tiny-invariant\"));\nconst index_js_1 = require(\"./broadcaster/index.js\");\nconst index_js_2 = require(\"./index.js\");\nconst TransactionEnvelope_js_1 = require(\"./transaction/TransactionEnvelope.js\");\nexports.DEFAULT_PROVIDER_OPTIONS = {\n preflightCommitment: \"confirmed\",\n commitment: \"confirmed\",\n};\nexports.DEFAULT_READONLY_PUBLIC_KEY = web3_js_1.SystemProgram.programId;\n/**\n * Provider that can only read.\n */\nclass SolanaReadonlyProvider {\n /**\n * @param connection The cluster connection where the program is deployed.\n * @param opts Transaction confirmation options to use by default.\n * @param publicKey Optional public key of read-only wallet.\n */\n constructor(connection, opts = exports.DEFAULT_PROVIDER_OPTIONS, publicKey = exports.DEFAULT_READONLY_PUBLIC_KEY) {\n this.connection = connection;\n this.opts = opts;\n this.publicKey = publicKey;\n this.wallet = {\n signTransaction: Promise.resolve.bind(Promise),\n signAllTransactions: Promise.resolve.bind(Promise),\n publicKey: exports.DEFAULT_READONLY_PUBLIC_KEY,\n };\n this.wallet = {\n ...this.wallet,\n publicKey,\n };\n }\n /**\n * Gets\n * @param accountId\n * @returns\n */\n async getAccountInfo(accountId) {\n const accountInfo = await this.connection.getAccountInfo(accountId, this.opts.commitment);\n if (!accountInfo) {\n return null;\n }\n return {\n accountId,\n accountInfo,\n };\n }\n}\nexports.SolanaReadonlyProvider = SolanaReadonlyProvider;\nconst doSignAndBroadcastTransaction = async (wallet, transaction, broadcaster, opts) => {\n const tx = await wallet.signTransaction(transaction);\n if ((opts === null || opts === void 0 ? void 0 : opts.signers) && opts.signers.length > 0) {\n tx.sign(...opts.signers);\n }\n return await broadcaster.broadcast(tx, opts);\n};\nexports.doSignAndBroadcastTransaction = doSignAndBroadcastTransaction;\n/**\n * Signs Solana transactions.\n */\nclass SolanaTransactionSigner {\n constructor(wallet, broadcaster, preflightCommitment = \"confirmed\") {\n this.wallet = wallet;\n this.broadcaster = broadcaster;\n this.preflightCommitment = preflightCommitment;\n }\n get publicKey() {\n return this.wallet.publicKey;\n }\n async signAndBroadcastTransaction(transaction, opts) {\n return await (0, exports.doSignAndBroadcastTransaction)(this.wallet, transaction, this.broadcaster, opts);\n }\n /**\n * Sends the given transaction, paid for and signed by the provider's wallet.\n *\n * @param tx The transaction to send.\n * @param signers The set of signers in addition to the provdier wallet that\n * will sign the transaction.\n * @param opts Transaction confirmation options.\n */\n async sign(tx, signers = [], opts = {\n preflightCommitment: this.preflightCommitment,\n }) {\n const { blockhash, lastValidBlockHeight } = await this.broadcaster.getLatestBlockhash(opts.preflightCommitment);\n tx.feePayer = this.wallet.publicKey;\n tx.lastValidBlockHeight = lastValidBlockHeight;\n tx.recentBlockhash = blockhash;\n await this.wallet.signTransaction(tx);\n signers\n .filter((s) => s !== undefined)\n .forEach((kp) => {\n tx.partialSign(kp);\n });\n return tx;\n }\n /**\n * Similar to `send`, but for an array of transactions and signers.\n */\n async signAll(reqs, opts = {\n preflightCommitment: this.preflightCommitment,\n }) {\n const { blockhash, lastValidBlockHeight } = await this.broadcaster.getLatestBlockhash(opts.preflightCommitment);\n const txs = reqs.map(({ tx, signers = [] }) => {\n tx.feePayer = this.wallet.publicKey;\n tx.lastValidBlockHeight = lastValidBlockHeight;\n tx.recentBlockhash = blockhash;\n signers\n .filter((s) => s !== undefined)\n .forEach((kp) => {\n tx.partialSign(kp);\n });\n return tx;\n });\n const signedTxs = await this.wallet.signAllTransactions(txs);\n return signedTxs;\n }\n}\nexports.SolanaTransactionSigner = SolanaTransactionSigner;\n/**\n * The network and wallet context used to send transactions paid for and signed\n * by the provider.\n *\n * This implementation was taken from Anchor.\n */\nclass SolanaProvider extends SolanaReadonlyProvider {\n /**\n * @param connection The cluster connection where the program is deployed.\n * @param sendConnection The connection where transactions are sent to.\n * @param wallet The wallet used to pay for and sign all transactions.\n * @param opts Transaction confirmation options to use by default.\n */\n constructor(connection, broadcaster, wallet, opts = exports.DEFAULT_PROVIDER_OPTIONS, signer = new SolanaTransactionSigner(wallet, broadcaster, opts.preflightCommitment)) {\n super(connection, opts);\n this.connection = connection;\n this.broadcaster = broadcaster;\n this.wallet = wallet;\n this.opts = opts;\n this.signer = signer;\n }\n async signAndBroadcastTransaction(transaction, opts) {\n return await this.signer.signAndBroadcastTransaction(transaction, opts);\n }\n /**\n * Creates a new SolanaProvider.\n * @deprecated use {@link SolanaProvider.init}\n */\n static load({ connection, sendConnection = connection, wallet, opts, }) {\n return new SolanaProvider(connection, new index_js_1.SingleConnectionBroadcaster(sendConnection, opts), wallet, opts);\n }\n /**\n * Initializes a new SolanaProvider.\n */\n static init({ connection, broadcastConnections = [connection], wallet, opts = exports.DEFAULT_PROVIDER_OPTIONS, }) {\n const firstBroadcastConnection = broadcastConnections[0];\n (0, tiny_invariant_1.default)(firstBroadcastConnection, \"must have at least one broadcast connection\");\n return new SolanaProvider(connection, broadcastConnections.length > 1\n ? new index_js_2.TieredBroadcaster(connection, broadcastConnections, opts)\n : new index_js_1.SingleConnectionBroadcaster(firstBroadcastConnection, opts), wallet, opts);\n }\n /**\n * Sends the given transaction, paid for and signed by the provider's wallet.\n *\n * @param tx The transaction to send.\n * @param signers The set of signers in addition to the provider wallet that\n * will sign the transaction.\n * @param opts Transaction confirmation options.\n */\n async send(tx, signers = [], opts = this.opts) {\n const theTx = await this.signer.sign(tx, signers, opts);\n const pending = await this.broadcaster.broadcast(theTx, opts);\n await pending.wait();\n return pending;\n }\n /**\n * Similar to `send`, but for an array of transactions and signers.\n */\n async sendAll(reqs, opts = this.opts) {\n const txs = await this.signer.signAll(reqs, opts);\n return await Promise.all(txs.map(async (tx) => {\n const pending = await this.broadcaster.broadcast(tx, opts);\n await pending.wait();\n return pending;\n }));\n }\n /**\n * Simulates the given transaction, returning emitted logs from execution.\n *\n * @param tx The transaction to send.\n * @param signers The set of signers in addition to the provider wallet that\n * will sign the transaction. If specified, the provider will\n * sign the transaction.\n * @param opts Transaction confirmation options.\n */\n async simulate(tx, signers, opts = this.opts) {\n let simTX = tx;\n if (signers !== undefined) {\n simTX = await this.signer.sign(tx, signers, opts);\n }\n return await this.broadcaster.simulate(simTX, {\n verifySigners: signers !== undefined,\n commitment: opts.commitment,\n });\n }\n}\nexports.SolanaProvider = SolanaProvider;\n/**\n * Wrapper for a Provider containing utility functions.\n */\nclass SolanaAugmentedProvider {\n constructor(provider) {\n this.provider = provider;\n }\n get walletKey() {\n return this.provider.wallet.publicKey;\n }\n get connection() {\n return this.provider.connection;\n }\n get signer() {\n return this.provider.signer;\n }\n get broadcaster() {\n return this.provider.broadcaster;\n }\n get opts() {\n return this.provider.opts;\n }\n get wallet() {\n return this.provider.wallet;\n }\n signAndBroadcastTransaction(transaction, opts) {\n return this.provider.signAndBroadcastTransaction(transaction, opts);\n }\n send(tx, signers, opts) {\n return this.provider.send(tx, signers, opts);\n }\n sendAll(reqs, opts) {\n return this.provider.sendAll(reqs, opts);\n }\n simulate(tx, signers, opts) {\n return this.provider.simulate(tx, signers, opts);\n }\n getAccountInfo(accountId) {\n return this.provider.getAccountInfo(accountId);\n }\n /**\n * Creates a new transaction using this Provider.\n * @param instructions\n * @param signers\n * @returns\n */\n newTX(instructions = [], signers = []) {\n return TransactionEnvelope_js_1.TransactionEnvelope.create(this, instructions, signers);\n }\n /**\n * Requests an airdrop of tokens.\n * @param amount\n * @returns\n */\n async requestAirdrop(lamports, to = this.wallet.publicKey) {\n return new index_js_2.PendingTransaction(this.connection, await this.connection.requestAirdrop(to, lamports));\n }\n /**\n * Returns this provider with a different signer.\n * @param signer\n * @returns\n */\n withSigner(signer) {\n return new SolanaAugmentedProvider(new SolanaProvider(this.connection, this.broadcaster, new index_js_2.SignerWallet(signer), this.opts));\n }\n}\nexports.SolanaAugmentedProvider = SolanaAugmentedProvider;\n//# sourceMappingURL=provider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PendingTransaction = void 0;\nconst tslib_1 = require(\"tslib\");\nconst promise_retry_1 = tslib_1.__importDefault(require(\"promise-retry\"));\nconst txLink_js_1 = require(\"../utils/txLink.js\");\nconst TransactionReceipt_js_1 = require(\"./TransactionReceipt.js\");\n/**\n * Transaction which may or may not be confirmed.\n */\nclass PendingTransaction {\n constructor(connection, signature) {\n this.connection = connection;\n this.signature = signature;\n this._receipt = null;\n }\n /**\n * Gets the transaction receipt, if it has already been fetched.\n *\n * You probably want the async version of this function, `wait`.\n */\n get receipt() {\n return this._receipt;\n }\n /**\n * Waits for the confirmation of the transaction.\n * @returns\n */\n async wait({ commitment = \"confirmed\", maxSupportedTransactionVersion = 0, useWebsocket = true, ...retryOpts } = {}) {\n if (this._receipt) {\n return this._receipt;\n }\n if (useWebsocket) {\n await this.confirm({ commitment, ...retryOpts });\n return await this.pollForReceipt({\n commitment,\n maxSupportedTransactionVersion,\n });\n }\n return await this.pollForReceipt({\n commitment,\n maxSupportedTransactionVersion,\n ...retryOpts,\n });\n }\n /**\n * Fetches the TransactionReceipt via polling.\n * @returns\n */\n async pollForReceipt({ commitment = \"confirmed\", maxSupportedTransactionVersion = 0, ...retryOpts } = {}) {\n const receipt = await (0, promise_retry_1.default)(async (retry) => {\n const result = await this.connection.getTransaction(this.signature, {\n commitment,\n maxSupportedTransactionVersion,\n });\n if (!result) {\n retry(new Error(\"Error fetching transaction\"));\n return;\n }\n return new TransactionReceipt_js_1.TransactionReceipt(this.signature, result);\n }, {\n retries: 5,\n minTimeout: 500,\n ...retryOpts,\n });\n if (!receipt) {\n throw new Error(\"transaction could not be confirmed\");\n }\n this._receipt = receipt;\n return receipt;\n }\n /**\n * Awaits the confirmation of the transaction, via onSignature subscription.\n *\n * @deprecated use {@link PendingTransaction#confirm}\n * @returns\n */\n async awaitSignatureConfirmation(commitment = \"confirmed\") {\n const { value } = await this.connection.confirmTransaction(this.signature, commitment);\n if (value.err) {\n throw value.err;\n }\n return this.signature;\n }\n /**\n * Awaits the confirmation of the transaction, via onSignature subscription.\n * @returns\n */\n async confirm({ commitment = \"confirmed\", blockhash, lastValidBlockHeight, }) {\n let value;\n if (blockhash && lastValidBlockHeight) {\n value = (await this.connection.confirmTransaction({\n signature: this.signature,\n blockhash,\n lastValidBlockHeight,\n }, commitment)).value;\n }\n else {\n value = (await this.connection.confirmTransaction(this.signature, commitment)).value;\n }\n if (value.err) {\n throw new Error(`Transaction ${this.signature} failed (${JSON.stringify(value)})`);\n }\n return this.signature;\n }\n /**\n * Generates a link to view this {@link PendingTransaction} on the official Solana explorer.\n * @param network\n * @returns\n */\n generateSolanaExplorerLink(cluster = \"mainnet-beta\") {\n return (0, txLink_js_1.generateTXLink)(this.signature, cluster);\n }\n}\nexports.PendingTransaction = PendingTransaction;\n//# sourceMappingURL=PendingTransaction.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TransactionEnvelope = exports.PACKET_DATA_SIZE = void 0;\nconst tslib_1 = require(\"tslib\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst tiny_invariant_1 = tslib_1.__importDefault(require(\"tiny-invariant\"));\nconst index_js_1 = require(\"../computeBudget/index.js\");\nconst index_js_2 = require(\"../utils/index.js\");\nconst txSizer_js_1 = require(\"./txSizer.js\");\nconst utils_js_1 = require(\"./utils.js\");\nexports.PACKET_DATA_SIZE = 1280 - 40 - 8;\nconst ASSOCIATED_TOKEN_PROGRAM_ID = new web3_js_1.PublicKey(\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\");\n/**\n * Filters the required signers for a list of instructions.\n * @param ixs\n * @returns\n */\nconst filterRequiredSigners = (ixs, signers) => {\n // filter out the signers required for the transaction\n const requiredSigners = ixs.flatMap((ix) => ix.keys.filter((k) => k.isSigner).map((k) => k.pubkey));\n return signers.filter((s) => requiredSigners.find((rs) => rs.equals(s.publicKey)));\n};\n/**\n * Contains a Transaction that is being built.\n */\nclass TransactionEnvelope {\n constructor(\n /**\n * Provider that will be sending the transaction as the fee payer.\n */\n provider, \n /**\n * Instructions associated with the transaction.\n */\n instructions, \n /**\n * Optional signers of the transaction.\n */\n signers = []) {\n this.provider = provider;\n this.instructions = instructions;\n this.signers = signers;\n }\n /**\n * Prepends the given {@link TransactionInstruction}s to the {@link TransactionEnvelope}.\n * @param instructions The instructions to prepend.\n * @returns\n */\n prepend(...instructions) {\n this.instructions.unshift(...instructions.filter((ix) => !!ix));\n return this;\n }\n /**\n * Appends the given {@link TransactionInstruction}s to the {@link TransactionEnvelope}.\n * @param instructions The instructions to append.\n * @returns\n */\n append(...instructions) {\n this.instructions.push(...instructions.filter((ix) => !!ix));\n return this;\n }\n /**\n * A the given {@link TransactionInstruction}s to the {@link TransactionEnvelope}.\n * @param instructions The instructions to add.\n * @deprecated Use {@link #append} instead.\n * @returns\n */\n addInstructions(...instructions) {\n return this.append(...instructions);\n }\n /**\n * Adds the given {@link Signer}s to the {@link TransactionEnvelope}.\n * @param signers The signers to add.\n * @returns\n */\n addSigners(...signers) {\n this.signers.push(...signers);\n return this;\n }\n /**\n * Builds a transaction from this envelope.\n * @param feePayer Optional override for the fee payer.\n */\n build(feePayer = this.provider.wallet.publicKey) {\n const tx = new web3_js_1.Transaction().add(...this.instructions);\n tx.feePayer = feePayer;\n return tx;\n }\n /**\n * Builds a transaction and estimates the size in bytes.\n * Does not check to see if the transaction is too big.\n *\n * @returns Byte count\n */\n estimateSizeUnsafe() {\n const builtTx = this.build();\n // dummy blockhash that is required for building the transaction\n builtTx.recentBlockhash = \"MaryHadALittLeLambZNdhAUTrsLE1ydg6rmtvFEpKT\";\n return (0, txSizer_js_1.calculateTxSizeUnsafe)(builtTx);\n }\n /**\n * Builds a transaction and estimates the size in bytes. This number is primrily\n * to be used for checking to see if a transaction is too big and instructions\n * need to be split. It may not be 100% accurate.\n *\n * This is used in expectTXTable and is useful for increasing efficiency in\n * dapps that build large transactions.\n *\n * The max transaction size of a v1 Transaction in Solana is 1232 bytes.\n * For info about Transaction v2: https://docs.solana.com/proposals/transactions-v2\n */\n estimateSize() {\n return (0, index_js_2.suppressConsoleError)(() => {\n try {\n const builtTx = this.build();\n // dummy blockhash that is required for building the transaction\n builtTx.recentBlockhash = \"MaryHadALittLeLambZNdhAUTrsLE1ydg6rmtvFEpKT\";\n const size = (0, txSizer_js_1.calculateTxSizeUnsafe)(builtTx);\n if (size > exports.PACKET_DATA_SIZE) {\n return { error: new index_js_2.EstimatedTXTooBigError(builtTx, size) };\n }\n return { size };\n }\n catch (e) {\n return { error: new index_js_2.TXSizeEstimationError(e) };\n }\n });\n }\n /**\n * Partition a large {@link TransactionEnvelope} into smaller, valid {@link Transaction}s.\n * This relies on this envelope already having the correct number of signers.\n *\n * @param feePayer Optional fee payer override.\n * @returns A list of {@link Transaction}s.\n */\n buildPartition(feePayer = this.provider.wallet.publicKey) {\n const partition = this.partition();\n return partition.map((env) => env.build(feePayer));\n }\n /**\n * Partition a large {@link TransactionEnvelope} into smaller, valid transaction envelopes which can be built.\n * This relies on this envelope already having the correct number of signers.\n *\n * @returns\n */\n partition() {\n const estimation = this.estimateSize();\n if (\"size\" in estimation) {\n return [this];\n }\n // empty partition should have no envelopes\n if (this.instructions.length === 0) {\n return [];\n }\n let lastTXEnv = new TransactionEnvelope(this.provider, this.instructions.slice(0, 1), this._filterRequiredSigners(this.instructions.slice(0, 1)));\n let lastEstimation = lastTXEnv.estimateSizeUnsafe();\n const txs = [];\n this.instructions.slice(1).forEach((ix, i) => {\n if (lastEstimation > exports.PACKET_DATA_SIZE) {\n throw new Error(`cannot construct a valid partition: instruction ${i} is too large (${lastEstimation} > ${exports.PACKET_DATA_SIZE})`);\n }\n const nextIXs = [...lastTXEnv.instructions, ix];\n const nextSigners = this._filterRequiredSigners(nextIXs);\n const nextTXEnv = new TransactionEnvelope(this.provider, nextIXs, nextSigners);\n const nextEstimation = nextTXEnv.estimateSizeUnsafe();\n // move to next tx envelope if too big\n if (nextEstimation > exports.PACKET_DATA_SIZE) {\n txs.push(lastTXEnv);\n const nextIXs = [ix];\n lastTXEnv = new TransactionEnvelope(this.provider, nextIXs, this._filterRequiredSigners(nextIXs));\n lastEstimation = lastTXEnv.estimateSizeUnsafe();\n }\n else {\n lastTXEnv = nextTXEnv;\n lastEstimation = nextEstimation;\n }\n });\n txs.push(lastTXEnv);\n return txs;\n }\n /**\n * Filters the required signers for a list of instructions.\n * @param ixs\n * @returns\n */\n _filterRequiredSigners(ixs) {\n return filterRequiredSigners(ixs, this.signers);\n }\n /**\n * Generates a link for inspecting the contents of this {@link TransactionEnvelope}.\n *\n * @returns URL\n */\n generateInspectLink(cluster = \"mainnet-beta\") {\n const t = this.build();\n t.recentBlockhash = utils_js_1.RECENT_BLOCKHASH_STUB;\n const str = t.serializeMessage().toString(\"base64\");\n return (0, utils_js_1.generateInspectLinkFromBase64)(cluster, str);\n }\n /**\n * Simulates the transaction.\n * @param opts\n * @returns\n */\n simulate(opts = {\n verifySigners: true,\n }) {\n return this.provider.simulate(this.build(), opts.verifySigners ? this.signers : undefined, opts);\n }\n /**\n * Simulates the transaction, without validating signers.\n *\n * @deprecated Use {@link TXEnvelope#simulate} instead.\n * @param opts\n * @returns\n */\n simulateUnchecked(opts) {\n return this.simulate({ ...opts, verifySigners: false });\n }\n /**\n * Simulates the transaction and prints a fancy table in the console.\n * ```\n * ┌─────┬───┬───┬───┬───────────┬──────┬─────┬──────┬───┐\n * │index│iso│mar│cum│ programId │quota │used │ left │CPI│\n * ├─────┼───┼───┼───┼───────────┼──────┼─────┼──────┼───┤\n * │ 0 │298│281│464│'ATokenG..'│200000│24270│175730│ 1 │\n * │ 1 │298│ 74│538│'ATokenG..'│178730│21270│157460│ 1 │\n * │ 2 │298│ 74│612│'ATokenG..'│157460│27277│130183│ 1 │\n * │ 3 │298│ 42│686│'ATokenG..'│130183│21270│108913│ 1 │\n * │ 4 │338│265│951│'qExampL..'│108913│76289│ 32624│ 3 │\n * └─────┴───┴───┴───┴───────────┴──────┴─────┴──────┴───┘\n * ```\n *\n * - **index**: the array index of the instruction within the transaction\n * - **iso**: the isolated size of the instruction (marginal cost of only the instruction)\n * - **mar**: the marginal size cost of the instruction (when added to previous)\n * - **cum**: the cumulative size of the instructions up until that instruction\n * - **quota/used/left**: [BPF instruction compute unit info](https://docs.solana.com/developing/programming-model/runtime)\n * - **CPI**: [the maximum depth of CPI](https://docs.solana.com/developing/programming-model/calling-between-programs) (current limit in Solana is 4)\n *\n * @param opts\n * @returns\n */\n simulateTable(opts) {\n return this.simulate(opts).then((simulation) => {\n var _a;\n if ((_a = simulation === null || simulation === void 0 ? void 0 : simulation.value) === null || _a === void 0 ? void 0 : _a.logs) {\n (0, index_js_2.printTXTable)(this, simulation.value.logs, \"\");\n }\n return simulation;\n });\n }\n /**\n * Sends the transaction without confirming it.\n * @param opts\n * @returns\n */\n async send(opts) {\n const signed = await this.provider.signer.sign(this.build(), this.signers, opts);\n return this.provider.broadcaster.broadcast(signed, opts);\n }\n /**\n * Sends the transaction and waits for confirmation.\n * @param opts\n */\n async confirm(opts) {\n return (await this.send(opts)).wait();\n }\n /**\n * Combines the instructions/signers of the other envelope to create one large transaction.\n */\n combine(other) {\n return new TransactionEnvelope(this.provider, [...this.instructions, ...other.instructions], [...this.signers, ...other.signers]);\n }\n /**\n * Get a list of all writable accounts, deduped\n * All of these accounts likely need to be updated after the transaction is confirmed.\n */\n get writableKeys() {\n return [\n ...new Set([\n ...this.instructions\n .map((inst) => inst.keys.filter((key) => key.isWritable).map((k) => k.pubkey))\n .reduce((acc, el) => acc.concat(el)),\n ]).values(),\n ];\n }\n /**\n * Gets the instructions in a format that can be serialized easily to JSON.\n */\n get instructionsJSON() {\n return this.instructions.map((instruction) => ({\n programId: instruction.programId.toString(),\n keys: instruction.keys.map((m) => ({\n isSigner: m.isSigner,\n isWritable: m.isWritable,\n publicKey: m.pubkey.toString(),\n })),\n data: instruction.data.toString(\"base64\"),\n }));\n }\n /**\n * Returns a string representation of the {@link TransactionEnvelope}.\n */\n get debugStr() {\n return [\n \"=> Instructions\",\n this.instructions\n .map((ser, i) => {\n return [\n `Instruction ${i}: ${ser.programId.toString()}`,\n ...ser.keys.map((k, i) => ` [${i}] ${k.pubkey.toString()} ${k.isWritable ? \"(mut)\" : \"\"} ${k.isSigner ? \"(signer)\" : \"\"}`),\n ` Data (base64): ${ser.data.toString(\"base64\")}`,\n ].join(\"\\n\");\n })\n .join(\"\\n\"),\n \"=> Signers\",\n this.signers.map((sg) => sg.publicKey.toString()).join(\"\\n\"),\n ].join(\"\\n\");\n }\n /**\n * Creates a new {@link TransactionEnvelope}.\n * @param provider\n * @param instructions\n * @param signers\n * @returns\n */\n static create(provider, instructions, signers = []) {\n const ixs = instructions.filter((ix) => !!ix);\n return new TransactionEnvelope(provider, ixs, signers);\n }\n /**\n * Add a memo to each transaction envelope specified.\n */\n static addMemos(memo, ...txs) {\n return txs.map((tx) => tx.addMemo(memo));\n }\n /**\n * Combines multiple TransactionEnvelopes into one.\n */\n static combineAll(...txs) {\n return txs.reduce((acc, tx) => acc.combine(tx));\n }\n /**\n * Takes a list of {@link TransactionEnvelope}s and combines them if they\n * are able to be combined under the maximum TX size limit.\n *\n * @param txs\n * @returns\n */\n static pack(...txs) {\n if (txs.length === 0) {\n return [];\n }\n const [first, ...rest] = txs;\n (0, tiny_invariant_1.default)(first);\n const { provider } = first;\n let lastTXEnv = first;\n let lastEstimation = lastTXEnv.estimateSizeUnsafe();\n const partition = [];\n rest.forEach((addedTX, i) => {\n if (lastEstimation > exports.PACKET_DATA_SIZE) {\n throw new Error(`cannot construct a valid partition: instruction ${i} is too large (${lastEstimation} > ${exports.PACKET_DATA_SIZE})`);\n }\n const nextIXs = [...lastTXEnv.instructions, ...addedTX.instructions];\n const nextSigners = filterRequiredSigners(nextIXs, [\n ...lastTXEnv.signers,\n ...addedTX.signers,\n ]);\n const nextTXEnv = new TransactionEnvelope(provider, nextIXs, nextSigners);\n const nextEstimation = nextTXEnv.estimateSizeUnsafe();\n // move to next tx envelope if too big\n if (nextEstimation > exports.PACKET_DATA_SIZE) {\n partition.push(lastTXEnv);\n lastTXEnv = addedTX;\n lastEstimation = lastTXEnv.estimateSizeUnsafe();\n }\n else {\n lastTXEnv = nextTXEnv;\n lastEstimation = nextEstimation;\n }\n });\n partition.push(lastTXEnv);\n return partition;\n }\n /**\n * Combines multiple async TransactionEnvelopes into one, serially.\n */\n static async combineAllAsync(firstTX, ...txs) {\n let acc = await firstTX;\n for (const tx of txs) {\n acc = acc.combine(await tx);\n }\n return acc;\n }\n /**\n * Sends all of the envelopes.\n * @returns Pending transactions\n */\n static async sendAll(txs, opts) {\n const firstTX = txs[0];\n if (!firstTX) {\n return [];\n }\n const provider = firstTX.provider;\n return await provider.sendAll(txs.map((tx) => ({ tx: tx.build(), signers: tx.signers })), opts);\n }\n /**\n * Deduplicate ATA instructions inside the transaction envelope.\n */\n dedupeATAIXs() {\n if (this.instructions.length === 0) {\n return this;\n }\n const seenATAs = new Set();\n const instructions = this.instructions\n .map((ix) => {\n var _a;\n const programId = ix.programId;\n if (programId.equals(ASSOCIATED_TOKEN_PROGRAM_ID)) {\n const ataKey = (_a = ix.keys[1]) === null || _a === void 0 ? void 0 : _a.pubkey.toString();\n if (!ataKey) {\n throw new Error(\"ATA key does not exist on ATA instruction\");\n }\n if (seenATAs.has(ataKey)) {\n return null;\n }\n seenATAs.add(ataKey);\n }\n return ix;\n })\n .filter((ix) => !!ix);\n return new TransactionEnvelope(this.provider, instructions, this.signers);\n }\n /**\n * Split out ATA instructions to a separate transaction envelope.\n */\n splitATAIXs() {\n const ataIXs = new TransactionEnvelope(this.provider, [], this.signers);\n const newTx = new TransactionEnvelope(this.provider, [], this.signers);\n for (const ix of this.instructions) {\n if (ix.programId.equals(ASSOCIATED_TOKEN_PROGRAM_ID)) {\n ataIXs.instructions.push(ix);\n }\n else {\n newTx.instructions.push(ix);\n }\n }\n return {\n ataIXs: ataIXs.dedupeATAIXs(),\n tx: newTx,\n };\n }\n /**\n * Get an instruction from the transaction envelope by index.\n */\n getInstruction(index) {\n const ix = this.instructions[index];\n if (!ix) {\n throw new Error(`No instruction found at index ${index}`);\n }\n return ix;\n }\n /**\n * Attach a memo instruction to this transaction.\n */\n addMemo(memo) {\n this.instructions.push((0, index_js_2.createMemoInstruction)(memo));\n return this;\n }\n /**\n * Request for additional compute units before processing this transaction.\n */\n addAdditionalComputeBudget(units, additionalFee) {\n this.instructions.unshift((0, index_js_1.requestComputeUnitsInstruction)(units, additionalFee));\n return this;\n }\n /**\n * Request a specific transaction-wide program heap region size in bytes.\n */\n addAdditionalHeapFrame(bytes) {\n this.instructions.unshift((0, index_js_1.requestHeapFrameInstruction)(bytes));\n return this;\n }\n}\nexports.TransactionEnvelope = TransactionEnvelope;\n//# sourceMappingURL=TransactionEnvelope.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TransactionReceipt = exports.confirmTransactionLike = void 0;\nconst tslib_1 = require(\"tslib\");\nconst tiny_invariant_1 = tslib_1.__importDefault(require(\"tiny-invariant\"));\nconst misc_js_1 = require(\"../utils/misc.js\");\nconst txLink_js_1 = require(\"../utils/txLink.js\");\nconst PendingTransaction_js_1 = require(\"./PendingTransaction.js\");\n/**\n * Confirms a transaction, returning its receipt.\n *\n * @param tx\n * @returns\n */\nconst confirmTransactionLike = async (tx) => {\n const ish = await (0, misc_js_1.valueAsPromise)(tx);\n if (ish instanceof TransactionReceipt) {\n return ish;\n }\n let pending;\n if (ish instanceof PendingTransaction_js_1.PendingTransaction) {\n pending = ish;\n }\n else {\n pending = await ish.send({\n printLogs: false,\n });\n }\n return await pending.wait();\n};\nexports.confirmTransactionLike = confirmTransactionLike;\n/**\n * A transaction that has been processed by the cluster.\n */\nclass TransactionReceipt {\n constructor(\n /**\n * Signature (id) of the transaction.\n */\n signature, \n /**\n * Raw response from web3.js\n */\n response) {\n this.signature = signature;\n this.response = response;\n }\n /**\n * Gets the events associated with this transaction.\n */\n getEvents(eventParser) {\n var _a;\n const logs = (_a = this.response.meta) === null || _a === void 0 ? void 0 : _a.logMessages;\n if (logs && logs.length > 0) {\n return eventParser(logs);\n }\n return [];\n }\n /**\n * Prints the logs associated with this transaction.\n */\n printLogs() {\n var _a, _b;\n console.log((_b = (_a = this.response.meta) === null || _a === void 0 ? void 0 : _a.logMessages) === null || _b === void 0 ? void 0 : _b.join(\"\\n\"));\n }\n /**\n * Gets the compute units used by the transaction.\n * @returns\n */\n get computeUnits() {\n var _a;\n const logs = (_a = this.response.meta) === null || _a === void 0 ? void 0 : _a.logMessages;\n (0, tiny_invariant_1.default)(logs, \"no logs\");\n const consumeLog = logs[logs.length - 2];\n (0, tiny_invariant_1.default)(consumeLog, \"no consume log\");\n const amtStr = consumeLog.split(\" \")[3];\n (0, tiny_invariant_1.default)(amtStr, \"no amount\");\n return parseInt(amtStr);\n }\n /**\n * Generates a link to view this {@link TransactionReceipt} on the official Solana explorer.\n * @param network\n * @returns\n */\n generateSolanaExplorerLink(cluster = \"mainnet-beta\") {\n return (0, txLink_js_1.generateTXLink)(this.signature, cluster);\n }\n}\nexports.TransactionReceipt = TransactionReceipt;\n//# sourceMappingURL=TransactionReceipt.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./parseTransactionLogs.js\"), exports);\ntslib_1.__exportStar(require(\"./PendingTransaction.js\"), exports);\ntslib_1.__exportStar(require(\"./programErr.js\"), exports);\ntslib_1.__exportStar(require(\"./TransactionEnvelope.js\"), exports);\ntslib_1.__exportStar(require(\"./TransactionReceipt.js\"), exports);\ntslib_1.__exportStar(require(\"./utils.js\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * Adapted from explorer.solana.com code written by @jstarry.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatInstructionLogs = exports.formatLogEntry = exports.parseTransactionLogs = void 0;\nconst tslib_1 = require(\"tslib\");\nconst tiny_invariant_1 = tslib_1.__importDefault(require(\"tiny-invariant\"));\nconst programErr_js_1 = require(\"./programErr.js\");\n/**\n * Stack-aware program log parser.\n * @param logs\n * @param error\n * @returns\n */\nconst parseTransactionLogs = (logs, error) => {\n let depth = 0;\n const prettyLogs = [];\n let prettyError;\n if (!logs) {\n if (error)\n throw new Error(JSON.stringify(error));\n throw new Error(\"No logs detected\");\n }\n else if (error) {\n prettyError = (0, programErr_js_1.getTransactionInstructionError)(error);\n }\n logs.forEach((log) => {\n var _a, _b, _c, _d, _e;\n if (log.startsWith(\"Program log:\")) {\n (_a = prettyLogs[prettyLogs.length - 1]) === null || _a === void 0 ? void 0 : _a.logs.push({\n type: \"text\",\n depth,\n text: log,\n });\n }\n else {\n const regex = /Program (\\w*) invoke \\[(\\d)\\]/g;\n const matches = [...log.matchAll(regex)];\n if (matches.length > 0) {\n const programAddress = (_b = matches[0]) === null || _b === void 0 ? void 0 : _b[1];\n (0, tiny_invariant_1.default)(programAddress, \"program address\");\n if (depth === 0) {\n prettyLogs.push({\n programAddress,\n logs: [],\n failed: false,\n });\n }\n else {\n (_c = prettyLogs[prettyLogs.length - 1]) === null || _c === void 0 ? void 0 : _c.logs.push({\n type: \"cpi\",\n depth,\n programAddress: programAddress !== null && programAddress !== void 0 ? programAddress : null,\n });\n }\n depth++;\n }\n else if (log.includes(\"success\")) {\n (_d = prettyLogs[prettyLogs.length - 1]) === null || _d === void 0 ? void 0 : _d.logs.push({\n type: \"success\",\n depth,\n });\n depth--;\n }\n else if (log.includes(\"failed\")) {\n const instructionLog = prettyLogs[prettyLogs.length - 1];\n if (instructionLog && !instructionLog.failed) {\n instructionLog.failed = true;\n instructionLog.logs.push({\n type: \"programError\",\n depth,\n text: log.slice(log.indexOf(\": \") + 2),\n });\n }\n depth--;\n }\n else {\n if (depth === 0) {\n prettyLogs.push({\n logs: [],\n failed: false,\n });\n depth++;\n }\n // system transactions don't start with \"Program log:\"\n (_e = prettyLogs[prettyLogs.length - 1]) === null || _e === void 0 ? void 0 : _e.logs.push({\n type: \"system\",\n depth,\n text: log,\n });\n }\n }\n });\n // If the instruction's simulation returned an error without any logs then add an empty log entry for Runtime error\n // For example BpfUpgradableLoader fails without returning any logs for Upgrade instruction with buffer that doesn't exist\n if (prettyError && prettyLogs.length === 0) {\n prettyLogs.push({\n logs: [],\n failed: true,\n });\n }\n if (prettyError && prettyError.index === prettyLogs.length - 1) {\n const failedIx = prettyLogs[prettyError.index];\n if (failedIx) {\n failedIx.failed = true;\n failedIx.logs.push({\n type: \"runtimeError\",\n depth: 1,\n text: prettyError.message,\n });\n }\n }\n return prettyLogs;\n};\nexports.parseTransactionLogs = parseTransactionLogs;\nconst buildPrefix = (depth) => {\n const prefix = new Array(depth - 1).fill(\"\\u00A0\\u00A0\").join(\"\");\n return prefix + \"> \";\n};\nconst formatLogEntryString = (entry) => {\n switch (entry.type) {\n case \"success\":\n return `Program returned success`;\n case \"programError\":\n return `Program returned error: ${entry.text}`;\n case \"runtimeError\":\n return `Runtime error: ${entry.text}`;\n case \"system\":\n return entry.text;\n case \"text\":\n return entry.text;\n case \"cpi\":\n return `Invoking Unknown ${entry.programAddress ? `(${entry.programAddress}) ` : \"\"}Program`;\n }\n};\n/**\n * Formats a log entry to be printed out.\n * @param entry\n * @param prefix\n * @returns\n */\nconst formatLogEntry = (entry, prefix = false) => {\n const prefixString = prefix ? buildPrefix(entry.depth) : \"\";\n return `${prefixString}${formatLogEntryString(entry)}`;\n};\nexports.formatLogEntry = formatLogEntry;\n/**\n * Formats instruction logs.\n * @param logs\n */\nconst formatInstructionLogs = (logs) => logs\n .map((log, i) => {\n return [\n `=> Instruction #${i}: ${log.programAddress ? `Program ${log.programAddress}` : \"System\"}`,\n ...log.logs.map((entry) => (0, exports.formatLogEntry)(entry, true)),\n ].join(\"\\n\");\n})\n .join(\"\\n\");\nexports.formatInstructionLogs = formatInstructionLogs;\n//# sourceMappingURL=parseTransactionLogs.js.map","\"use strict\";\n/**\n * Borrowed from explorer.solana.com code written by @jstarry.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getTransactionInstructionError = exports.BUILTIN_SOLANA_ERROR_MESSAGES = void 0;\n/**\n * Solana error messages built-in.\n */\nexports.BUILTIN_SOLANA_ERROR_MESSAGES = new Map([\n [\"GenericError\", \"generic instruction error\"],\n [\"InvalidArgument\", \"invalid program argument\"],\n [\"InvalidInstructionData\", \"invalid instruction data\"],\n [\"InvalidAccountData\", \"invalid account data for instruction\"],\n [\"AccountDataTooSmall\", \"account data too small for instruction\"],\n [\"InsufficientFunds\", \"insufficient funds for instruction\"],\n [\"IncorrectProgramId\", \"incorrect program id for instruction\"],\n [\"MissingRequiredSignature\", \"missing required signature for instruction\"],\n [\n \"AccountAlreadyInitialized\",\n \"instruction requires an uninitialized account\",\n ],\n [\"UninitializedAccount\", \"instruction requires an initialized account\"],\n [\n \"UnbalancedInstruction\",\n \"sum of account balances before and after instruction do not match\",\n ],\n [\"ModifiedProgramId\", \"instruction modified the program id of an account\"],\n [\n \"ExternalAccountLamportSpend\",\n \"instruction spent from the balance of an account it does not own\",\n ],\n [\n \"ExternalAccountDataModified\",\n \"instruction modified data of an account it does not own\",\n ],\n [\n \"ReadonlyLamportChange\",\n \"instruction changed the balance of a read-only account\",\n ],\n [\"ReadonlyDataModified\", \"instruction modified data of a read-only account\"],\n [\"DuplicateAccountIndex\", \"instruction contains duplicate accounts\"],\n [\"ExecutableModified\", \"instruction changed executable bit of an account\"],\n [\"RentEpochModified\", \"instruction modified rent epoch of an account\"],\n [\"NotEnoughAccountKeys\", \"insufficient account keys for instruction\"],\n [\"AccountDataSizeChanged\", \"non-system instruction changed account size\"],\n [\"AccountNotExecutable\", \"instruction expected an executable account\"],\n [\n \"AccountBorrowFailed\",\n \"instruction tries to borrow reference for an account which is already borrowed\",\n ],\n [\n \"AccountBorrowOutstanding\",\n \"instruction left account with an outstanding borrowed reference\",\n ],\n [\n \"DuplicateAccountOutOfSync\",\n \"instruction modifications of multiply-passed account differ\",\n ],\n [\"Custom\", \"custom program error: {0}\"],\n [\"InvalidError\", \"program returned invalid error code\"],\n [\"ExecutableDataModified\", \"instruction changed executable accounts data\"],\n [\n \"ExecutableLamportChange\",\n \"instruction changed the balance of a executable account\",\n ],\n [\"ExecutableAccountNotRentExempt\", \"executable accounts must be rent exempt\"],\n [\"UnsupportedProgramId\", \"Unsupported program id\"],\n [\"CallDepth\", \"Cross-program invocation call depth too deep\"],\n [\"MissingAccount\", \"An account required by the instruction is missing\"],\n [\n \"ReentrancyNotAllowed\",\n \"Cross-program invocation reentrancy not allowed for this instruction\",\n ],\n [\n \"MaxSeedLengthExceeded\",\n \"Length of the seed is too long for address generation\",\n ],\n [\"InvalidSeeds\", \"Provided seeds do not result in a valid address\"],\n [\"InvalidRealloc\", \"Failed to reallocate account data\"],\n [\"ComputationalBudgetExceeded\", \"Computational budget exceeded\"],\n [\n \"PrivilegeEscalation\",\n \"Cross-program invocation with unauthorized signer or writable account\",\n ],\n [\n \"ProgramEnvironmentSetupFailure\",\n \"Failed to create program execution environment\",\n ],\n [\"ProgramFailedToComplete\", \"Program failed to complete\"],\n [\"ProgramFailedToCompile\", \"Program failed to compile\"],\n [\"Immutable\", \"Account is immutable\"],\n [\"IncorrectAuthority\", \"Incorrect authority provided\"],\n [\"BorshIoError\", \"Failed to serialize or deserialize account data: {0}\"],\n [\n \"AccountNotRentExempt\",\n \"An account does not have enough lamports to be rent-exempt\",\n ],\n [\"InvalidAccountOwner\", \"Invalid account owner\"],\n [\"ArithmeticOverflow\", \"Program arithmetic overflowed\"],\n [\"UnsupportedSysvar\", \"Unsupported sysvar\"],\n [\"IllegalOwner\", \"Provided owner is not allowed\"],\n]);\nfunction getTransactionInstructionError(error) {\n if (!error) {\n return;\n }\n if (typeof error === \"object\" && \"InstructionError\" in error) {\n const innerError = error[\"InstructionError\"];\n const index = innerError[0];\n const instructionError = innerError[1];\n return {\n index,\n message: getInstructionError(instructionError),\n };\n }\n}\nexports.getTransactionInstructionError = getTransactionInstructionError;\nfunction getInstructionError(error) {\n let out;\n let value = null;\n if (typeof error === \"string\") {\n const message = exports.BUILTIN_SOLANA_ERROR_MESSAGES.get(error);\n if (message) {\n return message;\n }\n }\n else if (\"Custom\" in error) {\n out = exports.BUILTIN_SOLANA_ERROR_MESSAGES.get(\"Custom\");\n value = error[\"Custom\"];\n }\n else if (\"BorshIoError\" in error) {\n out = exports.BUILTIN_SOLANA_ERROR_MESSAGES.get(\"BorshIoError\");\n value = error[\"BorshIoError\"];\n }\n if (out && value) {\n return out.replace(\"{0}\", value);\n }\n return \"Unknown instruction error\";\n}\n//# sourceMappingURL=programErr.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateTxSizeUnsafe = void 0;\nfunction shortvecEncodeLength(bytes, len) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len === 0) {\n bytes.push(elem);\n break;\n }\n else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n/**\n * Calculates transaction size. If the transaction is too large, it does not throw.\n * @param tx\n * @returns\n */\nconst calculateTxSizeUnsafe = (tx) => {\n // check if fee payer signed.\n const { feePayer } = tx;\n const hasFeePayerSigned = feePayer && tx.signatures.find((s) => s.publicKey.equals(feePayer));\n const signData = tx.serializeMessage();\n const numSigners = tx.signatures.length + (hasFeePayerSigned ? 1 : 0);\n const signatureCount = [];\n shortvecEncodeLength(signatureCount, numSigners);\n return signatureCount.length + numSigners * 64 + signData.length;\n};\nexports.calculateTxSizeUnsafe = calculateTxSizeUnsafe;\n//# sourceMappingURL=txSizer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateUncheckedInspectLink = exports.generateInspectLinkFromBase64 = exports.serializeToBase64Unchecked = exports.buildStubbedTransaction = exports.RECENT_BLOCKHASH_STUB = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\n/**\n * Stub of a recent blockhash that can be used to simulate transactions.\n */\nexports.RECENT_BLOCKHASH_STUB = \"GfVcyD4kkTrj4bKc7WA9sZCin9JDbdT4Zkd3EittNR1W\";\n/**\n * Builds a transaction with a fake `recentBlockhash` and `feePayer` for the purpose\n * of simulating a sequence of instructions.\n *\n * @param cluster\n * @param ixs\n * @returns\n */\nconst buildStubbedTransaction = (cluster, ixs) => {\n const tx = new web3_js_1.Transaction();\n tx.recentBlockhash = exports.RECENT_BLOCKHASH_STUB;\n // random keys that always have money in them\n tx.feePayer =\n cluster === \"devnet\"\n ? new web3_js_1.PublicKey(\"A2jaCHPzD6346348JoEym2KFGX9A7uRBw6AhCdX7gTWP\")\n : new web3_js_1.PublicKey(\"9u9iZBWqGsp5hXBxkVZtBTuLSGNAG9gEQLgpuVw39ASg\");\n tx.instructions = ixs;\n return tx;\n};\nexports.buildStubbedTransaction = buildStubbedTransaction;\n/**\n * Serializes a {@link Transaction} to base64 format without checking signatures.\n * @param tx\n * @returns\n */\nconst serializeToBase64Unchecked = (tx) => tx\n .serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n})\n .toString(\"base64\");\nexports.serializeToBase64Unchecked = serializeToBase64Unchecked;\n/**\n * Generates a link for inspecting the contents of a transaction.\n *\n * @returns URL\n */\nconst generateInspectLinkFromBase64 = (cluster, base64TX) => {\n return `https://${cluster === \"mainnet-beta\" ? \"\" : `${cluster}.`}anchor.so/tx/inspector?message=${encodeURIComponent(base64TX)}`;\n};\nexports.generateInspectLinkFromBase64 = generateInspectLinkFromBase64;\n/**\n * Generates a link for inspecting the contents of a transaction, not checking for\n * or requiring valid signatures.\n *\n * @returns URL\n */\nconst generateUncheckedInspectLink = (cluster, tx) => {\n return (0, exports.generateInspectLinkFromBase64)(cluster, (0, exports.serializeToBase64Unchecked)(tx));\n};\nexports.generateUncheckedInspectLink = generateUncheckedInspectLink;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./instructions.js\"), exports);\ntslib_1.__exportStar(require(\"./misc.js\"), exports);\ntslib_1.__exportStar(require(\"./printAccountOwners.js\"), exports);\ntslib_1.__exportStar(require(\"./printTXTable.js\"), exports);\ntslib_1.__exportStar(require(\"./pubkeyCache.js\"), exports);\ntslib_1.__exportStar(require(\"./publicKey.js\"), exports);\ntslib_1.__exportStar(require(\"./simulateTransactionWithCommitment.js\"), exports);\ntslib_1.__exportStar(require(\"./time.js\"), exports);\ntslib_1.__exportStar(require(\"./txLink.js\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createMemoInstruction = exports.MEMO_PROGRAM_ID = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\n/**\n * ID of the memo program.\n */\nexports.MEMO_PROGRAM_ID = new web3_js_1.PublicKey(\"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr\");\n/**\n * Creates a memo program instruction.\n *\n * More info: https://spl.solana.com/memo\n *\n * @param text Text of the memo.\n * @param signers Optional signers to validate.\n * @returns\n */\nconst createMemoInstruction = (text, signers = []) => {\n return new web3_js_1.TransactionInstruction({\n programId: exports.MEMO_PROGRAM_ID,\n keys: signers.map((s) => ({\n pubkey: s,\n isSigner: true,\n isWritable: false,\n })),\n data: Buffer.from(text, \"utf8\"),\n });\n};\nexports.createMemoInstruction = createMemoInstruction;\n//# sourceMappingURL=instructions.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatPubkeyShort = exports.valueAsPromise = exports.sleep = exports.suppressConsoleError = exports.suppressConsoleErrorAsync = void 0;\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"@saberhq/option-utils\"), exports);\nconst noop = () => {\n // noop\n};\n/**\n * Hide the console.error because @solana/web3.js often emits noisy errors as a\n * side effect.\n */\nconst suppressConsoleErrorAsync = async (fn) => {\n const oldConsoleError = console.error;\n console.error = noop;\n try {\n const result = await fn();\n console.error = oldConsoleError;\n return result;\n }\n catch (e) {\n console.error = oldConsoleError;\n throw e;\n }\n};\nexports.suppressConsoleErrorAsync = suppressConsoleErrorAsync;\n/**\n * Hide the console.error because @solana/web3.js often emits noisy errors as a\n * side effect.\n */\nconst suppressConsoleError = (fn) => {\n const oldConsoleError = console.error;\n console.error = noop;\n try {\n const result = fn();\n console.error = oldConsoleError;\n return result;\n }\n catch (e) {\n console.error = oldConsoleError;\n throw e;\n }\n};\nexports.suppressConsoleError = suppressConsoleError;\nfunction sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\nexports.sleep = sleep;\n/**\n * Awaits for a promise or value.\n */\nconst valueAsPromise = async (awaitable) => {\n if (\"then\" in awaitable) {\n return await awaitable;\n }\n return awaitable;\n};\nexports.valueAsPromise = valueAsPromise;\n/**\n * Shortens a pubkey.\n * @param pubkey\n * @returns\n */\nconst formatPubkeyShort = (pubkey, leading = 7, trailing = 7) => {\n const str = pubkey.toString();\n return str.length > 20\n ? `${str.substring(0, leading)}.....${str.substring(str.length - trailing, str.length)}`\n : str;\n};\nexports.formatPubkeyShort = formatPubkeyShort;\n//# sourceMappingURL=misc.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.printAccountOwners = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\n/**\n * A useful tool for debugging account structs. It gives a quick glance at\n * addresses and owners. It also converts bignums into JS numbers.\n *\n * Types converted:\n * - **big numbers**: converted to native numbers\n * - **addresses**: format in base58, and prints the owner in parentheses if the account exists\n * - **plain objects**: recursively converts\n *\n * HINT: This function is mainly useful for the browser. If you are writing\n * Rust integration tests, use debugAccountOwners from chai-solana instead, so\n * that you don't have to pass in connection.\n *\n * Usage:\n * ```\n * await printAccountOwners(connection, depositAccounts);\n * // using void is recommend in dapps to avoid slowing down the user experience\n * void printAccountOwners(connection, depositAccounts);\n * ```\n *\n * Example output:\n * ```\n * tests/awesomeTest.spec.ts:583:29 {\n * payer: 'CEGhKVeyXUrihUnNU9EchSuu6pMHEsB8MiKgvhJqYgd1 (11111111111111111111111111111111)',\n * foo: '61tMNVhG66QZQ4UEAoHytqaUN4G1xpk1zsS5YU7Y2Qui (135QzSyjKTKaZ7ebhLpvNA2KUahEjykMjbqz3JV1V4k9)',\n * bar: '9oPMxXVSm5msAecxi4zJpKDwbHS9c6Yos1ru739rVExc (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA)',\n * tokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA (BPFLoader2111111111111111111111111111111111)'\n * }\n * ```\n *\n * WARNING: This may break silently if web3 changes its api. This is only\n * intended for debugging purposes only. But it should be safe to use in production.\n */\nasync function printAccountOwners(connection, plainObj) {\n var _a, _b;\n try {\n if (typeof plainObj !== \"object\") {\n throw new Error(\"printAccountOwners only works on objects\");\n }\n else {\n let relativePath;\n const callStack = (_a = new Error().stack) === null || _a === void 0 ? void 0 : _a.split(\"\\n\");\n if (callStack) {\n let expectIndex = callStack.findIndex((l) => l.includes(`at ${printAccountOwners.name}`));\n // debugAccountOwners in chai-solana wraps printAccountOwners\n // We need to get the caller of debugAccountOwners instead\n const debugAccountOwnersIndex = callStack.findIndex((l) => l.includes(`at debugAccountOwners`));\n if (debugAccountOwnersIndex > expectIndex) {\n expectIndex = debugAccountOwnersIndex;\n }\n // Only log the line number in Node.js\n if (expectIndex > 0 &&\n typeof process !== \"undefined\" &&\n process.versions !== undefined &&\n process.versions.node !== undefined) {\n const maybeProcess = process;\n const targetLine = callStack[expectIndex + 1];\n if (targetLine) {\n const cwd = ((_b = maybeProcess.cwd) === null || _b === void 0 ? void 0 : _b.call(maybeProcess)) || \"/\";\n // get the part of targetLine after cwd\n const targetLineAfterCwd = targetLine.substring(targetLine.indexOf(cwd) + cwd.length);\n if (targetLineAfterCwd.length > 0) {\n relativePath = targetLineAfterCwd.substring(1).replace(/\\)$/, \"\");\n }\n }\n }\n }\n if (!connection) {\n return;\n }\n if (relativePath) {\n console.log(relativePath, await _transformAccountOwners(plainObj, connection));\n }\n else {\n console.log(await _transformAccountOwners(plainObj, connection));\n }\n }\n }\n catch (e) {\n console.error(\"Error in printAccountOwners:\", e);\n }\n}\nexports.printAccountOwners = printAccountOwners;\n/**\n * This is a patched version of web3's getMultipleAccountsInfo.\n *\n * When it reaches an account that doesn't exist, it will just continue instead\n * of giving up.\n *\n * WARNING: This may break silently if web3 changes its api. This is only\n * intended for debugging purposes only.\n */\nasync function gracefulGetMultipleAccountsInfo(connection, publicKeys) {\n var _a;\n try {\n // To be honest, the web3 internals aren't going to change that much. And if\n // they do, it'll be rare.\n const unknownConection = connection;\n const rpcRequest = unknownConection._rpcRequest;\n if (typeof rpcRequest !== \"function\") {\n console.error(\"_rpcRequest is not a function. Maybe web3 changed?\");\n return [];\n }\n const unsafeRes = await rpcRequest(\"getMultipleAccounts\", [\n publicKeys.map((key) => key.toBase58()),\n { encoding: \"base64\", commitment: \"confirmed\" },\n ]);\n const value = (_a = unsafeRes === null || unsafeRes === void 0 ? void 0 : unsafeRes.result) === null || _a === void 0 ? void 0 : _a.value;\n if (value) {\n return value;\n }\n return [];\n }\n catch (e) {\n console.error(\"Error in gracefulGetMultipleAccountsInfo:\", e);\n return [];\n }\n}\n/**\n * Lots of complexity in this function. But using getMultipleAccountsInfo is\n * very important. Even locally, it reduces the time from 300ms to 40ms. On a\n * remote RPC server, it would probably save much more time.\n */\nconst _transformAccountOwners = async (plainObjWithAddressesAndBignums, connection) => {\n /* eslint-disable */\n const result = {};\n if (!plainObjWithAddressesAndBignums ||\n typeof plainObjWithAddressesAndBignums !== \"object\") {\n return plainObjWithAddressesAndBignums;\n }\n const base58ToResultKey = {};\n const base58ToLookup = [];\n const asyncKeys = [];\n const asyncPromises = [];\n for (const [key, value] of Object.entries(plainObjWithAddressesAndBignums)) {\n if (value && value.toBase58 && typeof value.toBase58 === \"function\") {\n const base58 = value.toBase58();\n base58ToResultKey[base58] = key;\n const pubKey = new web3_js_1.PublicKey(base58);\n if (!base58ToLookup.includes(pubKey)) {\n base58ToLookup.push(pubKey);\n }\n }\n else if (value &&\n value.toNumber &&\n typeof value.toNumber === \"function\") {\n result[key] = value.toNumber();\n }\n else if (isPlainObject(value) && value) {\n asyncKeys.push(key);\n asyncPromises.push(_transformAccountOwners(value, connection));\n }\n else {\n result[key] = value;\n }\n }\n if (Object.keys(base58ToResultKey).length > 0) {\n const accountInfos = await gracefulGetMultipleAccountsInfo(connection, base58ToLookup);\n for (const [base58, resultKey] of Object.entries(base58ToResultKey)) {\n const lookupIndex = base58ToLookup.findIndex((p) => p.toBase58() === base58);\n if (lookupIndex >= 0) {\n const accountInfo = accountInfos[lookupIndex];\n const owner = accountInfo === null || accountInfo === void 0 ? void 0 : accountInfo.owner;\n if (owner) {\n result[resultKey] = `${base58} (${owner})`;\n // Uncomment to verify that this implementation is correct\n // const accountInfo =\n // await connection.getAccountInfo(\n // new PublicKey(base58)\n // );\n // const correctOwner = accountInfo?.owner; // we know for sure this works\n // if (!correctOwner) {\n // throw new Error(\"Unable to load correct owner\");\n // }\n // if (!new PublicKey(owner).equals(correctOwner)) {\n // console.log(\"OWNER MISMATCH\", base58, owner, accountInfo?.owner);\n // throw new Error(\"OWNER MISMATCH\");\n // }\n }\n else {\n result[resultKey] = `${base58}`;\n }\n }\n else {\n result[resultKey] = `${base58}`;\n }\n }\n }\n const asyncValues = await Promise.all(asyncPromises);\n for (let i = 0; i < asyncKeys.length; i++) {\n result[asyncKeys[i]] = asyncValues[i];\n }\n return result;\n};\nfunction isPlainObject(obj) {\n /* eslint-disable */\n return (typeof obj === \"object\" && // separate from primitives\n obj !== null && // is obvious\n obj.constructor === Object && // separate instances (Array, DOM, ...)\n Object.prototype.toString.call(obj) === \"[object Object]\"); // separate build-in like Math\n}\n//# sourceMappingURL=printAccountOwners.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.estimateTransactionSize = exports.EstimatedTXTooBigError = exports.TXSizeEstimationError = exports.printTXTable = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst index_js_1 = require(\"../index.js\");\n/**\n * Takes in a simulation result of a transaction and prints it in a cool table.\n * ```\n * ┌─────┬───┬───┬───┬───────────┬──────┬─────┬──────┬───┐\n * │index│iso│mar│cum│ programId │quota │used │ left │CPI│\n * ├─────┼───┼───┼───┼───────────┼──────┼─────┼──────┼───┤\n * │ 0 │298│281│464│'ATokenG..'│200000│24270│175730│ 1 │\n * │ 1 │298│ 74│538│'ATokenG..'│178730│21270│157460│ 1 │\n * │ 2 │298│ 74│612│'ATokenG..'│157460│27277│130183│ 1 │\n * │ 3 │298│ 42│686│'ATokenG..'│130183│21270│108913│ 1 │\n * │ 4 │338│265│951│'qExampL..'│108913│76289│ 32624│ 3 │\n * └─────┴───┴───┴───┴───────────┴──────┴─────┴──────┴───┘\n * ```\n *\n * - **index**: the array index of the instruction within the transaction\n * - **iso**: the isolated size of the instruction (marginal cost of only the instruction)\n * - **mar**: the marginal size cost of the instruction (when added to previous)\n * - **cum**: the cumulative size of the instructions up until that instruction\n * - **quota/used/left**: [BPF instruction compute unit info](https://docs.solana.com/developing/programming-model/runtime)\n * - **CPI**: [the maximum depth of CPI](https://docs.solana.com/developing/programming-model/calling-between-programs) (current limit in Solana is 4)\n *\n * Safe for browser usage. Can be conveniently run with txEnvelope.simulateTable()\n */\nconst printTXTable = (tx, transactionLogs, message) => {\n if (message && message !== \"\") {\n console.log((0, exports.estimateTransactionSize)(tx), message);\n }\n else {\n console.log(\"Transaction size:\", (0, exports.estimateTransactionSize)(tx));\n }\n const computeUnitLogStack = [];\n const cpiLogStack = [];\n let currentIndex = -1;\n transactionLogs.forEach((line) => {\n if (line.includes(\" invoke [1]\")) {\n currentIndex++;\n cpiLogStack[currentIndex] = 0;\n }\n const cpiMatch = line.match(/ invoke \\[(\\d)\\]/);\n if (cpiMatch && cpiMatch[1]) {\n const cur = cpiLogStack[currentIndex];\n cpiLogStack[currentIndex] =\n cur === undefined\n ? Number(cpiMatch[1]) - 1\n : Math.max(Number(cpiMatch[1]) - 1, cur);\n }\n const computeMatch = line.match(/consumed \\d* of \\d* compute units/);\n if (computeMatch && computeMatch[0]) {\n computeUnitLogStack[currentIndex] = computeMatch[0];\n }\n });\n const instructionTable = [];\n tx.instructions.forEach((instruction, i) => {\n const computeUnitLog = computeUnitLogStack[i];\n const computeUnitMatch = computeUnitLog === null || computeUnitLog === void 0 ? void 0 : computeUnitLog.match(/consumed (\\d*) of (\\d*)/);\n const [consumed, quota] = (computeUnitMatch === null || computeUnitMatch === void 0 ? void 0 : computeUnitMatch.slice(1, 3).map((num) => parseInt(num, 10))) || [undefined, undefined];\n instructionTable.push({\n iso: isolatedInstructionSize(tx.provider, instruction),\n mar: marginalInstructionSize(tx.provider, tx.instructions.slice(0, i), instruction),\n cum: instructionsSize(tx.provider, tx.instructions.slice(0, i + 1)),\n programId: instruction.programId.toBase58(),\n quota: quota ? quota : i === 0 ? 200000 : undefined,\n used: consumed,\n left: quota && consumed ? quota - consumed : undefined,\n CPI: cpiLogStack[i],\n });\n });\n console.table(instructionTable);\n};\nexports.printTXTable = printTXTable;\nclass TXSizeEstimationError extends Error {\n constructor(underlyingError) {\n super(`could not estimate transaction size`);\n this.underlyingError = underlyingError;\n this.name = \"TXSizeEstimationError\";\n }\n}\nexports.TXSizeEstimationError = TXSizeEstimationError;\nclass EstimatedTXTooBigError extends Error {\n constructor(tx, size) {\n super(`Transaction too large`);\n this.tx = tx;\n this.size = size;\n this.name = \"EstimatedTXTooBigError\";\n }\n}\nexports.EstimatedTXTooBigError = EstimatedTXTooBigError;\n/**\n * Builds a transaction and estimates the size in bytes. This number is primrily\n * to be used for checking to see if a transaction is too big and instructions\n * need to be split. It may not be 100% accurate.\n *\n * This is used in expectTXTable and is useful for increasing efficiency in\n * dapps that build large transactions.\n *\n * The max transaction size of a v1 Transaction in Solana is 1232 bytes.\n * For info about Transaction v2: https://docs.solana.com/proposals/transactions-v2\n *\n * Returns 8888 if the transaction was too big.\n * Returns 9999 if the transaction was unable to be built.\n */\nconst estimateTransactionSize = (txEnvelope) => {\n const result = txEnvelope.estimateSize();\n if (\"size\" in result) {\n return result.size;\n }\n if (result.error instanceof TXSizeEstimationError) {\n console.error(\"Unknown error estimating transaction size\", result.error.underlyingError);\n return 9999;\n }\n return 8888;\n};\nexports.estimateTransactionSize = estimateTransactionSize;\n/**\n * A dummy instruction that is probably tiny and has overlap with most instructions\n */\nconst simpleInstruction = () => {\n const fs = getFakeSigner();\n return web3_js_1.SystemProgram.transfer({\n fromPubkey: fs.publicKey,\n toPubkey: fs.publicKey,\n lamports: 1,\n });\n};\nconst isolatedInstructionSize = (randomProvider, instruction) => {\n return marginalInstructionSize(randomProvider, [simpleInstruction()], instruction);\n};\nconst marginalInstructionSize = (randomProvider, previousInstructions, instruction) => {\n const previousTxSize = instructionsSize(randomProvider, previousInstructions.length ? previousInstructions : [simpleInstruction()]);\n const biggerTxSize = instructionsSize(randomProvider, [\n ...previousInstructions,\n instruction,\n ]);\n return biggerTxSize - previousTxSize;\n};\nconst instructionsSize = (randomProvider, instructions) => {\n const instructionedTx = new index_js_1.TransactionEnvelope(randomProvider, [\n ...instructions,\n ]);\n return (0, exports.estimateTransactionSize)(instructionedTx);\n};\nlet fakeSigner = undefined;\nconst getFakeSigner = () => {\n if (!fakeSigner) {\n fakeSigner = web3_js_1.Keypair.generate();\n }\n return fakeSigner;\n};\n//# sourceMappingURL=printTXTable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getProgramAddress = exports.getPublicKey = exports.CachedPublicKey = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst pubkeyCache = {};\n/**\n * PublicKey with a cached base58 value.\n */\nclass CachedPublicKey extends web3_js_1.PublicKey {\n constructor(value) {\n super(value);\n this._base58 = super.toBase58();\n }\n equals(other) {\n if (other instanceof CachedPublicKey) {\n return other._base58 === this._base58;\n }\n return super.equals(other);\n }\n toString() {\n return this._base58;\n }\n toBase58() {\n return this._base58;\n }\n}\nexports.CachedPublicKey = CachedPublicKey;\nconst getOrCreatePublicKey = (pk) => {\n const cached = pubkeyCache[pk];\n if (!cached) {\n return (pubkeyCache[pk] = new CachedPublicKey(pk));\n }\n return cached;\n};\n/**\n * Gets or parses a PublicKey.\n * @param pk\n * @returns\n */\nconst getPublicKey = (pk) => {\n if (typeof pk === \"string\") {\n return getOrCreatePublicKey(pk);\n }\n else if (pk instanceof web3_js_1.PublicKey) {\n return getOrCreatePublicKey(pk.toString());\n }\n else {\n return getOrCreatePublicKey(new web3_js_1.PublicKey(pk).toString());\n }\n};\nexports.getPublicKey = getPublicKey;\nconst gpaCache = {};\n/**\n * Concatenates seeds to generate a unique number array.\n * @param seeds\n * @returns\n */\nconst concatSeeds = (seeds) => {\n return Uint8Array.from(seeds.reduce((acc, seed) => [...acc, ...seed], []));\n};\n/**\n * Gets a cached program address for the given seeds.\n * @param seeds\n * @param programId\n * @returns\n */\nconst getProgramAddress = (seeds, programId) => {\n const normalizedSeeds = concatSeeds(seeds);\n const cacheKey = `${normalizedSeeds.toString()}_${programId.toString()}`;\n const cached = gpaCache[cacheKey];\n if (cached) {\n return cached;\n }\n const [key] = web3_js_1.PublicKey.findProgramAddressSync(seeds, programId);\n return (gpaCache[cacheKey] = (0, exports.getPublicKey)(key));\n};\nexports.getProgramAddress = getProgramAddress;\n//# sourceMappingURL=pubkeyCache.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPublicKey = exports.parsePublicKey = exports.PublicKey = void 0;\nconst tslib_1 = require(\"tslib\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst bn_js_1 = tslib_1.__importDefault(require(\"bn.js\"));\nvar web3_js_2 = require(\"@solana/web3.js\");\nObject.defineProperty(exports, \"PublicKey\", { enumerable: true, get: function () { return web3_js_2.PublicKey; } });\n/**\n * Returns a {@link PublicKey} if it can be parsed, otherwise returns null.\n * @param pk\n * @returns\n */\nconst parsePublicKey = (pk) => {\n if (!pk) {\n return null;\n }\n if (pk instanceof web3_js_1.PublicKey) {\n return pk;\n }\n if (typeof pk !== \"object\" ||\n Array.isArray(pk) ||\n (\"constructor\" in pk && bn_js_1.default.isBN(pk))) {\n return null;\n }\n try {\n return new web3_js_1.PublicKey(pk);\n }\n catch (e) {\n return null;\n }\n};\nexports.parsePublicKey = parsePublicKey;\n/**\n * Returns true if the given value is a {@link PublicKey}.\n * @param pk\n * @returns\n */\nconst isPublicKey = (pk) => {\n return !!(0, exports.parsePublicKey)(pk);\n};\nexports.isPublicKey = isPublicKey;\n//# sourceMappingURL=publicKey.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.simulateTransactionWithCommitment = void 0;\nconst web3_js_1 = require(\"@solana/web3.js\");\n/**\n * Copy of Connection.simulateTransaction that takes a commitment parameter.\n */\nasync function simulateTransactionWithCommitment(connection, transaction, commitment = \"confirmed\") {\n var _a;\n const connectionInner = connection;\n // only populate recent blockhash if it isn't on the tx\n if (!transaction.recentBlockhash) {\n const { blockhash } = await connection.getLatestBlockhash(commitment);\n transaction.recentBlockhash = blockhash;\n }\n const wireTransaction = transaction.serialize({\n requireAllSignatures: false,\n });\n const encodedTransaction = wireTransaction.toString(\"base64\");\n const config = { encoding: \"base64\", commitment };\n const res = await connectionInner._rpcRequest(\"simulateTransaction\", [\n encodedTransaction,\n config,\n ]);\n if (res.error) {\n throw new web3_js_1.SendTransactionError(\"failed to simulate transaction: \" + res.error.message, (_a = res.result.value.logs) !== null && _a !== void 0 ? _a : undefined);\n }\n return res.result;\n}\nexports.simulateTransactionWithCommitment = simulateTransactionWithCommitment;\n//# sourceMappingURL=simulateTransactionWithCommitment.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tsToDate = exports.dateToTs = void 0;\nconst tslib_1 = require(\"tslib\");\nconst bn_js_1 = tslib_1.__importDefault(require(\"bn.js\"));\n/**\n * Converts a {@link Date} to a {@link BN} timestamp.\n * @param date\n * @returns\n */\nconst dateToTs = (date) => new bn_js_1.default(Math.floor(date.getTime() / 1000));\nexports.dateToTs = dateToTs;\n/**\n * Converts a {@link BN} timestamp to a {@link Date}.\n * @param ts\n * @returns\n */\nconst tsToDate = (ts) => new Date(ts.toNumber() * 1000);\nexports.tsToDate = tsToDate;\n//# sourceMappingURL=time.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateTXLink = exports.ExplorerType = void 0;\nvar ExplorerType;\n(function (ExplorerType) {\n ExplorerType[\"SOLANA_EXPLORER\"] = \"solana-explorer\";\n ExplorerType[\"SOLSCAN\"] = \"solscan\";\n})(ExplorerType || (exports.ExplorerType = ExplorerType = {}));\nfunction generateTXLink(signature, cluster = \"mainnet-beta\", explorerType = ExplorerType.SOLANA_EXPLORER) {\n switch (explorerType) {\n case ExplorerType.SOLANA_EXPLORER:\n return `https://explorer.solana.com/tx/${signature}?cluster=${cluster}`;\n case ExplorerType.SOLSCAN:\n return `https://solscan.io/tx/${signature}?cluster=${cluster}`;\n default:\n throw new Error(`Explorer type ${explorerType} is not supported.`);\n }\n}\nexports.generateTXLink = generateTXLink;\n//# sourceMappingURL=txLink.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SignerWallet = void 0;\nconst provider_js_1 = require(\"./provider.js\");\n/**\n * Wallet based on a Signer.\n */\nclass SignerWallet {\n constructor(signer) {\n this.signer = signer;\n }\n get publicKey() {\n return this.signer.publicKey;\n }\n signAllTransactions(transactions) {\n return Promise.resolve(transactions.map((tx) => {\n tx.partialSign(this.signer);\n return tx;\n }));\n }\n signTransaction(transaction) {\n transaction.partialSign(this.signer);\n return Promise.resolve(transaction);\n }\n /**\n * Creates a Provider from this Wallet by adding a Connection.\n * @param connection\n * @returns\n */\n createProvider(connection, sendConnection, opts) {\n return provider_js_1.SolanaProvider.load({\n connection,\n sendConnection,\n wallet: this,\n opts,\n });\n }\n}\nexports.SignerWallet = SignerWallet;\n//# sourceMappingURL=wallet.js.map","/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.s16 = exports.s8 = exports.nu64be = exports.u48be = exports.u40be = exports.u32be = exports.u24be = exports.u16be = exports.nu64 = exports.u48 = exports.u40 = exports.u32 = exports.u24 = exports.u16 = exports.u8 = exports.offset = exports.greedy = exports.Constant = exports.UTF8 = exports.CString = exports.Blob = exports.Boolean = exports.BitField = exports.BitStructure = exports.VariantLayout = exports.Union = exports.UnionLayoutDiscriminator = exports.UnionDiscriminator = exports.Structure = exports.Sequence = exports.DoubleBE = exports.Double = exports.FloatBE = exports.Float = exports.NearInt64BE = exports.NearInt64 = exports.NearUInt64BE = exports.NearUInt64 = exports.IntBE = exports.Int = exports.UIntBE = exports.UInt = exports.OffsetLayout = exports.GreedyCount = exports.ExternalLayout = exports.bindConstructorLayout = exports.nameWithProperty = exports.Layout = exports.uint8ArrayToBuffer = exports.checkUint8Array = void 0;\nexports.constant = exports.utf8 = exports.cstr = exports.blob = exports.unionLayoutDiscriminator = exports.union = exports.seq = exports.bits = exports.struct = exports.f64be = exports.f64 = exports.f32be = exports.f32 = exports.ns64be = exports.s48be = exports.s40be = exports.s32be = exports.s24be = exports.s16be = exports.ns64 = exports.s48 = exports.s40 = exports.s32 = exports.s24 = void 0;\nconst buffer_1 = require(\"buffer\");\n/* Check if a value is a Uint8Array.\n *\n * @ignore */\nfunction checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError('b must be a Uint8Array');\n }\n}\nexports.checkUint8Array = checkUint8Array;\n/* Create a Buffer instance from a Uint8Array.\n *\n * @ignore */\nfunction uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n}\nexports.uint8ArrayToBuffer = uint8ArrayToBuffer;\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nexports.Layout = Layout;\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nexports.nameWithProperty = nameWithProperty;\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\n// `Class` must be a constructor Function, but the assignment of a `layout_` property to it makes it difficult to type\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Object.prototype.hasOwnProperty.call(Class, 'layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (Object.prototype.hasOwnProperty.call(layout, 'boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nexports.bindConstructorLayout = bindConstructorLayout;\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\nexports.ExternalLayout = ExternalLayout;\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\nexports.GreedyCount = GreedyCount;\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n super(layout.span, property || layout.property);\n /** The subordinated layout. */\n this.layout = layout;\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Uint8Array\n * being accessed. */\n this.offset = offset;\n }\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n /** @override */\n decode(b, offset = 0) {\n return this.layout.decode(b, offset + this.offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\nexports.OffsetLayout = OffsetLayout;\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UInt = UInt;\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UIntBE = UIntBE;\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.Int = Int;\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.IntBE = IntBE;\nconst V2E32 = Math.pow(2, 32);\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return { hi32, lo32 };\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64 = NearUInt64;\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64BE = NearUInt64BE;\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64 = NearInt64;\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64BE = NearInt64BE;\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset);\n return 4;\n }\n}\nexports.Float = Float;\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset);\n return 4;\n }\n}\nexports.FloatBE = FloatBE;\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset);\n return 8;\n }\n}\nexports.Double = Double;\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset);\n return 8;\n }\n}\nexports.DoubleBE = DoubleBE;\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n super(span, property);\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n }\n else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\nexports.Sequence = Sequence;\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n }\n catch (e) {\n // ignore error\n }\n super(span, property);\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n }\n catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset = 0) {\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n }\n else if (0 <= offset) {\n offset += fd.span;\n }\n }\n return undefined;\n }\n}\nexports.Structure = Structure;\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\nexports.UnionDiscriminator = UnionDiscriminator;\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n super(property || layout.property || 'variant');\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\nexports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if ((discr instanceof UInt)\n || (discr instanceof UIntBE)) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n }\n else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n }\n else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n else {\n discriminator = discr;\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && ((discr instanceof UInt)\n || (discr instanceof UIntBE))) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discriminator;\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = (discr instanceof UInt)\n || (discr instanceof UIntBE);\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function (src) {\n return boundGetSourceVariant(src);\n };\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function (gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property\n && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)))) {\n return vlo;\n }\n }\n else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n const clo = this.registry[discr];\n if (undefined === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n // defaultLayout.property can be undefined, but this is allowed by buffer-layout\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n dest[defaultLayout.property] = defaultLayout.decode(b, offset + contentOffset);\n }\n else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset = 0) {\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n // this.defaultLayout is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n // clo.property is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return contentOffset + clo.encode(src[clo.property], b, offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset);\n }\n else {\n variant = vb;\n }\n return this.registry[variant];\n }\n}\nexports.Union = Union;\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n }\n else if (this.property) {\n dest[this.property] = true;\n }\n else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!Object.prototype.hasOwnProperty.call(src, this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return undefined;\n }\n}\nexports.VariantLayout = VariantLayout;\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function (v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function () {\n return value;\n };\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset = 0) {\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n}\nexports.BitStructure = BitStructure;\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n /** The span of this value in bits. */\n this.bits = bits;\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ('number' !== typeof value\n || !Number.isInteger(value)\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n }\n}\nexports.BitField = BitField;\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!super.decode(b, offset);\n }\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n super.encode(value);\n }\n}\nexports.Boolean = Boolean;\n/* eslint-enable no-extend-native */\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Uint8Array.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Uint8Array as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Uint8Array');\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\nexports.Blob = Blob;\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n return uint8ArrayToBuffer(b).slice(offset, offset + span - 1).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset);\n buffer[offset + span] = 0;\n return span + 1;\n }\n}\nexports.CString = CString;\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan) && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n }\n else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n super(-1, property);\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n return b.length - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(uint8ArrayToBuffer(b), offset);\n return span;\n }\n}\nexports.UTF8 = UTF8;\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n /** @override */\n decode(b, offset) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\nexports.Constant = Constant;\n/** Factory for {@link GreedyCount}. */\nexports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n/** Factory for {@link OffsetLayout}. */\nexports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nexports.u8 = ((property) => new UInt(1, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16 = ((property) => new UInt(2, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24 = ((property) => new UInt(3, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32 = ((property) => new UInt(4, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40 = ((property) => new UInt(5, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48 = ((property) => new UInt(6, property));\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64 = ((property) => new NearUInt64(property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16be = ((property) => new UIntBE(2, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24be = ((property) => new UIntBE(3, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32be = ((property) => new UIntBE(4, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40be = ((property) => new UIntBE(5, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48be = ((property) => new UIntBE(6, property));\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64be = ((property) => new NearUInt64BE(property));\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nexports.s8 = ((property) => new Int(1, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nexports.s16 = ((property) => new Int(2, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nexports.s24 = ((property) => new Int(3, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nexports.s32 = ((property) => new Int(4, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nexports.s40 = ((property) => new Int(5, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nexports.s48 = ((property) => new Int(6, property));\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64 = ((property) => new NearInt64(property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nexports.s16be = ((property) => new IntBE(2, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nexports.s24be = ((property) => new IntBE(3, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nexports.s32be = ((property) => new IntBE(4, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nexports.s40be = ((property) => new IntBE(5, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nexports.s48be = ((property) => new IntBE(6, property));\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64be = ((property) => new NearInt64BE(property));\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nexports.f32 = ((property) => new Float(property));\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nexports.f32be = ((property) => new FloatBE(property));\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nexports.f64 = ((property) => new Double(property));\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nexports.f64be = ((property) => new DoubleBE(property));\n/** Factory for {@link Structure} values. */\nexports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n/** Factory for {@link BitStructure} values. */\nexports.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n/** Factory for {@link Sequence} values. */\nexports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n/** Factory for {@link Union} values. */\nexports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nexports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n/** Factory for {@link Blob} values. */\nexports.blob = ((length, property) => new Blob(length, property));\n/** Factory for {@link CString} values. */\nexports.cstr = ((property) => new CString(property));\n/** Factory for {@link UTF8} values. */\nexports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n/** Factory for {@link Constant} values. */\nexports.constant = ((value, property) => new Constant(value, property));\n//# sourceMappingURL=Layout.js.map","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _defineProperty from '@babel/runtime/helpers/defineProperty';\nimport BN from 'bn.js';\nimport { sendAndConfirmTransaction as sendAndConfirmTransaction$1, PublicKey, Keypair, Transaction, SystemProgram, SYSVAR_RENT_PUBKEY, TransactionInstruction } from '@solana/web3.js';\n\nvar buffer = {};\n\nvar base64Js = {};\n\nbase64Js.byteLength = byteLength;\nbase64Js.toByteArray = toByteArray;\nbase64Js.fromByteArray = fromByteArray;\n\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62;\nrevLookup['_'.charCodeAt(0)] = 63;\n\nfunction getLens (b64) {\n var len = b64.length;\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=');\n if (validLen === -1) validLen = len;\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4);\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n\n var curByte = 0;\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen;\n\n var i;\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)];\n arr[curByte++] = (tmp >> 16) & 0xFF;\n arr[curByte++] = (tmp >> 8) & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4);\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2);\n arr[curByte++] = (tmp >> 8) & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp;\n var output = [];\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF);\n output.push(tripletToBase64(tmp));\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n var parts = [];\n var maxChunkLength = 16383; // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n );\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n );\n }\n\n return parts.join('')\n}\n\nvar ieee754 = {};\n\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\n\nieee754.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? (nBytes - 1) : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n\n i += d;\n\n e = s & ((1 << (-nBits)) - 1);\n s >>= (-nBits);\n nBits += eLen;\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1);\n e >>= (-nBits);\n nBits += mLen;\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n};\n\nieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);\n var i = isLE ? 0 : (nBytes - 1);\n var d = isLE ? 1 : -1;\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n};\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n(function (exports) {\n\nconst base64 = base64Js;\nconst ieee754$1 = ieee754;\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null;\n\nexports.Buffer = Buffer;\nexports.SlowBuffer = SlowBuffer;\nexports.INSPECT_MAX_BYTES = 50;\n\nconst K_MAX_LENGTH = 0x7fffffff;\nexports.kMaxLength = K_MAX_LENGTH;\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport();\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n );\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1);\n const proto = { foo: function () { return 42 } };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n});\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n});\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, Buffer.prototype);\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192; // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value);\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n};\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);\nObject.setPrototypeOf(Buffer, Uint8Array);\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n};\n\nfunction allocUnsafe (size) {\n assertSize(size);\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n};\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0;\n let buf = createBuffer(length);\n\n const actual = buf.write(string, encoding);\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual);\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0;\n const buf = createBuffer(length);\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255;\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView);\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf;\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array);\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset);\n } else {\n buf = new Uint8Array(array, byteOffset, length);\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype);\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0;\n const buf = createBuffer(len);\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len);\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0;\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n};\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length;\n let y = b.length;\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n};\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n};\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i;\n if (length === undefined) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n\n const buffer = Buffer.allocUnsafe(length);\n let pos = 0;\n for (i = 0; i < list.length; ++i) {\n let buf = list[i];\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);\n buf.copy(buffer, pos);\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n );\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos);\n }\n pos += buf.length;\n }\n return buffer\n};\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length;\n const mustMatch = (arguments.length > 2 && arguments[2] === true);\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n}\nBuffer.byteLength = byteLength;\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false;\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0;\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length;\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0;\n start >>>= 0;\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8';\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true;\n\nfunction swap (b, n, m) {\n const i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this\n};\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this\n};\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this\n};\n\nBuffer.prototype.toString = function toString () {\n const length = this.length;\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n};\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString;\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n};\n\nBuffer.prototype.inspect = function inspect () {\n let str = '';\n const max = exports.INSPECT_MAX_BYTES;\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();\n if (this.length > max) str += ' ... ';\n return ''\n};\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength);\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0;\n }\n if (end === undefined) {\n end = target ? target.length : 0;\n }\n if (thisStart === undefined) {\n thisStart = 0;\n }\n if (thisEnd === undefined) {\n thisEnd = this.length;\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart;\n let y = end - start;\n const len = Math.min(x, y);\n\n const thisCopy = this.slice(thisStart, thisEnd);\n const targetCopy = target.slice(start, end);\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n};\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1;\n let arrLength = arr.length;\n let valLength = val.length;\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i;\n if (dir) {\n let foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n let found = true;\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n};\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n};\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n};\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0;\n const remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n\n const strLen = string.length;\n\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n let i;\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16);\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed;\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0;\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0;\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8';\n\n let loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n};\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n};\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end);\n const res = [];\n\n let i = start;\n while (i < end) {\n const firstByte = buf[i];\n let codePoint = null;\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1;\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint;\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte;\n }\n break\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n\n res.push(codePoint);\n i += bytesPerSequence;\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000;\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = '';\n let i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n );\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = '';\n end = Math.min(buf.length, end);\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = '';\n end = Math.min(buf.length, end);\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length;\n\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n\n let out = '';\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]];\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end);\n let res = '';\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256));\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) {\n start = len;\n }\n\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n\n if (end < start) end = start;\n\n const newBuf = this.subarray(start, end);\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype);\n\n return newBuf\n};\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n let val = this[offset];\n let mul = 1;\n let i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n\n return val\n};\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length);\n }\n\n let val = this[offset + --byteLength];\n let mul = 1;\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n\n return val\n};\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset]\n};\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | (this[offset + 1] << 8)\n};\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 2, this.length);\n return (this[offset] << 8) | this[offset + 1]\n};\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n};\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n};\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0;\n validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8);\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24;\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24;\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n});\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0;\n validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8);\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset];\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last;\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n});\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n let val = this[offset];\n let mul = 1;\n let i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n};\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n let i = byteLength;\n let mul = 1;\n let val = this[offset + --i];\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n};\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n};\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 2, this.length);\n const val = this[offset] | (this[offset + 1] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 2, this.length);\n const val = this[offset + 1] | (this[offset] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n};\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n};\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0;\n validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8);\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24); // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n});\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0;\n validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8);\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset];\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n});\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754$1.read(this, offset, true, 23, 4)\n};\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754$1.read(this, offset, false, 23, 4)\n};\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754$1.read(this, offset, true, 52, 8)\n};\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754$1.read(this, offset, false, 52, 8)\n};\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n let mul = 1;\n let i = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n let i = byteLength - 1;\n let mul = 1;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n this[offset] = (value & 0xff);\n return offset + 1\n};\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n return offset + 2\n};\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n return offset + 2\n};\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n this[offset + 3] = (value >>> 24);\n this[offset + 2] = (value >>> 16);\n this[offset + 1] = (value >>> 8);\n this[offset] = (value & 0xff);\n return offset + 4\n};\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n return offset + 4\n};\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n\n let lo = Number(value & BigInt(0xffffffff));\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n\n let lo = Number(value & BigInt(0xffffffff));\n buf[offset + 7] = lo;\n lo = lo >> 8;\n buf[offset + 6] = lo;\n lo = lo >> 8;\n buf[offset + 5] = lo;\n lo = lo >> 8;\n buf[offset + 4] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n buf[offset + 3] = hi;\n hi = hi >> 8;\n buf[offset + 2] = hi;\n hi = hi >> 8;\n buf[offset + 1] = hi;\n hi = hi >> 8;\n buf[offset] = hi;\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n});\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n});\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n let i = 0;\n let mul = 1;\n let sub = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n let i = byteLength - 1;\n let mul = 1;\n let sub = 0;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = (value & 0xff);\n return offset + 1\n};\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n return offset + 2\n};\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n return offset + 2\n};\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n this[offset + 2] = (value >>> 16);\n this[offset + 3] = (value >>> 24);\n return offset + 4\n};\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (value < 0) value = 0xffffffff + value + 1;\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n return offset + 4\n};\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n});\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n});\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4);\n }\n ieee754$1.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n};\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8);\n }\n ieee754$1.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n};\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start;\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n\n const len = end - start;\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end);\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n );\n }\n\n return len\n};\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0);\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code;\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255;\n } else if (typeof val === 'boolean') {\n val = Number(val);\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n\n if (!val) val = 0;\n\n let i;\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding);\n const len = bytes.length;\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n\n return this\n};\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {};\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super();\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n });\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`;\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack; // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name;\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n });\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n };\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError);\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError);\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`;\n let received = input;\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input));\n } else if (typeof input === 'bigint') {\n received = String(input);\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received);\n }\n received += 'n';\n }\n msg += ` It must be ${range}. Received ${received}`;\n return msg\n }, RangeError);\n\nfunction addNumericalSeparator (val) {\n let res = '';\n let i = val.length;\n const start = val[0] === '-' ? 1 : 0;\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`;\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset');\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1));\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : '';\n let range;\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`;\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`;\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength);\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type);\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0];\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '');\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '=';\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity;\n let codePoint;\n const length = string.length;\n let leadSurrogate = null;\n const bytes = [];\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i);\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint;\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n\n leadSurrogate = null;\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo;\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i;\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i];\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef';\n const table = new Array(256);\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16;\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j];\n }\n }\n return table\n})();\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n}(buffer));\n\nvar global$1 = (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n\nvar inherits;\nif (typeof Object.create === 'function'){\n inherits = function inherits(ctor, superCtor) {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n inherits = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n };\n}\nvar inherits$1 = inherits;\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect$1(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n _extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect$1.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect$1.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect$1.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect$1.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect$1.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== inspect$1 &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var length = output.reduce(function(prev, cur) {\n if (cur.indexOf('\\n') >= 0) ;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\n\nfunction isNull(arg) {\n return arg === null;\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\nfunction _extend(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n}\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n if (hasOwn.call(obj, key)) keys.push(key);\n }\n return keys;\n};\nvar pSlice = Array.prototype.slice;\nvar _functionsHaveNames;\nfunction functionsHaveNames() {\n if (typeof _functionsHaveNames !== 'undefined') {\n return _functionsHaveNames;\n }\n return _functionsHaveNames = (function () {\n return function foo() {}.name === 'foo';\n }());\n}\nfunction pToString (obj) {\n return Object.prototype.toString.call(obj);\n}\nfunction isView(arrbuf) {\n if (buffer.isBuffer(arrbuf)) {\n return false;\n }\n if (typeof global$1.ArrayBuffer !== 'function') {\n return false;\n }\n if (typeof ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(arrbuf);\n }\n if (!arrbuf) {\n return false;\n }\n if (arrbuf instanceof DataView) {\n return true;\n }\n if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {\n return true;\n }\n return false;\n}\n// 1. The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nfunction assert(value, message) {\n if (!value) fail(value, true, message, '==', ok);\n}\n\n// 2. The AssertionError is defined in assert.\n// new assert.AssertionError({ message: message,\n// actual: actual,\n// expected: expected })\n\nvar regex = /\\s*function\\s+([^\\(\\s]*)\\s*/;\n// based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js\nfunction getName(func) {\n if (!isFunction(func)) {\n return;\n }\n if (functionsHaveNames()) {\n return func.name;\n }\n var str = func.toString();\n var match = str.match(regex);\n return match && match[1];\n}\nassert.AssertionError = AssertionError;\nfunction AssertionError(options) {\n this.name = 'AssertionError';\n this.actual = options.actual;\n this.expected = options.expected;\n this.operator = options.operator;\n if (options.message) {\n this.message = options.message;\n this.generatedMessage = false;\n } else {\n this.message = getMessage(this);\n this.generatedMessage = true;\n }\n var stackStartFunction = options.stackStartFunction || fail;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, stackStartFunction);\n } else {\n // non v8 browsers so we can have a stacktrace\n var err = new Error();\n if (err.stack) {\n var out = err.stack;\n\n // try to strip useless frames\n var fn_name = getName(stackStartFunction);\n var idx = out.indexOf('\\n' + fn_name);\n if (idx >= 0) {\n // once we have located the function frame\n // we need to strip out everything before it (and its line)\n var next_line = out.indexOf('\\n', idx + 1);\n out = out.substring(next_line + 1);\n }\n\n this.stack = out;\n }\n }\n}\n\n// assert.AssertionError instanceof Error\ninherits$1(AssertionError, Error);\n\nfunction truncate(s, n) {\n if (typeof s === 'string') {\n return s.length < n ? s : s.slice(0, n);\n } else {\n return s;\n }\n}\nfunction inspect(something) {\n if (functionsHaveNames() || !isFunction(something)) {\n return inspect$1(something);\n }\n var rawname = getName(something);\n var name = rawname ? ': ' + rawname : '';\n return '[Function' + name + ']';\n}\nfunction getMessage(self) {\n return truncate(inspect(self.actual), 128) + ' ' +\n self.operator + ' ' +\n truncate(inspect(self.expected), 128);\n}\n\n// At present only the three keys mentioned above are used and\n// understood by the spec. Implementations or sub modules can pass\n// other keys to the AssertionError's constructor - they will be\n// ignored.\n\n// 3. All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction fail(actual, expected, message, operator, stackStartFunction) {\n throw new AssertionError({\n message: message,\n actual: actual,\n expected: expected,\n operator: operator,\n stackStartFunction: stackStartFunction\n });\n}\n\n// EXTENSION! allows for well behaved errors defined elsewhere.\nassert.fail = fail;\n\n// 4. Pure assertion tests whether a value is truthy, as determined\n// by !!guard.\n// assert.ok(guard, message_opt);\n// This statement is equivalent to assert.equal(true, !!guard,\n// message_opt);. To test strictly for the value true, use\n// assert.strictEqual(true, guard, message_opt);.\n\nfunction ok(value, message) {\n if (!value) fail(value, true, message, '==', ok);\n}\nassert.ok = ok;\n\n// 5. The equality assertion tests shallow, coercive equality with\n// ==.\n// assert.equal(actual, expected, message_opt);\nassert.equal = equal;\nfunction equal(actual, expected, message) {\n if (actual != expected) fail(actual, expected, message, '==', equal);\n}\n\n// 6. The non-equality assertion tests for whether two objects are not equal\n// with != assert.notEqual(actual, expected, message_opt);\nassert.notEqual = notEqual;\nfunction notEqual(actual, expected, message) {\n if (actual == expected) {\n fail(actual, expected, message, '!=', notEqual);\n }\n}\n\n// 7. The equivalence assertion tests a deep equality relation.\n// assert.deepEqual(actual, expected, message_opt);\nassert.deepEqual = deepEqual;\nfunction deepEqual(actual, expected, message) {\n if (!_deepEqual(actual, expected, false)) {\n fail(actual, expected, message, 'deepEqual', deepEqual);\n }\n}\nassert.deepStrictEqual = deepStrictEqual;\nfunction deepStrictEqual(actual, expected, message) {\n if (!_deepEqual(actual, expected, true)) {\n fail(actual, expected, message, 'deepStrictEqual', deepStrictEqual);\n }\n}\n\nfunction _deepEqual(actual, expected, strict, memos) {\n // 7.1. All identical values are equivalent, as determined by ===.\n if (actual === expected) {\n return true;\n } else if (buffer.isBuffer(actual) && buffer.isBuffer(expected)) {\n return compare(actual, expected) === 0;\n\n // 7.2. If the expected value is a Date object, the actual value is\n // equivalent if it is also a Date object that refers to the same time.\n } else if (isDate(actual) && isDate(expected)) {\n return actual.getTime() === expected.getTime();\n\n // 7.3 If the expected value is a RegExp object, the actual value is\n // equivalent if it is also a RegExp object with the same source and\n // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).\n } else if (isRegExp(actual) && isRegExp(expected)) {\n return actual.source === expected.source &&\n actual.global === expected.global &&\n actual.multiline === expected.multiline &&\n actual.lastIndex === expected.lastIndex &&\n actual.ignoreCase === expected.ignoreCase;\n\n // 7.4. Other pairs that do not both pass typeof value == 'object',\n // equivalence is determined by ==.\n } else if ((actual === null || typeof actual !== 'object') &&\n (expected === null || typeof expected !== 'object')) {\n return strict ? actual === expected : actual == expected;\n\n // If both values are instances of typed arrays, wrap their underlying\n // ArrayBuffers in a Buffer each to increase performance\n // This optimization requires the arrays to have the same type as checked by\n // Object.prototype.toString (aka pToString). Never perform binary\n // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their\n // bit patterns are not identical.\n } else if (isView(actual) && isView(expected) &&\n pToString(actual) === pToString(expected) &&\n !(actual instanceof Float32Array ||\n actual instanceof Float64Array)) {\n return compare(new Uint8Array(actual.buffer),\n new Uint8Array(expected.buffer)) === 0;\n\n // 7.5 For all other Object pairs, including Array objects, equivalence is\n // determined by having the same number of owned properties (as verified\n // with Object.prototype.hasOwnProperty.call), the same set of keys\n // (although not necessarily the same order), equivalent values for every\n // corresponding key, and an identical 'prototype' property. Note: this\n // accounts for both named and indexed properties on Arrays.\n } else if (buffer.isBuffer(actual) !== buffer.isBuffer(expected)) {\n return false;\n } else {\n memos = memos || {actual: [], expected: []};\n\n var actualIndex = memos.actual.indexOf(actual);\n if (actualIndex !== -1) {\n if (actualIndex === memos.expected.indexOf(expected)) {\n return true;\n }\n }\n\n memos.actual.push(actual);\n memos.expected.push(expected);\n\n return objEquiv(actual, expected, strict, memos);\n }\n}\n\nfunction isArguments(object) {\n return Object.prototype.toString.call(object) == '[object Arguments]';\n}\n\nfunction objEquiv(a, b, strict, actualVisitedObjects) {\n if (a === null || a === undefined || b === null || b === undefined)\n return false;\n // if one is a primitive, the other must be same\n if (isPrimitive(a) || isPrimitive(b))\n return a === b;\n if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))\n return false;\n var aIsArgs = isArguments(a);\n var bIsArgs = isArguments(b);\n if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))\n return false;\n if (aIsArgs) {\n a = pSlice.call(a);\n b = pSlice.call(b);\n return _deepEqual(a, b, strict);\n }\n var ka = objectKeys(a);\n var kb = objectKeys(b);\n var key, i;\n // having the same number of owned properties (keys incorporates\n // hasOwnProperty)\n if (ka.length !== kb.length)\n return false;\n //the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n //~~~cheap key test\n for (i = ka.length - 1; i >= 0; i--) {\n if (ka[i] !== kb[i])\n return false;\n }\n //equivalent values for every corresponding key, and\n //~~~possibly expensive deep test\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects))\n return false;\n }\n return true;\n}\n\n// 8. The non-equivalence assertion tests for any deep inequality.\n// assert.notDeepEqual(actual, expected, message_opt);\nassert.notDeepEqual = notDeepEqual;\nfunction notDeepEqual(actual, expected, message) {\n if (_deepEqual(actual, expected, false)) {\n fail(actual, expected, message, 'notDeepEqual', notDeepEqual);\n }\n}\n\nassert.notDeepStrictEqual = notDeepStrictEqual;\nfunction notDeepStrictEqual(actual, expected, message) {\n if (_deepEqual(actual, expected, true)) {\n fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);\n }\n}\n\n\n// 9. The strict equality assertion tests strict equality, as determined by ===.\n// assert.strictEqual(actual, expected, message_opt);\nassert.strictEqual = strictEqual;\nfunction strictEqual(actual, expected, message) {\n if (actual !== expected) {\n fail(actual, expected, message, '===', strictEqual);\n }\n}\n\n// 10. The strict non-equality assertion tests for strict inequality, as\n// determined by !==. assert.notStrictEqual(actual, expected, message_opt);\nassert.notStrictEqual = notStrictEqual;\nfunction notStrictEqual(actual, expected, message) {\n if (actual === expected) {\n fail(actual, expected, message, '!==', notStrictEqual);\n }\n}\n\nfunction expectedException(actual, expected) {\n if (!actual || !expected) {\n return false;\n }\n\n if (Object.prototype.toString.call(expected) == '[object RegExp]') {\n return expected.test(actual);\n }\n\n try {\n if (actual instanceof expected) {\n return true;\n }\n } catch (e) {\n // Ignore. The instanceof check doesn't work for arrow functions.\n }\n\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n\n return expected.call({}, actual) === true;\n}\n\nfunction _tryBlock(block) {\n var error;\n try {\n block();\n } catch (e) {\n error = e;\n }\n return error;\n}\n\nfunction _throws(shouldThrow, block, expected, message) {\n var actual;\n\n if (typeof block !== 'function') {\n throw new TypeError('\"block\" argument must be a function');\n }\n\n if (typeof expected === 'string') {\n message = expected;\n expected = null;\n }\n\n actual = _tryBlock(block);\n\n message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +\n (message ? ' ' + message : '.');\n\n if (shouldThrow && !actual) {\n fail(actual, expected, 'Missing expected exception' + message);\n }\n\n var userProvidedMessage = typeof message === 'string';\n var isUnwantedException = !shouldThrow && isError(actual);\n var isUnexpectedException = !shouldThrow && actual && !expected;\n\n if ((isUnwantedException &&\n userProvidedMessage &&\n expectedException(actual, expected)) ||\n isUnexpectedException) {\n fail(actual, expected, 'Got unwanted exception' + message);\n }\n\n if ((shouldThrow && actual && expected &&\n !expectedException(actual, expected)) || (!shouldThrow && actual)) {\n throw actual;\n }\n}\n\n// 11. Expected to throw an error:\n// assert.throws(block, Error_opt, message_opt);\nassert.throws = throws;\nfunction throws(block, /*optional*/error, /*optional*/message) {\n _throws(true, block, error, message);\n}\n\n// EXTENSION! This is annoying to write outside this module.\nassert.doesNotThrow = doesNotThrow;\nfunction doesNotThrow(block, /*optional*/error, /*optional*/message) {\n _throws(false, block, error, message);\n}\n\nassert.ifError = ifError;\nfunction ifError(err) {\n if (err) throw err;\n}\n\nvar Layout$1 = {};\n\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n\n /**\n * Decode from a Buffer into an JavaScript value.\n *\n * @param {Buffer} b - the buffer from which encoded data is read.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {(Number|Array|Object)} - the value of the decoded data.\n *\n * @abstract\n */\n decode(b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Encode a JavaScript value into a Buffer.\n *\n * @param {(Number|Array|Object)} src - the value to be encoded into\n * the buffer. The type accepted depends on the (sub-)type of {@link\n * Layout}.\n *\n * @param {Buffer} b - the buffer into which encoded data will be\n * written.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {Number} - the number of bytes encoded, including the\n * space skipped for internal padding, but excluding data such as\n * {@link Sequence#count|lengths} when stored {@link\n * ExternalLayout|externally}. This is the adjustment to `offset`\n * producing the offset where data for the next layout would be\n * written.\n *\n * @abstract\n */\n encode(src, b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Buffer} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nLayout$1.Layout = Layout;\n\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nLayout$1.nameWithProperty = nameWithProperty;\n\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Class.hasOwnProperty('layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (layout.hasOwnProperty('boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value: function(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value: function(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nLayout$1.bindConstructorLayout = bindConstructorLayout;\n\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\n\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan, property) {\n if (undefined === elementSpan) {\n elementSpan = 1;\n }\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n\n /** @override */\n isCount() {\n return true;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\n\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n\n if (undefined === offset) {\n offset = 0;\n } else if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n\n super(layout.span, property || layout.property);\n\n /** The subordinated layout. */\n this.layout = layout;\n\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Buffer\n * being accessed. */\n this.offset = offset;\n }\n\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.decode(b, offset + this.offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\n\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super( span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\nconst V2E32 = Math.pow(2, 32);\n\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return {hi32, lo32};\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const hi32 = b.readUInt32BE(offset);\n const lo32 = b.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32BE(split.hi32, offset);\n b.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const hi32 = b.readInt32BE(offset);\n const lo32 = b.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeInt32BE(split.hi32, offset);\n b.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readFloatLE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeFloatLE(src, offset);\n return 4;\n }\n}\n\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readFloatBE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeFloatBE(src, offset);\n return 4;\n }\n}\n\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readDoubleLE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeDoubleLE(src, offset);\n return 8;\n }\n}\n\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readDoubleBE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeDoubleBE(src, offset);\n return 8;\n }\n}\n\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n\n super(span, property);\n\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n } else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\n\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n } else if (0 <= offset) {\n offset += fd.span;\n }\n }\n }\n}\n\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\n\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n\n super(property || layout.property || 'variant');\n\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\n\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n const upv = ((discr instanceof UInt)\n || (discr instanceof UIntBE));\n if (upv) {\n discr = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discr = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && upv) {\n span += discr.layout.span;\n }\n }\n super(span, property);\n\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discr;\n\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = upv;\n\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisified rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (src.hasOwnProperty(this.discriminator.property)) {\n if (this.defaultLayout\n && src.hasOwnProperty(this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || src.hasOwnProperty(vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (src.hasOwnProperty(vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n let clo = this.registry[discr];\n if (undefined === clo) {\n let contentOffset = 0;\n clo = this.defaultLayout;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[clo.property] = this.defaultLayout.decode(b, offset + contentOffset);\n } else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n return contentOffset + clo.encode(src[clo.property], b,\n offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Buffer)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Buffer}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset) {\n let variant = vb;\n if (buffer.Buffer.isBuffer(vb)) {\n if (undefined === offset) {\n offset = 0;\n }\n variant = this.discriminator.decode(vb, offset);\n }\n return this.registry[variant];\n }\n}\n\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n return contentOffset + this.layout.getSpan(b, offset + contentOffset);\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!src.hasOwnProperty(this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n }\n}\n\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = undefined;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function(v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function() {\n return value;\n };\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(value);\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n // eslint-disable-next-line no-new-wrappers\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n}\n\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n\n /** The span of this value in bits. */\n this.bits = bits;\n\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode() {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ((!Number.isInteger(value))\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n };\n}\n\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!BitField.prototype.decode.call(this, b, offset);\n }\n\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n return BitField.prototype.encode.call(this, value);\n }\n}\n/* eslint-enable no-extend-native */\n\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Buffer.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return b.slice(offset, offset + span);\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(buffer.Buffer.isBuffer(src)\n && (span === src.length))) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Buffer as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n b.write(src.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\n\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n\n /** @override */\n getSpan(b, offset) {\n if (!buffer.Buffer.isBuffer(b)) {\n throw new TypeError('b must be a Buffer');\n }\n if (undefined === offset) {\n offset = 0;\n }\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n\n /** @override */\n decode(b, offset, dest) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.getSpan(b, offset);\n return b.slice(offset, offset + span - 1).toString('utf-8');\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = src.toString();\n }\n const srcb = new buffer.Buffer(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(b, offset);\n b[offset + span] = 0;\n return span + 1;\n }\n}\n\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan)\n && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n } else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n\n super(-1, property);\n\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (!buffer.Buffer.isBuffer(b)) {\n throw new TypeError('b must be a Buffer');\n }\n if (undefined === offset) {\n offset = 0;\n }\n return b.length - offset;\n }\n\n /** @override */\n decode(b, offset, dest) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return b.slice(offset, offset + span).toString('utf-8');\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = src.toString();\n }\n const srcb = new buffer.Buffer(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(b, offset);\n return span;\n }\n}\n\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n\n /** @override */\n decode(b, offset, dest) {\n return this.value;\n }\n\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\n\nLayout$1.ExternalLayout = ExternalLayout;\nLayout$1.GreedyCount = GreedyCount;\nLayout$1.OffsetLayout = OffsetLayout;\nLayout$1.UInt = UInt;\nLayout$1.UIntBE = UIntBE;\nLayout$1.Int = Int;\nLayout$1.IntBE = IntBE;\nLayout$1.Float = Float;\nLayout$1.FloatBE = FloatBE;\nLayout$1.Double = Double;\nLayout$1.DoubleBE = DoubleBE;\nLayout$1.Sequence = Sequence;\nLayout$1.Structure = Structure;\nLayout$1.UnionDiscriminator = UnionDiscriminator;\nLayout$1.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\nLayout$1.Union = Union;\nLayout$1.VariantLayout = VariantLayout;\nLayout$1.BitStructure = BitStructure;\nLayout$1.BitField = BitField;\nLayout$1.Boolean = Boolean;\nLayout$1.Blob = Blob;\nLayout$1.CString = CString;\nLayout$1.UTF8 = UTF8;\nLayout$1.Constant = Constant;\n\n/** Factory for {@link GreedyCount}. */\nLayout$1.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n\n/** Factory for {@link OffsetLayout}. */\nLayout$1.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nvar u8 = Layout$1.u8 = (property => new UInt(1, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nLayout$1.u16 = (property => new UInt(2, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nLayout$1.u24 = (property => new UInt(3, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nvar u32 = Layout$1.u32 = (property => new UInt(4, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nLayout$1.u40 = (property => new UInt(5, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nLayout$1.u48 = (property => new UInt(6, property));\n\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nLayout$1.nu64 = (property => new NearUInt64(property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nLayout$1.u16be = (property => new UIntBE(2, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nLayout$1.u24be = (property => new UIntBE(3, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nLayout$1.u32be = (property => new UIntBE(4, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nLayout$1.u40be = (property => new UIntBE(5, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nLayout$1.u48be = (property => new UIntBE(6, property));\n\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nLayout$1.nu64be = (property => new NearUInt64BE(property));\n\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nLayout$1.s8 = (property => new Int(1, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nLayout$1.s16 = (property => new Int(2, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nLayout$1.s24 = (property => new Int(3, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nLayout$1.s32 = (property => new Int(4, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nLayout$1.s40 = (property => new Int(5, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nLayout$1.s48 = (property => new Int(6, property));\n\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nLayout$1.ns64 = (property => new NearInt64(property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nLayout$1.s16be = (property => new IntBE(2, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nLayout$1.s24be = (property => new IntBE(3, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nLayout$1.s32be = (property => new IntBE(4, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nLayout$1.s40be = (property => new IntBE(5, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nLayout$1.s48be = (property => new IntBE(6, property));\n\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nLayout$1.ns64be = (property => new NearInt64BE(property));\n\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nLayout$1.f32 = (property => new Float(property));\n\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nLayout$1.f32be = (property => new FloatBE(property));\n\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nLayout$1.f64 = (property => new Double(property));\n\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nLayout$1.f64be = (property => new DoubleBE(property));\n\n/** Factory for {@link Structure} values. */\nvar struct = Layout$1.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n\n/** Factory for {@link BitStructure} values. */\nLayout$1.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n\n/** Factory for {@link Sequence} values. */\nLayout$1.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n\n/** Factory for {@link Union} values. */\nLayout$1.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nLayout$1.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n\n/** Factory for {@link Blob} values. */\nvar blob = Layout$1.blob = ((length, property) => new Blob(length, property));\n\n/** Factory for {@link CString} values. */\nLayout$1.cstr = (property => new CString(property));\n\n/** Factory for {@link UTF8} values. */\nLayout$1.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n\n/** Factory for {@link Constant} values. */\nLayout$1.const = ((value, property) => new Constant(value, property));\n\n// \n/**\n * Layout for a public key\n */\n\nconst publicKey = (property = 'publicKey') => {\n return blob(32, property);\n};\n/**\n * Layout for a 64bit unsigned value\n */\n\nconst uint64 = (property = 'uint64') => {\n return blob(8, property);\n};\n\n// \nfunction sendAndConfirmTransaction(title, connection, transaction, ...signers) {\n return sendAndConfirmTransaction$1(connection, transaction, signers, {\n skipPreflight: false\n });\n}\n\nconst TOKEN_PROGRAM_ID = new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');\nconst ASSOCIATED_TOKEN_PROGRAM_ID = new PublicKey('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL');\nconst FAILED_TO_FIND_ACCOUNT = 'Failed to find account';\nconst INVALID_ACCOUNT_OWNER = 'Invalid account owner';\n/**\n * Unfortunately, BufferLayout.encode uses an `instanceof` check for `Buffer`\n * which fails when using `publicKey.toBuffer()` directly because the bundled `Buffer`\n * class in `@solana/web3.js` is different from the bundled `Buffer` class in this package\n */\n\nfunction pubkeyToBuffer(publicKey) {\n return buffer.Buffer.from(publicKey.toBuffer());\n}\n/**\n * 64-bit value\n */\n\n\nclass u64 extends BN {\n /**\n * Convert to Buffer representation\n */\n toBuffer() {\n const a = super.toArray().reverse();\n const b = buffer.Buffer.from(a);\n\n if (b.length === 8) {\n return b;\n }\n\n assert(b.length < 8, 'u64 too large');\n const zeroPad = buffer.Buffer.alloc(8);\n b.copy(zeroPad);\n return zeroPad;\n }\n /**\n * Construct a u64 from Buffer representation\n */\n\n\n static fromBuffer(buffer) {\n assert(buffer.length === 8, `Invalid buffer length: ${buffer.length}`);\n return new u64([...buffer].reverse().map(i => `00${i.toString(16)}`.slice(-2)).join(''), 16);\n }\n\n}\n\nfunction isAccount(accountOrPublicKey) {\n return 'publicKey' in accountOrPublicKey;\n}\n\nconst AuthorityTypeCodes = {\n MintTokens: 0,\n FreezeAccount: 1,\n AccountOwner: 2,\n CloseAccount: 3\n}; // The address of the special mint for wrapped native token.\n\nconst NATIVE_MINT = new PublicKey('So11111111111111111111111111111111111111112');\n/**\n * Information about the mint\n */\n\nconst MintLayout = struct([u32('mintAuthorityOption'), publicKey('mintAuthority'), uint64('supply'), u8('decimals'), u8('isInitialized'), u32('freezeAuthorityOption'), publicKey('freezeAuthority')]);\n/**\n * Information about an account\n */\n\n/**\n * @private\n */\n\nconst AccountLayout = struct([publicKey('mint'), publicKey('owner'), uint64('amount'), u32('delegateOption'), publicKey('delegate'), u8('state'), u32('isNativeOption'), uint64('isNative'), uint64('delegatedAmount'), u32('closeAuthorityOption'), publicKey('closeAuthority')]);\n/**\n * Information about an multisig\n */\n\n/**\n * @private\n */\n\nconst MultisigLayout = struct([u8('m'), u8('n'), u8('is_initialized'), publicKey('signer1'), publicKey('signer2'), publicKey('signer3'), publicKey('signer4'), publicKey('signer5'), publicKey('signer6'), publicKey('signer7'), publicKey('signer8'), publicKey('signer9'), publicKey('signer10'), publicKey('signer11')]);\n/**\n * An ERC20-like Token\n */\n\nclass Token {\n /**\n * @private\n */\n\n /**\n * The public key identifying this mint\n */\n\n /**\n * Program Identifier for the Token program\n */\n\n /**\n * Program Identifier for the Associated Token program\n */\n\n /**\n * Fee payer\n */\n\n /**\n * Create a Token object attached to the specific mint\n *\n * @param connection The connection to use\n * @param token Public key of the mint\n * @param programId token programId\n * @param payer Payer of fees\n */\n constructor(connection, publicKey, programId, payer) {\n _defineProperty(this, \"connection\", void 0);\n\n _defineProperty(this, \"publicKey\", void 0);\n\n _defineProperty(this, \"programId\", void 0);\n\n _defineProperty(this, \"associatedProgramId\", void 0);\n\n _defineProperty(this, \"payer\", void 0);\n\n Object.assign(this, {\n connection,\n publicKey,\n programId,\n payer,\n // Hard code is ok; Overriding is needed only for tests\n associatedProgramId: ASSOCIATED_TOKEN_PROGRAM_ID\n });\n }\n /**\n * Get the minimum balance for the mint to be rent exempt\n *\n * @return Number of lamports required\n */\n\n\n static async getMinBalanceRentForExemptMint(connection) {\n return await connection.getMinimumBalanceForRentExemption(MintLayout.span);\n }\n /**\n * Get the minimum balance for the account to be rent exempt\n *\n * @return Number of lamports required\n */\n\n\n static async getMinBalanceRentForExemptAccount(connection) {\n return await connection.getMinimumBalanceForRentExemption(AccountLayout.span);\n }\n /**\n * Get the minimum balance for the multsig to be rent exempt\n *\n * @return Number of lamports required\n */\n\n\n static async getMinBalanceRentForExemptMultisig(connection) {\n return await connection.getMinimumBalanceForRentExemption(MultisigLayout.span);\n }\n /**\n * Create and initialize a token.\n *\n * @param connection The connection to use\n * @param payer Fee payer for transaction\n * @param mintAuthority Account or multisig that will control minting\n * @param freezeAuthority Optional account or multisig that can freeze token accounts\n * @param decimals Location of the decimal place\n * @param programId Optional token programId, uses the system programId by default\n * @return Token object for the newly minted token\n */\n\n\n static async createMint(connection, payer, mintAuthority, freezeAuthority, decimals, programId) {\n const mintAccount = Keypair.generate();\n const token = new Token(connection, mintAccount.publicKey, programId, payer); // Allocate memory for the account\n\n const balanceNeeded = await Token.getMinBalanceRentForExemptMint(connection);\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: mintAccount.publicKey,\n lamports: balanceNeeded,\n space: MintLayout.span,\n programId\n }));\n transaction.add(Token.createInitMintInstruction(programId, mintAccount.publicKey, decimals, mintAuthority, freezeAuthority)); // Send the two instructions\n\n await sendAndConfirmTransaction('createAccount and InitializeMint', connection, transaction, payer, mintAccount);\n return token;\n }\n /**\n * Create and initialize a new account.\n *\n * This account may then be used as a `transfer()` or `approve()` destination\n *\n * @param owner User account that will own the new account\n * @return Public key of the new empty account\n */\n\n\n async createAccount(owner) {\n // Allocate memory for the account\n const balanceNeeded = await Token.getMinBalanceRentForExemptAccount(this.connection);\n const newAccount = Keypair.generate();\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: this.payer.publicKey,\n newAccountPubkey: newAccount.publicKey,\n lamports: balanceNeeded,\n space: AccountLayout.span,\n programId: this.programId\n }));\n const mintPublicKey = this.publicKey;\n transaction.add(Token.createInitAccountInstruction(this.programId, mintPublicKey, newAccount.publicKey, owner)); // Send the two instructions\n\n await sendAndConfirmTransaction('createAccount and InitializeAccount', this.connection, transaction, this.payer, newAccount);\n return newAccount.publicKey;\n }\n /**\n * Create and initialize the associated account.\n *\n * This account may then be used as a `transfer()` or `approve()` destination\n *\n * @param owner User account that will own the new account\n * @return Public key of the new associated account\n */\n\n\n async createAssociatedTokenAccount(owner) {\n const associatedAddress = await Token.getAssociatedTokenAddress(this.associatedProgramId, this.programId, this.publicKey, owner);\n return this.createAssociatedTokenAccountInternal(owner, associatedAddress);\n }\n\n async createAssociatedTokenAccountInternal(owner, associatedAddress) {\n await sendAndConfirmTransaction('CreateAssociatedTokenAccount', this.connection, new Transaction().add(Token.createAssociatedTokenAccountInstruction(this.associatedProgramId, this.programId, this.publicKey, associatedAddress, owner, this.payer.publicKey)), this.payer);\n return associatedAddress;\n }\n /**\n * Retrieve the associated account or create one if not found.\n *\n * This account may then be used as a `transfer()` or `approve()` destination\n *\n * @param owner User account that will own the new account\n * @return The new associated account\n */\n\n\n async getOrCreateAssociatedAccountInfo(owner) {\n const associatedAddress = await Token.getAssociatedTokenAddress(this.associatedProgramId, this.programId, this.publicKey, owner); // This is the optimum logic, considering TX fee, client-side computation,\n // RPC roundtrips and guaranteed idempotent.\n // Sadly we can't do this atomically;\n\n try {\n return await this.getAccountInfo(associatedAddress);\n } catch (err) {\n // INVALID_ACCOUNT_OWNER can be possible if the associatedAddress has\n // already been received some lamports (= became system accounts).\n // Assuming program derived addressing is safe, this is the only case\n // for the INVALID_ACCOUNT_OWNER in this code-path\n if (err.message === FAILED_TO_FIND_ACCOUNT || err.message === INVALID_ACCOUNT_OWNER) {\n // as this isn't atomic, it's possible others can create associated\n // accounts meanwhile\n try {\n await this.createAssociatedTokenAccountInternal(owner, associatedAddress);\n } catch (err) {// ignore all errors; for now there is no API compatible way to\n // selectively ignore the expected instruction error if the\n // associated account is existing already.\n } // Now this should always succeed\n\n\n return await this.getAccountInfo(associatedAddress);\n } else {\n throw err;\n }\n }\n }\n /**\n * Create and initialize a new account on the special native token mint.\n *\n * In order to be wrapped, the account must have a balance of native tokens\n * when it is initialized with the token program.\n *\n * This function sends lamports to the new account before initializing it.\n *\n * @param connection A solana web3 connection\n * @param programId The token program ID\n * @param owner The owner of the new token account\n * @param payer The source of the lamports to initialize, and payer of the initialization fees.\n * @param amount The amount of lamports to wrap\n * @return {Promise} The new token account\n */\n\n\n static async createWrappedNativeAccount(connection, programId, owner, payer, amount) {\n // Allocate memory for the account\n const balanceNeeded = await Token.getMinBalanceRentForExemptAccount(connection); // Create a new account\n\n const newAccount = Keypair.generate();\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: newAccount.publicKey,\n lamports: balanceNeeded,\n space: AccountLayout.span,\n programId\n })); // Send lamports to it (these will be wrapped into native tokens by the token program)\n\n transaction.add(SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: newAccount.publicKey,\n lamports: amount\n })); // Assign the new account to the native token mint.\n // the account will be initialized with a balance equal to the native token balance.\n // (i.e. amount)\n\n transaction.add(Token.createInitAccountInstruction(programId, NATIVE_MINT, newAccount.publicKey, owner)); // Send the three instructions\n\n await sendAndConfirmTransaction('createAccount, transfer, and initializeAccount', connection, transaction, payer, newAccount);\n return newAccount.publicKey;\n }\n /**\n * Create and initialize a new multisig.\n *\n * This account may then be used for multisignature verification\n *\n * @param m Number of required signatures\n * @param signers Full set of signers\n * @return Public key of the new multisig account\n */\n\n\n async createMultisig(m, signers) {\n const multisigAccount = Keypair.generate(); // Allocate memory for the account\n\n const balanceNeeded = await Token.getMinBalanceRentForExemptMultisig(this.connection);\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: this.payer.publicKey,\n newAccountPubkey: multisigAccount.publicKey,\n lamports: balanceNeeded,\n space: MultisigLayout.span,\n programId: this.programId\n })); // create the new account\n\n let keys = [{\n pubkey: multisigAccount.publicKey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n signers.forEach(signer => keys.push({\n pubkey: signer,\n isSigner: false,\n isWritable: false\n }));\n const dataLayout = struct([u8('instruction'), u8('m')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 2,\n // InitializeMultisig instruction\n m\n }, data);\n transaction.add({\n keys,\n programId: this.programId,\n data\n }); // Send the two instructions\n\n await sendAndConfirmTransaction('createAccount and InitializeMultisig', this.connection, transaction, this.payer, multisigAccount);\n return multisigAccount.publicKey;\n }\n /**\n * Retrieve mint information\n */\n\n\n async getMintInfo() {\n const info = await this.connection.getAccountInfo(this.publicKey);\n\n if (info === null) {\n throw new Error('Failed to find mint account');\n }\n\n if (!info.owner.equals(this.programId)) {\n throw new Error(`Invalid mint owner: ${JSON.stringify(info.owner)}`);\n }\n\n if (info.data.length != MintLayout.span) {\n throw new Error(`Invalid mint size`);\n }\n\n const data = buffer.Buffer.from(info.data);\n const mintInfo = MintLayout.decode(data);\n\n if (mintInfo.mintAuthorityOption === 0) {\n mintInfo.mintAuthority = null;\n } else {\n mintInfo.mintAuthority = new PublicKey(mintInfo.mintAuthority);\n }\n\n mintInfo.supply = u64.fromBuffer(mintInfo.supply);\n mintInfo.isInitialized = mintInfo.isInitialized != 0;\n\n if (mintInfo.freezeAuthorityOption === 0) {\n mintInfo.freezeAuthority = null;\n } else {\n mintInfo.freezeAuthority = new PublicKey(mintInfo.freezeAuthority);\n }\n\n return mintInfo;\n }\n /**\n * Retrieve account information\n *\n * @param account Public key of the account\n */\n\n\n async getAccountInfo(account, commitment) {\n const info = await this.connection.getAccountInfo(account, commitment);\n\n if (info === null) {\n throw new Error(FAILED_TO_FIND_ACCOUNT);\n }\n\n if (!info.owner.equals(this.programId)) {\n throw new Error(INVALID_ACCOUNT_OWNER);\n }\n\n if (info.data.length != AccountLayout.span) {\n throw new Error(`Invalid account size`);\n }\n\n const data = buffer.Buffer.from(info.data);\n const accountInfo = AccountLayout.decode(data);\n accountInfo.address = account;\n accountInfo.mint = new PublicKey(accountInfo.mint);\n accountInfo.owner = new PublicKey(accountInfo.owner);\n accountInfo.amount = u64.fromBuffer(accountInfo.amount);\n\n if (accountInfo.delegateOption === 0) {\n accountInfo.delegate = null;\n accountInfo.delegatedAmount = new u64();\n } else {\n accountInfo.delegate = new PublicKey(accountInfo.delegate);\n accountInfo.delegatedAmount = u64.fromBuffer(accountInfo.delegatedAmount);\n }\n\n accountInfo.isInitialized = accountInfo.state !== 0;\n accountInfo.isFrozen = accountInfo.state === 2;\n\n if (accountInfo.isNativeOption === 1) {\n accountInfo.rentExemptReserve = u64.fromBuffer(accountInfo.isNative);\n accountInfo.isNative = true;\n } else {\n accountInfo.rentExemptReserve = null;\n accountInfo.isNative = false;\n }\n\n if (accountInfo.closeAuthorityOption === 0) {\n accountInfo.closeAuthority = null;\n } else {\n accountInfo.closeAuthority = new PublicKey(accountInfo.closeAuthority);\n }\n\n if (!accountInfo.mint.equals(this.publicKey)) {\n throw new Error(`Invalid account mint: ${JSON.stringify(accountInfo.mint)} !== ${JSON.stringify(this.publicKey)}`);\n }\n\n return accountInfo;\n }\n /**\n * Retrieve Multisig information\n *\n * @param multisig Public key of the account\n */\n\n\n async getMultisigInfo(multisig) {\n const info = await this.connection.getAccountInfo(multisig);\n\n if (info === null) {\n throw new Error('Failed to find multisig');\n }\n\n if (!info.owner.equals(this.programId)) {\n throw new Error(`Invalid multisig owner`);\n }\n\n if (info.data.length != MultisigLayout.span) {\n throw new Error(`Invalid multisig size`);\n }\n\n const data = buffer.Buffer.from(info.data);\n const multisigInfo = MultisigLayout.decode(data);\n multisigInfo.signer1 = new PublicKey(multisigInfo.signer1);\n multisigInfo.signer2 = new PublicKey(multisigInfo.signer2);\n multisigInfo.signer3 = new PublicKey(multisigInfo.signer3);\n multisigInfo.signer4 = new PublicKey(multisigInfo.signer4);\n multisigInfo.signer5 = new PublicKey(multisigInfo.signer5);\n multisigInfo.signer6 = new PublicKey(multisigInfo.signer6);\n multisigInfo.signer7 = new PublicKey(multisigInfo.signer7);\n multisigInfo.signer8 = new PublicKey(multisigInfo.signer8);\n multisigInfo.signer9 = new PublicKey(multisigInfo.signer9);\n multisigInfo.signer10 = new PublicKey(multisigInfo.signer10);\n multisigInfo.signer11 = new PublicKey(multisigInfo.signer11);\n return multisigInfo;\n }\n /**\n * Transfer tokens to another account\n *\n * @param source Source account\n * @param destination Destination account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Number of tokens to transfer\n */\n\n\n async transfer(source, destination, owner, multiSigners, amount) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n return await sendAndConfirmTransaction('Transfer', this.connection, new Transaction().add(Token.createTransferInstruction(this.programId, source, destination, ownerPublicKey, multiSigners, amount)), this.payer, ...signers);\n }\n /**\n * Grant a third-party permission to transfer up the specified number of tokens from an account\n *\n * @param account Public key of the account\n * @param delegate Account authorized to perform a transfer tokens from the source account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Maximum number of tokens the delegate may transfer\n */\n\n\n async approve(account, delegate, owner, multiSigners, amount) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('Approve', this.connection, new Transaction().add(Token.createApproveInstruction(this.programId, account, delegate, ownerPublicKey, multiSigners, amount)), this.payer, ...signers);\n }\n /**\n * Remove approval for the transfer of any remaining tokens\n *\n * @param account Public key of the account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n */\n\n\n async revoke(account, owner, multiSigners) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('Revoke', this.connection, new Transaction().add(Token.createRevokeInstruction(this.programId, account, ownerPublicKey, multiSigners)), this.payer, ...signers);\n }\n /**\n * Assign a new authority to the account\n *\n * @param account Public key of the account\n * @param newAuthority New authority of the account\n * @param authorityType Type of authority to set\n * @param currentAuthority Current authority of the account\n * @param multiSigners Signing accounts if `currentAuthority` is a multiSig\n */\n\n\n async setAuthority(account, newAuthority, authorityType, currentAuthority, multiSigners) {\n let currentAuthorityPublicKey;\n let signers;\n\n if (isAccount(currentAuthority)) {\n currentAuthorityPublicKey = currentAuthority.publicKey;\n signers = [currentAuthority];\n } else {\n currentAuthorityPublicKey = currentAuthority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('SetAuthority', this.connection, new Transaction().add(Token.createSetAuthorityInstruction(this.programId, account, newAuthority, authorityType, currentAuthorityPublicKey, multiSigners)), this.payer, ...signers);\n }\n /**\n * Mint new tokens\n *\n * @param dest Public key of the account to mint to\n * @param authority Minting authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Amount to mint\n */\n\n\n async mintTo(dest, authority, multiSigners, amount) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(authority)) {\n ownerPublicKey = authority.publicKey;\n signers = [authority];\n } else {\n ownerPublicKey = authority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('MintTo', this.connection, new Transaction().add(Token.createMintToInstruction(this.programId, this.publicKey, dest, ownerPublicKey, multiSigners, amount)), this.payer, ...signers);\n }\n /**\n * Burn tokens\n *\n * @param account Account to burn tokens from\n * @param owner Account owner\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Amount to burn\n */\n\n\n async burn(account, owner, multiSigners, amount) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('Burn', this.connection, new Transaction().add(Token.createBurnInstruction(this.programId, this.publicKey, account, ownerPublicKey, multiSigners, amount)), this.payer, ...signers);\n }\n /**\n * Close account\n *\n * @param account Account to close\n * @param dest Account to receive the remaining balance of the closed account\n * @param authority Authority which is allowed to close the account\n * @param multiSigners Signing accounts if `authority` is a multiSig\n */\n\n\n async closeAccount(account, dest, authority, multiSigners) {\n let authorityPublicKey;\n let signers;\n\n if (isAccount(authority)) {\n authorityPublicKey = authority.publicKey;\n signers = [authority];\n } else {\n authorityPublicKey = authority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('CloseAccount', this.connection, new Transaction().add(Token.createCloseAccountInstruction(this.programId, account, dest, authorityPublicKey, multiSigners)), this.payer, ...signers);\n }\n /**\n * Freeze account\n *\n * @param account Account to freeze\n * @param authority The mint freeze authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n */\n\n\n async freezeAccount(account, authority, multiSigners) {\n let authorityPublicKey;\n let signers;\n\n if (isAccount(authority)) {\n authorityPublicKey = authority.publicKey;\n signers = [authority];\n } else {\n authorityPublicKey = authority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('FreezeAccount', this.connection, new Transaction().add(Token.createFreezeAccountInstruction(this.programId, account, this.publicKey, authorityPublicKey, multiSigners)), this.payer, ...signers);\n }\n /**\n * Thaw account\n *\n * @param account Account to thaw\n * @param authority The mint freeze authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n */\n\n\n async thawAccount(account, authority, multiSigners) {\n let authorityPublicKey;\n let signers;\n\n if (isAccount(authority)) {\n authorityPublicKey = authority.publicKey;\n signers = [authority];\n } else {\n authorityPublicKey = authority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('ThawAccount', this.connection, new Transaction().add(Token.createThawAccountInstruction(this.programId, account, this.publicKey, authorityPublicKey, multiSigners)), this.payer, ...signers);\n }\n /**\n * Transfer tokens to another account, asserting the token mint and decimals\n *\n * @param source Source account\n * @param destination Destination account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Number of tokens to transfer\n * @param decimals Number of decimals in transfer amount\n */\n\n\n async transferChecked(source, destination, owner, multiSigners, amount, decimals) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n return await sendAndConfirmTransaction('TransferChecked', this.connection, new Transaction().add(Token.createTransferCheckedInstruction(this.programId, source, this.publicKey, destination, ownerPublicKey, multiSigners, amount, decimals)), this.payer, ...signers);\n }\n /**\n * Grant a third-party permission to transfer up the specified number of tokens from an account,\n * asserting the token mint and decimals\n *\n * @param account Public key of the account\n * @param delegate Account authorized to perform a transfer tokens from the source account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Maximum number of tokens the delegate may transfer\n * @param decimals Number of decimals in approve amount\n */\n\n\n async approveChecked(account, delegate, owner, multiSigners, amount, decimals) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('ApproveChecked', this.connection, new Transaction().add(Token.createApproveCheckedInstruction(this.programId, account, this.publicKey, delegate, ownerPublicKey, multiSigners, amount, decimals)), this.payer, ...signers);\n }\n /**\n * Mint new tokens, asserting the token mint and decimals\n *\n * @param dest Public key of the account to mint to\n * @param authority Minting authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Amount to mint\n * @param decimals Number of decimals in amount to mint\n */\n\n\n async mintToChecked(dest, authority, multiSigners, amount, decimals) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(authority)) {\n ownerPublicKey = authority.publicKey;\n signers = [authority];\n } else {\n ownerPublicKey = authority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('MintToChecked', this.connection, new Transaction().add(Token.createMintToCheckedInstruction(this.programId, this.publicKey, dest, ownerPublicKey, multiSigners, amount, decimals)), this.payer, ...signers);\n }\n /**\n * Burn tokens, asserting the token mint and decimals\n *\n * @param account Account to burn tokens from\n * @param owner Account owner\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Amount to burn\n * @param decimals Number of decimals in amount to burn\n */\n\n\n async burnChecked(account, owner, multiSigners, amount, decimals) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('BurnChecked', this.connection, new Transaction().add(Token.createBurnCheckedInstruction(this.programId, this.publicKey, account, ownerPublicKey, multiSigners, amount, decimals)), this.payer, ...signers);\n }\n /**\n * Sync amount in native SPL token account to underlying lamports\n *\n * @param nativeAccount Account to sync\n */\n\n\n async syncNative(nativeAccount) {\n await sendAndConfirmTransaction('SyncNative', this.connection, new Transaction().add(Token.createSyncNativeInstruction(this.programId, nativeAccount)), this.payer);\n }\n /**\n * Construct an InitializeMint instruction\n *\n * @param programId SPL Token program account\n * @param mint Token mint account\n * @param decimals Number of decimals in token account amounts\n * @param mintAuthority Minting authority\n * @param freezeAuthority Optional authority that can freeze token accounts\n */\n\n\n static createInitMintInstruction(programId, mint, decimals, mintAuthority, freezeAuthority) {\n let keys = [{\n pubkey: mint,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n const commandDataLayout = struct([u8('instruction'), u8('decimals'), publicKey('mintAuthority'), u8('option'), publicKey('freezeAuthority')]);\n let data = buffer.Buffer.alloc(1024);\n {\n const encodeLength = commandDataLayout.encode({\n instruction: 0,\n // InitializeMint instruction\n decimals,\n mintAuthority: pubkeyToBuffer(mintAuthority),\n option: freezeAuthority === null ? 0 : 1,\n freezeAuthority: pubkeyToBuffer(freezeAuthority || new PublicKey(0))\n }, data);\n data = data.slice(0, encodeLength);\n }\n return new TransactionInstruction({\n keys,\n programId,\n data\n });\n }\n /**\n * Construct an InitializeAccount instruction\n *\n * @param programId SPL Token program account\n * @param mint Token mint account\n * @param account New account\n * @param owner Owner of the new account\n */\n\n\n static createInitAccountInstruction(programId, mint, account, owner) {\n const keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: owner,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 1 // InitializeAccount instruction\n\n }, data);\n return new TransactionInstruction({\n keys,\n programId,\n data\n });\n }\n /**\n * Construct a Transfer instruction\n *\n * @param programId SPL Token program account\n * @param source Source account\n * @param destination Destination account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Number of tokens to transfer\n */\n\n\n static createTransferInstruction(programId, source, destination, owner, multiSigners, amount) {\n const dataLayout = struct([u8('instruction'), uint64('amount')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 3,\n // Transfer instruction\n amount: new u64(amount).toBuffer()\n }, data);\n let keys = [{\n pubkey: source,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: destination,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct an Approve instruction\n *\n * @param programId SPL Token program account\n * @param account Public key of the account\n * @param delegate Account authorized to perform a transfer of tokens from the source account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Maximum number of tokens the delegate may transfer\n */\n\n\n static createApproveInstruction(programId, account, delegate, owner, multiSigners, amount) {\n const dataLayout = struct([u8('instruction'), uint64('amount')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 4,\n // Approve instruction\n amount: new u64(amount).toBuffer()\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: delegate,\n isSigner: false,\n isWritable: false\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a Revoke instruction\n *\n * @param programId SPL Token program account\n * @param account Public key of the account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n */\n\n\n static createRevokeInstruction(programId, account, owner, multiSigners) {\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 5 // Approve instruction\n\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a SetAuthority instruction\n *\n * @param programId SPL Token program account\n * @param account Public key of the account\n * @param newAuthority New authority of the account\n * @param authorityType Type of authority to set\n * @param currentAuthority Current authority of the specified type\n * @param multiSigners Signing accounts if `currentAuthority` is a multiSig\n */\n\n\n static createSetAuthorityInstruction(programId, account, newAuthority, authorityType, currentAuthority, multiSigners) {\n const commandDataLayout = struct([u8('instruction'), u8('authorityType'), u8('option'), publicKey('newAuthority')]);\n let data = buffer.Buffer.alloc(1024);\n {\n const encodeLength = commandDataLayout.encode({\n instruction: 6,\n // SetAuthority instruction\n authorityType: AuthorityTypeCodes[authorityType],\n option: newAuthority === null ? 0 : 1,\n newAuthority: pubkeyToBuffer(newAuthority || new PublicKey(0))\n }, data);\n data = data.slice(0, encodeLength);\n }\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: currentAuthority,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: currentAuthority,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a MintTo instruction\n *\n * @param programId SPL Token program account\n * @param mint Public key of the mint\n * @param dest Public key of the account to mint to\n * @param authority The mint authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Amount to mint\n */\n\n\n static createMintToInstruction(programId, mint, dest, authority, multiSigners, amount) {\n const dataLayout = struct([u8('instruction'), uint64('amount')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 7,\n // MintTo instruction\n amount: new u64(amount).toBuffer()\n }, data);\n let keys = [{\n pubkey: mint,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: dest,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: authority,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: authority,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a Burn instruction\n *\n * @param programId SPL Token program account\n * @param mint Mint for the account\n * @param account Account to burn tokens from\n * @param owner Owner of the account\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount amount to burn\n */\n\n\n static createBurnInstruction(programId, mint, account, owner, multiSigners, amount) {\n const dataLayout = struct([u8('instruction'), uint64('amount')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 8,\n // Burn instruction\n amount: new u64(amount).toBuffer()\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a Close instruction\n *\n * @param programId SPL Token program account\n * @param account Account to close\n * @param dest Account to receive the remaining balance of the closed account\n * @param authority Account Close authority\n * @param multiSigners Signing accounts if `owner` is a multiSig\n */\n\n\n static createCloseAccountInstruction(programId, account, dest, owner, multiSigners) {\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 9 // CloseAccount instruction\n\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: dest,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a Freeze instruction\n *\n * @param programId SPL Token program account\n * @param account Account to freeze\n * @param mint Mint account\n * @param authority Mint freeze authority\n * @param multiSigners Signing accounts if `owner` is a multiSig\n */\n\n\n static createFreezeAccountInstruction(programId, account, mint, authority, multiSigners) {\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 10 // FreezeAccount instruction\n\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: authority,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: authority,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a Thaw instruction\n *\n * @param programId SPL Token program account\n * @param account Account to thaw\n * @param mint Mint account\n * @param authority Mint freeze authority\n * @param multiSigners Signing accounts if `owner` is a multiSig\n */\n\n\n static createThawAccountInstruction(programId, account, mint, authority, multiSigners) {\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 11 // ThawAccount instruction\n\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: authority,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: authority,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a TransferChecked instruction\n *\n * @param programId SPL Token program account\n * @param source Source account\n * @param mint Mint account\n * @param destination Destination account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Number of tokens to transfer\n * @param decimals Number of decimals in transfer amount\n */\n\n\n static createTransferCheckedInstruction(programId, source, mint, destination, owner, multiSigners, amount, decimals) {\n const dataLayout = struct([u8('instruction'), uint64('amount'), u8('decimals')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 12,\n // TransferChecked instruction\n amount: new u64(amount).toBuffer(),\n decimals\n }, data);\n let keys = [{\n pubkey: source,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: destination,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct an ApproveChecked instruction\n *\n * @param programId SPL Token program account\n * @param account Public key of the account\n * @param mint Mint account\n * @param delegate Account authorized to perform a transfer of tokens from the source account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Maximum number of tokens the delegate may transfer\n * @param decimals Number of decimals in approve amount\n */\n\n\n static createApproveCheckedInstruction(programId, account, mint, delegate, owner, multiSigners, amount, decimals) {\n const dataLayout = struct([u8('instruction'), uint64('amount'), u8('decimals')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 13,\n // ApproveChecked instruction\n amount: new u64(amount).toBuffer(),\n decimals\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: delegate,\n isSigner: false,\n isWritable: false\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a MintToChecked instruction\n *\n * @param programId SPL Token program account\n * @param mint Public key of the mint\n * @param dest Public key of the account to mint to\n * @param authority The mint authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Amount to mint\n * @param decimals Number of decimals in amount to mint\n */\n\n\n static createMintToCheckedInstruction(programId, mint, dest, authority, multiSigners, amount, decimals) {\n const dataLayout = struct([u8('instruction'), uint64('amount'), u8('decimals')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 14,\n // MintToChecked instruction\n amount: new u64(amount).toBuffer(),\n decimals\n }, data);\n let keys = [{\n pubkey: mint,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: dest,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: authority,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: authority,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a BurnChecked instruction\n *\n * @param programId SPL Token program account\n * @param mint Mint for the account\n * @param account Account to burn tokens from\n * @param owner Owner of the account\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount amount to burn\n */\n\n\n static createBurnCheckedInstruction(programId, mint, account, owner, multiSigners, amount, decimals) {\n const dataLayout = struct([u8('instruction'), uint64('amount'), u8('decimals')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 15,\n // BurnChecked instruction\n amount: new u64(amount).toBuffer(),\n decimals\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a SyncNative instruction\n *\n * @param programId SPL Token program account\n * @param nativeAccount Account to sync lamports from\n */\n\n\n static createSyncNativeInstruction(programId, nativeAccount) {\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 17 // SyncNative instruction\n\n }, data);\n let keys = [{\n pubkey: nativeAccount,\n isSigner: false,\n isWritable: true\n }];\n return new TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Get the address for the associated token account\n *\n * @param associatedProgramId SPL Associated Token program account\n * @param programId SPL Token program account\n * @param mint Token mint account\n * @param owner Owner of the new account\n * @return Public key of the associated token account\n */\n\n\n static async getAssociatedTokenAddress(associatedProgramId, programId, mint, owner, allowOwnerOffCurve = false) {\n if (!allowOwnerOffCurve && !PublicKey.isOnCurve(owner.toBuffer())) {\n throw new Error(`Owner cannot sign: ${owner.toString()}`);\n }\n\n return (await PublicKey.findProgramAddress([owner.toBuffer(), programId.toBuffer(), mint.toBuffer()], associatedProgramId))[0];\n }\n /**\n * Construct the AssociatedTokenProgram instruction to create the associated\n * token account\n *\n * @param associatedProgramId SPL Associated Token program account\n * @param programId SPL Token program account\n * @param mint Token mint account\n * @param associatedAccount New associated account\n * @param owner Owner of the new account\n * @param payer Payer of fees\n */\n\n\n static createAssociatedTokenAccountInstruction(associatedProgramId, programId, mint, associatedAccount, owner, payer) {\n const data = buffer.Buffer.alloc(0);\n let keys = [{\n pubkey: payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: associatedAccount,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: owner,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: programId,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n return new TransactionInstruction({\n keys,\n programId: associatedProgramId,\n data\n });\n }\n\n}\n\nexport { ASSOCIATED_TOKEN_PROGRAM_ID, AccountLayout, MintLayout, NATIVE_MINT, TOKEN_PROGRAM_ID, Token, u64 };\n//# sourceMappingURL=index.browser.esm.js.map\n","const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import { HashMD } from './_md.js';\nimport u64 from './_u64.js';\nimport { wrapConstructor } from './utils.js';\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n))))();\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\nconst SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\nexport class SHA512 extends HashMD {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x1f83d9ab | 0;\n this.Gl = 0xfb41bd6b | 0;\n this.Hh = 0x5be0cd19 | 0;\n this.Hl = 0x137e2179 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H.fill(0);\n SHA512_W_L.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\nclass SHA512_224 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x8c3d37c8 | 0;\n this.Al = 0x19544da2 | 0;\n this.Bh = 0x73e19966 | 0;\n this.Bl = 0x89dcd4d6 | 0;\n this.Ch = 0x1dfab7ae | 0;\n this.Cl = 0x32ff9c82 | 0;\n this.Dh = 0x679dd514 | 0;\n this.Dl = 0x582f9fcf | 0;\n this.Eh = 0x0f6d2b69 | 0;\n this.El = 0x7bd44da8 | 0;\n this.Fh = 0x77e36f73 | 0;\n this.Fl = 0x04c48942 | 0;\n this.Gh = 0x3f9d85a8 | 0;\n this.Gl = 0x6a1d36c8 | 0;\n this.Hh = 0x1112e6ad | 0;\n this.Hl = 0x91d692a1 | 0;\n this.outputLen = 28;\n }\n}\nclass SHA512_256 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x22312194 | 0;\n this.Al = 0xfc2bf72c | 0;\n this.Bh = 0x9f555fa3 | 0;\n this.Bl = 0xc84c64c2 | 0;\n this.Ch = 0x2393b86b | 0;\n this.Cl = 0x6f53b151 | 0;\n this.Dh = 0x96387719 | 0;\n this.Dl = 0x5940eabd | 0;\n this.Eh = 0x96283ee2 | 0;\n this.El = 0xa88effe3 | 0;\n this.Fh = 0xbe5e1e25 | 0;\n this.Fl = 0x53863992 | 0;\n this.Gh = 0x2b0199fc | 0;\n this.Gl = 0x2c85b8aa | 0;\n this.Hh = 0x0eb72ddc | 0;\n this.Hl = 0x81c52ca2 | 0;\n this.outputLen = 32;\n }\n}\nclass SHA384 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0xcbbb9d5d | 0;\n this.Al = 0xc1059ed8 | 0;\n this.Bh = 0x629a292a | 0;\n this.Bl = 0x367cd507 | 0;\n this.Ch = 0x9159015a | 0;\n this.Cl = 0x3070dd17 | 0;\n this.Dh = 0x152fecd8 | 0;\n this.Dl = 0xf70e5939 | 0;\n this.Eh = 0x67332667 | 0;\n this.El = 0xffc00b31 | 0;\n this.Fh = 0x8eb44a87 | 0;\n this.Fl = 0x68581511 | 0;\n this.Gh = 0xdb0c2e0d | 0;\n this.Gl = 0x64f98fa7 | 0;\n this.Hh = 0x47b5481d | 0;\n this.Hl = 0xbefa4fa4 | 0;\n this.outputLen = 48;\n }\n}\nexport const sha512 = /* @__PURE__ */ wrapConstructor(() => new SHA512());\nexport const sha512_224 = /* @__PURE__ */ wrapConstructor(() => new SHA512_224());\nexport const sha512_256 = /* @__PURE__ */ wrapConstructor(() => new SHA512_256());\nexport const sha384 = /* @__PURE__ */ wrapConstructor(() => new SHA384());\n//# sourceMappingURL=sha512.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// 100 lines of code in the file are duplicated from noble-hashes (utils).\n// This is OK: `abstract` directory does not use noble-hashes.\n// User may opt-in into using different hashing library. This way, noble-hashes\n// won't be included into their bundle.\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nexport function isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nexport function abytes(item) {\n if (!isBytes(item))\n throw new Error('Uint8Array expected');\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n abytes(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // Big Endian\n return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// BE: Big Endian, LE: Little Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\nexport function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nexport function numberToVarBytesBE(n) {\n return hexToBytes(numberToHexUnpadded(n));\n}\n/**\n * Takes hex string or Uint8Array, converts to Uint8Array.\n * Validates output length.\n * Will throw error for other types.\n * @param title descriptive title for an error e.g. 'private key'\n * @param hex hex string or Uint8Array\n * @param expectedLength optional, will compare to result array's length\n * @returns\n */\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n }\n }\n else if (isBytes(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(`${title} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n return res;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// Compares 2 u8a-s in kinda constant time\nexport function equalBytes(a, b) {\n if (a.length !== b.length)\n return false;\n let diff = 0;\n for (let i = 0; i < a.length; i++)\n diff |= a[i] ^ b[i];\n return diff === 0;\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n// Bit operations\n/**\n * Calculates amount of bits in a bigint.\n * Same as `n.toString(2).length`\n */\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n/**\n * Gets single bit at position.\n * NOTE: first bit position is 0 (same as arrays)\n * Same as `!!+Array.from(n.toString(2)).reverse()[pos]`\n */\nexport function bitGet(n, pos) {\n return (n >> BigInt(pos)) & _1n;\n}\n/**\n * Sets single bit at position.\n */\nexport function bitSet(n, pos, value) {\n return n | ((value ? _1n : _0n) << BigInt(pos));\n}\n/**\n * Calculate mask for N bits. Not using ** operator with bigints because of old engines.\n * Same as BigInt(`0b${Array(i).fill('1').join('')}`)\n */\nexport const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n()) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n stringOrUint8Array: (val) => typeof val === 'string' || isBytes(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\nimport { bitMask, bytesToNumberBE, bytesToNumberLE, ensureBytes, numberToBytesBE, numberToBytesLE, validateObject, } from './utils.js';\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently raise num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * pow(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nexport function pow(num, power, modulo) {\n if (modulo <= _0n || power < _0n)\n throw new Error('Expected power/modulo > 0');\n if (modulo === _1n)\n return _0n;\n let res = _1n;\n while (power > _0n) {\n if (power & _1n)\n res = (res * num) % modulo;\n num = (num * num) % modulo;\n power >>= _1n;\n }\n return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nexport function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= modulo;\n }\n return res;\n}\n// Inverses number over modulo\nexport function invert(number, modulo) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n // Euclidean GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n let a = mod(number, modulo);\n let b = modulo;\n // prettier-ignore\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n // JIT applies optimization if those two lines follow each other\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n // prettier-ignore\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\n/**\n * Tonelli-Shanks square root search algorithm.\n * 1. https://eprint.iacr.org/2012/685.pdf (page 12)\n * 2. Square Roots from 1; 24, 51, 10 to Dan Shanks\n * Will start an infinite loop if field order P is not prime.\n * @param P field order\n * @returns function that takes field Fp (created from P) and number n\n */\nexport function tonelliShanks(P) {\n // Legendre constant: used to calculate Legendre symbol (a | p),\n // which denotes the value of a^((p-1)/2) (mod p).\n // (a | p) ≡ 1 if a is a square (mod p)\n // (a | p) ≡ -1 if a is not a square (mod p)\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreC = (P - _1n) / _2n;\n let Q, S, Z;\n // Step 1: By factoring out powers of 2 from p - 1,\n // find q and s such that p - 1 = q*(2^s) with q odd\n for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++)\n ;\n // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++)\n ;\n // Fast-path\n if (S === 1) {\n const p1div4 = (P + _1n) / _4n;\n return function tonelliFast(Fp, n) {\n const root = Fp.pow(n, p1div4);\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Slow-path\n const Q1div2 = (Q + _1n) / _2n;\n return function tonelliSlow(Fp, n) {\n // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n throw new Error('Cannot find square root');\n let r = S;\n // TODO: will fail at Fp2/etc\n let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n let x = Fp.pow(n, Q1div2); // first guess at the square root\n let b = Fp.pow(n, Q); // first guess at the fudge factor\n while (!Fp.eql(b, Fp.ONE)) {\n if (Fp.eql(b, Fp.ZERO))\n return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n // Find m such b^(2^m)==1\n let m = 1;\n for (let t2 = Fp.sqr(b); m < r; m++) {\n if (Fp.eql(t2, Fp.ONE))\n break;\n t2 = Fp.sqr(t2); // t2 *= t2\n }\n // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n const ge = Fp.pow(g, _1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n g = Fp.sqr(ge); // g = ge * ge\n x = Fp.mul(x, ge); // x *= ge\n b = Fp.mul(b, g); // b *= g\n r = m;\n }\n return x;\n };\n}\nexport function FpSqrt(P) {\n // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n // P ≡ 3 (mod 4)\n // √n = n^((P+1)/4)\n if (P % _4n === _3n) {\n // Not all roots possible!\n // const ORDER =\n // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n // const NUM = 72057594037927816n;\n const p1div4 = (P + _1n) / _4n;\n return function sqrt3mod4(Fp, n) {\n const root = Fp.pow(n, p1div4);\n // Throw if root**2 != n\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n if (P % _8n === _5n) {\n const c1 = (P - _5n) / _8n;\n return function sqrt5mod8(Fp, n) {\n const n2 = Fp.mul(n, _2n);\n const v = Fp.pow(n2, c1);\n const nv = Fp.mul(n, v);\n const i = Fp.mul(Fp.mul(nv, _2n), v);\n const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // P ≡ 9 (mod 16)\n if (P % _16n === _9n) {\n // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n // Means we cannot use sqrt for constants at all!\n //\n // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n // const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n // const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n // const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic\n // sqrt = (x) => {\n // let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4\n // let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1\n // const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1\n // let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1\n // const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x\n // const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x\n // tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x\n // tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x\n // const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x\n // return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2\n // }\n }\n // Other cases: Tonelli-Shanks algorithm\n return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n 'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n 'eql', 'add', 'sub', 'mul', 'pow', 'div',\n 'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n const initial = {\n ORDER: 'bigint',\n MASK: 'bigint',\n BYTES: 'isSafeInteger',\n BITS: 'isSafeInteger',\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = 'function';\n return map;\n }, initial);\n return validateObject(field, opts);\n}\n// Generic field functions\n/**\n * Same as `pow` but for Fp: non-constant-time.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n */\nexport function FpPow(f, num, power) {\n // Should have same speed as pow for bigints\n // TODO: benchmark!\n if (power < _0n)\n throw new Error('Expected power > 0');\n if (power === _0n)\n return f.ONE;\n if (power === _1n)\n return num;\n let p = f.ONE;\n let d = num;\n while (power > _0n) {\n if (power & _1n)\n p = f.mul(p, d);\n d = f.sqr(d);\n power >>= _1n;\n }\n return p;\n}\n/**\n * Efficiently invert an array of Field elements.\n * `inv(0)` will return `undefined` here: make sure to throw an error.\n */\nexport function FpInvertBatch(f, nums) {\n const tmp = new Array(nums.length);\n // Walk from first to last, multiply them by each other MOD p\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = acc;\n return f.mul(acc, num);\n }, f.ONE);\n // Invert last element\n const inverted = f.inv(lastMultiplied);\n // Walk from last to first, multiply them by inverted each other MOD p\n nums.reduceRight((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = f.mul(acc, tmp[i]);\n return f.mul(acc, num);\n }, inverted);\n return tmp;\n}\nexport function FpDiv(f, lhs, rhs) {\n return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n const legendreConst = (f.ORDER - _1n) / _2n; // Integer arithmetic\n return (x) => {\n const p = f.pow(x, legendreConst);\n return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n };\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n // Bit size, byte size of CURVE.n\n const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a finite field over prime. **Non-primes are not supported.**\n * Do not init in loop: slow. Very fragile: always run a benchmark on a change.\n * Major performance optimizations:\n * * a) denormalized operations like mulN instead of mul\n * * b) same object shape: never add or remove keys\n * * c) Object.freeze\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLen, isLE = false, redef = {}) {\n if (ORDER <= _0n)\n throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('Field lengths over 2048 bytes are not supported');\n const sqrtP = FpSqrt(ORDER);\n const f = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n,\n ONE: _1n,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== 'bigint')\n throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n },\n is0: (num) => num === _0n,\n isOdd: (num) => (num & _1n) === _1n,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n invertBatch: (lst) => FpInvertBatch(f, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a, b, c) => (c ? b : a),\n toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n });\n return Object.freeze(f);\n}\nexport function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Same as mapKeyToField, but accepts less bytes (40 instead of 48 for 32-byte field).\n * Which makes it slightly more biased, less secure.\n * @deprecated use mapKeyToField instead\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n hash = ensureBytes('privateHash', hash);\n const hashLen = hash.length;\n const minLen = nLength(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n return mod(num, groupOrder - _1n) + _1n;\n}\n/**\n * Returns total number of bytes consumed by the field element.\n * For example, 32 bytes for usual 256-bit weierstrass curve.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of field\n */\nexport function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== 'bigint')\n throw new Error('field order must be bigint');\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n}\n/**\n * Returns minimal amount of bytes that can be safely reduced\n * by field order.\n * Should be 2^-128 for 128-bit curve such as P256.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of target hash\n */\nexport function getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Can take (n + n/2) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being negligible.\n * Needs at least 48 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * FIPS 186-5, A.2 https://csrc.nist.gov/publications/detail/fips/186/5/final\n * RFC 9380, https://www.rfc-editor.org/rfc/rfc9380#section-5\n * @param hash hash output from SHA3 or a similar function\n * @param groupOrder size of subgroup - (e.g. secp256k1.CURVE.n)\n * @param isLE interpret hash bytes as LE num\n * @returns valid private scalar\n */\nexport function mapHashToField(key, fieldOrder, isLE = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n // No small numbers: need to understand bias story. No huge numbers: easier to detect JS timings.\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);\n const num = isLE ? bytesToNumberBE(key) : bytesToNumberLE(key);\n // `mod(x, 11)` can sometimes produce 0. `mod(x, 10) + 1` is the same, but no 0\n const reduced = mod(num, fieldOrder - _1n) + _1n;\n return isLE ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n}\n//# sourceMappingURL=modular.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nexport function wNAF(c, bits) {\n const constTimeNegate = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1; // +1, because\n const windowSize = 2 ** (W - 1); // -1 because we skip zero\n return { windows, windowSize };\n };\n return {\n constTimeNegate,\n // non-const time multiplication ladder\n unsafeLadder(elm, n) {\n let p = c.ZERO;\n let d = elm;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p = elm;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n // =1, because we skip zero\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n // But need to carefully remove other checks before wNAF. ORDER == bits here\n const { windows, windowSize } = opts(W);\n let p = c.ZERO;\n let f = c.BASE;\n const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n // Extract W bits.\n let wbits = Number(n & mask);\n // Shift number by W bits.\n n >>= shiftBy;\n // If the bits are bigger than max size, we'll split those.\n // +224 => 256 - 32\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n // there is negate now: it is possible that negated element from low value\n // would be the same as high element, which will create carry into next window.\n // It's not obvious how this can fail, but still worth investigating later.\n // Check if we're onto Zero point.\n // Add random point inside current window to f.\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n // The most important part for const-time getPublicKey\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n // Even if the variable is still unused, there are some checks which will\n // throw an exception, so compiler needs to prove they won't happen, which is hard.\n // At this point there is a way to F be infinity-point even if p is not,\n // which makes it less const-time: around 1 bigint multiply.\n return { p, f };\n },\n wNAFCached(P, precomputesMap, n, transform) {\n // @ts-ignore\n const W = P._WINDOW_SIZE || 1;\n // Calculate precomputes on a first run, reuse them after\n let comp = precomputesMap.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1) {\n precomputesMap.set(P, transform(comp));\n }\n }\n return this.wNAF(W, comp, n);\n },\n };\n}\nexport function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: 'bigint',\n h: 'bigint',\n Gx: 'field',\n Gy: 'field',\n }, {\n nBitLength: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n });\n // Set defaults\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER },\n });\n}\n//# sourceMappingURL=curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y²\nimport { validateBasic, wNAF } from './curve.js';\nimport { mod } from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _8n = BigInt(8);\n// verification rule is either zip215 or rfc8032 / nist186-5. Consult fromHex:\nconst VERIFY_DEFAULT = { zip215: true };\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(curve, {\n hash: 'function',\n a: 'bigint',\n d: 'bigint',\n randomBytes: 'function',\n }, {\n adjustScalarBytes: 'function',\n domain: 'function',\n uvRatio: 'function',\n mapToCurve: 'function',\n });\n // Set defaults\n return Object.freeze({ ...opts });\n}\n// It is not generic twisted curve for now, but ed25519/ed448 generic implementation\nexport function twistedEdwards(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, prehash: prehash, hash: cHash, randomBytes, nByteLength, h: cofactor, } = CURVE;\n const MASK = _2n << (BigInt(nByteLength * 8) - _1n);\n const modP = Fp.create; // Function overrides\n // sqrt(u/v)\n const uvRatio = CURVE.uvRatio ||\n ((u, v) => {\n try {\n return { isValid: true, value: Fp.sqrt(u * Fp.inv(v)) };\n }\n catch (e) {\n return { isValid: false, value: _0n };\n }\n });\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes); // NOOP\n const domain = CURVE.domain ||\n ((data, ctx, phflag) => {\n if (ctx.length || phflag)\n throw new Error('Contexts/pre-hash are not supported');\n return data;\n }); // NOOP\n const inBig = (n) => typeof n === 'bigint' && _0n < n; // n in [1..]\n const inRange = (n, max) => inBig(n) && inBig(max) && n < max; // n in [1..max-1]\n const in0MaskRange = (n) => n === _0n || inRange(n, MASK); // n in [0..MASK-1]\n function assertInRange(n, max) {\n // n in [1..max-1]\n if (inRange(n, max))\n return n;\n throw new Error(`Expected valid scalar < ${max}, got ${typeof n} ${n}`);\n }\n function assertGE0(n) {\n // n in [0..CURVE_ORDER-1]\n return n === _0n ? n : assertInRange(n, CURVE_ORDER); // GE = prime subgroup, not full group\n }\n const pointPrecomputes = new Map();\n function isPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ExtendedPoint expected');\n }\n // Extended Point works in extended coordinates: (x, y, z, t) ∋ (x=x/z, y=y/z, t=xy).\n // https://en.wikipedia.org/wiki/Twisted_Edwards_curve#Extended_coordinates\n class Point {\n constructor(ex, ey, ez, et) {\n this.ex = ex;\n this.ey = ey;\n this.ez = ez;\n this.et = et;\n if (!in0MaskRange(ex))\n throw new Error('x required');\n if (!in0MaskRange(ey))\n throw new Error('y required');\n if (!in0MaskRange(ez))\n throw new Error('z required');\n if (!in0MaskRange(et))\n throw new Error('t required');\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error('extended point not allowed');\n const { x, y } = p || {};\n if (!in0MaskRange(x) || !in0MaskRange(y))\n throw new Error('invalid affine point');\n return new Point(x, y, _1n, modP(x * y));\n }\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.ez));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // Not required for fromHex(), which always creates valid points.\n // Could be useful for fromAffine().\n assertValidity() {\n const { a, d } = CURVE;\n if (this.is0())\n throw new Error('bad point: ZERO'); // TODO: optimize, with vars below?\n // Equation in affine coordinates: ax² + y² = 1 + dx²y²\n // Equation in projective coordinates (X/Z, Y/Z, Z): (aX² + Y²)Z² = Z⁴ + dX²Y²\n const { ex: X, ey: Y, ez: Z, et: T } = this;\n const X2 = modP(X * X); // X²\n const Y2 = modP(Y * Y); // Y²\n const Z2 = modP(Z * Z); // Z²\n const Z4 = modP(Z2 * Z2); // Z⁴\n const aX2 = modP(X2 * a); // aX²\n const left = modP(Z2 * modP(aX2 + Y2)); // (aX² + Y²)Z²\n const right = modP(Z4 + modP(d * modP(X2 * Y2))); // Z⁴ + dX²Y²\n if (left !== right)\n throw new Error('bad point: equation left != right (1)');\n // In Extended coordinates we also have T, which is x*y=T/Z: check X*Y == Z*T\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error('bad point: equation left != right (2)');\n }\n // Compare one point to another.\n equals(other) {\n isPoint(other);\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const { ex: X2, ey: Y2, ez: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n // Flips point sign to a negative one (-x, y in affine coords)\n return new Point(modP(-this.ex), this.ey, this.ez, modP(-this.et));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const A = modP(X1 * X1); // A = X12\n const B = modP(Y1 * Y1); // B = Y12\n const C = modP(_2n * modP(Z1 * Z1)); // C = 2*Z12\n const D = modP(a * A); // D = a*A\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B); // E = (X1+Y1)2-A-B\n const G = D + B; // G = D+B\n const F = G - C; // F = G-C\n const H = D - B; // H = D-B\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n isPoint(other);\n const { a, d } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1, et: T1 } = this;\n const { ex: X2, ey: Y2, ez: Z2, et: T2 } = other;\n // Faster algo for adding 2 Extended Points when curve's a=-1.\n // http://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html#addition-add-2008-hwcd-4\n // Cost: 8M + 8add + 2*2.\n // Note: It does not check whether the `other` point is valid.\n if (a === BigInt(-1)) {\n const A = modP((Y1 - X1) * (Y2 + X2));\n const B = modP((Y1 + X1) * (Y2 - X2));\n const F = modP(B - A);\n if (F === _0n)\n return this.double(); // Same point. Tests say it doesn't affect timing\n const C = modP(Z1 * _2n * T2);\n const D = modP(T1 * _2n * Z2);\n const E = D + C;\n const G = B + A;\n const H = D - C;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n const A = modP(X1 * X2); // A = X1*X2\n const B = modP(Y1 * Y2); // B = Y1*Y2\n const C = modP(T1 * d * T2); // C = T1*d*T2\n const D = modP(Z1 * Z2); // D = Z1*Z2\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B); // E = (X1+Y1)*(X2+Y2)-A-B\n const F = D - C; // F = D-C\n const G = D + C; // G = D+C\n const H = modP(B - a * A); // H = B-a*A\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, Point.normalizeZ);\n }\n // Constant-time multiplication.\n multiply(scalar) {\n const { p, f } = this.wNAF(assertInRange(scalar, CURVE_ORDER));\n return Point.normalizeZ([p, f])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n multiplyUnsafe(scalar) {\n let n = assertGE0(scalar); // 0 <= scalar < CURVE.n\n if (n === _0n)\n return I;\n if (this.equals(I) || n === _1n)\n return this;\n if (this.equals(G))\n return this.wNAF(n).p;\n return wnaf.unsafeLadder(this, n);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafeLadder(this, CURVE_ORDER).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(iz) {\n const { ex: x, ey: y, ez: z } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? _8n : Fp.inv(z); // 8 was chosen arbitrarily\n const ax = modP(x * iz);\n const ay = modP(y * iz);\n const zz = modP(z * iz);\n if (is0)\n return { x: _0n, y: _1n };\n if (zz !== _1n)\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n clearCofactor() {\n const { h: cofactor } = CURVE;\n if (cofactor === _1n)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n // Converts hash string or Uint8Array to Point.\n // Uses algo from RFC8032 5.1.3.\n static fromHex(hex, zip215 = false) {\n const { d, a } = CURVE;\n const len = Fp.BYTES;\n hex = ensureBytes('pointHex', hex, len); // copy hex to a new array\n const normed = hex.slice(); // copy again, we'll manipulate it\n const lastByte = hex[len - 1]; // select last byte\n normed[len - 1] = lastByte & ~0x80; // clear last bit\n const y = ut.bytesToNumberLE(normed);\n if (y === _0n) {\n // y=0 is allowed\n }\n else {\n // RFC8032 prohibits >= p, but ZIP215 doesn't\n if (zip215)\n assertInRange(y, MASK); // zip215=true [1..P-1] (2^255-19-1 for ed25519)\n else\n assertInRange(y, Fp.ORDER); // zip215=false [1..MASK-1] (2^256-1 for ed25519)\n }\n // Ed25519: x² = (y²-1)/(dy²+1) mod p. Ed448: x² = (y²-1)/(dy²-1) mod p. Generic case:\n // ax²+y²=1+dx²y² => y²-1=dx²y²-ax² => y²-1=x²(dy²-a) => x²=(y²-1)/(dy²-a)\n const y2 = modP(y * y); // denominator is always non-0 mod p.\n const u = modP(y2 - _1n); // u = y² - 1\n const v = modP(d * y2 - a); // v = d y² + 1.\n let { isValid, value: x } = uvRatio(u, v); // √(u/v)\n if (!isValid)\n throw new Error('Point.fromHex: invalid y coordinate');\n const isXOdd = (x & _1n) === _1n; // There are 2 square roots. Use x_0 bit to select proper\n const isLastByteOdd = (lastByte & 0x80) !== 0; // x_0, last bit\n if (!zip215 && x === _0n && isLastByteOdd)\n // if x=0 and x_0 = 1, fail\n throw new Error('Point.fromHex: x=0 and x_0=1');\n if (isLastByteOdd !== isXOdd)\n x = modP(-x); // if x_0 != x mod 2, set x = p-x\n return Point.fromAffine({ x, y });\n }\n static fromPrivateKey(privKey) {\n return getExtendedPublicKey(privKey).point;\n }\n toRawBytes() {\n const { x, y } = this.toAffine();\n const bytes = ut.numberToBytesLE(y, Fp.BYTES); // each y has 2 x values (x, -y)\n bytes[bytes.length - 1] |= x & _1n ? 0x80 : 0; // when compressing, it's enough to store y\n return bytes; // and use the last byte to encode sign of x\n }\n toHex() {\n return ut.bytesToHex(this.toRawBytes()); // Same as toRawBytes, but returns string.\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, _1n, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(_0n, _1n, _1n, _0n); // 0, 1, 1, 0\n const { BASE: G, ZERO: I } = Point;\n const wnaf = wNAF(Point, nByteLength * 8);\n function modN(a) {\n return mod(a, CURVE_ORDER);\n }\n // Little-endian SHA512 with modulo n\n function modN_LE(hash) {\n return modN(ut.bytesToNumberLE(hash));\n }\n /** Convenience method that creates public key and other stuff. RFC8032 5.1.5 */\n function getExtendedPublicKey(key) {\n const len = nByteLength;\n key = ensureBytes('private key', key, len);\n // Hash private key with curve's hash function to produce uniformingly random input\n // Check byte lengths: ensure(64, h(ensure(32, key)))\n const hashed = ensureBytes('hashed private key', cHash(key), 2 * len);\n const head = adjustScalarBytes(hashed.slice(0, len)); // clear first half bits, produce FE\n const prefix = hashed.slice(len, 2 * len); // second half is called key prefix (5.1.6)\n const scalar = modN_LE(head); // The actual private scalar\n const point = G.multiply(scalar); // Point on Edwards curve aka public key\n const pointBytes = point.toRawBytes(); // Uint8Array representation\n return { head, prefix, scalar, point, pointBytes };\n }\n // Calculates EdDSA pub key. RFC8032 5.1.5. Privkey is hashed. Use first half with 3 bits cleared\n function getPublicKey(privKey) {\n return getExtendedPublicKey(privKey).pointBytes;\n }\n // int('LE', SHA512(dom2(F, C) || msgs)) mod N\n function hashDomainToScalar(context = new Uint8Array(), ...msgs) {\n const msg = ut.concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, ensureBytes('context', context), !!prehash)));\n }\n /** Signs message with privateKey. RFC8032 5.1.6 */\n function sign(msg, privKey, options = {}) {\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph etc.\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(privKey);\n const r = hashDomainToScalar(options.context, prefix, msg); // r = dom2(F, C) || prefix || PH(M)\n const R = G.multiply(r).toRawBytes(); // R = rG\n const k = hashDomainToScalar(options.context, R, pointBytes, msg); // R || A || PH(M)\n const s = modN(r + k * scalar); // S = (r + k * s) mod L\n assertGE0(s); // 0 <= s < l\n const res = ut.concatBytes(R, ut.numberToBytesLE(s, Fp.BYTES));\n return ensureBytes('result', res, nByteLength * 2); // 64-byte signature\n }\n const verifyOpts = VERIFY_DEFAULT;\n function verify(sig, msg, publicKey, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = Fp.BYTES; // Verifies EdDSA signature against message and public key. RFC8032 5.1.7.\n sig = ensureBytes('signature', sig, 2 * len); // An extended group equation is checked.\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph, etc\n const s = ut.bytesToNumberLE(sig.slice(len, 2 * len));\n // zip215: true is good for consensus-critical apps and allows points < 2^256\n // zip215: false follows RFC8032 / NIST186-5 and restricts points to CURVE.p\n let A, R, SB;\n try {\n A = Point.fromHex(publicKey, zip215);\n R = Point.fromHex(sig.slice(0, len), zip215);\n SB = G.multiplyUnsafe(s); // 0 <= s < l is done inside\n }\n catch (error) {\n return false;\n }\n if (!zip215 && A.isSmallOrder())\n return false;\n const k = hashDomainToScalar(context, R.toRawBytes(), A.toRawBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n // [8][S]B = [8]R + [8][k]A'\n return RkA.subtract(SB).clearCofactor().equals(Point.ZERO);\n }\n G._setWindowSize(8); // Enable precomputes. Slows down first publicKey computation by 20ms.\n const utils = {\n getExtendedPublicKey,\n // ed25519 private keys are uniform 32b. No need to check for modulo bias, like in secp256k1.\n randomPrivateKey: () => randomBytes(Fp.BYTES),\n /**\n * We're doing scalar multiplication (used in getPublicKey etc) with precomputed BASE_POINT\n * values. This slows down first getPublicKey() by milliseconds (see Speed section),\n * but allows to speed-up subsequent getPublicKey() calls up to 20x.\n * @param windowSize 2, 4, 8, 16\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n },\n };\n return {\n CURVE,\n getPublicKey,\n sign,\n verify,\n ExtendedPoint: Point,\n utils,\n };\n}\n//# sourceMappingURL=edwards.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha512 } from '@noble/hashes/sha512';\nimport { concatBytes, randomBytes, utf8ToBytes } from '@noble/hashes/utils';\nimport { twistedEdwards } from './abstract/edwards.js';\nimport { createHasher, expand_message_xmd } from './abstract/hash-to-curve.js';\nimport { Field, FpSqrtEven, isNegativeLE, mod, pow2 } from './abstract/modular.js';\nimport { montgomery } from './abstract/montgomery.js';\nimport { bytesToHex, bytesToNumberLE, ensureBytes, equalBytes, numberToBytesLE, } from './abstract/utils.js';\n/**\n * ed25519 Twisted Edwards curve with following addons:\n * - X25519 ECDH\n * - Ristretto cofactor elimination\n * - Elligator hash-to-group / point indistinguishability\n */\nconst ED25519_P = BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819949');\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst ED25519_SQRT_M1 = /* @__PURE__ */ BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _5n = BigInt(5), _8n = BigInt(8);\nfunction ed25519_pow_2_252_3(x) {\n // prettier-ignore\n const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\n const P = ED25519_P;\n const x2 = (x * x) % P;\n const b2 = (x2 * x) % P; // x^3, 11\n const b4 = (pow2(b2, _2n, P) * b2) % P; // x^15, 1111\n const b5 = (pow2(b4, _1n, P) * x) % P; // x^31\n const b10 = (pow2(b5, _5n, P) * b5) % P;\n const b20 = (pow2(b10, _10n, P) * b10) % P;\n const b40 = (pow2(b20, _20n, P) * b20) % P;\n const b80 = (pow2(b40, _40n, P) * b40) % P;\n const b160 = (pow2(b80, _80n, P) * b80) % P;\n const b240 = (pow2(b160, _80n, P) * b80) % P;\n const b250 = (pow2(b240, _10n, P) * b10) % P;\n const pow_p_5_8 = (pow2(b250, _2n, P) * x) % P;\n // ^ To pow to (p+3)/8, multiply it by x.\n return { pow_p_5_8, b2 };\n}\nfunction adjustScalarBytes(bytes) {\n // Section 5: For X25519, in order to decode 32 random bytes as an integer scalar,\n // set the three least significant bits of the first byte\n bytes[0] &= 248; // 0b1111_1000\n // and the most significant bit of the last to zero,\n bytes[31] &= 127; // 0b0111_1111\n // set the second most significant bit of the last byte to 1\n bytes[31] |= 64; // 0b0100_0000\n return bytes;\n}\n// sqrt(u/v)\nfunction uvRatio(u, v) {\n const P = ED25519_P;\n const v3 = mod(v * v * v, P); // v³\n const v7 = mod(v3 * v3 * v, P); // v⁷\n // (p+3)/8 and (p-5)/8\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = mod(u * v3 * pow, P); // (uv³)(uv⁷)^(p-5)/8\n const vx2 = mod(v * x * x, P); // vx²\n const root1 = x; // First root candidate\n const root2 = mod(x * ED25519_SQRT_M1, P); // Second root candidate\n const useRoot1 = vx2 === u; // If vx² = u (mod p), x is a square root\n const useRoot2 = vx2 === mod(-u, P); // If vx² = -u, set x <-- x * 2^((p-1)/4)\n const noRoot = vx2 === mod(-u * ED25519_SQRT_M1, P); // There is no valid root, vx² = -u√(-1)\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2; // We return root2 anyway, for const-time\n if (isNegativeLE(x, P))\n x = mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n}\n// Just in case\nexport const ED25519_TORSION_SUBGROUP = [\n '0100000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a',\n '0000000000000000000000000000000000000000000000000000000000000080',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05',\n 'ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85',\n '0000000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa',\n];\nconst Fp = /* @__PURE__ */ (() => Field(ED25519_P, undefined, true))();\nconst ed25519Defaults = /* @__PURE__ */ (() => ({\n // Param: a\n a: BigInt(-1), // Fp.create(-1) is proper; our way still works and is faster\n // d is equal to -121665/121666 over finite field.\n // Negative number is P - number, and division is invert(number, P)\n d: BigInt('37095705934669439343138083508754565189542113879843219016388785533085940283555'),\n // Finite field 𝔽p over which we'll do calculations; 2n**255n - 19n\n Fp,\n // Subgroup order: how many points curve has\n // 2n**252n + 27742317777372353535851937790883648493n;\n n: BigInt('7237005577332262213973186563042994240857116359379907606001950938285454250989'),\n // Cofactor\n h: _8n,\n // Base point (x, y) aka generator point\n Gx: BigInt('15112221349535400772501151409588531511454012693041857206046113283949847762202'),\n Gy: BigInt('46316835694926478169428394003475163141307993866256225615783033603165251855960'),\n hash: sha512,\n randomBytes,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio,\n}))();\nexport const ed25519 = /* @__PURE__ */ (() => twistedEdwards(ed25519Defaults))();\nfunction ed25519_domain(data, ctx, phflag) {\n if (ctx.length > 255)\n throw new Error('Context is too big');\n return concatBytes(utf8ToBytes('SigEd25519 no Ed25519 collisions'), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);\n}\nexport const ed25519ctx = /* @__PURE__ */ (() => twistedEdwards({\n ...ed25519Defaults,\n domain: ed25519_domain,\n}))();\nexport const ed25519ph = /* @__PURE__ */ (() => twistedEdwards(Object.assign({}, ed25519Defaults, {\n domain: ed25519_domain,\n prehash: sha512,\n})))();\nexport const x25519 = /* @__PURE__ */ (() => montgomery({\n P: ED25519_P,\n a: BigInt(486662),\n montgomeryBits: 255, // n is 253 bits\n nByteLength: 32,\n Gu: BigInt(9),\n powPminus2: (x) => {\n const P = ED25519_P;\n // x^(p-2) aka x^(2^255-21)\n const { pow_p_5_8, b2 } = ed25519_pow_2_252_3(x);\n return mod(pow2(pow_p_5_8, _3n, P) * b2, P);\n },\n adjustScalarBytes,\n randomBytes,\n}))();\n/**\n * Converts ed25519 public key to x25519 public key. Uses formula:\n * * `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * * `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * @example\n * const someonesPub = ed25519.getPublicKey(ed25519.utils.randomPrivateKey());\n * const aPriv = x25519.utils.randomPrivateKey();\n * x25519.getSharedSecret(aPriv, edwardsToMontgomeryPub(someonesPub))\n */\nexport function edwardsToMontgomeryPub(edwardsPub) {\n const { y } = ed25519.ExtendedPoint.fromHex(edwardsPub);\n const _1n = BigInt(1);\n return Fp.toBytes(Fp.create((_1n + y) * Fp.inv(_1n - y)));\n}\nexport const edwardsToMontgomery = edwardsToMontgomeryPub; // deprecated\n/**\n * Converts ed25519 secret key to x25519 secret key.\n * @example\n * const someonesPub = x25519.getPublicKey(x25519.utils.randomPrivateKey());\n * const aPriv = ed25519.utils.randomPrivateKey();\n * x25519.getSharedSecret(edwardsToMontgomeryPriv(aPriv), someonesPub)\n */\nexport function edwardsToMontgomeryPriv(edwardsPriv) {\n const hashed = ed25519Defaults.hash(edwardsPriv.subarray(0, 32));\n return ed25519Defaults.adjustScalarBytes(hashed).subarray(0, 32);\n}\n// Hash To Curve Elligator2 Map (NOTE: different from ristretto255 elligator)\n// NOTE: very important part is usage of FpSqrtEven for ELL2_C1_EDWARDS, since\n// SageMath returns different root first and everything falls apart\nconst ELL2_C1 = /* @__PURE__ */ (() => (Fp.ORDER + _3n) / _8n)(); // 1. c1 = (q + 3) / 8 # Integer arithmetic\nconst ELL2_C2 = /* @__PURE__ */ (() => Fp.pow(_2n, ELL2_C1))(); // 2. c2 = 2^c1\nconst ELL2_C3 = /* @__PURE__ */ (() => Fp.sqrt(Fp.neg(Fp.ONE)))(); // 3. c3 = sqrt(-1)\n// prettier-ignore\nfunction map_to_curve_elligator2_curve25519(u) {\n const ELL2_C4 = (Fp.ORDER - _5n) / _8n; // 4. c4 = (q - 5) / 8 # Integer arithmetic\n const ELL2_J = BigInt(486662);\n let tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, _2n); // 2. tv1 = 2 * tv1\n let xd = Fp.add(tv1, Fp.ONE); // 3. xd = tv1 + 1 # Nonzero: -1 is square (mod p), tv1 is not\n let x1n = Fp.neg(ELL2_J); // 4. x1n = -J # x1 = x1n / xd = -J / (1 + 2 * u^2)\n let tv2 = Fp.sqr(xd); // 5. tv2 = xd^2\n let gxd = Fp.mul(tv2, xd); // 6. gxd = tv2 * xd # gxd = xd^3\n let gx1 = Fp.mul(tv1, ELL2_J); // 7. gx1 = J * tv1 # x1n + J * xd\n gx1 = Fp.mul(gx1, x1n); // 8. gx1 = gx1 * x1n # x1n^2 + J * x1n * xd\n gx1 = Fp.add(gx1, tv2); // 9. gx1 = gx1 + tv2 # x1n^2 + J * x1n * xd + xd^2\n gx1 = Fp.mul(gx1, x1n); // 10. gx1 = gx1 * x1n # x1n^3 + J * x1n^2 * xd + x1n * xd^2\n let tv3 = Fp.sqr(gxd); // 11. tv3 = gxd^2\n tv2 = Fp.sqr(tv3); // 12. tv2 = tv3^2 # gxd^4\n tv3 = Fp.mul(tv3, gxd); // 13. tv3 = tv3 * gxd # gxd^3\n tv3 = Fp.mul(tv3, gx1); // 14. tv3 = tv3 * gx1 # gx1 * gxd^3\n tv2 = Fp.mul(tv2, tv3); // 15. tv2 = tv2 * tv3 # gx1 * gxd^7\n let y11 = Fp.pow(tv2, ELL2_C4); // 16. y11 = tv2^c4 # (gx1 * gxd^7)^((p - 5) / 8)\n y11 = Fp.mul(y11, tv3); // 17. y11 = y11 * tv3 # gx1*gxd^3*(gx1*gxd^7)^((p-5)/8)\n let y12 = Fp.mul(y11, ELL2_C3); // 18. y12 = y11 * c3\n tv2 = Fp.sqr(y11); // 19. tv2 = y11^2\n tv2 = Fp.mul(tv2, gxd); // 20. tv2 = tv2 * gxd\n let e1 = Fp.eql(tv2, gx1); // 21. e1 = tv2 == gx1\n let y1 = Fp.cmov(y12, y11, e1); // 22. y1 = CMOV(y12, y11, e1) # If g(x1) is square, this is its sqrt\n let x2n = Fp.mul(x1n, tv1); // 23. x2n = x1n * tv1 # x2 = x2n / xd = 2 * u^2 * x1n / xd\n let y21 = Fp.mul(y11, u); // 24. y21 = y11 * u\n y21 = Fp.mul(y21, ELL2_C2); // 25. y21 = y21 * c2\n let y22 = Fp.mul(y21, ELL2_C3); // 26. y22 = y21 * c3\n let gx2 = Fp.mul(gx1, tv1); // 27. gx2 = gx1 * tv1 # g(x2) = gx2 / gxd = 2 * u^2 * g(x1)\n tv2 = Fp.sqr(y21); // 28. tv2 = y21^2\n tv2 = Fp.mul(tv2, gxd); // 29. tv2 = tv2 * gxd\n let e2 = Fp.eql(tv2, gx2); // 30. e2 = tv2 == gx2\n let y2 = Fp.cmov(y22, y21, e2); // 31. y2 = CMOV(y22, y21, e2) # If g(x2) is square, this is its sqrt\n tv2 = Fp.sqr(y1); // 32. tv2 = y1^2\n tv2 = Fp.mul(tv2, gxd); // 33. tv2 = tv2 * gxd\n let e3 = Fp.eql(tv2, gx1); // 34. e3 = tv2 == gx1\n let xn = Fp.cmov(x2n, x1n, e3); // 35. xn = CMOV(x2n, x1n, e3) # If e3, x = x1, else x = x2\n let y = Fp.cmov(y2, y1, e3); // 36. y = CMOV(y2, y1, e3) # If e3, y = y1, else y = y2\n let e4 = Fp.isOdd(y); // 37. e4 = sgn0(y) == 1 # Fix sign of y\n y = Fp.cmov(y, Fp.neg(y), e3 !== e4); // 38. y = CMOV(y, -y, e3 XOR e4)\n return { xMn: xn, xMd: xd, yMn: y, yMd: _1n }; // 39. return (xn, xd, y, 1)\n}\nconst ELL2_C1_EDWARDS = /* @__PURE__ */ (() => FpSqrtEven(Fp, Fp.neg(BigInt(486664))))(); // sgn0(c1) MUST equal 0\nfunction map_to_curve_elligator2_edwards25519(u) {\n const { xMn, xMd, yMn, yMd } = map_to_curve_elligator2_curve25519(u); // 1. (xMn, xMd, yMn, yMd) =\n // map_to_curve_elligator2_curve25519(u)\n let xn = Fp.mul(xMn, yMd); // 2. xn = xMn * yMd\n xn = Fp.mul(xn, ELL2_C1_EDWARDS); // 3. xn = xn * c1\n let xd = Fp.mul(xMd, yMn); // 4. xd = xMd * yMn # xn / xd = c1 * xM / yM\n let yn = Fp.sub(xMn, xMd); // 5. yn = xMn - xMd\n let yd = Fp.add(xMn, xMd); // 6. yd = xMn + xMd # (n / d - 1) / (n / d + 1) = (n - d) / (n + d)\n let tv1 = Fp.mul(xd, yd); // 7. tv1 = xd * yd\n let e = Fp.eql(tv1, Fp.ZERO); // 8. e = tv1 == 0\n xn = Fp.cmov(xn, Fp.ZERO, e); // 9. xn = CMOV(xn, 0, e)\n xd = Fp.cmov(xd, Fp.ONE, e); // 10. xd = CMOV(xd, 1, e)\n yn = Fp.cmov(yn, Fp.ONE, e); // 11. yn = CMOV(yn, 1, e)\n yd = Fp.cmov(yd, Fp.ONE, e); // 12. yd = CMOV(yd, 1, e)\n const inv = Fp.invertBatch([xd, yd]); // batch division\n return { x: Fp.mul(xn, inv[0]), y: Fp.mul(yn, inv[1]) }; // 13. return (xn, xd, yn, yd)\n}\nconst htf = /* @__PURE__ */ (() => createHasher(ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {\n DST: 'edwards25519_XMD:SHA-512_ELL2_RO_',\n encodeDST: 'edwards25519_XMD:SHA-512_ELL2_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha512,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\nfunction assertRstPoint(other) {\n if (!(other instanceof RistPoint))\n throw new Error('RistrettoPoint expected');\n}\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst SQRT_M1 = ED25519_SQRT_M1;\n// √(ad - 1)\nconst SQRT_AD_MINUS_ONE = /* @__PURE__ */ BigInt('25063068953384623474111414158702152701244531502492656460079210482610430750235');\n// 1 / √(a-d)\nconst INVSQRT_A_MINUS_D = /* @__PURE__ */ BigInt('54469307008909316920995813868745141605393597292927456921205312896311721017578');\n// 1-d²\nconst ONE_MINUS_D_SQ = /* @__PURE__ */ BigInt('1159843021668779879193775521855586647937357759715417654439879720876111806838');\n// (d-1)²\nconst D_MINUS_ONE_SQ = /* @__PURE__ */ BigInt('40440834346308536858101042469323190826248399146238708352240133220865137265952');\n// Calculates 1/√(number)\nconst invertSqrt = (number) => uvRatio(_1n, number);\nconst MAX_255B = /* @__PURE__ */ BigInt('0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');\nconst bytes255ToNumberLE = (bytes) => ed25519.CURVE.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n// Computes Elligator map for Ristretto\n// https://ristretto.group/formulas/elligator.html\nfunction calcElligatorRistrettoMap(r0) {\n const { d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const r = mod(SQRT_M1 * r0 * r0); // 1\n const Ns = mod((r + _1n) * ONE_MINUS_D_SQ); // 2\n let c = BigInt(-1); // 3\n const D = mod((c - d * r) * mod(r + d)); // 4\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D); // 5\n let s_ = mod(s * r0); // 6\n if (!isNegativeLE(s_, P))\n s_ = mod(-s_);\n if (!Ns_D_is_sq)\n s = s_; // 7\n if (!Ns_D_is_sq)\n c = r; // 8\n const Nt = mod(c * (r - _1n) * D_MINUS_ONE_SQ - D); // 9\n const s2 = s * s;\n const W0 = mod((s + s) * D); // 10\n const W1 = mod(Nt * SQRT_AD_MINUS_ONE); // 11\n const W2 = mod(_1n - s2); // 12\n const W3 = mod(_1n + s2); // 13\n return new ed25519.ExtendedPoint(mod(W0 * W3), mod(W2 * W1), mod(W1 * W3), mod(W0 * W2));\n}\n/**\n * Each ed25519/ExtendedPoint has 8 different equivalent points. This can be\n * a source of bugs for protocols like ring signatures. Ristretto was created to solve this.\n * Ristretto point operates in X:Y:Z:T extended coordinates like ExtendedPoint,\n * but it should work in its own namespace: do not combine those two.\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-ristretto255-decaf448\n */\nclass RistPoint {\n // Private property to discourage combining ExtendedPoint + RistrettoPoint\n // Always use Ristretto encoding/decoding instead.\n constructor(ep) {\n this.ep = ep;\n }\n static fromAffine(ap) {\n return new RistPoint(ed25519.ExtendedPoint.fromAffine(ap));\n }\n /**\n * Takes uniform output of 64-byte hash function like sha512 and converts it to `RistrettoPoint`.\n * The hash-to-group operation applies Elligator twice and adds the results.\n * **Note:** this is one-way map, there is no conversion from point to hash.\n * https://ristretto.group/formulas/elligator.html\n * @param hex 64-byte output of a hash function\n */\n static hashToCurve(hex) {\n hex = ensureBytes('ristrettoHash', hex, 64);\n const r1 = bytes255ToNumberLE(hex.slice(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(hex.slice(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new RistPoint(R1.add(R2));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * https://ristretto.group/formulas/decoding.html\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n hex = ensureBytes('ristrettoHex', hex, 32);\n const { a, d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const emsg = 'RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint';\n const s = bytes255ToNumberLE(hex);\n // 1. Check that s_bytes is the canonical encoding of a field element, or else abort.\n // 3. Check that s is non-negative, or else abort\n if (!equalBytes(numberToBytesLE(s, 32), hex) || isNegativeLE(s, P))\n throw new Error(emsg);\n const s2 = mod(s * s);\n const u1 = mod(_1n + a * s2); // 4 (a is -1)\n const u2 = mod(_1n - a * s2); // 5\n const u1_2 = mod(u1 * u1);\n const u2_2 = mod(u2 * u2);\n const v = mod(a * d * u1_2 - u2_2); // 6\n const { isValid, value: I } = invertSqrt(mod(v * u2_2)); // 7\n const Dx = mod(I * u2); // 8\n const Dy = mod(I * Dx * v); // 9\n let x = mod((s + s) * Dx); // 10\n if (isNegativeLE(x, P))\n x = mod(-x); // 10\n const y = mod(u1 * Dy); // 11\n const t = mod(x * y); // 12\n if (!isValid || isNegativeLE(t, P) || y === _0n)\n throw new Error(emsg);\n return new RistPoint(new ed25519.ExtendedPoint(x, y, _1n, t));\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * https://ristretto.group/formulas/encoding.html\n */\n toRawBytes() {\n let { ex: x, ey: y, ez: z, et: t } = this.ep;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const u1 = mod(mod(z + y) * mod(z - y)); // 1\n const u2 = mod(x * y); // 2\n // Square root always exists\n const u2sq = mod(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod(u1 * u2sq)); // 3\n const D1 = mod(invsqrt * u1); // 4\n const D2 = mod(invsqrt * u2); // 5\n const zInv = mod(D1 * D2 * t); // 6\n let D; // 7\n if (isNegativeLE(t * zInv, P)) {\n let _x = mod(y * SQRT_M1);\n let _y = mod(x * SQRT_M1);\n x = _x;\n y = _y;\n D = mod(D1 * INVSQRT_A_MINUS_D);\n }\n else {\n D = D2; // 8\n }\n if (isNegativeLE(x * zInv, P))\n y = mod(-y); // 9\n let s = mod((z - y) * D); // 10 (check footer's note, no sqrt(-a))\n if (isNegativeLE(s, P))\n s = mod(-s);\n return numberToBytesLE(s, 32); // 11\n }\n toHex() {\n return bytesToHex(this.toRawBytes());\n }\n toString() {\n return this.toHex();\n }\n // Compare one point to another.\n equals(other) {\n assertRstPoint(other);\n const { ex: X1, ey: Y1 } = this.ep;\n const { ex: X2, ey: Y2 } = other.ep;\n const mod = ed25519.CURVE.Fp.create;\n // (x1 * y2 == y1 * x2) | (y1 * y2 == x1 * x2)\n const one = mod(X1 * Y2) === mod(Y1 * X2);\n const two = mod(Y1 * Y2) === mod(X1 * X2);\n return one || two;\n }\n add(other) {\n assertRstPoint(other);\n return new RistPoint(this.ep.add(other.ep));\n }\n subtract(other) {\n assertRstPoint(other);\n return new RistPoint(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return new RistPoint(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return new RistPoint(this.ep.multiplyUnsafe(scalar));\n }\n double() {\n return new RistPoint(this.ep.double());\n }\n negate() {\n return new RistPoint(this.ep.negate());\n }\n}\nexport const RistrettoPoint = /* @__PURE__ */ (() => {\n if (!RistPoint.BASE)\n RistPoint.BASE = new RistPoint(ed25519.ExtendedPoint.BASE);\n if (!RistPoint.ZERO)\n RistPoint.ZERO = new RistPoint(ed25519.ExtendedPoint.ZERO);\n return RistPoint;\n})();\n// Hashing to ristretto255. https://www.rfc-editor.org/rfc/rfc9380#appendix-B\nexport const hashToRistretto255 = (msg, options) => {\n const d = options.DST;\n const DST = typeof d === 'string' ? utf8ToBytes(d) : d;\n const uniform_bytes = expand_message_xmd(msg, DST, 64, sha512);\n const P = RistPoint.hashToCurve(uniform_bytes);\n return P;\n};\nexport const hash_to_ristretto255 = hashToRistretto255; // legacy\n//# sourceMappingURL=ed25519.js.map","/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message, explanation, ...rest } = failure;\n const { path } = failure;\n const msg = path.length === 0 ? message : `At path: ${path.join('.')} -- ${message}`;\n super(explanation ?? msg);\n if (explanation != null)\n this.cause = msg;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return (cached ?? (cached = [failure, ...failures()]));\n };\n }\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a non-array object.\n */\nfunction isNonArrayObject(x) {\n return isObject(x) && !Array.isArray(x);\n}\n/**\n * Check if a value is a plain object.\n */\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\nfunction print(value) {\n if (typeof value === 'symbol') {\n return value.toString();\n }\n return typeof value === 'string' ? JSON.stringify(value) : `${value}`;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\nfunction shiftIterator(input) {\n const { done, value } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n }\n else if (result === false) {\n result = {};\n }\n else if (typeof result === 'string') {\n result = { message: result };\n }\n const { path, branch } = context;\n const { type } = struct;\n const { refinement, message = `Expected a value of type \\`${type}\\`${refinement ? ` with refinement \\`${refinement}\\`` : ''}, but received: \\`${print(value)}\\``, } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message,\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\nfunction* run(value, struct, options = {}) {\n const { path = [], branch = [value], coerce = false, mask = false } = options;\n const ctx = { path, branch, mask };\n if (coerce) {\n value = struct.coercer(value, ctx);\n }\n let status = 'valid';\n for (const failure of struct.validator(value, ctx)) {\n failure.explanation = options.message;\n status = 'not_valid';\n yield [failure, undefined];\n }\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask,\n message: options.message,\n });\n for (const t of ts) {\n if (t[0]) {\n status = t[0].refinement != null ? 'not_refined' : 'not_valid';\n yield [t[0], undefined];\n }\n else if (coerce) {\n v = t[1];\n if (k === undefined) {\n value = v;\n }\n else if (value instanceof Map) {\n value.set(k, v);\n }\n else if (value instanceof Set) {\n value.add(v);\n }\n else if (isObject(value)) {\n if (v !== undefined || k in value)\n value[k] = v;\n }\n }\n }\n }\n if (status !== 'not_valid') {\n for (const failure of struct.refiner(value, ctx)) {\n failure.explanation = options.message;\n status = 'not_refined';\n yield [failure, undefined];\n }\n }\n if (status === 'valid') {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\nclass Struct {\n constructor(props) {\n const { type, schema, validator, refiner, coercer = (value) => value, entries = function* () { }, } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message) {\n return assert(value, this, message);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message) {\n return create(value, this, message);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema. Masking applies recursively to\n * props of `object` structs only.\n */\n mask(value, message) {\n return mask(value, this, message);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `coerce` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful. Also, `mask` will turn on\n * masking of the unknown `object` props recursively if passed.\n */\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\nfunction assert(value, struct, message) {\n const result = validate(value, struct, { message });\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\nfunction create(value, struct, message) {\n const result = validate(value, struct, { coerce: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\nfunction mask(value, struct, message) {\n const result = validate(value, struct, { coerce: true, mask: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n }\n else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const isType = Structs[0].type === 'type';\n const schemas = Structs.map((s) => s.schema);\n const schema = Object.assign({}, ...schemas);\n return isType ? type(schema) : object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\nfunction define(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\nfunction deprecated(struct, log) {\n return new Struct({\n ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n }\n else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n },\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n const struct = fn(value, ctx);\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n *entries(value, ctx) {\n struct ?? (struct = fn());\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n struct ?? (struct = fn());\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n struct ?? (struct = fn());\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n struct ?? (struct = fn());\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\nfunction omit(struct, keys) {\n const { schema } = struct;\n const subschema = { ...schema };\n for (const key of keys) {\n delete subschema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\nfunction partial(struct) {\n const isStruct = struct instanceof Struct;\n const schema = isStruct ? { ...struct.schema } : { ...struct };\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n if (isStruct && struct.type === 'type') {\n return type(schema);\n }\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\nfunction pick(struct, keys) {\n const { schema } = struct;\n const subschema = {};\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array value, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a bigint.\n */\nfunction bigint() {\n return define('bigint', (value) => {\n return typeof value === 'bigint';\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\nfunction boolean() {\n return define('boolean', (value) => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\nfunction date() {\n return define('date', (value) => {\n return ((value instanceof Date && !isNaN(value.getTime())) ||\n `Expected a valid \\`Date\\` object, but received: ${print(value)}`);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map((v) => print(v)).join();\n for (const key of values) {\n schema[key] = key;\n }\n return new Struct({\n type: 'enums',\n schema,\n validator(value) {\n return (values.includes(value) ||\n `Expected one of \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a function.\n */\nfunction func() {\n return define('func', (value) => {\n return (typeof value === 'function' ||\n `Expected a function, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\nfunction instance(Class) {\n return define('instance', (value) => {\n return (value instanceof Class ||\n `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\nfunction integer() {\n return define('integer', (value) => {\n return ((typeof value === 'number' && !isNaN(value) && Number.isInteger(value)) ||\n `Expected an integer, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value matches all of a set of types.\n */\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n },\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n validator(value) {\n return (value === constant ||\n `Expected the literal \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n validator(value) {\n return (value instanceof Map ||\n `Expected a \\`Map\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\nfunction nullable(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx),\n });\n}\n/**\n * Ensure that a value is a number.\n */\nfunction number() {\n return define('number', (value) => {\n return ((typeof value === 'number' && !isNaN(value)) ||\n `Expected a number, but received: ${print(value)}`);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n validator(value) {\n return (isNonArrayObject(value) ||\n `Expected an object, but received: ${print(value)}`);\n },\n coercer(value, ctx) {\n if (!isNonArrayObject(value)) {\n return value;\n }\n const coerced = { ...value };\n // The `object` struct has special behaviour enabled by the mask flag.\n // When masking, properties that are not in the schema are deleted from\n // the coerced object instead of eventually failing validaiton.\n if (ctx.mask && schema) {\n for (const key in coerced) {\n if (schema[key] === undefined) {\n delete coerced[key];\n }\n }\n }\n return coerced;\n },\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\nfunction optional(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n validator(value) {\n return (isNonArrayObject(value) ||\n `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n },\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\nfunction regexp() {\n return define('regexp', (value) => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n validator(value) {\n return (value instanceof Set ||\n `Expected a \\`Set\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a string.\n */\nfunction string() {\n return define('string', (value) => {\n return (typeof value === 'string' ||\n `Expected a string, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is a tuple of a specific length, and that each of its\n * elements is of a specific type.\n */\nfunction tuple(Structs) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Structs[i] || Never];\n }\n }\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array, but received: ${print(value)}`);\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n validator(value) {\n return (isNonArrayObject(value) ||\n `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n },\n });\n}\n/**\n * Ensure that a value matches one of a set of types.\n */\nfunction union(Structs) {\n const description = Structs.map((s) => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n coercer(value, ctx) {\n for (const S of Structs) {\n const [error, coerced] = S.validate(value, {\n coerce: true,\n mask: ctx.mask,\n });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n if (!first[0]) {\n return [];\n }\n else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures,\n ];\n },\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction coerce(struct, condition, coercer) {\n return new Struct({\n ...struct,\n coercer: (value, ctx) => {\n return is(value, condition)\n ? struct.coercer(coercer(value, ctx), ctx)\n : struct.coercer(value, ctx);\n },\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), (x) => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n if (x === undefined) {\n return f;\n }\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x };\n let changed = false;\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n if (changed) {\n return ret;\n }\n }\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction trimmed(struct) {\n return coerce(struct, string(), (x) => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\nfunction empty(struct) {\n return refine(struct, 'empty', (value) => {\n const size = getSize(value);\n return (size === 0 ||\n `Expected an empty ${struct.type} but received one with a size of \\`${size}\\``);\n });\n}\nfunction getSize(value) {\n if (value instanceof Map || value instanceof Set) {\n return value.size;\n }\n else {\n return value.length;\n }\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\nfunction max(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'max', (value) => {\n return exclusive\n ? value < threshold\n : value <= threshold ||\n `Expected a ${struct.type} less than ${exclusive ? '' : 'or equal to '}${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\nfunction min(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'min', (value) => {\n return exclusive\n ? value > threshold\n : value >= threshold ||\n `Expected a ${struct.type} greater than ${exclusive ? '' : 'or equal to '}${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a string, array, map or set is not empty.\n */\nfunction nonempty(struct) {\n return refine(struct, 'nonempty', (value) => {\n const size = getSize(value);\n return (size > 0 || `Expected a nonempty ${struct.type} but received an empty one`);\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', (value) => {\n return (regexp.test(value) ||\n `Expected a ${struct.type} matching \\`/${regexp.source}/\\` but received \"${value}\"`);\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\nfunction size(struct, min, max = min) {\n const expected = `Expected a ${struct.type}`;\n const of = min === max ? `of \\`${min}\\`` : `between \\`${min}\\` and \\`${max}\\``;\n return refine(struct, 'size', (value) => {\n if (typeof value === 'number' || value instanceof Date) {\n return ((min <= value && value <= max) ||\n `${expected} ${of} but received \\`${value}\\``);\n }\n else if (value instanceof Map || value instanceof Set) {\n const { size } = value;\n return ((min <= size && size <= max) ||\n `${expected} with a size ${of} but received one with a size of \\`${size}\\``);\n }\n else {\n const { length } = value;\n return ((min <= length && length <= max) ||\n `${expected} with a length ${of} but received one with a length of \\`${length}\\``);\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\nfunction refine(struct, name, refiner) {\n return new Struct({\n ...struct,\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n for (const failure of failures) {\n yield { ...failure, refinement: name };\n }\n },\n });\n}\n\nexport { Struct, StructError, any, array, assert, assign, bigint, boolean, coerce, create, date, defaulted, define, deprecated, dynamic, empty, enums, func, instance, integer, intersection, is, lazy, literal, map, mask, max, min, never, nonempty, nullable, number, object, omit, optional, partial, pattern, pick, record, refine, regexp, set, size, string, struct, trimmed, tuple, type, union, unknown, validate };\n//# sourceMappingURL=index.mjs.map\n","import EventEmitter from './index.js'\n\nexport { EventEmitter }\nexport default EventEmitter\n","import { Buffer } from 'buffer';\nimport { EventEmitter } from 'eventemitter3';\n\n// node_modules/esbuild-plugin-polyfill-node/polyfills/buffer.js\nvar WebSocketBrowserImpl = class extends EventEmitter {\n socket;\n /** Instantiate a WebSocket class\n * @constructor\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @param {(String|Array)} protocols - a list of protocols\n * @return {WebSocketBrowserImpl} - returns a WebSocket instance\n */\n constructor(address, options, protocols) {\n super();\n this.socket = new window.WebSocket(address, protocols);\n this.socket.onopen = () => this.emit(\"open\");\n this.socket.onmessage = (event) => this.emit(\"message\", event.data);\n this.socket.onerror = (error) => this.emit(\"error\", error);\n this.socket.onclose = (event) => {\n this.emit(\"close\", event.code, event.reason);\n };\n }\n /**\n * Sends data through a websocket connection\n * @method\n * @param {(String|Object)} data - data to be sent via websocket\n * @param {Object} optionsOrCallback - ws options\n * @param {Function} callback - a callback called once the data is sent\n * @return {Undefined}\n */\n send(data, optionsOrCallback, callback) {\n const cb = callback || optionsOrCallback;\n try {\n this.socket.send(data);\n cb();\n } catch (error) {\n cb(error);\n }\n }\n /**\n * Closes an underlying socket\n * @method\n * @param {Number} code - status code explaining why the connection is being closed\n * @param {String} reason - a description why the connection is closing\n * @return {Undefined}\n * @throws {Error}\n */\n close(code, reason) {\n this.socket.close(code, reason);\n }\n addEventListener(type, listener, options) {\n this.socket.addEventListener(type, listener, options);\n }\n};\nfunction WebSocket(address, options) {\n return new WebSocketBrowserImpl(address, options);\n}\n\n// src/lib/utils.ts\nvar DefaultDataPack = class {\n encode(value) {\n return JSON.stringify(value);\n }\n decode(value) {\n return JSON.parse(value);\n }\n};\n\n// src/lib/client.ts\nvar CommonClient = class extends EventEmitter {\n address;\n rpc_id;\n queue;\n options;\n autoconnect;\n ready;\n reconnect;\n reconnect_timer_id;\n reconnect_interval;\n max_reconnects;\n rest_options;\n current_reconnects;\n generate_request_id;\n socket;\n webSocketFactory;\n dataPack;\n /**\n * Instantiate a Client class.\n * @constructor\n * @param {webSocketFactory} webSocketFactory - factory method for WebSocket\n * @param {String} address - url to a websocket server\n * @param {Object} options - ws options object with reconnect parameters\n * @param {Function} generate_request_id - custom generation request Id\n * @param {DataPack} dataPack - data pack contains encoder and decoder\n * @return {CommonClient}\n */\n constructor(webSocketFactory, address = \"ws://localhost:8080\", {\n autoconnect = true,\n reconnect = true,\n reconnect_interval = 1e3,\n max_reconnects = 5,\n ...rest_options\n } = {}, generate_request_id, dataPack) {\n super();\n this.webSocketFactory = webSocketFactory;\n this.queue = {};\n this.rpc_id = 0;\n this.address = address;\n this.autoconnect = autoconnect;\n this.ready = false;\n this.reconnect = reconnect;\n this.reconnect_timer_id = void 0;\n this.reconnect_interval = reconnect_interval;\n this.max_reconnects = max_reconnects;\n this.rest_options = rest_options;\n this.current_reconnects = 0;\n this.generate_request_id = generate_request_id || (() => ++this.rpc_id);\n if (!dataPack) this.dataPack = new DefaultDataPack();\n else this.dataPack = dataPack;\n if (this.autoconnect)\n this._connect(this.address, {\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects,\n ...this.rest_options\n });\n }\n /**\n * Connects to a defined server if not connected already.\n * @method\n * @return {Undefined}\n */\n connect() {\n if (this.socket) return;\n this._connect(this.address, {\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects,\n ...this.rest_options\n });\n }\n /**\n * Calls a registered RPC method on server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object|Array} params - optional method parameters\n * @param {Number} timeout - RPC reply timeout value\n * @param {Object} ws_opts - options passed to ws\n * @return {Promise}\n */\n call(method, params, timeout, ws_opts) {\n if (!ws_opts && \"object\" === typeof timeout) {\n ws_opts = timeout;\n timeout = null;\n }\n return new Promise((resolve, reject) => {\n if (!this.ready) return reject(new Error(\"socket not ready\"));\n const rpc_id = this.generate_request_id(method, params);\n const message = {\n jsonrpc: \"2.0\",\n method,\n params: params || void 0,\n id: rpc_id\n };\n this.socket.send(this.dataPack.encode(message), ws_opts, (error) => {\n if (error) return reject(error);\n this.queue[rpc_id] = { promise: [resolve, reject] };\n if (timeout) {\n this.queue[rpc_id].timeout = setTimeout(() => {\n delete this.queue[rpc_id];\n reject(new Error(\"reply timeout\"));\n }, timeout);\n }\n });\n });\n }\n /**\n * Logins with the other side of the connection.\n * @method\n * @param {Object} params - Login credentials object\n * @return {Promise}\n */\n async login(params) {\n const resp = await this.call(\"rpc.login\", params);\n if (!resp) throw new Error(\"authentication failed\");\n return resp;\n }\n /**\n * Fetches a list of client's methods registered on server.\n * @method\n * @return {Array}\n */\n async listMethods() {\n return await this.call(\"__listMethods\");\n }\n /**\n * Sends a JSON-RPC 2.0 notification to server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object} params - optional method parameters\n * @return {Promise}\n */\n notify(method, params) {\n return new Promise((resolve, reject) => {\n if (!this.ready) return reject(new Error(\"socket not ready\"));\n const message = {\n jsonrpc: \"2.0\",\n method,\n params\n };\n this.socket.send(this.dataPack.encode(message), (error) => {\n if (error) return reject(error);\n resolve();\n });\n });\n }\n /**\n * Subscribes for a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n async subscribe(event) {\n if (typeof event === \"string\") event = [event];\n const result = await this.call(\"rpc.on\", event);\n if (typeof event === \"string\" && result[event] !== \"ok\")\n throw new Error(\n \"Failed subscribing to an event '\" + event + \"' with: \" + result[event]\n );\n return result;\n }\n /**\n * Unsubscribes from a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n async unsubscribe(event) {\n if (typeof event === \"string\") event = [event];\n const result = await this.call(\"rpc.off\", event);\n if (typeof event === \"string\" && result[event] !== \"ok\")\n throw new Error(\"Failed unsubscribing from an event with: \" + result);\n return result;\n }\n /**\n * Closes a WebSocket connection gracefully.\n * @method\n * @param {Number} code - socket close code\n * @param {String} data - optional data to be sent before closing\n * @return {Undefined}\n */\n close(code, data) {\n this.socket.close(code || 1e3, data);\n }\n /**\n * Enable / disable automatic reconnection.\n * @method\n * @param {Boolean} reconnect - enable / disable reconnection\n * @return {Undefined}\n */\n setAutoReconnect(reconnect) {\n this.reconnect = reconnect;\n }\n /**\n * Set the interval between reconnection attempts.\n * @method\n * @param {Number} interval - reconnection interval in milliseconds\n * @return {Undefined}\n */\n setReconnectInterval(interval) {\n this.reconnect_interval = interval;\n }\n /**\n * Set the maximum number of reconnection attempts.\n * @method\n * @param {Number} max_reconnects - maximum reconnection attempts\n * @return {Undefined}\n */\n setMaxReconnects(max_reconnects) {\n this.max_reconnects = max_reconnects;\n }\n /**\n * Connection/Message handler.\n * @method\n * @private\n * @param {String} address - WebSocket API address\n * @param {Object} options - ws options object\n * @return {Undefined}\n */\n _connect(address, options) {\n clearTimeout(this.reconnect_timer_id);\n this.socket = this.webSocketFactory(address, options);\n this.socket.addEventListener(\"open\", () => {\n this.ready = true;\n this.emit(\"open\");\n this.current_reconnects = 0;\n });\n this.socket.addEventListener(\"message\", ({ data: message }) => {\n if (message instanceof ArrayBuffer)\n message = Buffer.from(message).toString();\n try {\n message = this.dataPack.decode(message);\n } catch (error) {\n return;\n }\n if (message.notification && this.listeners(message.notification).length) {\n if (!Object.keys(message.params).length)\n return this.emit(message.notification);\n const args = [message.notification];\n if (message.params.constructor === Object) args.push(message.params);\n else\n for (let i = 0; i < message.params.length; i++)\n args.push(message.params[i]);\n return Promise.resolve().then(() => {\n this.emit.apply(this, args);\n });\n }\n if (!this.queue[message.id]) {\n if (message.method) {\n return Promise.resolve().then(() => {\n this.emit(message.method, message?.params);\n });\n }\n return;\n }\n if (\"error\" in message === \"result\" in message)\n this.queue[message.id].promise[1](\n new Error(\n 'Server response malformed. Response must include either \"result\" or \"error\", but not both.'\n )\n );\n if (this.queue[message.id].timeout)\n clearTimeout(this.queue[message.id].timeout);\n if (message.error) this.queue[message.id].promise[1](message.error);\n else this.queue[message.id].promise[0](message.result);\n delete this.queue[message.id];\n });\n this.socket.addEventListener(\"error\", (error) => this.emit(\"error\", error));\n this.socket.addEventListener(\"close\", ({ code, reason }) => {\n if (this.ready)\n setTimeout(() => this.emit(\"close\", code, reason), 0);\n this.ready = false;\n this.socket = void 0;\n if (code === 1e3) return;\n this.current_reconnects++;\n if (this.reconnect && (this.max_reconnects > this.current_reconnects || this.max_reconnects === 0))\n this.reconnect_timer_id = setTimeout(\n () => this._connect(address, options),\n this.reconnect_interval\n );\n });\n }\n};\n\n// src/index.browser.ts\nvar Client = class extends CommonClient {\n constructor(address = \"ws://localhost:8080\", {\n autoconnect = true,\n reconnect = true,\n reconnect_interval = 1e3,\n max_reconnects = 5\n } = {}, generate_request_id) {\n super(\n WebSocket,\n address,\n {\n autoconnect,\n reconnect,\n reconnect_interval,\n max_reconnects\n },\n generate_request_id\n );\n }\n};\n\nexport { Client, CommonClient, DefaultDataPack, WebSocket };\n//# sourceMappingURL=out.js.map\n//# sourceMappingURL=index.browser.mjs.map","import { bytes, exists, number, output } from './_assert.js';\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, isLE, byteSwap32, } from './utils.js';\n// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.\n// It's called a sponge function.\n// Various per round constants calculations\nconst SHA3_PI = [];\nconst SHA3_ROTL = [];\nconst _SHA3_IOTA = [];\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n if (!isLE)\n byteSwap32(this.state32);\n keccakP(this.state32, this.rounds);\n if (!isLE)\n byteSwap32(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n exists(this, false);\n bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = /* @__PURE__ */ gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = /* @__PURE__ */ gen(0x06, 136, 256 / 8);\nexport const sha3_384 = /* @__PURE__ */ gen(0x06, 104, 384 / 8);\nexport const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);\nexport const keccak_224 = /* @__PURE__ */ gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\nexport const keccak_384 = /* @__PURE__ */ gen(0x01, 104, 384 / 8);\nexport const keccak_512 = /* @__PURE__ */ gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = /* @__PURE__ */ genShake(0x1f, 168, 128 / 8);\nexport const shake256 = /* @__PURE__ */ genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","import { hash as assertHash, bytes as assertBytes, exists as assertExists } from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nexport class HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assertHash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new Error('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assertExists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assertExists(this);\n assertBytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport { validateBasic, wNAF } from './curve.js';\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n ut.abytes(data);\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((_c, point, _isCompressed) => {\n const a = point.toAffine();\n return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (ut.isBytes(key))\n key = ut.bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n if (this.is0()) {\n // (0, 1, 0) aka ZERO is invalid in most contexts.\n // In BLS, ZERO can be serialized, so we allow it.\n // (0, 0, 0) is wrong representation of ZERO and is always invalid.\n if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, _3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, _3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === _0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === _1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return mod.mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return mod.invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y;\n try {\n y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n }\n catch (sqrtError) {\n const suffix = sqrtError instanceof Error ? ': ' + sqrtError.message : '';\n throw new Error('Point is not on curve' + suffix);\n }\n const isYOdd = (y & _1n) === _1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = mod.getMinHashLength(CURVE.n);\n return mod.mapHashToField(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = ut.isBytes(item);\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null && ent !== false) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(ensureBytes('extraEntropy', e)); // check for being bytes\n }\n const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === _0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === _0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash with a private key.\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param msgHash NOT message. msg needs to be hashed to `msgHash`, or use `prehash`.\n * @param privKey private key\n * @param opts lowS for non-malleable sigs. extraEntropy for mixing randomness into k. prehash will hash first arg.\n * @returns signature with recovery param\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const C = CURVE;\n const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes('msgHash', msgHash);\n publicKey = ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || ut.isBytes(sg)) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n/**\n * Implementation of the Shallue and van de Woestijne method for any weierstrass curve.\n * TODO: check if there is a way to merge this with uvRatio in Edwards; move to modular.\n * b = True and y = sqrt(u / v) if (u / v) is square in F, and\n * b = False and y = sqrt(Z * (u / v)) otherwise.\n * @param Fp\n * @param Z\n * @returns\n */\nexport function SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = _0n;\n for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n l += _1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n // We need 2n ** c1 and 2n ** (c1-1). We can't use **; but we can use <<.\n // 2n ** c1 == 2n << (c1-1)\n const _2n_pow_c1_1 = _2n << (c1 - _1n - _1n);\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n;\n const c2 = (q - _1n) / _2n_pow_c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n_pow_c1 - _1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n_pow_c1_1; // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > _1n; i--) {\n let tv5 = i - _2n; // 18. tv5 = i - 2\n tv5 = _2n << (tv5 - _1n); // 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n === _3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n/**\n * Simplified Shallue-van de Woestijne-Ulas Method\n * https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2\n */\nexport function mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n return {\n hash,\n hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n randomBytes,\n };\n}\nexport function createCurve(curveDef, defHash) {\n const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { createCurve } from './_shortw_utils.js';\nimport { createHasher, isogenyMap } from './abstract/hash-to-curve.js';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0), // equation params: a, b\n b: BigInt(7), // Seem to be rigid: bitcointalk.org/index.php?topic=289795.msg3183975#msg3183975\n Fp, // Field's prime: 2n**256n - 2n**32n - 2n**9n - 2n**8n - 2n**7n - 2n**6n - 2n**4n - 1n\n n: secp256k1N, // Curve order, total count of valid points in the field\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1), // Cofactor\n lowS: true, // Allow only low-S signatures by default in sign() and verify()\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n}))();\nconst isoMap = /* @__PURE__ */ (() => isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j)))))();\nconst mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n}))();\nconst htf = /* @__PURE__ */ (() => createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\n//# sourceMappingURL=secp256k1.js.map","import { Buffer } from 'buffer';\nimport { ed25519 } from '@noble/curves/ed25519';\nimport BN from 'bn.js';\nimport bs58 from 'bs58';\nimport { sha256 } from '@noble/hashes/sha256';\nimport { serialize, deserialize, deserializeUnchecked } from 'borsh';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport { blob } from '@solana/buffer-layout';\nimport { toBigIntLE, toBufferLE } from 'bigint-buffer';\nimport { coerce, instance, string, tuple, literal, unknown, type, number, array, nullable, optional, boolean, record, union, create, any, assert as assert$1 } from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport { CommonClient, WebSocket } from 'rpc-websockets';\nimport { keccak_256 } from '@noble/hashes/sha3';\nimport { secp256k1 } from '@noble/curves/secp256k1';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n\n/**\n * Ed25519 Keypair\n */\n\nconst generatePrivateKey = ed25519.utils.randomPrivateKey;\nconst generateKeypair = () => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey\n };\n};\nconst getPublicKey = ed25519.getPublicKey;\nfunction isOnCurve(publicKey) {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nconst sign = (message, secretKey) => ed25519.sign(message, secretKey.slice(0, 32));\nconst verify = ed25519.verify;\n\nconst toBuffer = arr => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n\n// Class wrapping a plain object\nclass Struct {\n constructor(properties) {\n Object.assign(this, properties);\n }\n encode() {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n static decode(data) {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n static decodeUnchecked(data) {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nclass Enum extends Struct {\n constructor(properties) {\n super(properties);\n this.enum = '';\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\nconst SOLANA_SCHEMA = new Map();\n\nvar _PublicKey;\n\n/**\n * Maximum length of derived pubkey seed\n */\nconst MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nconst PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\n\n/**\n * JSON object representation of PublicKey class\n */\n\nfunction isPublicKeyData(value) {\n return value._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nclass PublicKey extends Struct {\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value) {\n super({});\n /** @internal */\n this._bn = void 0;\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique() {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey) {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58() {\n return bs58.encode(this.toBytes());\n }\n toJSON() {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes() {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer() {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n get [Symbol.toStringTag]() {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString() {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(fromPublicKey, seed, programId) {\n const buffer = Buffer.concat([fromPublicKey.toBuffer(), Buffer.from(seed), programId.toBuffer()]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(seeds, programId) {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([buffer, programId.toBuffer(), Buffer.from('ProgramDerivedAddress')]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(seeds, programId) {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(seeds, programId) {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(seeds, programId) {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData) {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n_PublicKey = PublicKey;\nPublicKey.default = new _PublicKey('11111111111111111111111111111111');\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']]\n});\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nclass Account {\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey) {\n /** @internal */\n this._publicKey = void 0;\n /** @internal */\n this._secretKey = void 0;\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey() {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey() {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n\nconst BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey('BPFLoader1111111111111111111111111111111111');\n\n/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nconst PACKET_DATA_SIZE = 1280 - 40 - 8;\nconst VERSION_PREFIX_MASK = 0x7f;\nconst SIGNATURE_LENGTH_IN_BYTES = 64;\n\nclass TransactionExpiredBlockheightExceededError extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = void 0;\n this.signature = signature;\n }\n}\nObject.defineProperty(TransactionExpiredBlockheightExceededError.prototype, 'name', {\n value: 'TransactionExpiredBlockheightExceededError'\n});\nclass TransactionExpiredTimeoutError extends Error {\n constructor(signature, timeoutSeconds) {\n super(`Transaction was not confirmed in ${timeoutSeconds.toFixed(2)} seconds. It is ` + 'unknown if it succeeded or failed. Check signature ' + `${signature} using the Solana Explorer or CLI tools.`);\n this.signature = void 0;\n this.signature = signature;\n }\n}\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError'\n});\nclass TransactionExpiredNonceInvalidError extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = void 0;\n this.signature = signature;\n }\n}\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError'\n});\n\nclass MessageAccountKeys {\n constructor(staticAccountKeys, accountKeysFromLookups) {\n this.staticAccountKeys = void 0;\n this.accountKeysFromLookups = void 0;\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n keySegments() {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n get(index) {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n get length() {\n return this.keySegments().flat().length;\n }\n compileInstructions(instructions) {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n const keyIndexMap = new Map();\n this.keySegments().flat().forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n const findKeyIndex = key => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined) throw new Error('Encountered an unknown instruction account key during compilation');\n return keyIndex;\n };\n return instructions.map(instruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta => findKeyIndex(meta.pubkey)),\n data: instruction.data\n };\n });\n }\n}\n\n/**\n * Layout for a public key\n */\nconst publicKey = (property = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nconst signature = (property = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n/**\n * Layout for a Rust String type\n */\nconst rustString = (property = 'string') => {\n const rsl = BufferLayout.struct([BufferLayout.u32('length'), BufferLayout.u32('lengthPadding'), BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars')], property);\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n const rslShim = rsl;\n rslShim.decode = (b, offset) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n rslShim.encode = (str, b, offset) => {\n const data = {\n chars: Buffer.from(str, 'utf8')\n };\n return _encode(data, b, offset);\n };\n rslShim.alloc = str => {\n return BufferLayout.u32().span + BufferLayout.u32().span + Buffer.from(str, 'utf8').length;\n };\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nconst authorized = (property = 'authorized') => {\n return BufferLayout.struct([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nconst lockup = (property = 'lockup') => {\n return BufferLayout.struct([BufferLayout.ns64('unixTimestamp'), BufferLayout.ns64('epoch'), publicKey('custodian')], property);\n};\n\n/**\n * Layout for a VoteInit object\n */\nconst voteInit = (property = 'voteInit') => {\n return BufferLayout.struct([publicKey('nodePubkey'), publicKey('authorizedVoter'), publicKey('authorizedWithdrawer'), BufferLayout.u8('commission')], property);\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nconst voteAuthorizeWithSeedArgs = (property = 'voteAuthorizeWithSeedArgs') => {\n return BufferLayout.struct([BufferLayout.u32('voteAuthorizationType'), publicKey('currentAuthorityDerivedKeyOwnerPubkey'), rustString('currentAuthorityDerivedKeySeed'), publicKey('newAuthorized')], property);\n};\nfunction getAlloc(type, fields) {\n const getItemAlloc = item => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({\n layout: item\n }, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n let alloc = 0;\n type.layout.fields.forEach(item => {\n alloc += getItemAlloc(item);\n });\n return alloc;\n}\n\nfunction decodeLength(bytes) {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift();\n len |= (elem & 0x7f) << size * 7;\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\nfunction encodeLength(bytes, len) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n\nfunction assert (condition, message) {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n\nclass CompiledKeys {\n constructor(payer, keyMetaMap) {\n this.payer = void 0;\n this.keyMetaMap = void 0;\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n static compile(instructions, payer) {\n const keyMetaMap = new Map();\n const getOrInsertDefault = pubkey => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n return new CompiledKeys(payer, keyMetaMap);\n }\n getMessageComponents() {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n const writableSigners = mapEntries.filter(([, meta]) => meta.isSigner && meta.isWritable);\n const readonlySigners = mapEntries.filter(([, meta]) => meta.isSigner && !meta.isWritable);\n const writableNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && meta.isWritable);\n const readonlyNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && !meta.isWritable);\n const header = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length\n };\n\n // sanity checks\n {\n assert(writableSigners.length > 0, 'Expected at least one writable signer key');\n const [payerAddress] = writableSigners[0];\n assert(payerAddress === this.payer.toBase58(), 'Expected first writable signer key to be the fee payer');\n }\n const staticAccountKeys = [...writableSigners.map(([address]) => new PublicKey(address)), ...readonlySigners.map(([address]) => new PublicKey(address)), ...writableNonSigners.map(([address]) => new PublicKey(address)), ...readonlyNonSigners.map(([address]) => new PublicKey(address))];\n return [header, staticAccountKeys];\n }\n extractTableLookup(lookupTable) {\n const [writableIndexes, drainedWritableKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, keyMeta => !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable);\n const [readonlyIndexes, drainedReadonlyKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, keyMeta => !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable);\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n return [{\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes\n }, {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys\n }];\n }\n\n /** @internal */\n drainKeysFoundInLookupTable(lookupTableEntries, keyMetaFilter) {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry => entry.equals(key));\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n return [lookupTableIndexes, drainedKeys];\n }\n}\n\nconst END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';\n\n/**\n * Delegates to `Array#shift`, but throws if the array is zero-length.\n */\nfunction guardedShift(byteArray) {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift();\n}\n\n/**\n * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of\n * the array.\n */\nfunction guardedSplice(byteArray, ...args) {\n const [start] = args;\n if (args.length === 2 // Implies that `deleteCount` was supplied\n ? start + (args[1] ?? 0) > byteArray.length : start >= byteArray.length) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(...args);\n}\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\n\n/**\n * Message constructor arguments\n */\n\n/**\n * List of instructions to be processed atomically\n */\nclass Message {\n constructor(args) {\n this.header = void 0;\n this.accountKeys = void 0;\n this.recentBlockhash = void 0;\n this.instructions = void 0;\n this.indexToProgramIds = new Map();\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix => this.indexToProgramIds.set(ix.programIdIndex, this.accountKeys[ix.programIdIndex]));\n }\n get version() {\n return 'legacy';\n }\n get staticAccountKeys() {\n return this.accountKeys;\n }\n get compiledInstructions() {\n return this.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data)\n }));\n }\n get addressTableLookups() {\n return [];\n }\n getAccountKeys() {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(ix => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data)\n }));\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions\n });\n }\n isAccountSigner(index) {\n return index < this.header.numRequiredSignatures;\n }\n isAccountWritable(index) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n isProgramId(index) {\n return this.indexToProgramIds.has(index);\n }\n programIds() {\n return [...this.indexToProgramIds.values()];\n }\n nonProgramIds() {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n serialize() {\n const numKeys = this.accountKeys.length;\n let keyCount = [];\n encodeLength(keyCount, numKeys);\n const instructions = this.instructions.map(instruction => {\n const {\n accounts,\n programIdIndex\n } = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n let keyIndicesCount = [];\n encodeLength(keyIndicesCount, accounts.length);\n let dataCount = [];\n encodeLength(dataCount, data.length);\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data\n };\n });\n let instructionCount = [];\n encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct([BufferLayout.u8('programIdIndex'), BufferLayout.blob(instruction.keyIndicesCount.length, 'keyIndicesCount'), BufferLayout.seq(BufferLayout.u8('keyIndex'), instruction.keyIndices.length, 'keyIndices'), BufferLayout.blob(instruction.dataLength.length, 'dataLength'), BufferLayout.seq(BufferLayout.u8('userdatum'), instruction.data.length, 'data')]);\n const length = instructionLayout.encode(instruction, instructionBuffer, instructionBufferLength);\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n const signDataLayout = BufferLayout.struct([BufferLayout.blob(1, 'numRequiredSignatures'), BufferLayout.blob(1, 'numReadonlySignedAccounts'), BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'), BufferLayout.blob(keyCount.length, 'keyCount'), BufferLayout.seq(publicKey('key'), numKeys, 'keys'), publicKey('recentBlockhash')]);\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([this.header.numReadonlySignedAccounts]),\n numReadonlyUnsignedAccounts: Buffer.from([this.header.numReadonlyUnsignedAccounts]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash)\n };\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer) {\n // Slice up wire data\n let byteArray = [...buffer];\n const numRequiredSignatures = guardedShift(byteArray);\n if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) {\n throw new Error('Versioned messages must be deserialized with VersionedMessage.deserialize()');\n }\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n const instructionCount = decodeLength(byteArray);\n let instructions = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount);\n const dataLength = decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data\n });\n }\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions\n };\n return new Message(messageArgs);\n }\n}\n\n/**\n * Message constructor arguments\n */\n\nclass MessageV0 {\n constructor(args) {\n this.header = void 0;\n this.staticAccountKeys = void 0;\n this.recentBlockhash = void 0;\n this.compiledInstructions = void 0;\n this.addressTableLookups = void 0;\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n get version() {\n return 0;\n }\n get numAccountKeysFromLookups() {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n getAccountKeys(args) {\n let accountKeysFromLookups;\n if (args && 'accountKeysFromLookups' in args && args.accountKeysFromLookups) {\n if (this.numAccountKeysFromLookups != args.accountKeysFromLookups.writable.length + args.accountKeysFromLookups.readonly.length) {\n throw new Error('Failed to get account keys because of a mismatch in the number of account keys from lookups');\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (args && 'addressLookupTableAccounts' in args && args.addressLookupTableAccounts) {\n accountKeysFromLookups = this.resolveAddressTableLookups(args.addressLookupTableAccounts);\n } else if (this.addressTableLookups.length > 0) {\n throw new Error('Failed to get account keys because address table lookups were not resolved');\n }\n return new MessageAccountKeys(this.staticAccountKeys, accountKeysFromLookups);\n }\n isAccountSigner(index) {\n return index < this.header.numRequiredSignatures;\n }\n isAccountWritable(index) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce((count, lookup) => count + lookup.writableIndexes.length, 0);\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n resolveAddressTableLookups(addressLookupTableAccounts) {\n const accountKeysFromLookups = {\n writable: [],\n readonly: []\n };\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account => account.key.equals(tableLookup.accountKey));\n if (!tableAccount) {\n throw new Error(`Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`);\n }\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(tableAccount.state.addresses[index]);\n } else {\n throw new Error(`Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`);\n }\n }\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(tableAccount.state.addresses[index]);\n } else {\n throw new Error(`Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`);\n }\n }\n }\n return accountKeysFromLookups;\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const addressTableLookups = new Array();\n const accountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array()\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {\n writable,\n readonly\n }] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys, accountKeysFromLookups);\n const compiledInstructions = accountKeys.compileInstructions(args.instructions);\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups\n });\n }\n serialize() {\n const encodedStaticAccountKeysLength = Array();\n encodeLength(encodedStaticAccountKeysLength, this.staticAccountKeys.length);\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n encodeLength(encodedInstructionsLength, this.compiledInstructions.length);\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n encodeLength(encodedAddressTableLookupsLength, this.addressTableLookups.length);\n const messageLayout = BufferLayout.struct([BufferLayout.u8('prefix'), BufferLayout.struct([BufferLayout.u8('numRequiredSignatures'), BufferLayout.u8('numReadonlySignedAccounts'), BufferLayout.u8('numReadonlyUnsignedAccounts')], 'header'), BufferLayout.blob(encodedStaticAccountKeysLength.length, 'staticAccountKeysLength'), BufferLayout.seq(publicKey(), this.staticAccountKeys.length, 'staticAccountKeys'), publicKey('recentBlockhash'), BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'), BufferLayout.blob(serializedInstructions.length, 'serializedInstructions'), BufferLayout.blob(encodedAddressTableLookupsLength.length, 'addressTableLookupsLength'), BufferLayout.blob(serializedAddressTableLookups.length, 'serializedAddressTableLookups')]);\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode({\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(encodedAddressTableLookupsLength),\n serializedAddressTableLookups\n }, serializedMessage);\n return serializedMessage.slice(0, serializedMessageLength);\n }\n serializeInstructions() {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n encodeLength(encodedAccountKeyIndexesLength, instruction.accountKeyIndexes.length);\n const encodedDataLength = Array();\n encodeLength(encodedDataLength, instruction.data.length);\n const instructionLayout = BufferLayout.struct([BufferLayout.u8('programIdIndex'), BufferLayout.blob(encodedAccountKeyIndexesLength.length, 'encodedAccountKeyIndexesLength'), BufferLayout.seq(BufferLayout.u8(), instruction.accountKeyIndexes.length, 'accountKeyIndexes'), BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'), BufferLayout.blob(instruction.data.length, 'data')]);\n serializedLength += instructionLayout.encode({\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(encodedAccountKeyIndexesLength),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data\n }, serializedInstructions, serializedLength);\n }\n return serializedInstructions.slice(0, serializedLength);\n }\n serializeAddressTableLookups() {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n encodeLength(encodedWritableIndexesLength, lookup.writableIndexes.length);\n const encodedReadonlyIndexesLength = Array();\n encodeLength(encodedReadonlyIndexesLength, lookup.readonlyIndexes.length);\n const addressTableLookupLayout = BufferLayout.struct([publicKey('accountKey'), BufferLayout.blob(encodedWritableIndexesLength.length, 'encodedWritableIndexesLength'), BufferLayout.seq(BufferLayout.u8(), lookup.writableIndexes.length, 'writableIndexes'), BufferLayout.blob(encodedReadonlyIndexesLength.length, 'encodedReadonlyIndexesLength'), BufferLayout.seq(BufferLayout.u8(), lookup.readonlyIndexes.length, 'readonlyIndexes')]);\n serializedLength += addressTableLookupLayout.encode({\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(encodedWritableIndexesLength),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(encodedReadonlyIndexesLength),\n readonlyIndexes: lookup.readonlyIndexes\n }, serializedAddressTableLookups, serializedLength);\n }\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n static deserialize(serializedMessage) {\n let byteArray = [...serializedMessage];\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(prefix !== maskedPrefix, `Expected versioned message but received legacy message`);\n const version = maskedPrefix;\n assert(version === 0, `Expected versioned message with version 0 but found version ${version}`);\n const header = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray)\n };\n const staticAccountKeys = [];\n const staticAccountKeysLength = decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)));\n }\n const recentBlockhash = bs58.encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const instructionCount = decodeLength(byteArray);\n const compiledInstructions = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength);\n const dataLength = decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data\n });\n }\n const addressTableLookupsCount = decodeLength(byteArray);\n const addressTableLookups = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = decodeLength(byteArray);\n const writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength);\n const readonlyIndexesLength = decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes\n });\n }\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups\n });\n }\n}\n\n// eslint-disable-next-line no-redeclare\nconst VersionedMessage = {\n deserializeMessageVersion(serializedMessage) {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n deserialize: serializedMessage => {\n const version = VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(`Transaction message version ${version} deserialization is not supported`);\n }\n }\n};\n\n/** @internal */\n\n/**\n * Transaction signature as base-58 encoded string\n */\n\nlet TransactionStatus = /*#__PURE__*/function (TransactionStatus) {\n TransactionStatus[TransactionStatus[\"BLOCKHEIGHT_EXCEEDED\"] = 0] = \"BLOCKHEIGHT_EXCEEDED\";\n TransactionStatus[TransactionStatus[\"PROCESSED\"] = 1] = \"PROCESSED\";\n TransactionStatus[TransactionStatus[\"TIMED_OUT\"] = 2] = \"TIMED_OUT\";\n TransactionStatus[TransactionStatus[\"NONCE_INVALID\"] = 3] = \"NONCE_INVALID\";\n return TransactionStatus;\n}({});\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\n\n/**\n * Configuration object for Transaction.serialize()\n */\n\n/**\n * @internal\n */\n\n/**\n * Transaction Instruction class\n */\nclass TransactionInstruction {\n constructor(opts) {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n this.keys = void 0;\n /**\n * Program Id to execute\n */\n this.programId = void 0;\n /**\n * Program input\n */\n this.data = Buffer.alloc(0);\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON() {\n return {\n keys: this.keys.map(({\n pubkey,\n isSigner,\n isWritable\n }) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable\n })),\n programId: this.programId.toJSON(),\n data: [...this.data]\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\n\n/**\n * @internal\n */\n\n/**\n * Transaction class\n */\nclass Transaction {\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature() {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n\n // Construct a transaction using a durable nonce\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n\n /**\n * Construct an empty Transaction\n */\n constructor(opts) {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n this.signatures = [];\n this.feePayer = void 0;\n /**\n * The instructions to atomically execute\n */\n this.instructions = [];\n /**\n * A recent transaction id. Must be populated by the caller\n */\n this.recentBlockhash = void 0;\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n this.lastValidBlockHeight = void 0;\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n this.nonceInfo = void 0;\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n this.minNonceContextSlot = void 0;\n /**\n * @internal\n */\n this._message = void 0;\n /**\n * @internal\n */\n this._json = void 0;\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {\n minContextSlot,\n nonceInfo\n } = opts;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')) {\n const {\n blockhash,\n lastValidBlockHeight\n } = opts;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {\n recentBlockhash,\n nonceInfo\n } = opts;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON() {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON()\n } : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({\n publicKey\n }) => {\n return publicKey.toJSON();\n })\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(...items) {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n items.forEach(item => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage() {\n if (this._message && JSON.stringify(this.toJSON()) === JSON.stringify(this._json)) {\n return this._message;\n }\n let recentBlockhash;\n let instructions;\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n let feePayer;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(`Transaction instruction index ${i} has undefined program id`);\n }\n }\n const programIds = [];\n const accountMetas = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({\n ...accountMeta\n });\n });\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower'\n };\n return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn('Transaction references a signature that is unnecessary, ' + 'only the fee payer and instruction signer accounts should sign a transaction. ' + 'This behavior is deprecated and will throw an error in the next major version release.');\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys = [];\n const unsignedKeys = [];\n uniqueMetas.forEach(({\n pubkey,\n isSigner,\n isWritable\n }) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions = instructions.map(instruction => {\n const {\n data,\n programId\n } = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta => accountKeys.indexOf(meta.pubkey.toString())),\n data: bs58.encode(data)\n };\n });\n compiledInstructions.forEach(instruction => {\n assert(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => assert(keyIndex >= 0));\n });\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions\n });\n }\n\n /**\n * @internal\n */\n _compile() {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(0, message.header.numRequiredSignatures);\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n if (valid) return message;\n }\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey\n }));\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage() {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection) {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n const seen = new Set();\n this.signatures = signers.filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n }).map(publicKey => ({\n signature: null,\n publicKey\n }));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey\n }));\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message, ...signers) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey, signature) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey, signature) {\n assert(signature.length === 64);\n const index = this.signatures.findIndex(sigpair => pubkey.equals(sigpair.publicKey));\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures = true) {\n const signatureErrors = this._getMessageSignednessErrors(this.serializeMessage(), requireAllSignatures);\n return !signatureErrors;\n }\n\n /**\n * @internal\n */\n _getMessageSignednessErrors(message, requireAllSignatures) {\n const errors = {};\n for (const {\n signature,\n publicKey\n } of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n (errors.missing ||= []).push(publicKey);\n }\n } else {\n if (!verify(signature, message, publicKey.toBytes())) {\n (errors.invalid ||= []).push(publicKey);\n }\n }\n }\n return errors.invalid || errors.missing ? errors : undefined;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config) {\n const {\n requireAllSignatures,\n verifySignatures\n } = Object.assign({\n requireAllSignatures: true,\n verifySignatures: true\n }, config);\n const signData = this.serializeMessage();\n if (verifySignatures) {\n const sigErrors = this._getMessageSignednessErrors(signData, requireAllSignatures);\n if (sigErrors) {\n let errorMessage = 'Signature verification failed.';\n if (sigErrors.invalid) {\n errorMessage += `\\nInvalid signature for public key${sigErrors.invalid.length === 1 ? '' : '(s)'} [\\`${sigErrors.invalid.map(p => p.toBase58()).join('`, `')}\\`].`;\n }\n if (sigErrors.missing) {\n errorMessage += `\\nMissing signature for public key${sigErrors.missing.length === 1 ? '' : '(s)'} [\\`${sigErrors.missing.map(p => p.toBase58()).join('`, `')}\\`].`;\n }\n throw new Error(errorMessage);\n }\n }\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData) {\n const {\n signatures\n } = this;\n const signatureCount = [];\n encodeLength(signatureCount, signatures.length);\n const transactionLength = signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n assert(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({\n signature\n }, index) => {\n if (signature !== null) {\n assert(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(wireTransaction, signatureCount.length + index * 64);\n }\n });\n signData.copy(wireTransaction, signatureCount.length + signatures.length * 64);\n assert(wireTransaction.length <= PACKET_DATA_SIZE, `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`);\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys() {\n assert(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId() {\n assert(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data() {\n assert(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer) {\n // Slice up wire data\n let byteArray = [...buffer];\n const signatureCount = decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(message, signatures = []) {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature: signature == bs58.encode(DEFAULT_SIGNATURE) ? null : bs58.decode(signature),\n publicKey: message.accountKeys[index]\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner: transaction.signatures.some(keyObj => keyObj.publicKey.toString() === pubkey.toString()) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account)\n };\n });\n transaction.instructions.push(new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data)\n }));\n });\n transaction._message = message;\n transaction._json = transaction.toJSON();\n return transaction;\n }\n}\n\nclass TransactionMessage {\n constructor(args) {\n this.payerKey = void 0;\n this.instructions = void 0;\n this.recentBlockhash = void 0;\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n static decompile(message, args) {\n const {\n header,\n compiledInstructions,\n recentBlockhash\n } = message;\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n } = header;\n const numWritableSignedAccounts = numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n const numWritableUnsignedAccounts = message.staticAccountKeys.length - numRequiredSignatures - numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error('Failed to decompile message because no account keys were found');\n }\n const instructions = [];\n for (const compiledIx of compiledInstructions) {\n const keys = [];\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(`Failed to find key for account key index ${keyIndex}`);\n }\n const isSigner = keyIndex < numRequiredSignatures;\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable = keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable = keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups.writable.length;\n }\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable\n });\n }\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(`Failed to find program id for program id index ${compiledIx.programIdIndex}`);\n }\n instructions.push(new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys\n }));\n }\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash\n });\n }\n compileToLegacyMessage() {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions\n });\n }\n compileToV0Message(addressLookupTableAccounts) {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts\n });\n }\n}\n\n/**\n * Versioned transaction class\n */\nclass VersionedTransaction {\n get version() {\n return this.message.version;\n }\n constructor(message, signatures) {\n this.signatures = void 0;\n this.message = void 0;\n if (signatures !== undefined) {\n assert(signatures.length === message.header.numRequiredSignatures, 'Expected signatures length to be equal to the number of required signatures');\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n serialize() {\n const serializedMessage = this.message.serialize();\n const encodedSignaturesLength = Array();\n encodeLength(encodedSignaturesLength, this.signatures.length);\n const transactionLayout = BufferLayout.struct([BufferLayout.blob(encodedSignaturesLength.length, 'encodedSignaturesLength'), BufferLayout.seq(signature(), this.signatures.length, 'signatures'), BufferLayout.blob(serializedMessage.length, 'serializedMessage')]);\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode({\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage\n }, serializedTransaction);\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n static deserialize(serializedTransaction) {\n let byteArray = [...serializedTransaction];\n const signatures = [];\n const signaturesLength = decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)));\n }\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n sign(signers) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(0, this.message.header.numRequiredSignatures);\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey => pubkey.equals(signer.publicKey));\n assert(signerIndex >= 0, `Cannot sign with non signer key ${signer.publicKey.toBase58()}`);\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n addSignature(publicKey, signature) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(0, this.message.header.numRequiredSignatures);\n const signerIndex = signerPubkeys.findIndex(pubkey => pubkey.equals(publicKey));\n assert(signerIndex >= 0, `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`);\n this.signatures[signerIndex] = signature;\n }\n}\n\n// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nconst NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nconst DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nconst NUM_SLOTS_PER_SECOND = NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nconst MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n\nconst SYSVAR_CLOCK_PUBKEY = new PublicKey('SysvarC1ock11111111111111111111111111111111');\nconst SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey('SysvarEpochSchedu1e111111111111111111111111');\nconst SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey('Sysvar1nstructions1111111111111111111111111');\nconst SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey('SysvarRecentB1ockHashes11111111111111111111');\nconst SYSVAR_RENT_PUBKEY = new PublicKey('SysvarRent111111111111111111111111111111111');\nconst SYSVAR_REWARDS_PUBKEY = new PublicKey('SysvarRewards111111111111111111111111111111');\nconst SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey('SysvarS1otHashes111111111111111111111111111');\nconst SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey('SysvarS1otHistory11111111111111111111111111');\nconst SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey('SysvarStakeHistory1111111111111111111111111');\n\nclass SendTransactionError extends Error {\n constructor({\n action,\n signature,\n transactionMessage,\n logs\n }) {\n const maybeLogsOutput = logs ? `Logs: \\n${JSON.stringify(logs.slice(-10), null, 2)}. ` : '';\n const guideText = '\\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.';\n let message;\n switch (action) {\n case 'send':\n message = `Transaction ${signature} resulted in an error. \\n` + `${transactionMessage}. ` + maybeLogsOutput + guideText;\n break;\n case 'simulate':\n message = `Simulation failed. \\nMessage: ${transactionMessage}. \\n` + maybeLogsOutput + guideText;\n break;\n default:\n {\n message = `Unknown action '${(a => a)(action)}'`;\n }\n }\n super(message);\n this.signature = void 0;\n this.transactionMessage = void 0;\n this.transactionLogs = void 0;\n this.signature = signature;\n this.transactionMessage = transactionMessage;\n this.transactionLogs = logs ? logs : undefined;\n }\n get transactionError() {\n return {\n message: this.transactionMessage,\n logs: Array.isArray(this.transactionLogs) ? this.transactionLogs : undefined\n };\n }\n\n /* @deprecated Use `await getLogs()` instead */\n get logs() {\n const cachedLogs = this.transactionLogs;\n if (cachedLogs != null && typeof cachedLogs === 'object' && 'then' in cachedLogs) {\n return undefined;\n }\n return cachedLogs;\n }\n async getLogs(connection) {\n if (!Array.isArray(this.transactionLogs)) {\n this.transactionLogs = new Promise((resolve, reject) => {\n connection.getTransaction(this.signature).then(tx => {\n if (tx && tx.meta && tx.meta.logMessages) {\n const logs = tx.meta.logMessages;\n this.transactionLogs = logs;\n resolve(logs);\n } else {\n reject(new Error('Log messages not found'));\n }\n }).catch(reject);\n });\n }\n return await this.transactionLogs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016\n};\nclass SolanaJSONRPCError extends Error {\n constructor({\n code,\n message,\n data\n }, customMessage) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = void 0;\n this.data = void 0;\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nasync function sendAndConfirmTransaction(connection, transaction, signers, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot\n };\n const signature = await connection.sendTransaction(transaction, signers, sendOptions);\n let status;\n if (transaction.recentBlockhash != null && transaction.lastValidBlockHeight != null) {\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight\n }, options && options.commitment)).value;\n } else if (transaction.minNonceContextSlot != null && transaction.nonceInfo != null) {\n const {\n nonceInstruction\n } = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature\n }, options && options.commitment)).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn('sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' + 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' + 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.');\n }\n status = (await connection.confirmTransaction(signature, options && options.commitment)).value;\n }\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: 'send',\n signature: signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n}\n\n// zzz\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\n/**\n * @internal\n */\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nfunction encodeData(type, fields) {\n const allocLength = type.layout.span >= 0 ? type.layout.span : getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({\n instruction: type.index\n }, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nfunction decodeData$1(type, buffer) {\n let data;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n if (data.instruction !== type.index) {\n throw new Error(`invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`);\n }\n return data;\n}\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nconst FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct([BufferLayout.u32('version'), BufferLayout.u32('state'), publicKey('authorizedPubkey'), publicKey('nonce'), BufferLayout.struct([FeeCalculatorLayout], 'feeCalculator')]);\nconst NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\n\n/**\n * NonceAccount class\n */\nclass NonceAccount {\n /**\n * @internal\n */\n constructor(args) {\n this.authorizedPubkey = void 0;\n this.nonce = void 0;\n this.feeCalculator = void 0;\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(buffer) {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator\n });\n }\n}\n\nconst encodeDecode = layout => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {\n decode,\n encode\n };\n};\nconst bigInt = length => property => {\n const layout = blob(length, property);\n const {\n encode,\n decode\n } = encodeDecode(layout);\n const bigIntLayout = layout;\n bigIntLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset);\n return toBigIntLE(Buffer.from(src));\n };\n bigIntLayout.encode = (bigInt, buffer, offset) => {\n const src = toBufferLE(bigInt, length);\n return encode(src, buffer, offset);\n };\n return bigIntLayout;\n};\nconst u64 = bigInt(8);\n\n/**\n * Create account system transaction params\n */\n\n/**\n * Transfer system transaction params\n */\n\n/**\n * Assign system transaction params\n */\n\n/**\n * Create account with seed system transaction params\n */\n\n/**\n * Create nonce account system transaction params\n */\n\n/**\n * Create nonce account with seed system transaction params\n */\n\n/**\n * Initialize nonce account system instruction params\n */\n\n/**\n * Advance nonce account system instruction params\n */\n\n/**\n * Withdraw nonce account system transaction params\n */\n\n/**\n * Authorize nonce account system transaction params\n */\n\n/**\n * Allocate account system transaction params\n */\n\n/**\n * Allocate account with seed system transaction params\n */\n\n/**\n * Assign account with seed system transaction params\n */\n\n/**\n * Transfer with seed system transaction params\n */\n\n/** Decoded transfer system transaction instruction */\n\n/** Decoded transferWithSeed system transaction instruction */\n\n/**\n * System Instruction class\n */\nclass SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n lamports,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Create, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n lamports\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Transfer, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports,\n seed,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n space\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Allocate, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n base,\n seed,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Assign, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n base,\n seed,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n base,\n seed,\n lamports,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n authorized\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized)\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {\n lamports\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n authorized\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized)\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nconst SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze({\n Create: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports'), BufferLayout.ns64('space'), publicKey('programId')])\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), publicKey('programId')])\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), u64('lamports')])\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), publicKey('base'), rustString('seed'), BufferLayout.ns64('lamports'), BufferLayout.ns64('space'), publicKey('programId')])\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32('instruction')])\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')])\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), publicKey('authorized')])\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), publicKey('authorized')])\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), BufferLayout.ns64('space')])\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), publicKey('base'), rustString('seed'), BufferLayout.ns64('space'), publicKey('programId')])\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), publicKey('base'), rustString('seed'), publicKey('programId')])\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), u64('lamports'), rustString('seed'), publicKey('programId')])\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct([BufferLayout.u32('instruction')])\n }\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nclass SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: true,\n isWritable: true\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(params) {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {\n lamports: BigInt(params.lamports)\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(params) {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n let keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: false,\n isWritable: true\n }];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(params) {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n } else {\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n }\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey\n };\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer())\n });\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {\n lamports: params.lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(params) {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n}\nSystemProgram.programId = new PublicKey('11111111111111111111111111111111');\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nclass Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return 2 * (\n // Every transaction requires two signatures (payer + program)\n Math.ceil(dataLength / Loader.chunkSize) + 1 +\n // Add one for Create transaction\n 1) // Add one for Finalize transaction\n ;\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(connection, payer, program, programId, data) {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(data.length);\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(program.publicKey, 'confirmed');\n let transaction = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length\n }));\n }\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId\n }));\n }\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports\n }));\n }\n } else {\n transaction = new Transaction().add(SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId\n }));\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed'\n });\n }\n }\n const dataLayout = BufferLayout.struct([BufferLayout.u32('instruction'), BufferLayout.u32('offset'), BufferLayout.u32('bytesLength'), BufferLayout.u32('bytesLengthPadding'), BufferLayout.seq(BufferLayout.u8('byte'), BufferLayout.offset(BufferLayout.u32(), -8), 'bytes')]);\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode({\n instruction: 0,\n // Load instruction\n offset,\n bytes: bytes,\n bytesLength: 0,\n bytesLengthPadding: 0\n }, data);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }],\n programId,\n data\n });\n transactions.push(sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed'\n }));\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([BufferLayout.u32('instruction')]);\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 1 // Finalize instruction\n }, data);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId,\n data\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(transaction, [payer, program], {\n preflightCommitment: deployCommitment\n });\n const {\n context,\n value\n } = await connection.confirmTransaction({\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n blockhash: transaction.recentBlockhash\n }, deployCommitment);\n if (value.err) {\n throw new Error(`Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`);\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve => setTimeout(resolve, Math.round(MS_PER_SLOT / 2)));\n }\n }\n\n // success\n return true;\n }\n}\nLoader.chunkSize = CHUNK_SIZE;\n\n/**\n * @deprecated Deprecated since Solana v1.17.20.\n */\nconst BPF_LOADER_PROGRAM_ID = new PublicKey('BPFLoader2111111111111111111111111111111111');\n\n/**\n * Factory class for transactions to interact with a program loader\n *\n * @deprecated Deprecated since Solana v1.17.20.\n */\nclass BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(connection, payer, program, elf, loaderProgramId) {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nvar fastStableStringify = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n\nvar fastStableStringify$1 = /*@__PURE__*/getDefaultExportFromCjs(fastStableStringify);\n\nconst MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nclass EpochSchedule {\n constructor(slotsPerEpoch, leaderScheduleSlotOffset, warmup, firstNormalEpoch, firstNormalSlot) {\n /** The maximum number of slots in each epoch */\n this.slotsPerEpoch = void 0;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n this.leaderScheduleSlotOffset = void 0;\n /** Indicates whether epochs start short and grow */\n this.warmup = void 0;\n /** The first epoch with `slotsPerEpoch` slots */\n this.firstNormalEpoch = void 0;\n /** The first slot of `firstNormalEpoch` */\n this.firstNormalSlot = void 0;\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n getEpoch(slot) {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n getEpochAndSlotIndex(slot) {\n if (slot < this.firstNormalSlot) {\n const epoch = trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) - trailingZeros(MINIMUM_SLOT_PER_EPOCH) - 1;\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n getFirstSlotInEpoch(epoch) {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (epoch - this.firstNormalEpoch) * this.slotsPerEpoch + this.firstNormalSlot;\n }\n }\n getLastSlotInEpoch(epoch) {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n getSlotsInEpoch(epoch) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n\nvar fetchImpl = globalThis.fetch;\n\nclass RpcWebSocketClient extends CommonClient {\n constructor(address, options, generate_request_id) {\n const webSocketFactory = url => {\n const rpc = WebSocket(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options\n });\n if ('socket' in rpc) {\n this.underlyingSocket = rpc.socket;\n } else {\n this.underlyingSocket = rpc;\n }\n return rpc;\n };\n super(webSocketFactory, address, options, generate_request_id);\n this.underlyingSocket = void 0;\n }\n call(...args) {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(new Error('Tried to call a JSON-RPC method `' + args[0] + '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' + readyState + ')'));\n }\n notify(...args) {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(new Error('Tried to send a JSON-RPC notification `' + args[0] + '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' + readyState + ')'));\n }\n}\n\n/**\n * @internal\n */\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nfunction decodeData(type, data) {\n let decoded;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n if (decoded.typeIndex !== type.index) {\n throw new Error(`invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`);\n }\n return decoded;\n}\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\nclass AddressLookupTableAccount {\n constructor(args) {\n this.key = void 0;\n this.state = void 0;\n this.key = args.key;\n this.state = args.state;\n }\n isActive() {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n static deserialize(accountData) {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {\n addresses\n } = BufferLayout.struct([BufferLayout.seq(publicKey(), numSerializedAddresses, 'addresses')]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority: meta.authority.length !== 0 ? new PublicKey(meta.authority[0]) : undefined,\n addresses: addresses.map(address => new PublicKey(address))\n };\n }\n}\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32('typeIndex'), u64('deactivationSlot'), BufferLayout.nu64('lastExtendedSlot'), BufferLayout.u8('lastExtendedStartIndex'), BufferLayout.u8(),\n // option\n BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u8(), -1), 'authority')])\n};\n\nconst URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\nfunction makeWebsocketUrl(endpoint) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [_,\n // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish, portWithColon, rest] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort = portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explicitly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to agave-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n\nconst PublicKeyFromString = coerce(instance(PublicKey), string(), value => new PublicKey(value));\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\nconst BufferFromRawAccountData = coerce(instance(Buffer), RawAccountDataResult, value => Buffer.from(value[0], 'base64'));\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nconst BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\n\n/** @internal */\n/** @internal */\n/** @internal */\n/** @internal */\n\n/** @internal */\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\n\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\n\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\n\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\n\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\n\n/**\n * @internal\n */\n\n/**\n * Extra contextual information for RPC responses\n */\n\n/**\n * Options for sending transactions\n */\n\n/**\n * Options for confirming transactions\n */\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\n\n/**\n * Options for getSignaturesForAddress\n */\n\n/**\n * RPC Response with extra contextual information\n */\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\n\n/**\n * This type represents all transaction confirmation strategies\n */\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(commitmentOrConfig) {\n let commitment;\n let config;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {\n commitment: specifiedCommitment,\n ...specifiedConfig\n } = commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {\n commitment,\n config\n };\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result) {\n return union([type({\n jsonrpc: literal('2.0'),\n id: string(),\n result\n }), type({\n jsonrpc: literal('2.0'),\n id: string(),\n error: type({\n code: unknown(),\n message: string(),\n data: optional(any())\n })\n })]);\n}\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema)\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value) {\n return jsonRpcResult(type({\n context: type({\n slot: number()\n }),\n value\n }));\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value) {\n return type({\n context: type({\n slot: number()\n }),\n value\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(version, response) {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(accountKey => new PublicKey(accountKey)),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data)\n })),\n addressTableLookups: response.addressTableLookups\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\n\n// Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\n\n/**\n * Configuration object for changing query behavior\n */\n\n/**\n * Information describing a cluster node\n */\n\n/**\n * Information describing a vote account\n */\n\n/**\n * A collection of cluster vote accounts\n */\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\n\nconst GetInflationGovernorResult = type({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number()\n});\n\n/**\n * The inflation reward for an epoch\n */\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(array(nullable(type({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number()))\n}))));\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(type({\n slot: number(),\n prioritizationFee: number()\n}));\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = type({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number()\n});\n\n/**\n * Information about the current epoch\n */\n\nconst GetEpochInfoResult = type({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number())\n});\nconst GetEpochScheduleResult = type({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number()\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([type({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = type({\n err: TransactionErrorResult\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\n\nconst VersionResult = type({\n 'solana-core': string(),\n 'feature-set': optional(number())\n});\nconst ParsedInstructionStruct = type({\n program: string(),\n programId: PublicKeyFromString,\n parsed: unknown()\n});\nconst PartiallyDecodedInstructionStruct = type({\n programId: PublicKeyFromString,\n accounts: array(PublicKeyFromString),\n data: string()\n});\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({\n err: nullable(union([type({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(nullable(array(nullable(type({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number())\n }))))),\n unitsConsumed: optional(number()),\n returnData: optional(nullable(type({\n programId: string(),\n data: tuple([string(), literal('base64')])\n }))),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(union([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))\n }))))\n}));\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\n\n/**\n * A processed transaction from the RPC API\n */\n\n/**\n * A processed transaction from the RPC API\n */\n\n/**\n * A processed transaction message from the RPC API\n */\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0.\n */\n\n/**\n * A partially decoded transaction instruction\n */\n\n/**\n * A parsed transaction message account\n */\n\n/**\n * A parsed transaction instruction\n */\n\n/**\n * A parsed address table lookup\n */\n\n/**\n * A parsed transaction message\n */\n\n/**\n * A parsed transaction\n */\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\n\n/**\n * A parsed transaction on the ledger with meta\n */\n\n/**\n * A processed block fetched from the RPC API\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\n\n/**\n * A block with parsed transactions\n */\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\n\n/**\n * A processed block fetched from the RPC API\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0.\n */\n\n/**\n * A Block on the ledger with signatures only\n */\n\n/**\n * recent block production information\n */\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(type({\n byIdentity: record(string(), array(number())),\n range: type({\n firstSlot: number(),\n lastSlot: number()\n })\n}));\n\n/**\n * A performance sample\n */\n\nfunction createRpcClient(url, httpHeaders, customFetch, fetchMiddleware, disableRetryOnRateLimit, httpAgent) {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent;\n {\n if (httpAgent != null) {\n console.warn('You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' + 'It has been ignored; `httpAgent` is only used in Node environments.');\n }\n }\n let fetchWithMiddleware;\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise((resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) => resolve([modifiedInfo, modifiedInit]));\n } catch (error) {\n reject(error);\n }\n });\n return await fetch(...modifiedFetchArgs);\n };\n }\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign({\n 'Content-Type': 'application/json'\n }, httpHeaders || {}, COMMON_HTTP_HEADERS)\n };\n try {\n let too_many_requests_retries = 5;\n let res;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.error(`Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`);\n await sleep(waitTime);\n waitTime *= 2;\n }\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n return clientBrowser;\n}\nfunction createRpcRequest(client) {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err, response) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\nfunction createRpcBatchRequest(client) {\n return requests => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n const batch = requests.map(params => {\n return client.request(params.methodName, params.args);\n });\n client.request(batch, (err, response) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(type({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString)\n}));\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = type({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n});\n\n/**\n * Token address and balance.\n */\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(array(type({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n})));\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n })\n})));\nconst ParsedAccountDataResult = type({\n program: string(),\n parsed: unknown(),\n space: number()\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number()\n })\n})));\n\n/**\n * Pair of an account address and its balance\n */\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(array(type({\n lamports: number(),\n address: PublicKeyFromString\n})));\n\n/**\n * @internal\n */\nconst AccountInfoResult = type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n});\nconst ParsedOrRawAccountData = coerce(union([instance(Buffer), ParsedAccountDataResult]), union([RawAccountDataResult, ParsedAccountDataResult]), value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n});\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number()\n});\nconst KeyedParsedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = type({\n state: union([literal('active'), literal('inactive'), literal('activating'), literal('deactivating')]),\n active: number(),\n inactive: number()\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n})));\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n})));\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult)\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult)\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = type({\n parent: number(),\n slot: number(),\n root: number()\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = type({\n subscription: number(),\n result: SlotInfoResult\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([type({\n type: union([literal('firstShredReceived'), literal('completed'), literal('optimisticConfirmation'), literal('root')]),\n slot: number(),\n timestamp: number()\n}), type({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number()\n}), type({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: type({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number()\n })\n}), type({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string()\n})]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = type({\n subscription: number(),\n result: SlotUpdateResult\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(union([SignatureStatusResult, SignatureReceivedResult]))\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = type({\n subscription: number(),\n result: number()\n});\nconst ContactInfoResult = type({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string())\n});\nconst VoteAccountInfoResult = type({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number())\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(type({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult)\n}));\nconst ConfirmationStatus = union([literal('processed'), literal('confirmed'), literal('finalized')]);\nconst SignatureStatusResponse = type({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus)\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(array(nullable(SignatureStatusResponse)));\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\nconst AddressTableLookupStruct = type({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number())\n});\nconst ConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(string()),\n header: type({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number()\n }),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n })),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct))\n })\n});\nconst AnnotatedAccountKey = type({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')]))\n});\nconst ConfirmedTransactionAccountsModeResult = type({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string())\n});\nconst ParsedInstructionResult = type({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString\n});\nconst RawInstructionResult = type({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString\n});\nconst InstructionResult = union([RawInstructionResult, ParsedInstructionResult]);\nconst UnknownInstructionResult = union([type({\n parsed: unknown(),\n program: string(),\n programId: string()\n}), type({\n accounts: array(string()),\n data: string(),\n programId: string()\n})]);\nconst ParsedOrRawInstruction = coerce(InstructionResult, UnknownInstructionResult, value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct)))\n })\n});\nconst TokenBalanceResult = type({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult\n});\nconst LoadedAddressesResult = type({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString)\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n }))\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number())\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(ParsedOrRawInstruction)\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number())\n});\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = type({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number()))\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number())\n})));\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number())\n})));\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n meta: nullable(ConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct)\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct)\n})));\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(type({\n blockhash: string(),\n feeCalculator: type({\n lamportsPerSignature: number()\n })\n}));\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(type({\n blockhash: string(),\n lastValidBlockHeight: number()\n}));\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\nconst PerfSampleResult = type({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number()\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(array(PerfSampleResult));\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(nullable(type({\n feeCalculator: type({\n lamportsPerSignature: number()\n })\n})));\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\n\n/**\n * Parsed account data\n */\n\n/**\n * Stake Activation data\n */\n\n/**\n * Data slice argument for getProgramAccounts\n */\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\n\n/**\n * A filter object for getProgramAccounts\n */\n\n/**\n * Configuration object for getProgramAccounts requests\n */\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\n\n/**\n * Configuration object for getMultipleAccounts\n */\n\n/**\n * Configuration object for `getStakeActivation`\n */\n\n/**\n * Configuration object for `getStakeActivation`\n */\n\n/**\n * Configuration object for `getStakeActivation`\n */\n\n/**\n * Configuration object for `getNonce`\n */\n\n/**\n * Configuration object for `getNonceAndContext`\n */\n\n/**\n * Information describing an account\n */\n\n/**\n * Account information identified by pubkey\n */\n\n/**\n * Callback function for account change notifications\n */\n\n/**\n * Callback function for program account change notifications\n */\n\n/**\n * Callback function for slot change notifications\n */\n\n/**\n * Callback function for slot update notifications\n */\n\n/**\n * Callback function for signature status notifications\n */\n\n/**\n * Signature status notification with transaction result\n */\n\n/**\n * Signature received notification\n */\n\n/**\n * Callback function for signature notifications\n */\n\n/**\n * Signature subscription options\n */\n\n/**\n * Callback function for root change notifications\n */\n\n/**\n * @internal\n */\nconst LogsResult = type({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string()\n});\n\n/**\n * Logs result.\n */\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = type({\n result: notificationResultAndContext(LogsResult),\n subscription: number()\n});\n\n/**\n * Filter for log subscriptions.\n */\n\n/**\n * Callback function for log notifications.\n */\n\n/**\n * Signature result\n */\n\n/**\n * Transaction error\n */\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\n\n/**\n * Signature status\n */\n\n/**\n * A confirmed signature with its status\n */\n\n/**\n * An object defining headers to be passed to the RPC server\n */\n\n/**\n * The type of the JavaScript `fetch()` API\n */\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\n\n/**\n * Configuration for instantiating a Connection\n */\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${\"0.0.0-development\" }`\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nclass Connection {\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(endpoint, _commitmentOrConfig) {\n /** @internal */\n this._commitment = void 0;\n /** @internal */\n this._confirmTransactionInitialTimeout = void 0;\n /** @internal */\n this._rpcEndpoint = void 0;\n /** @internal */\n this._rpcWsEndpoint = void 0;\n /** @internal */\n this._rpcClient = void 0;\n /** @internal */\n this._rpcRequest = void 0;\n /** @internal */\n this._rpcBatchRequest = void 0;\n /** @internal */\n this._rpcWebSocket = void 0;\n /** @internal */\n this._rpcWebSocketConnected = false;\n /** @internal */\n this._rpcWebSocketHeartbeat = null;\n /** @internal */\n this._rpcWebSocketIdleTimeout = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */\n this._rpcWebSocketGeneration = 0;\n /** @internal */\n this._disableBlockhashCaching = false;\n /** @internal */\n this._pollingBlockhash = false;\n /** @internal */\n this._blockhashInfo = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: []\n };\n /** @internal */\n this._nextClientSubscriptionId = 0;\n /** @internal */\n this._subscriptionDisposeFunctionsByClientSubscriptionId = {};\n /** @internal */\n this._subscriptionHashByClientSubscriptionId = {};\n /** @internal */\n this._subscriptionStateChangeCallbacksByHash = {};\n /** @internal */\n this._subscriptionCallbacksByServerSubscriptionId = {};\n /** @internal */\n this._subscriptionsByHash = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */\n this._subscriptionsAutoDisposedByRpc = new Set();\n /*\n * Returns the current block height of the node\n */\n this.getBlockHeight = (() => {\n const requestPromises = {};\n return async commitmentOrConfig => {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const requestHash = fastStableStringify$1(args);\n requestPromises[requestHash] = requestPromises[requestHash] ?? (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block height information');\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (_commitmentOrConfig && typeof _commitmentOrConfig === 'string') {\n this._commitment = _commitmentOrConfig;\n } else if (_commitmentOrConfig) {\n this._commitment = _commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout = _commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = _commitmentOrConfig.wsEndpoint;\n httpHeaders = _commitmentOrConfig.httpHeaders;\n fetch = _commitmentOrConfig.fetch;\n fetchMiddleware = _commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = _commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = _commitmentOrConfig.httpAgent;\n }\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n this._rpcClient = createRpcClient(endpoint, httpHeaders, fetch, fetchMiddleware, disableRetryOnRateLimit, httpAgent);\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on('accountNotification', this._wsOnAccountNotification.bind(this));\n this._rpcWebSocket.on('programNotification', this._wsOnProgramAccountNotification.bind(this));\n this._rpcWebSocket.on('slotNotification', this._wsOnSlotNotification.bind(this));\n this._rpcWebSocket.on('slotsUpdatesNotification', this._wsOnSlotUpdatesNotification.bind(this));\n this._rpcWebSocket.on('signatureNotification', this._wsOnSignatureNotification.bind(this));\n this._rpcWebSocket.on('rootNotification', this._wsOnRootNotification.bind(this));\n this._rpcWebSocket.on('logsNotification', this._wsOnLogsNotification.bind(this));\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment() {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint() {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(publicKey, commitmentOrConfig) {\n /** @internal */\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get balance for ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(publicKey, commitmentOrConfig) {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig).then(x => x.value).catch(e => {\n throw new Error('failed to get balance of account ' + publicKey.toBase58() + ': ' + e);\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot) {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get block time for slot ${slot}`);\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot() {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get minimum ledger slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock() {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get first available block');\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(config) {\n let configArg = {};\n if (typeof config === 'string') {\n configArg = {\n commitment: config\n };\n } else if (config) {\n configArg = {\n ...config,\n commitment: config && config.commitment || this.commitment\n };\n } else {\n configArg = {\n commitment: this.commitment\n };\n }\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(tokenMintAddress, commitment) {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(tokenAddress, commitment) {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token account balance');\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(ownerAddress, filter, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n let _args = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({\n mint: filter.mint.toBase58()\n });\n } else {\n _args.push({\n programId: filter.programId.toBase58()\n });\n }\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(ownerAddress, filter, commitment) {\n let _args = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({\n mint: filter.mint.toBase58()\n });\n } else {\n _args.push({\n programId: filter.programId.toBase58()\n });\n }\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(config) {\n const arg = {\n ...config,\n commitment: config && config.commitment || this.commitment\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(mintAddress, commitment) {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(publicKey, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(AccountInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(publicKey, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(publicKey, commitmentOrConfig) {\n try {\n const res = await this.getAccountInfoAndContext(publicKey, commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get info about account ' + publicKey.toBase58() + ': ' + e);\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(publicKeys, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(AccountInfoResult))));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(publicKeys, commitmentOrConfig) {\n const res = await this.getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig);\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n *\n * @deprecated Deprecated since RPC v1.18; will be removed in a future version.\n */\n async getStakeActivation(publicKey, commitmentOrConfig, epoch) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, undefined /* encoding */, {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch\n });\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get Stake Activation ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(programId, configOrCommitment) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(configOrCommitment);\n const {\n encoding,\n ...configWithoutEncoding\n } = config || {};\n const args = this._buildArgs([programId.toBase58()], commitment, encoding || 'base64', configWithoutEncoding);\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res = configWithoutEncoding.withContext === true ? create(unsafeRes, jsonRpcResultAndContext(baseSchema)) : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(programId, configOrCommitment) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs([programId.toBase58()], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(unsafeRes, jsonRpcResult(array(KeyedParsedAccountInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);\n }\n return res.result;\n }\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(strategy, commitment) {\n let rawSignature;\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy;\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n let decodedSignature;\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n assert(decodedSignature.length === 64, 'signature has invalid length');\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy\n });\n }\n }\n getCancellationPromise(signal) {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n getTransactionConfirmationPromise({\n commitment,\n signature\n }) {\n let signatureSubscriptionId;\n let disposeSignatureSubscriptionStateChangeObserver;\n let done = false;\n const confirmationPromise = new Promise((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(signature, (result, context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result\n };\n resolve({\n __type: TransactionStatus.PROCESSED,\n response\n });\n }, commitment);\n const subscriptionSetupPromise = new Promise(resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver = this._onSubscriptionStateChange(signatureSubscriptionId, nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n });\n }\n });\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {\n context,\n value\n } = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root':\n {\n if (value.confirmationStatus === 'processed' || value.confirmationStatus === 'confirmed') {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value\n }\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {\n abortConfirmation,\n confirmationPromise\n };\n }\n async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {\n abortSignal,\n lastValidBlockHeight,\n signature\n }\n }) {\n let done = false;\n const expiryPromise = new Promise(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED\n });\n })();\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature\n });\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result;\n try {\n const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature\n }\n }) {\n let done = false;\n const expiryPromise = new Promise(resolve => {\n let currentNonceValue = nonceValue;\n let lastCheckedSlot = null;\n const getCurrentNonceValue = async () => {\n try {\n const {\n context,\n value: nonceAccount\n } = await this.getNonceAndContext(nonceAccountPubkey, {\n commitment,\n minContextSlot\n });\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature\n });\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result;\n try {\n const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus;\n while (true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (status.context.slot < (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {\n confirmationStatus\n } = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (confirmationStatus !== 'processed' && confirmationStatus !== 'confirmed' && confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (confirmationStatus !== 'confirmed' && confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (_ => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {\n err: signatureStatus.value.err\n }\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature\n }) {\n let timeoutId;\n const expiryPromise = new Promise(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip':\n {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n }\n timeoutId = setTimeout(() => resolve({\n __type: TransactionStatus.TIMED_OUT,\n timeoutMs\n }), timeoutMs);\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature\n });\n let result;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(signature, outcome.timeoutMs / 1000);\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes() {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(startSlot, limit) {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(signature, config) {\n const {\n context,\n value: values\n } = await this.getSignatureStatuses([signature], config);\n assert(values.length === 1);\n const value = values[0];\n return {\n context,\n value\n };\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(signatures, config) {\n const params = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction count');\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since RPC v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment) {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(addresses, epoch, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([addresses.map(pubkey => pubkey.toBase58())], commitment, undefined /* encoding */, {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch\n });\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate() {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule() {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(epochSchedule.slotsPerEpoch, epochSchedule.leaderScheduleSlotOffset, epochSchedule.warmup, epochSchedule.firstNormalEpoch, epochSchedule.firstNormalSlot);\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule() {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(dataLength, commitment) {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest('getMinimumBalanceForRentExemption', args);\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(limit) {\n const unsafeRes = await this._rpcRequest('getRecentPerformanceSamples', limit ? [limit] : []);\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent performance samples');\n }\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(blockhash, commitment) {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest('getFeeCalculatorForBlockhash', args);\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {\n context,\n value\n } = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(message, commitment) {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(config) {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest('getRecentPrioritizationFees', args);\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent prioritization fees');\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(commitment) {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(commitmentOrConfig) {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(blockhash, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs([blockhash], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to determine if the blockhash `' + blockhash + '`is valid');\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion() {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash() {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(slot, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts':\n {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none':\n {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default:\n {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {\n result\n } = res;\n return result ? {\n ...result,\n transactions: result.transactions.map(({\n transaction,\n meta,\n version\n }) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(version, transaction.message)\n },\n version\n }))\n } : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e, 'failed to get confirmed block');\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(slot, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts':\n {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none':\n {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default:\n {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e, 'failed to get block');\n }\n }\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(configOrCommitment) {\n let extra;\n let commitment;\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {\n commitment: c,\n ...rest\n } = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block production information');\n }\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(signature, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n const result = res.result;\n if (!result) return result;\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(result.version, result.transaction.message)\n }\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(signature, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(signatures, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed', config);\n return {\n methodName: 'getTransaction',\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map(unsafeRes => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(signatures, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, undefined /* encoding */, config);\n return {\n methodName: 'getTransaction',\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map(unsafeRes => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(result.version, result.transaction.message)\n }\n };\n });\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n const block = {\n ...result,\n transactions: result.transactions.map(({\n transaction,\n meta\n }) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message\n }\n };\n })\n };\n return {\n ...block,\n transactions: block.transactions.map(({\n transaction,\n meta\n }) => {\n return {\n meta,\n transaction: Transaction.populate(transaction.message, transaction.signatures)\n };\n })\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(startSlot, endSlot, commitment) {\n const args = this._buildArgsAtLeastConfirmed(endSlot !== undefined ? [startSlot, endSlot] : [startSlot], commitment);\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined, {\n transactionDetails: 'signatures',\n rewards: false\n });\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined, {\n transactionDetails: 'signatures',\n rewards: false\n });\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(signature, commitment) {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n const result = res.result;\n if (!result) return result;\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures)\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(signature, commitment) {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(signatures, commitment) {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed');\n return {\n methodName: 'getConfirmedTransaction',\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map(unsafeRes => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed transactions');\n }\n return res.result;\n });\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since RPC v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(address, startSlot, endSlot) {\n let options = {};\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n try {\n const block = await this.getConfirmedBlockSignatures(startSlot, 'finalized');\n if (block.signatures.length > 0) {\n options.until = block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before = block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(address, options);\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getSignaturesForAddress} instead.\n */\n async getConfirmedSignaturesForAddress2(address, options, commitment) {\n const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);\n const unsafeRes = await this._rpcRequest('getConfirmedSignaturesForAddress2', args);\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed signatures for address');\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(address, options, commitment) {\n const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signatures for address');\n }\n return res.result;\n }\n async getAddressLookupTable(accountKey, config) {\n const {\n context,\n value: accountInfo\n } = await this.getAccountInfoAndContext(accountKey, config);\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data)\n });\n }\n return {\n context,\n value\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(nonceAccount, commitmentOrConfig) {\n const {\n context,\n value: accountInfo\n } = await this.getAccountInfoAndContext(nonceAccount, commitmentOrConfig);\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n return {\n context,\n value\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(nonceAccount, commitmentOrConfig) {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig).then(x => x.value).catch(e => {\n throw new Error('failed to get nonce for account ' + nonceAccount.toBase58() + ': ' + e);\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(to, lamports) {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [to.toBase58(), lamports]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `airdrop to ${to.toBase58()} failed`);\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(disableCache) {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash() {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash ? cachedLatestBlockhash.blockhash : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: []\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n throw new Error(`Unable to obtain a new blockhash after ${Date.now() - startTime}ms`);\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(config) {\n const {\n commitment,\n config: configArg\n } = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get stake minimum delegation`);\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(transactionOrMessage, configOrSigners, includeAccounts) {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction = Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n const config = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n if (configOrSigners && typeof configOrSigners === 'object' && 'innerInstructions' in configOrSigners) {\n config.innerInstructions = configOrSigners.innerInstructions;\n }\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n if (!signers) break;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.simulatedSignatures.includes(signature) && !this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config = {\n encoding: 'base64',\n commitment: this.commitment\n };\n if (includeAccounts) {\n const addresses = (Array.isArray(includeAccounts) ? includeAccounts : message.nonProgramIds()).map(key => key.toBase58());\n config['accounts'] = {\n encoding: 'base64',\n addresses\n };\n }\n if (signers) {\n config.sigVerify = true;\n }\n if (configOrSigners && typeof configOrSigners === 'object' && 'innerInstructions' in configOrSigners) {\n config.innerInstructions = configOrSigners.innerInstructions;\n }\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError({\n action: 'simulate',\n signature: '',\n transactionMessage: res.error.message,\n logs: logs\n });\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(transaction, signersOrOptions, options) {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(rawTransaction, options) {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(encodedTransaction, options);\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(encodedTransaction, options) {\n const config = {\n encoding: 'base64'\n };\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment = skipPreflight === true ? 'processed' // FIXME Remove when https://github.com/anza-xyz/agave/pull/483 is deployed.\n : options && options.preflightCommitment || this.commitment;\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs = undefined;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError({\n action: skipPreflight ? 'send' : 'simulate',\n signature: '',\n transactionMessage: res.error.message,\n logs: logs\n });\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration = (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(this._subscriptionsByHash).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending'\n });\n });\n }\n\n /**\n * @internal\n */\n _setSubscription(hash, nextSubscription) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n _onSubscriptionStateChange(clientSubscriptionId, callback) {\n const hash = this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash] ||= new Set();\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(`Error when closing socket connection: ${err.message}`);\n }\n }\n }, 500);\n }\n return;\n }\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[subscription.serverSubscriptionId];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {\n args,\n method\n } = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing'\n });\n const serverSubscriptionId = await this._rpcWebSocket.call(method, args);\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed'\n });\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${method} error for argument`, args, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending'\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {\n serverSubscriptionId,\n unsubscribeMethod\n } = subscription;\n if (this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(serverSubscriptionId);\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing'\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing'\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [serverSubscriptionId]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed'\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed'\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n }\n }));\n }\n\n /**\n * @internal\n */\n _handleServerNotification(serverSubscriptionId, callbackArgs) {\n const callbacks = this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs);\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, AccountNotificationResult);\n this._handleServerNotification(subscription, [result.value, result.context]);\n }\n\n /**\n * @internal\n */\n _makeSubscription(subscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args) {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify$1([subscriptionConfig.method, args]);\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending'\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(subscription !== undefined, `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`);\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n\n /** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n onAccountChange(publicKey, callback, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment || this._commitment || 'finalized',\n // Apply connection/server default.\n 'base64', config);\n return this._makeSubscription({\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe'\n }, args);\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeAccountChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'account change');\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, ProgramAccountNotificationResult);\n this._handleServerNotification(subscription, [{\n accountId: result.value.pubkey,\n accountInfo: result.value.account\n }, result.context]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n\n /** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',\n // Apply connection/server default.\n 'base64' /* encoding */, config ? config : maybeFilters ? {\n filters: maybeFilters\n } : undefined /* extra */);\n return this._makeSubscription({\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe'\n }, args);\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeProgramAccountChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'program account change');\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(filter, callback, commitment) {\n const args = this._buildArgs([typeof filter === 'object' ? {\n mentions: [filter.toString()]\n } : filter], commitment || this._commitment || 'finalized' // Apply connection/server default.\n );\n return this._makeSubscription({\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe'\n }, args);\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param clientSubscriptionId client subscription id to deregister.\n */\n async removeOnLogsListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [result.value, result.context]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback) {\n return this._makeSubscription({\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe'\n }, [] /* args */);\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'slot change');\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, SlotUpdateNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback) {\n return this._makeSubscription({\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe'\n }, [] /* args */);\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotUpdateListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'slot update');\n }\n\n /**\n * @internal\n */\n\n async _unsubscribeClientSubscription(clientSubscriptionId, subscriptionName) {\n const dispose = this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];\n if (dispose) {\n await dispose();\n } else {\n console.warn('Ignored unsubscribe request because an active subscription with id ' + `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` + 'could not be found.');\n }\n }\n _buildArgs(args, override, encoding, extra) {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(args, override, encoding, extra) {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error('Using Connection with default commitment: `' + this._commitment + '`, but method requires at least `confirmed`');\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, SignatureNotificationResult);\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(subscription, result.value === 'receivedSignature' ? [{\n type: 'received'\n }, result.context] : [{\n type: 'status',\n result: result.value\n }, result.context]);\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(signature, callback, commitment) {\n const args = this._buildArgs([signature], commitment || this._commitment || 'finalized' // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription({\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe'\n }, args);\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(signature, callback, options) {\n const {\n commitment,\n ...extra\n } = {\n ...options,\n commitment: options && options.commitment || this._commitment || 'finalized' // Apply connection/server default.\n };\n const args = this._buildArgs([signature], commitment, undefined /* encoding */, extra);\n const clientSubscriptionId = this._makeSubscription({\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe'\n }, args);\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSignatureListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'signature result');\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback) {\n return this._makeSubscription({\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe'\n }, [] /* args */);\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeRootChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'root change');\n }\n}\n\n/**\n * Keypair signer interface\n */\n\n/**\n * An account keypair used for signing transactions.\n */\nclass Keypair {\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair) {\n this._keypair = void 0;\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate() {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(secretKey, options) {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({\n publicKey,\n secretKey\n });\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed) {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({\n publicKey,\n secretKey\n });\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey() {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey() {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nconst LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), u64('recentSlot'), BufferLayout.u8('bumpSeed')])\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32('instruction')])\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), u64(), BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u32(), -8), 'addresses')])\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32('instruction')])\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32('instruction')])\n }\n});\nclass AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [layoutType, layout] of Object.entries(LOOKUP_TABLE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == index) {\n type = layoutType;\n break;\n }\n }\n if (!type) {\n throw new Error('Invalid Instruction. Should be a LookupTable Instruction');\n }\n return type;\n }\n static decodeCreateLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n const {\n recentSlot\n } = decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable, instruction.data);\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot)\n };\n }\n static decodeExtendLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(`invalid instruction; found ${instruction.keys.length} keys, expected at least 2`);\n }\n const {\n addresses\n } = decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable, instruction.data);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer))\n };\n }\n static decodeCloseLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey\n };\n }\n static decodeFreezeLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey\n };\n }\n static decodeDeactivateLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error('invalid instruction; programId is not AddressLookupTable Program');\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\nclass AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n static createLookupTable(params) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), toBufferLE(BigInt(params.recentSlot), 8)], this.programId);\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed\n });\n const keys = [{\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n }];\n return [new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n }), lookupTableAddress];\n }\n static freezeLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n static extendLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes())\n });\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n if (params.payer) {\n keys.push({\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n static deactivateLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n static closeLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n}\nAddressLookupTableProgram.programId = new PublicKey('AddressLookupTab1e1111111111111111111111111');\n\n/**\n * Compute Budget Instruction class\n */\nclass ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a ComputeBudgetInstruction');\n }\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n units,\n additionalFee\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits, instruction.data);\n return {\n units,\n additionalFee\n };\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n bytes\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame, instruction.data);\n return {\n bytes\n };\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n units\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit, instruction.data);\n return {\n units\n };\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n microLamports\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice, instruction.data);\n return {\n microLamports\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error('invalid instruction; programId is not ComputeBudgetProgram');\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\n\n/**\n * Request units instruction params\n */\n\n/**\n * Request heap frame instruction params\n */\n\n/**\n * Set compute unit limit instruction params\n */\n\n/**\n * Set compute unit price instruction params\n */\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nconst COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u8('instruction'), BufferLayout.u32('units'), BufferLayout.u32('additionalFee')])\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')])\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u8('instruction'), BufferLayout.u32('units')])\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u8('instruction'), u64('microLamports')])\n }\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nclass ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static requestHeapFrame(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitLimit(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitPrice(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports)\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n}\nComputeBudgetProgram.programId = new PublicKey('ComputeBudget111111111111111111111111111111');\n\nconst PRIVATE_KEY_BYTES$1 = 64;\nconst PUBLIC_KEY_BYTES$1 = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8('numSignatures'), BufferLayout.u8('padding'), BufferLayout.u16('signatureOffset'), BufferLayout.u16('signatureInstructionIndex'), BufferLayout.u16('publicKeyOffset'), BufferLayout.u16('publicKeyInstructionIndex'), BufferLayout.u16('messageDataOffset'), BufferLayout.u16('messageDataSize'), BufferLayout.u16('messageInstructionIndex')]);\nclass Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey,\n message,\n signature,\n instructionIndex\n } = params;\n assert(publicKey.length === PUBLIC_KEY_BYTES$1, `Public Key must be ${PUBLIC_KEY_BYTES$1} bytes but received ${publicKey.length} bytes`);\n assert(signature.length === SIGNATURE_BYTES, `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`);\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n const index = instructionIndex == null ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n ED25519_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index\n }, instructionData);\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey,\n message,\n instructionIndex\n } = params;\n assert(privateKey.length === PRIVATE_KEY_BYTES$1, `Private key must be ${PRIVATE_KEY_BYTES$1} bytes but received ${privateKey.length} bytes`);\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\nEd25519Program.programId = new PublicKey('Ed25519SigVerify111111111111111111111111111');\n\nconst ecdsaSign = (msgHash, privKey) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery];\n};\nsecp256k1.utils.isValidPrivateKey;\nconst publicKeyCreate = secp256k1.getPublicKey;\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8('numSignatures'), BufferLayout.u16('signatureOffset'), BufferLayout.u8('signatureInstructionIndex'), BufferLayout.u16('ethAddressOffset'), BufferLayout.u8('ethAddressInstructionIndex'), BufferLayout.u16('messageDataOffset'), BufferLayout.u16('messageDataSize'), BufferLayout.u8('messageInstructionIndex'), BufferLayout.blob(20, 'ethAddress'), BufferLayout.blob(64, 'signature'), BufferLayout.u8('recoveryId')]);\nclass Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(publicKey) {\n assert(publicKey.length === PUBLIC_KEY_BYTES, `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`);\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(-ETHEREUM_ADDRESS_BYTES);\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex\n } = params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(params) {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0\n } = params;\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n assert(ethAddress.length === ETHEREUM_ADDRESS_BYTES, `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`);\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n const instructionData = Buffer.alloc(SECP256K1_INSTRUCTION_LAYOUT.span + message.length);\n SECP256K1_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId\n }, instructionData);\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey: pkey,\n message,\n instructionIndex\n } = params;\n assert(pkey.length === PRIVATE_KEY_BYTES, `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`);\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(privateKey, false /* isCompressed */).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\nSecp256k1Program.programId = new PublicKey('KeccakSecp256k11111111111111111111111111111');\n\nvar _Lockup;\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nconst STAKE_CONFIG_ID = new PublicKey('StakeConfig11111111111111111111111111111111');\n\n/**\n * Stake account authority info\n */\nclass Authorized {\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker, withdrawer) {\n /** stake authority */\n this.staker = void 0;\n /** withdraw authority */\n this.withdrawer = void 0;\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n/**\n * Stake account lockup info\n */\nclass Lockup {\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp, epoch, custodian) {\n /** Unix timestamp of lockup expiration */\n this.unixTimestamp = void 0;\n /** Epoch of lockup expiration */\n this.epoch = void 0;\n /** Lockup custodian authority */\n this.custodian = void 0;\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n}\n_Lockup = Lockup;\nLockup.default = new _Lockup(0, 0, PublicKey.default);\n/**\n * Create stake account transaction params\n */\n/**\n * Create stake account with seed transaction params\n */\n/**\n * Initialize stake instruction params\n */\n/**\n * Delegate stake instruction params\n */\n/**\n * Authorize stake instruction params\n */\n/**\n * Authorize stake instruction params using a derived key\n */\n/**\n * Split stake instruction params\n */\n/**\n * Split with seed transaction params\n */\n/**\n * Withdraw stake instruction params\n */\n/**\n * Deactivate stake instruction params\n */\n/**\n * Merge stake instruction params\n */\n/**\n * Stake Instruction class\n */\nclass StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n authorized,\n lockup\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Initialize, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(new PublicKey(authorized.staker), new PublicKey(authorized.withdrawer)),\n lockup: new Lockup(lockup.unixTimestamp, lockup.epoch, new PublicKey(lockup.custodian))\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n newAuthorized,\n stakeAuthorizationType\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Authorize, instruction.data);\n const o = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType\n }\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed, instruction.data);\n const o = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType\n }\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Split, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {\n lamports\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Withdraw, instruction.data);\n const o = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nconst STAKE_INSTRUCTION_LAYOUTS = Object.freeze({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), authorized(), lockup()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), publicKey('newAuthorized'), BufferLayout.u32('stakeAuthorizationType')])\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32('instruction')])\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')])\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')])\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([BufferLayout.u32('instruction')])\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([BufferLayout.u32('instruction')])\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), publicKey('newAuthorized'), BufferLayout.u32('stakeAuthorizationType'), rustString('authoritySeed'), publicKey('authorityOwner')])\n }\n});\n\n/**\n * Stake authorization type\n */\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nconst StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nclass StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params) {\n const {\n stakePubkey,\n authorized,\n lockup: maybeLockup\n } = params;\n const lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer())\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer())\n }\n });\n const instructionData = {\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized,\n lockup\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized,\n lockup\n }));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized,\n lockup\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized,\n lockup\n }));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n votePubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: votePubkey,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: STAKE_CONFIG_ID,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params) {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer())\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorityBase,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {\n lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: splitStakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params,\n // Compute the cost of allocating the new stake account in lamports\n rentExemptReserve) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: rentExemptReserve,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params,\n // If this stake account is new, compute the cost of allocating it in lamports\n rentExemptReserve) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports\n } = params;\n const transaction = new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId\n }));\n if (rentExemptReserve && rentExemptReserve > 0) {\n transaction.add(SystemProgram.transfer({\n fromPubkey: params.authorizedPubkey,\n toPubkey: splitStakePubkey,\n lamports: rentExemptReserve\n }));\n }\n return transaction.add(this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n }));\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params) {\n const {\n stakePubkey,\n sourceStakePubKey,\n authorizedPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: sourceStakePubKey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n toPubkey,\n lamports,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {\n lamports\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params) {\n const {\n stakePubkey,\n authorizedPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n}\nStakeProgram.programId = new PublicKey('Stake11111111111111111111111111111111111111');\n/**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeStateV2::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeStateV2.html\n */\nStakeProgram.space = 200;\n\n/**\n * Vote account info\n */\nclass VoteInit {\n /** [0, 100] */\n\n constructor(nodePubkey, authorizedVoter, authorizedWithdrawer, commission) {\n this.nodePubkey = void 0;\n this.authorizedVoter = void 0;\n this.authorizedWithdrawer = void 0;\n this.commission = void 0;\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\n\n/**\n * InitializeAccount instruction params\n */\n\n/**\n * Authorize instruction params\n */\n\n/**\n * AuthorizeWithSeed instruction params\n */\n\n/**\n * Withdraw from vote account transaction params\n */\n\n/**\n * Update validator identity (node pubkey) vote account instruction params.\n */\n\n/**\n * Vote Instruction class\n */\nclass VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n const {\n voteInit\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.InitializeAccount, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(new PublicKey(voteInit.nodePubkey), new PublicKey(voteInit.authorizedVoter), new PublicKey(voteInit.authorizedWithdrawer), voteInit.commission)\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n newAuthorized,\n voteAuthorizationType\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.Authorize, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType\n }\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType\n }\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed, instruction.data);\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(currentAuthorityDerivedKeyOwnerPubkey),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType\n },\n votePubkey: instruction.keys[0].pubkey\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.Withdraw, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\n\n/** @internal */\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), voteInit()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), publicKey('newAuthorized'), BufferLayout.u32('voteAuthorizationType')])\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')])\n },\n UpdateValidatorIdentity: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32('instruction')])\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([BufferLayout.u32('instruction'), voteAuthorizeWithSeedArgs()])\n }\n});\n\n/**\n * VoteAuthorize type\n */\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nconst VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nclass VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(params) {\n const {\n votePubkey,\n nodePubkey,\n voteInit\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(voteInit.authorizedWithdrawer.toBuffer()),\n commission: voteInit.commission\n }\n });\n const instructionData = {\n keys: [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit\n }));\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params) {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params) {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(currentAuthorityDerivedKeyOwnerPubkey.toBuffer()),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n }\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n lamports,\n toPubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {\n lamports\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(params, currentVoteAccountBalance, rentExemptMinimum) {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error('Withdraw will leave vote account with insufficient funds.');\n }\n return VoteProgram.withdraw(params);\n }\n\n /**\n * Generate a transaction to update the validator identity (node pubkey) of a Vote account.\n */\n static updateValidatorIdentity(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n nodePubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.UpdateValidatorIdentity;\n const data = encodeData(type);\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n}\nVoteProgram.programId = new PublicKey('Vote111111111111111111111111111111111111111');\n/**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\nVoteProgram.space = 3762;\n\nconst VALIDATOR_INFO_KEY = new PublicKey('Va1idator1nfo111111111111111111111111111111');\n\n/**\n * @internal\n */\n\n/**\n * Info used to identity validators.\n */\n\nconst InfoString = type({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n iconUrl: optional(string()),\n keybaseUsername: optional(string())\n});\n\n/**\n * ValidatorInfo class\n */\nclass ValidatorInfo {\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key, info) {\n /**\n * validator public key\n */\n this.key = void 0;\n /**\n * validator information\n */\n this.info = void 0;\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(buffer) {\n let byteArray = [...buffer];\n const configKeyCount = decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n const configKeys = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({\n publicKey,\n isSigner\n });\n }\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo = rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo);\n assert$1(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n return null;\n }\n}\n\nconst VOTE_PROGRAM_ID = new PublicKey('Vote111111111111111111111111111111111111111');\n\n/**\n * History of how many credits earned by the end of each epoch\n */\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([publicKey('nodePubkey'), publicKey('authorizedWithdrawer'), BufferLayout.u8('commission'), BufferLayout.nu64(),\n// votes.length\nBufferLayout.seq(BufferLayout.struct([BufferLayout.nu64('slot'), BufferLayout.u32('confirmationCount')]), BufferLayout.offset(BufferLayout.u32(), -8), 'votes'), BufferLayout.u8('rootSlotValid'), BufferLayout.nu64('rootSlot'), BufferLayout.nu64(),\n// authorizedVoters.length\nBufferLayout.seq(BufferLayout.struct([BufferLayout.nu64('epoch'), publicKey('authorizedVoter')]), BufferLayout.offset(BufferLayout.u32(), -8), 'authorizedVoters'), BufferLayout.struct([BufferLayout.seq(BufferLayout.struct([publicKey('authorizedPubkey'), BufferLayout.nu64('epochOfLastAuthorizedSwitch'), BufferLayout.nu64('targetEpoch')]), 32, 'buf'), BufferLayout.nu64('idx'), BufferLayout.u8('isEmpty')], 'priorVoters'), BufferLayout.nu64(),\n// epochCredits.length\nBufferLayout.seq(BufferLayout.struct([BufferLayout.nu64('epoch'), BufferLayout.nu64('credits'), BufferLayout.nu64('prevCredits')]), BufferLayout.offset(BufferLayout.u32(), -8), 'epochCredits'), BufferLayout.struct([BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')], 'lastTimestamp')]);\n/**\n * VoteAccount class\n */\nclass VoteAccount {\n /**\n * @internal\n */\n constructor(args) {\n this.nodePubkey = void 0;\n this.authorizedWithdrawer = void 0;\n this.commission = void 0;\n this.rootSlot = void 0;\n this.votes = void 0;\n this.authorizedVoters = void 0;\n this.priorVoters = void 0;\n this.epochCredits = void 0;\n this.lastTimestamp = void 0;\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(buffer) {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n let rootSlot = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp\n });\n }\n}\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch\n}) {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter)\n };\n}\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch\n}) {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch\n };\n}\nfunction getPriorVoters({\n buf,\n idx,\n isEmpty\n}) {\n if (isEmpty) {\n return [];\n }\n return [...buf.slice(idx + 1).map(parsePriorVoters), ...buf.slice(0, idx).map(parsePriorVoters)];\n}\n\nconst endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/'\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/'\n }\n};\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nfunction clusterApiUrl(cluster, tls) {\n const key = tls === false ? 'http' : 'https';\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\n\n// eslint-disable-next-line no-redeclare\nasync function sendAndConfirmRawTransaction(connection, rawTransaction, confirmationStrategyOrConfirmOptions, maybeConfirmOptions) {\n let confirmationStrategy;\n let options;\n if (confirmationStrategyOrConfirmOptions && Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions, 'lastValidBlockHeight')) {\n confirmationStrategy = confirmationStrategyOrConfirmOptions;\n options = maybeConfirmOptions;\n } else if (confirmationStrategyOrConfirmOptions && Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions, 'nonceValue')) {\n confirmationStrategy = confirmationStrategyOrConfirmOptions;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot\n };\n const signature = await connection.sendRawTransaction(rawTransaction, sendOptions);\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy ? connection.confirmTransaction(confirmationStrategy, commitment) : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: sendOptions?.skipPreflight ? 'send' : 'simulate',\n signature: signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Raw transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n}\n\n/**\n * There are 1-billion lamports in one SOL\n */\nconst LAMPORTS_PER_SOL = 1000000000;\n\nexport { Account, AddressLookupTableAccount, AddressLookupTableInstruction, AddressLookupTableProgram, Authorized, BLOCKHASH_CACHE_TIMEOUT_MS, BPF_LOADER_DEPRECATED_PROGRAM_ID, BPF_LOADER_PROGRAM_ID, BpfLoader, COMPUTE_BUDGET_INSTRUCTION_LAYOUTS, ComputeBudgetInstruction, ComputeBudgetProgram, Connection, Ed25519Program, Enum, EpochSchedule, FeeCalculatorLayout, Keypair, LAMPORTS_PER_SOL, LOOKUP_TABLE_INSTRUCTION_LAYOUTS, Loader, Lockup, MAX_SEED_LENGTH, Message, MessageAccountKeys, MessageV0, NONCE_ACCOUNT_LENGTH, NonceAccount, PACKET_DATA_SIZE, PUBLIC_KEY_LENGTH, PublicKey, SIGNATURE_LENGTH_IN_BYTES, SOLANA_SCHEMA, STAKE_CONFIG_ID, STAKE_INSTRUCTION_LAYOUTS, SYSTEM_INSTRUCTION_LAYOUTS, SYSVAR_CLOCK_PUBKEY, SYSVAR_EPOCH_SCHEDULE_PUBKEY, SYSVAR_INSTRUCTIONS_PUBKEY, SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY, SYSVAR_REWARDS_PUBKEY, SYSVAR_SLOT_HASHES_PUBKEY, SYSVAR_SLOT_HISTORY_PUBKEY, SYSVAR_STAKE_HISTORY_PUBKEY, Secp256k1Program, SendTransactionError, SolanaJSONRPCError, SolanaJSONRPCErrorCode, StakeAuthorizationLayout, StakeInstruction, StakeProgram, Struct, SystemInstruction, SystemProgram, Transaction, TransactionExpiredBlockheightExceededError, TransactionExpiredNonceInvalidError, TransactionExpiredTimeoutError, TransactionInstruction, TransactionMessage, TransactionStatus, VALIDATOR_INFO_KEY, VERSION_PREFIX_MASK, VOTE_PROGRAM_ID, ValidatorInfo, VersionedMessage, VersionedTransaction, VoteAccount, VoteAuthorizationLayout, VoteInit, VoteInstruction, VoteProgram, clusterApiUrl, sendAndConfirmRawTransaction, sendAndConfirmTransaction };\n//# sourceMappingURL=index.browser.esm.js.map\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MAX_U256 = exports.MAX_U64 = exports.Rounding = exports.TEN = exports.ONE = exports.ZERO = void 0;\nconst tslib_1 = require(\"tslib\");\nconst jsbi_1 = tslib_1.__importDefault(require(\"jsbi\"));\n/**\n * Zero bigint.\n */\nexports.ZERO = jsbi_1.default.BigInt(0);\n/**\n * One bigint.\n */\nexports.ONE = jsbi_1.default.BigInt(1);\n/**\n * 10 bigint.\n */\nexports.TEN = jsbi_1.default.BigInt(10);\nvar Rounding;\n(function (Rounding) {\n Rounding[Rounding[\"ROUND_DOWN\"] = 0] = \"ROUND_DOWN\";\n Rounding[Rounding[\"ROUND_HALF_UP\"] = 1] = \"ROUND_HALF_UP\";\n Rounding[Rounding[\"ROUND_UP\"] = 2] = \"ROUND_UP\";\n})(Rounding = exports.Rounding || (exports.Rounding = {}));\nexports.MAX_U64 = jsbi_1.default.BigInt(\"0xffffffffffffffff\");\nexports.MAX_U256 = jsbi_1.default.BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/*\n * toFormat v2.0.0\n * Adds a toFormat instance method to big.js or decimal.js\n * Copyright (c) 2017 Michael Mclaughlin\n * MIT Licence\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatBig = exports.formatDecimal = exports.DEFAULT_DISPLAY_NUMBER_FORMAT = exports.DEFAULT_NUMBER_FORMAT = exports.toSignificantRounding = void 0;\nconst tslib_1 = require(\"tslib\");\nconst big_js_1 = tslib_1.__importDefault(require(\"big.js\"));\nconst decimal_js_light_1 = tslib_1.__importDefault(require(\"decimal.js-light\"));\nconst tiny_invariant_1 = tslib_1.__importDefault(require(\"tiny-invariant\"));\nconst constants_js_1 = require(\"./constants.js\");\nexports.toSignificantRounding = {\n [constants_js_1.Rounding.ROUND_DOWN]: decimal_js_light_1.default.ROUND_DOWN,\n [constants_js_1.Rounding.ROUND_HALF_UP]: decimal_js_light_1.default.ROUND_HALF_UP,\n [constants_js_1.Rounding.ROUND_UP]: decimal_js_light_1.default.ROUND_UP,\n};\nconst toFixedRounding = {\n [constants_js_1.Rounding.ROUND_DOWN]: big_js_1.default.roundDown,\n [constants_js_1.Rounding.ROUND_HALF_UP]: big_js_1.default.roundHalfUp,\n [constants_js_1.Rounding.ROUND_UP]: big_js_1.default.roundUp,\n};\n/**\n * Default number format. (no grouping)\n */\nexports.DEFAULT_NUMBER_FORMAT = {\n decimalSeparator: \".\",\n groupSeparator: \"\",\n groupSize: 3,\n rounding: constants_js_1.Rounding.ROUND_DOWN,\n};\n/**\n * Default number format display.\n */\nexports.DEFAULT_DISPLAY_NUMBER_FORMAT = {\n ...exports.DEFAULT_NUMBER_FORMAT,\n groupSeparator: \",\",\n};\nconst formatNum = (num, isNegative, roundingMethod, decimalPlaces, { decimalSeparator = exports.DEFAULT_NUMBER_FORMAT.decimalSeparator, groupSeparator = exports.DEFAULT_NUMBER_FORMAT.groupSeparator, groupSize = exports.DEFAULT_NUMBER_FORMAT.groupSize, rounding = exports.DEFAULT_NUMBER_FORMAT.rounding, } = exports.DEFAULT_NUMBER_FORMAT) => {\n const decInternal = num;\n if (!decInternal.e && decInternal.e !== 0) {\n return num.toString(); // Infinity/NaN\n }\n const [integerPart, fractionPart] = num\n .toFixed(decimalPlaces, roundingMethod === \"fixed\"\n ? toFixedRounding[rounding]\n : exports.toSignificantRounding[rounding])\n .split(\".\");\n (0, tiny_invariant_1.default)(integerPart);\n let displayIntegerPart = integerPart;\n if (groupSeparator) {\n // integer digits\n const intd = isNegative ? integerPart.slice(1) : integerPart;\n // number of integer digits\n const nd = intd.length;\n if (groupSize > 0 && nd > 0) {\n let i = nd % groupSize || groupSize;\n displayIntegerPart = intd.slice(0, i);\n for (; i < nd; i += groupSize) {\n displayIntegerPart += groupSeparator + intd.slice(i, i + groupSize);\n }\n if (isNegative) {\n displayIntegerPart = \"-\" + displayIntegerPart;\n }\n }\n }\n if (fractionPart) {\n return displayIntegerPart + (decimalSeparator !== null && decimalSeparator !== void 0 ? decimalSeparator : \"\") + fractionPart;\n }\n else {\n return displayIntegerPart;\n }\n};\n/*\n * Returns a string representing the value of this big number in fixed-point notation to `dp`\n * decimal places using rounding mode `rm`, and formatted according to the properties of the\n * `fmt`, `this.format` and `this.constructor.format` objects, in that order of precedence.\n *\n * Example:\n *\n * x = new Decimal('123456789.987654321')\n *\n * // Add a format object to the constructor...\n * Decimal.format = {\n * decimalSeparator: '.',\n * groupSeparator: ',',\n * groupSize: 3,\n * secondaryGroupSize: 0,\n * fractionGroupSeparator: '', // '\\xA0' non-breaking space\n * fractionGroupSize : 0\n * }\n *\n * x.toFormat(); // 123,456,789.987654321\n * x.toFormat(2, 1); // 123,456,789.98\n *\n * // And/or add a format object to the big number itself...\n * x.format = {\n * decimalSeparator: ',',\n * groupSeparator: '',\n * }\n *\n * x.toFormat(); // 123456789,987654321\n *\n * format = {\n * decimalSeparator: '.',\n * groupSeparator: ' ',\n * groupSize: 3,\n * fractionGroupSeparator: ' ', // '\\xA0' non-breaking space\n * fractionGroupSize : 5\n * }\n * // And/or pass a format object to the method call.\n * x.toFormat(format); // 123 456 789.98765 4321\n * x.toFormat(4, format); // 123 456 789.9877\n * x.toFormat(2, 1, format); // 123 456 789.98\n *\n * [dp] {number} Decimal places. Integer.\n * [rm] {number} Rounding mode. Integer, 0 to 8. (Ignored if using big.js.)\n * [fmt] {Object} A format object.\n *\n */\nconst formatDecimal = (dec, decimalPlaces, fmt = exports.DEFAULT_NUMBER_FORMAT) => {\n return formatNum(dec, dec.isNegative(), \"significant\", decimalPlaces, fmt);\n};\nexports.formatDecimal = formatDecimal;\n/*\n * Returns a string representing the value of this big number in fixed-point notation to `dp`\n * decimal places using rounding mode `rm`, and formatted according to the properties of the\n * `fmt`, `this.format` and `this.constructor.format` objects, in that order of precedence.\n *\n * Example:\n *\n * x = new Decimal('123456789.987654321')\n *\n * // Add a format object to the constructor...\n * Decimal.format = {\n * decimalSeparator: '.',\n * groupSeparator: ',',\n * groupSize: 3,\n * secondaryGroupSize: 0,\n * fractionGroupSeparator: '', // '\\xA0' non-breaking space\n * fractionGroupSize : 0\n * }\n *\n * x.toFormat(); // 123,456,789.987654321\n * x.toFormat(2, 1); // 123,456,789.98\n *\n * // And/or add a format object to the big number itself...\n * x.format = {\n * decimalSeparator: ',',\n * groupSeparator: '',\n * }\n *\n * x.toFormat(); // 123456789,987654321\n *\n * format = {\n * decimalSeparator: '.',\n * groupSeparator: ' ',\n * groupSize: 3,\n * fractionGroupSeparator: ' ', // '\\xA0' non-breaking space\n * fractionGroupSize : 5\n * }\n * // And/or pass a format object to the method call.\n * x.toFormat(format); // 123 456 789.98765 4321\n * x.toFormat(4, format); // 123 456 789.9877\n * x.toFormat(2, 1, format); // 123 456 789.98\n *\n * [dp] {number} Decimal places. Integer.\n * [rm] {number} Rounding mode. Integer, 0 to 8. (Ignored if using big.js.)\n * [fmt] {Object} A format object.\n *\n */\nconst formatBig = (big, decimalPlaces, fmt = exports.DEFAULT_NUMBER_FORMAT) => {\n return formatNum(big, big.s === -1, \"fixed\", decimalPlaces, fmt);\n};\nexports.formatBig = formatBig;\n//# sourceMappingURL=format.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Fraction = exports.fractionFromObject = void 0;\nconst tslib_1 = require(\"tslib\");\nconst big_js_1 = tslib_1.__importDefault(require(\"big.js\"));\nconst decimal_js_light_1 = tslib_1.__importDefault(require(\"decimal.js-light\"));\nconst jsbi_1 = tslib_1.__importDefault(require(\"jsbi\"));\nconst tiny_invariant_1 = tslib_1.__importDefault(require(\"tiny-invariant\"));\nconst constants_js_1 = require(\"./constants.js\");\nconst format_js_1 = require(\"./format.js\");\nconst utils_js_1 = require(\"./utils.js\");\n/**\n * Attempts to parse a {@link Fraction}.\n * @param fractionish Fraction or BigintIsh.\n * @returns\n */\nconst tryParseFraction = (fractionish) => {\n if (Fraction.isFraction(fractionish)) {\n return fractionish;\n }\n try {\n return new Fraction((0, utils_js_1.parseBigintIsh)(fractionish));\n }\n catch (e) {\n if (e instanceof Error) {\n throw new Error(`Could not parse fraction: ${e.message}`);\n }\n throw new Error(`Could not parse fraction`);\n }\n};\n/**\n * Creates a {@link Fraction} from a {@link FractionObject}.\n * @param param0\n * @returns\n */\nconst fractionFromObject = ({ numeratorStr, denominatorStr, }) => {\n return new Fraction(numeratorStr, denominatorStr);\n};\nexports.fractionFromObject = fractionFromObject;\n/**\n * Number with an integer numerator and denominator.\n */\nclass Fraction {\n constructor(numerator, denominator = constants_js_1.ONE) {\n this.isFraction = true;\n this.numerator = (0, utils_js_1.parseBigintIsh)(numerator);\n this.denominator = (0, utils_js_1.parseBigintIsh)(denominator);\n }\n get numeratorStr() {\n return this.numerator.toString();\n }\n get denominatorStr() {\n return this.numerator.toString();\n }\n /**\n * Ensures the other object is of this {@link Fraction} type.\n * @param other\n * @returns\n */\n static fromObject(other) {\n if (other instanceof Fraction) {\n return other;\n }\n return (0, exports.fractionFromObject)(other);\n }\n /**\n * JSON representation of the {@link Fraction}.\n */\n toJSON() {\n return {\n isFraction: true,\n numeratorStr: this.numerator.toString(),\n denominatorStr: this.denominator.toString(),\n };\n }\n /**\n * Returns true if the other object is a {@link Fraction}.\n *\n * @param other\n * @returns\n */\n static isFraction(other) {\n return (typeof other === \"object\" &&\n other !== null &&\n \"numerator\" in other &&\n \"denominator\" in other);\n }\n /**\n * Compares this {@link Fraction} to the other {@link Fraction}.\n */\n compareTo(other) {\n if (this.equalTo(other)) {\n return 0;\n }\n return this.greaterThan(other) ? 1 : -1;\n }\n /**\n * Parses a {@link Fraction} from a float.\n * @param number Number to parse.\n * @param decimals Number of decimals of precision. (default 10)\n * @returns Fraction\n */\n static fromNumber(number, decimals = 10) {\n const multiplier = Math.pow(10, decimals);\n return new Fraction(Math.floor(number * multiplier), multiplier);\n }\n /**\n * Performs floor division.\n */\n get quotient() {\n return jsbi_1.default.divide(this.numerator, this.denominator);\n }\n /**\n * Remainder after floor division.\n */\n get remainder() {\n return new Fraction(jsbi_1.default.remainder(this.numerator, this.denominator), this.denominator);\n }\n /**\n * Swaps the numerator and denominator of the {@link Fraction}.\n * @returns\n */\n invert() {\n return new Fraction(this.denominator, this.numerator);\n }\n add(other) {\n const otherParsed = tryParseFraction(other);\n if (jsbi_1.default.equal(this.denominator, otherParsed.denominator)) {\n return new Fraction(jsbi_1.default.add(this.numerator, otherParsed.numerator), this.denominator);\n }\n return new Fraction(jsbi_1.default.add(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(otherParsed.numerator, this.denominator)), jsbi_1.default.multiply(this.denominator, otherParsed.denominator));\n }\n subtract(other) {\n const otherParsed = tryParseFraction(other);\n if (jsbi_1.default.equal(this.denominator, otherParsed.denominator)) {\n return new Fraction(jsbi_1.default.subtract(this.numerator, otherParsed.numerator), this.denominator);\n }\n return new Fraction(jsbi_1.default.subtract(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(otherParsed.numerator, this.denominator)), jsbi_1.default.multiply(this.denominator, otherParsed.denominator));\n }\n lessThan(other) {\n const otherParsed = tryParseFraction(other);\n return jsbi_1.default.lessThan(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(otherParsed.numerator, this.denominator));\n }\n equalTo(other) {\n const otherParsed = tryParseFraction(other);\n return jsbi_1.default.equal(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(otherParsed.numerator, this.denominator));\n }\n greaterThan(other) {\n const otherParsed = tryParseFraction(other);\n return jsbi_1.default.greaterThan(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(otherParsed.numerator, this.denominator));\n }\n multiply(other) {\n const otherParsed = tryParseFraction(other);\n return new Fraction(jsbi_1.default.multiply(this.numerator, otherParsed.numerator), jsbi_1.default.multiply(this.denominator, otherParsed.denominator));\n }\n /**\n * Divides this {@link Fraction} by another {@link Fraction}.\n */\n divide(other) {\n const otherParsed = tryParseFraction(other);\n return new Fraction(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(this.denominator, otherParsed.numerator));\n }\n /**\n * Converts this {@link Fraction} to a string with the specified significant digits.\n * @param significantDigits\n * @param format\n * @param rounding\n * @returns\n */\n toSignificant(significantDigits, format = { groupSeparator: \"\" }, rounding = constants_js_1.Rounding.ROUND_HALF_UP) {\n (0, tiny_invariant_1.default)(Number.isInteger(significantDigits), `${significantDigits} is not an integer.`);\n (0, tiny_invariant_1.default)(significantDigits > 0, `${significantDigits} is not positive.`);\n decimal_js_light_1.default.set({\n precision: significantDigits + 1,\n rounding: format_js_1.toSignificantRounding[rounding],\n });\n const quotient = new decimal_js_light_1.default(this.numerator.toString())\n .div(this.denominator.toString())\n .toSignificantDigits(significantDigits);\n return (0, format_js_1.formatDecimal)(quotient, quotient.decimalPlaces(), {\n ...format,\n rounding,\n });\n }\n toFixed(decimalPlaces, format = { groupSeparator: \"\" }, rounding = constants_js_1.Rounding.ROUND_HALF_UP) {\n (0, tiny_invariant_1.default)(Number.isInteger(decimalPlaces), `${decimalPlaces} is not an integer.`);\n (0, tiny_invariant_1.default)(decimalPlaces >= 0, `${decimalPlaces} is negative.`);\n return (0, format_js_1.formatBig)(new big_js_1.default(this.numerator.toString()).div(this.denominator.toString()), decimalPlaces, { ...format, rounding });\n }\n /**\n * Helper method for converting any super class back to a fraction\n */\n get asFraction() {\n return new Fraction(this.numerator, this.denominator);\n }\n /**\n * Gets the value of this {@link Fraction} as a number.\n */\n get asNumber() {\n if (jsbi_1.default.equal(this.denominator, constants_js_1.ZERO)) {\n return jsbi_1.default.greaterThan(this.numerator, constants_js_1.ZERO)\n ? Number.POSITIVE_INFINITY\n : jsbi_1.default.lessThan(this.numerator, constants_js_1.ZERO)\n ? Number.NEGATIVE_INFINITY\n : Number.NaN;\n }\n const result = jsbi_1.default.toNumber(this.numerator) / jsbi_1.default.toNumber(this.denominator);\n if (!Number.isNaN(result)) {\n return result;\n }\n return parseFloat(this.toFixed(10));\n }\n /**\n * Returns true if this number (the numerator) is equal to zero and the denominator is non-zero.\n * @returns\n */\n isZero() {\n return jsbi_1.default.EQ(this.numerator, constants_js_1.ZERO) && jsbi_1.default.NE(this.denominator, constants_js_1.ZERO);\n }\n /**\n * Returns true if this number (the numerator) is not equal to zero.\n * @returns\n */\n isNonZero() {\n return !this.isZero();\n }\n}\nexports.Fraction = Fraction;\nFraction.ZERO = new Fraction(0);\nFraction.ONE = new Fraction(1);\n//# sourceMappingURL=fraction.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./constants.js\"), exports);\ntslib_1.__exportStar(require(\"./fraction.js\"), exports);\ntslib_1.__exportStar(require(\"./percent.js\"), exports);\ntslib_1.__exportStar(require(\"./price.js\"), exports);\ntslib_1.__exportStar(require(\"./token.js\"), exports);\ntslib_1.__exportStar(require(\"./tokenAmount.js\"), exports);\ntslib_1.__exportStar(require(\"./utils.js\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Percent = void 0;\nconst fraction_js_1 = require(\"./fraction.js\");\nconst ONE_HUNDRED = new fraction_js_1.Fraction(100);\n/**\n * Converts a fraction to a percent\n * @param fraction the fraction to convert\n */\nfunction toPercent(fraction) {\n return new Percent(fraction.numerator, fraction.denominator);\n}\nclass Percent extends fraction_js_1.Fraction {\n constructor() {\n super(...arguments);\n /**\n * This boolean prevents a fraction from being interpreted as a Percent\n */\n this.isPercent = true;\n }\n /**\n * Parses a {@link Percent} from a float.\n * @param number Number to parse. (100% is 1.00)\n * @param decimals Number of decimals of precision. (default 10)\n * @returns Percent\n */\n static fromNumber(number, decimals = 10) {\n const frac = fraction_js_1.Fraction.fromNumber(number, decimals);\n return new Percent(frac.numerator, frac.denominator);\n }\n /**\n * Constructs an {@link Percent} from a {@link PercentObject}.\n * @param other\n * @returns\n */\n static fromObject(other) {\n if (other instanceof Percent) {\n return other;\n }\n return toPercent(fraction_js_1.Fraction.fromObject(other));\n }\n /**\n * JSON representation of the {@link Percent}.\n */\n toJSON() {\n return {\n ...super.toJSON(),\n isPercent: true,\n };\n }\n /**\n * Creates a {@link Percent} from a {@link Fraction}.\n */\n static fromFraction(fraction) {\n return toPercent(fraction);\n }\n /**\n * Parses a {@link Percent} from a given number of bps.\n * @returns Percent\n */\n static fromBPS(bps) {\n return new Percent(bps, 10000);\n }\n add(other) {\n return toPercent(super.add(other));\n }\n subtract(other) {\n return toPercent(super.subtract(other));\n }\n multiply(other) {\n return toPercent(super.multiply(other));\n }\n divide(other) {\n return toPercent(super.divide(other));\n }\n /**\n * Swaps the numerator and denominator of the {@link Percent}.\n * @returns\n */\n invert() {\n return new Percent(this.denominator, this.numerator);\n }\n toSignificant(significantDigits = 5, format, rounding) {\n return super\n .multiply(ONE_HUNDRED)\n .toSignificant(significantDigits, format, rounding);\n }\n toFixed(decimalPlaces = 2, format, rounding) {\n return super.multiply(ONE_HUNDRED).toFixed(decimalPlaces, format, rounding);\n }\n /**\n * Returns true if the other object is a {@link Percent}.\n *\n * @param other\n * @returns\n */\n static isPercent(other) {\n return (fraction_js_1.Fraction.isFraction(other) &&\n (other === null || other === void 0 ? void 0 : other.isPercent) === true);\n }\n}\nexports.Percent = Percent;\n/**\n * Zero percent.\n */\nPercent.ZERO = new Percent(0);\n/**\n * 1%\n */\nPercent.ONE = new Percent(1, 100);\n/**\n * 100% (1/1)\n */\nPercent.ONE_HUNDRED = new Percent(1);\n//# sourceMappingURL=percent.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Price = void 0;\nconst tslib_1 = require(\"tslib\");\nconst tiny_invariant_1 = tslib_1.__importDefault(require(\"tiny-invariant\"));\nconst fraction_js_1 = require(\"./fraction.js\");\nconst utils_js_1 = require(\"./utils.js\");\nclass Price extends fraction_js_1.Fraction {\n /**\n * Constructs a Price.\n *\n * denominator and numerator _must_ be raw, i.e. in the native representation\n *\n * @param denominator Units of base currency. E.g. 1 BTC would be 1_00000000\n * @param numerator Units of quote currency. E.g. $30k at 6 decimals would be 30_000_000000\n */\n constructor(baseCurrency, quoteCurrency, denominator, numerator) {\n super((0, utils_js_1.parseBigintIsh)(numerator), (0, utils_js_1.parseBigintIsh)(denominator));\n this.baseCurrency = baseCurrency;\n this.quoteCurrency = quoteCurrency;\n this.scalar = new fraction_js_1.Fraction((0, utils_js_1.makeDecimalMultiplier)(baseCurrency.decimals), (0, utils_js_1.makeDecimalMultiplier)(quoteCurrency.decimals));\n }\n get raw() {\n return new fraction_js_1.Fraction(this.numerator, this.denominator);\n }\n get adjusted() {\n return super.multiply(this.scalar);\n }\n invert() {\n return this.new(this.quoteCurrency, this.baseCurrency, this.numerator, this.denominator);\n }\n multiply(other) {\n (0, tiny_invariant_1.default)(this.quoteCurrency.equals(other.baseCurrency), `multiply token mismatch: ${this.quoteCurrency.toString()} !== ${other.baseCurrency.toString()}`);\n const fraction = super.multiply(other);\n return this.new(this.baseCurrency, other.quoteCurrency, fraction.denominator, fraction.numerator);\n }\n // performs floor division on overflow\n quote(tokenAmount) {\n (0, tiny_invariant_1.default)(tokenAmount.token.equals(this.baseCurrency), `quote token mismatch: ${tokenAmount.token.toString()} !== ${this.baseCurrency.toString()}`);\n return tokenAmount.new(this.quoteCurrency, super.multiply(tokenAmount.raw).quotient);\n }\n toSignificant(significantDigits = 6, format, rounding) {\n return this.adjusted.toSignificant(significantDigits, format, rounding);\n }\n toFixed(decimalPlaces = 4, format, rounding) {\n return this.adjusted.toFixed(decimalPlaces, format, rounding);\n }\n /**\n * Returns the price in terms of the quote currency.\n * @param format\n * @param rounding\n * @returns\n */\n toFixedQuote(format = { groupSeparator: \"\" }, rounding) {\n return this.toFixed(this.quoteCurrency.decimals, format, rounding);\n }\n get asNumber() {\n return this.adjusted.asNumber;\n }\n}\nexports.Price = Price;\n//# sourceMappingURL=price.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=token.js.map","\"use strict\";\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TokenAmount = exports.stripTrailingZeroes = exports.validateU256 = exports.validateU64 = exports.TokenAmountUnderflow = exports.TokenAmountOverflow = exports.parseAmountFromString = exports.DEFAULT_GROUP_SEPARATOR = exports.DEFAULT_DECIMAL_SEPARATOR = exports.DEFAULT_LOCALE_GROUP_SEPARATOR = exports.DEFAULT_LOCALE_DECIMAL_SEPARATOR = exports.getGroupSeparator = exports.getDecimalSeparator = exports.getSeparator = void 0;\nconst tslib_1 = require(\"tslib\");\nconst big_js_1 = tslib_1.__importDefault(require(\"big.js\"));\nconst jsbi_1 = tslib_1.__importDefault(require(\"jsbi\"));\nconst tiny_invariant_1 = tslib_1.__importDefault(require(\"tiny-invariant\"));\nconst constants_js_1 = require(\"./constants.js\");\nconst format_js_1 = require(\"./format.js\");\nconst fraction_js_1 = require(\"./fraction.js\");\nconst percent_js_1 = require(\"./percent.js\");\nconst utils_js_1 = require(\"./utils.js\");\n/**\n * Gets the separator of the provided locale.\n *\n * Source: {@link https://stackoverflow.com/questions/1074660/with-a-browser-how-do-i-know-which-decimal-separator-does-the-operating-system}\n *\n * @param separatorType\n * @param locale\n * @returns\n */\nconst getSeparator = (separatorType, locale) => {\n var _a;\n const numberWithDecimalSeparator = 1000.1;\n return (_a = Intl.NumberFormat(locale)\n .formatToParts(numberWithDecimalSeparator)\n .find((part) => part.type === separatorType)) === null || _a === void 0 ? void 0 : _a.value;\n};\nexports.getSeparator = getSeparator;\n/**\n * Gets the decimal separator of the provided locale.\n *\n * Source: {@link https://stackoverflow.com/questions/1074660/with-a-browser-how-do-i-know-which-decimal-separator-does-the-operating-system}\n *\n * @param locale\n * @returns\n */\nconst getDecimalSeparator = (locale) => {\n return (0, exports.getSeparator)(\"decimal\", locale);\n};\nexports.getDecimalSeparator = getDecimalSeparator;\n/**\n * Gets the group separator of the provided locale.\n *\n * Source: {@link https://stackoverflow.com/questions/1074660/with-a-browser-how-do-i-know-which-decimal-separator-does-the-operating-system}\n *\n * @param locale\n * @returns\n */\nconst getGroupSeparator = (locale) => {\n return (0, exports.getSeparator)(\"group\", locale);\n};\nexports.getGroupSeparator = getGroupSeparator;\n/**\n * The decimal separator of the default locale.\n */\nexports.DEFAULT_LOCALE_DECIMAL_SEPARATOR = (_a = (0, exports.getDecimalSeparator)()) !== null && _a !== void 0 ? _a : \".\";\n/**\n * The group separator of the default locale.\n */\nexports.DEFAULT_LOCALE_GROUP_SEPARATOR = (_b = (0, exports.getGroupSeparator)()) !== null && _b !== void 0 ? _b : \",\";\n/**\n * The default decimal separator.\n */\nexports.DEFAULT_DECIMAL_SEPARATOR = \".\";\n/**\n * The default group separator.\n */\nexports.DEFAULT_GROUP_SEPARATOR = \",\";\n/**\n * Parses a token amount from a decimal representation.\n * @param token\n * @param uiAmount\n * @returns\n */\nconst parseAmountFromString = (token, uiAmount, decimalSeparator = exports.DEFAULT_DECIMAL_SEPARATOR, groupSeparator = exports.DEFAULT_GROUP_SEPARATOR) => {\n const parts = uiAmount.split(decimalSeparator);\n if (parts.length === 0) {\n throw new Error(\"empty number\");\n }\n const [wholeRaw, fractionRaw] = parts;\n const whole = wholeRaw\n ? jsbi_1.default.BigInt(wholeRaw.split(groupSeparator).join(\"\"))\n : constants_js_1.ZERO;\n const fraction = fractionRaw\n ? jsbi_1.default.BigInt(fractionRaw.slice(0, token.decimals) +\n Array(token.decimals).fill(\"0\").slice(fractionRaw.length).join(\"\"))\n : constants_js_1.ZERO;\n const combined = jsbi_1.default.add(jsbi_1.default.multiply(whole, (0, utils_js_1.makeDecimalMultiplier)(token.decimals)), fraction);\n return combined;\n};\nexports.parseAmountFromString = parseAmountFromString;\n/**\n * Thrown when a token amount overflows.\n */\nclass TokenAmountOverflow extends RangeError {\n constructor(type, amount) {\n super(`Token amount overflows ${type}: ${amount.toString()}`);\n }\n}\nexports.TokenAmountOverflow = TokenAmountOverflow;\n/**\n * Thrown when a token amount underflows.\n */\nclass TokenAmountUnderflow extends RangeError {\n constructor(amount) {\n super(`Token amount must be greater than zero: ${amount.toString()}`);\n }\n}\nexports.TokenAmountUnderflow = TokenAmountUnderflow;\n/**\n * Validates that a number falls within the range of u64.\n * @param value\n */\nfunction validateU64(value) {\n if (!jsbi_1.default.greaterThanOrEqual(value, constants_js_1.ZERO)) {\n throw new TokenAmountUnderflow(value);\n }\n if (!jsbi_1.default.lessThanOrEqual(value, constants_js_1.MAX_U64)) {\n throw new TokenAmountOverflow(\"u64\", value);\n }\n}\nexports.validateU64 = validateU64;\n/**\n * Validates that a number falls within the range of u256.\n * @param value\n */\nfunction validateU256(value) {\n if (!jsbi_1.default.greaterThanOrEqual(value, constants_js_1.ZERO)) {\n throw new TokenAmountUnderflow(value);\n }\n if (!jsbi_1.default.lessThanOrEqual(value, constants_js_1.MAX_U256)) {\n throw new TokenAmountOverflow(\"u256\", value);\n }\n}\nexports.validateU256 = validateU256;\nconst stripTrailingZeroes = (num) => {\n const [head, tail, ...rest] = num.split(\".\");\n if (rest.length > 0 || !head) {\n console.warn(`Invalid number passed to stripTrailingZeroes: ${num}`);\n return num;\n }\n if (!tail) {\n return num;\n }\n const newTail = tail.replace(/0+$/, \"\");\n return newTail === \"\" ? head : `${head}.${newTail}`;\n};\nexports.stripTrailingZeroes = stripTrailingZeroes;\n/**\n * Represents a quantity of tokens.\n */\nclass TokenAmount extends fraction_js_1.Fraction {\n /**\n * amount _must_ be raw, i.e. in the native representation\n */\n constructor(token, amount, validate) {\n const parsedAmount = (0, utils_js_1.parseBigintIsh)(amount);\n validate === null || validate === void 0 ? void 0 : validate(parsedAmount);\n super(parsedAmount, (0, utils_js_1.makeDecimalMultiplier)(token.decimals));\n this.token = token;\n this.token = token;\n }\n withAmount(amount) {\n return this.new(this.token, amount);\n }\n get raw() {\n return this.numerator;\n }\n toSignificant(significantDigits = 6, format, rounding = constants_js_1.Rounding.ROUND_DOWN) {\n return super.toSignificant(significantDigits, format, rounding);\n }\n toFixed(decimalPlaces = this.token.decimals, format, rounding = constants_js_1.Rounding.ROUND_DOWN) {\n (0, tiny_invariant_1.default)(decimalPlaces <= this.token.decimals, \"DECIMALS\");\n return super.toFixed(decimalPlaces, format, rounding);\n }\n toExact(format = { groupSeparator: \"\" }) {\n return (0, format_js_1.formatBig)(new big_js_1.default(this.numerator.toString()).div(this.denominator.toString()), this.token.decimals, format);\n }\n add(other) {\n (0, tiny_invariant_1.default)(this.token.equals(other.token), `add token mismatch: ${this.token.toString()} !== ${other.token.toString()}`);\n return this.withAmount(jsbi_1.default.add(this.raw, other.raw));\n }\n subtract(other) {\n (0, tiny_invariant_1.default)(this.token.equals(other.token), `subtract token mismatch: ${this.token.toString()} !== ${other.token.toString()}`);\n return this.withAmount(jsbi_1.default.subtract(this.raw, other.raw));\n }\n /**\n * Gets this TokenAmount as a percentage of the other TokenAmount.\n * @param other\n * @returns\n */\n percentOf(other) {\n (0, tiny_invariant_1.default)(this.token.equals(other.token), `percentOf token mismatch: ${this.token.toString()} !== ${other.token.toString()}`);\n const frac = this.divide(other);\n return new percent_js_1.Percent(frac.numerator, frac.denominator);\n }\n /**\n * Gets this TokenAmount as a percentage of the other TokenAmount.\n * @param other\n * @returns\n */\n divideBy(other) {\n const frac = this.divide(other);\n return new percent_js_1.Percent(frac.numerator, frac.denominator);\n }\n /**\n * Multiplies this token amount by a fraction.\n * WARNING: this loses precision\n * @param percent\n * @returns\n */\n scale(fraction) {\n return this.withAmount(fraction.asFraction.multiply(this.raw).toFixed(0));\n }\n /**\n * Reduces this token amount by a percent.\n * WARNING: this loses precision\n * @param percent\n * @returns\n */\n reduceBy(percent) {\n return this.scale(percent_js_1.Percent.ONE_HUNDRED.subtract(percent));\n }\n /**\n * Formats the token amount quantity with units.\n *\n * This function is not locale-specific: it hardcodes \"en-US\"-like behavior.\n *\n * @returns\n */\n formatUnits() {\n return `${(0, exports.stripTrailingZeroes)(this.toExact({\n groupSeparator: exports.DEFAULT_GROUP_SEPARATOR,\n groupSize: 3,\n decimalSeparator: exports.DEFAULT_DECIMAL_SEPARATOR,\n }))} ${this.token.symbol}`;\n }\n /**\n * Formats this number using Intl.NumberFormatOptions\n * @param param0\n * @returns\n */\n format({ numberFormatOptions, locale } = {}) {\n return `${numberFormatOptions !== undefined\n ? this.asNumber.toLocaleString(locale, numberFormatOptions)\n : (0, exports.stripTrailingZeroes)(this.toFixed(this.token.decimals))}`;\n }\n /**\n * Gets the value of this {@link TokenAmount} as a number.\n */\n get asNumber() {\n return parseFloat(this.toExact());\n }\n /**\n * Returns true if the other object is a {@link TokenAmount}.\n *\n * @param other\n * @returns\n */\n static isTokenAmount(other) {\n return (fraction_js_1.Fraction.isFraction(other) &&\n !!(other === null || other === void 0 ? void 0 : other.token));\n }\n // ----------------------------------------------------------------\n // DEPRECATED FUNCTIONS\n // ----------------------------------------------------------------\n /**\n * Gets this TokenAmount as a percentage of the other TokenAmount.\n * @param other\n * @deprecated use {@link percentOf}\n * @returns\n */\n divideByAmount(other) {\n return this.percentOf(other);\n }\n /**\n * Multiplies this token amount by a fraction.\n * WARNING: this loses precision\n * @param percent\n * @deprecated use {@link scale}\n * @returns\n */\n multiplyBy(fraction) {\n return this.scale(fraction);\n }\n}\nexports.TokenAmount = TokenAmount;\n//# sourceMappingURL=tokenAmount.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeDecimalMultiplier = exports.parseBigintIsh = exports.isBN = void 0;\nconst tslib_1 = require(\"tslib\");\nconst jsbi_1 = tslib_1.__importDefault(require(\"jsbi\"));\nconst constants_js_1 = require(\"./constants.js\");\nconst BN_WORD_SIZE = 26;\n/**\n * Checks if an object is a BN.\n */\nconst isBN = (num) => {\n return (num !== null &&\n typeof num === \"object\" &&\n num.constructor.wordSize === BN_WORD_SIZE &&\n Array.isArray(num.words));\n};\nexports.isBN = isBN;\n/**\n * Parses a {@link BigintIsh} into a {@link JSBI}.\n * @param bigintIsh\n * @returns\n */\nfunction parseBigintIsh(bigintIsh) {\n return bigintIsh instanceof jsbi_1.default\n ? bigintIsh\n : typeof bigintIsh === \"string\" || typeof bigintIsh === \"number\"\n ? jsbi_1.default.BigInt(bigintIsh)\n : typeof bigintIsh === \"bigint\" || (0, exports.isBN)(bigintIsh)\n ? jsbi_1.default.BigInt(bigintIsh.toString())\n : jsbi_1.default.BigInt(bigintIsh);\n}\nexports.parseBigintIsh = parseBigintIsh;\nconst decimalMultipliersCache = {};\n/**\n * Creates the multiplier for an amount of decimals.\n * @param decimals\n * @returns\n */\nconst makeDecimalMultiplier = (decimals) => {\n const cached = decimalMultipliersCache[decimals];\n if (cached) {\n return cached;\n }\n if (decimals <= 18) {\n return (decimalMultipliersCache[decimals] = jsbi_1.default.BigInt(10 ** decimals));\n }\n return (decimalMultipliersCache[decimals] = jsbi_1.default.exponentiate(constants_js_1.TEN, jsbi_1.default.BigInt(decimals)));\n};\nexports.makeDecimalMultiplier = makeDecimalMultiplier;\n//# sourceMappingURL=utils.js.map","// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a51ae424a513ec9a6aa3466baa0cc1d55dd4f3b\n\n// Originally from narwhal.js (http://narwhaljs.org)\n// Copyright (c) 2009 Thomas Robinson <280north.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nvar _require = require('./internal/errors'),\n _require$codes = _require.codes,\n ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE,\n ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;\nvar AssertionError = require('./internal/assert/assertion_error');\nvar _require2 = require('util/'),\n inspect = _require2.inspect;\nvar _require$types = require('util/').types,\n isPromise = _require$types.isPromise,\n isRegExp = _require$types.isRegExp;\nvar objectAssign = require('object.assign/polyfill')();\nvar objectIs = require('object-is/polyfill')();\nvar RegExpPrototypeTest = require('call-bind/callBound')('RegExp.prototype.test');\nvar errorCache = new Map();\nvar isDeepEqual;\nvar isDeepStrictEqual;\nvar parseExpressionAt;\nvar findNodeAround;\nvar decoder;\nfunction lazyLoadComparison() {\n var comparison = require('./internal/util/comparisons');\n isDeepEqual = comparison.isDeepEqual;\n isDeepStrictEqual = comparison.isDeepStrictEqual;\n}\n\n// Escape control characters but not \\n and \\t to keep the line breaks and\n// indentation intact.\n// eslint-disable-next-line no-control-regex\nvar escapeSequencesRegExp = /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/g;\nvar meta = [\"\\\\u0000\", \"\\\\u0001\", \"\\\\u0002\", \"\\\\u0003\", \"\\\\u0004\", \"\\\\u0005\", \"\\\\u0006\", \"\\\\u0007\", '\\\\b', '', '', \"\\\\u000b\", '\\\\f', '', \"\\\\u000e\", \"\\\\u000f\", \"\\\\u0010\", \"\\\\u0011\", \"\\\\u0012\", \"\\\\u0013\", \"\\\\u0014\", \"\\\\u0015\", \"\\\\u0016\", \"\\\\u0017\", \"\\\\u0018\", \"\\\\u0019\", \"\\\\u001a\", \"\\\\u001b\", \"\\\\u001c\", \"\\\\u001d\", \"\\\\u001e\", \"\\\\u001f\"];\nvar escapeFn = function escapeFn(str) {\n return meta[str.charCodeAt(0)];\n};\nvar warned = false;\n\n// The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\nvar NO_EXCEPTION_SENTINEL = {};\n\n// All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction innerFail(obj) {\n if (obj.message instanceof Error) throw obj.message;\n throw new AssertionError(obj);\n}\nfunction fail(actual, expected, message, operator, stackStartFn) {\n var argsLen = arguments.length;\n var internalMessage;\n if (argsLen === 0) {\n internalMessage = 'Failed';\n } else if (argsLen === 1) {\n message = actual;\n actual = undefined;\n } else {\n if (warned === false) {\n warned = true;\n var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);\n warn('assert.fail() with more than one argument is deprecated. ' + 'Please use assert.strictEqual() instead or only pass a message.', 'DeprecationWarning', 'DEP0094');\n }\n if (argsLen === 2) operator = '!=';\n }\n if (message instanceof Error) throw message;\n var errArgs = {\n actual: actual,\n expected: expected,\n operator: operator === undefined ? 'fail' : operator,\n stackStartFn: stackStartFn || fail\n };\n if (message !== undefined) {\n errArgs.message = message;\n }\n var err = new AssertionError(errArgs);\n if (internalMessage) {\n err.message = internalMessage;\n err.generatedMessage = true;\n }\n throw err;\n}\nassert.fail = fail;\n\n// The AssertionError is defined in internal/error.\nassert.AssertionError = AssertionError;\nfunction innerOk(fn, argLen, value, message) {\n if (!value) {\n var generatedMessage = false;\n if (argLen === 0) {\n generatedMessage = true;\n message = 'No value argument passed to `assert.ok()`';\n } else if (message instanceof Error) {\n throw message;\n }\n var err = new AssertionError({\n actual: value,\n expected: true,\n message: message,\n operator: '==',\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n}\n\n// Pure assertion tests whether a value is truthy, as determined\n// by !!value.\nfunction ok() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n innerOk.apply(void 0, [ok, args.length].concat(args));\n}\nassert.ok = ok;\n\n// The equality assertion tests shallow, coercive equality with ==.\n/* eslint-disable no-restricted-properties */\nassert.equal = function equal(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n // eslint-disable-next-line eqeqeq\n if (actual != expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '==',\n stackStartFn: equal\n });\n }\n};\n\n// The non-equality assertion tests for whether two objects are not\n// equal with !=.\nassert.notEqual = function notEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n // eslint-disable-next-line eqeqeq\n if (actual == expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '!=',\n stackStartFn: notEqual\n });\n }\n};\n\n// The equivalence assertion tests a deep equality relation.\nassert.deepEqual = function deepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (!isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepEqual',\n stackStartFn: deepEqual\n });\n }\n};\n\n// The non-equivalence assertion tests for any deep inequality.\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepEqual',\n stackStartFn: notDeepEqual\n });\n }\n};\n/* eslint-enable */\n\nassert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (!isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepStrictEqual',\n stackStartFn: deepStrictEqual\n });\n }\n};\nassert.notDeepStrictEqual = notDeepStrictEqual;\nfunction notDeepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepStrictEqual',\n stackStartFn: notDeepStrictEqual\n });\n }\n}\nassert.strictEqual = function strictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (!objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'strictEqual',\n stackStartFn: strictEqual\n });\n }\n};\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notStrictEqual',\n stackStartFn: notStrictEqual\n });\n }\n};\nvar Comparison = /*#__PURE__*/_createClass(function Comparison(obj, keys, actual) {\n var _this = this;\n _classCallCheck(this, Comparison);\n keys.forEach(function (key) {\n if (key in obj) {\n if (actual !== undefined && typeof actual[key] === 'string' && isRegExp(obj[key]) && RegExpPrototypeTest(obj[key], actual[key])) {\n _this[key] = actual[key];\n } else {\n _this[key] = obj[key];\n }\n }\n });\n});\nfunction compareExceptionKey(actual, expected, key, message, keys, fn) {\n if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {\n if (!message) {\n // Create placeholder objects to create a nice output.\n var a = new Comparison(actual, keys);\n var b = new Comparison(expected, keys, actual);\n var err = new AssertionError({\n actual: a,\n expected: b,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.actual = actual;\n err.expected = expected;\n err.operator = fn.name;\n throw err;\n }\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: fn.name,\n stackStartFn: fn\n });\n }\n}\nfunction expectedException(actual, expected, msg, fn) {\n if (typeof expected !== 'function') {\n if (isRegExp(expected)) return RegExpPrototypeTest(expected, actual);\n // assert.doesNotThrow does not accept objects.\n if (arguments.length === 2) {\n throw new ERR_INVALID_ARG_TYPE('expected', ['Function', 'RegExp'], expected);\n }\n\n // Handle primitives properly.\n if (_typeof(actual) !== 'object' || actual === null) {\n var err = new AssertionError({\n actual: actual,\n expected: expected,\n message: msg,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.operator = fn.name;\n throw err;\n }\n var keys = Object.keys(expected);\n // Special handle errors to make sure the name and the message are compared\n // as well.\n if (expected instanceof Error) {\n keys.push('name', 'message');\n } else if (keys.length === 0) {\n throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n keys.forEach(function (key) {\n if (typeof actual[key] === 'string' && isRegExp(expected[key]) && RegExpPrototypeTest(expected[key], actual[key])) {\n return;\n }\n compareExceptionKey(actual, expected, key, msg, keys, fn);\n });\n return true;\n }\n // Guard instanceof against arrow functions as they don't have a prototype.\n if (expected.prototype !== undefined && actual instanceof expected) {\n return true;\n }\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n return expected.call({}, actual) === true;\n}\nfunction getActual(fn) {\n if (typeof fn !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn);\n }\n try {\n fn();\n } catch (e) {\n return e;\n }\n return NO_EXCEPTION_SENTINEL;\n}\nfunction checkIsPromise(obj) {\n // Accept native ES6 promises and promises that are implemented in a similar\n // way. Do not accept thenables that use a function as `obj` and that have no\n // `catch` handler.\n\n // TODO: thenables are checked up until they have the correct methods,\n // but according to documentation, the `then` method should receive\n // the `fulfill` and `reject` arguments as well or it may be never resolved.\n\n return isPromise(obj) || obj !== null && _typeof(obj) === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function';\n}\nfunction waitForActual(promiseFn) {\n return Promise.resolve().then(function () {\n var resultPromise;\n if (typeof promiseFn === 'function') {\n // Return a rejected promise if `promiseFn` throws synchronously.\n resultPromise = promiseFn();\n // Fail in case no promise is returned.\n if (!checkIsPromise(resultPromise)) {\n throw new ERR_INVALID_RETURN_VALUE('instance of Promise', 'promiseFn', resultPromise);\n }\n } else if (checkIsPromise(promiseFn)) {\n resultPromise = promiseFn;\n } else {\n throw new ERR_INVALID_ARG_TYPE('promiseFn', ['Function', 'Promise'], promiseFn);\n }\n return Promise.resolve().then(function () {\n return resultPromise;\n }).then(function () {\n return NO_EXCEPTION_SENTINEL;\n }).catch(function (e) {\n return e;\n });\n });\n}\nfunction expectsError(stackStartFn, actual, error, message) {\n if (typeof error === 'string') {\n if (arguments.length === 4) {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n if (_typeof(actual) === 'object' && actual !== null) {\n if (actual.message === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error message \\\"\".concat(actual.message, \"\\\" is identical to the message.\"));\n }\n } else if (actual === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error \\\"\".concat(actual, \"\\\" is identical to the message.\"));\n }\n message = error;\n error = undefined;\n } else if (error != null && _typeof(error) !== 'object' && typeof error !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n if (actual === NO_EXCEPTION_SENTINEL) {\n var details = '';\n if (error && error.name) {\n details += \" (\".concat(error.name, \")\");\n }\n details += message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception';\n innerFail({\n actual: undefined,\n expected: error,\n operator: stackStartFn.name,\n message: \"Missing expected \".concat(fnType).concat(details),\n stackStartFn: stackStartFn\n });\n }\n if (error && !expectedException(actual, error, message, stackStartFn)) {\n throw actual;\n }\n}\nfunction expectsNoError(stackStartFn, actual, error, message) {\n if (actual === NO_EXCEPTION_SENTINEL) return;\n if (typeof error === 'string') {\n message = error;\n error = undefined;\n }\n if (!error || expectedException(actual, error)) {\n var details = message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'doesNotReject' ? 'rejection' : 'exception';\n innerFail({\n actual: actual,\n expected: error,\n operator: stackStartFn.name,\n message: \"Got unwanted \".concat(fnType).concat(details, \"\\n\") + \"Actual message: \\\"\".concat(actual && actual.message, \"\\\"\"),\n stackStartFn: stackStartFn\n });\n }\n throw actual;\n}\nassert.throws = function throws(promiseFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));\n};\nassert.rejects = function rejects(promiseFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n return waitForActual(promiseFn).then(function (result) {\n return expectsError.apply(void 0, [rejects, result].concat(args));\n });\n};\nassert.doesNotThrow = function doesNotThrow(fn) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));\n};\nassert.doesNotReject = function doesNotReject(fn) {\n for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n args[_key5 - 1] = arguments[_key5];\n }\n return waitForActual(fn).then(function (result) {\n return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));\n });\n};\nassert.ifError = function ifError(err) {\n if (err !== null && err !== undefined) {\n var message = 'ifError got unwanted exception: ';\n if (_typeof(err) === 'object' && typeof err.message === 'string') {\n if (err.message.length === 0 && err.constructor) {\n message += err.constructor.name;\n } else {\n message += err.message;\n }\n } else {\n message += inspect(err);\n }\n var newErr = new AssertionError({\n actual: err,\n expected: null,\n operator: 'ifError',\n message: message,\n stackStartFn: ifError\n });\n\n // Make sure we actually have a stack trace!\n var origStack = err.stack;\n if (typeof origStack === 'string') {\n // This will remove any duplicated frames from the error frames taken\n // from within `ifError` and add the original error frames to the newly\n // created ones.\n var tmp2 = origStack.split('\\n');\n tmp2.shift();\n // Filter all frames existing in err.stack.\n var tmp1 = newErr.stack.split('\\n');\n for (var i = 0; i < tmp2.length; i++) {\n // Find the first occurrence of the frame.\n var pos = tmp1.indexOf(tmp2[i]);\n if (pos !== -1) {\n // Only keep new frames.\n tmp1 = tmp1.slice(0, pos);\n break;\n }\n }\n newErr.stack = \"\".concat(tmp1.join('\\n'), \"\\n\").concat(tmp2.join('\\n'));\n }\n throw newErr;\n }\n};\n\n// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a871df3dfb8ea663ef5e1f8f62701ec51384ecb\nfunction internalMatch(string, regexp, message, fn, fnName) {\n if (!isRegExp(regexp)) {\n throw new ERR_INVALID_ARG_TYPE('regexp', 'RegExp', regexp);\n }\n var match = fnName === 'match';\n if (typeof string !== 'string' || RegExpPrototypeTest(regexp, string) !== match) {\n if (message instanceof Error) {\n throw message;\n }\n var generatedMessage = !message;\n\n // 'The input was expected to not match the regular expression ' +\n message = message || (typeof string !== 'string' ? 'The \"string\" argument must be of type string. Received type ' + \"\".concat(_typeof(string), \" (\").concat(inspect(string), \")\") : (match ? 'The input did not match the regular expression ' : 'The input was expected to not match the regular expression ') + \"\".concat(inspect(regexp), \". Input:\\n\\n\").concat(inspect(string), \"\\n\"));\n var err = new AssertionError({\n actual: string,\n expected: regexp,\n message: message,\n operator: fnName,\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n}\nassert.match = function match(string, regexp, message) {\n internalMatch(string, regexp, message, match, 'match');\n};\nassert.doesNotMatch = function doesNotMatch(string, regexp, message) {\n internalMatch(string, regexp, message, doesNotMatch, 'doesNotMatch');\n};\n\n// Expose a strict only variant of assert\nfunction strict() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n innerOk.apply(void 0, [strict, args.length].concat(args));\n}\nassert.strict = objectAssign(strict, assert, {\n equal: assert.strictEqual,\n deepEqual: assert.deepStrictEqual,\n notEqual: assert.notStrictEqual,\n notDeepEqual: assert.notDeepStrictEqual\n});\nassert.strict.strict = assert.strict;","// Currently in sync with Node.js lib/internal/assert/assertion_error.js\n// https://github.com/nodejs/node/commit/0817840f775032169ddd70c85ac059f18ffcc81c\n\n'use strict';\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _require = require('util/'),\n inspect = _require.inspect;\nvar _require2 = require('../errors'),\n ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE;\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n return str.substring(this_len - search.length, this_len) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat\nfunction repeat(str, count) {\n count = Math.floor(count);\n if (str.length == 0 || count == 0) return '';\n var maxCount = str.length * count;\n count = Math.floor(Math.log(count) / Math.log(2));\n while (count) {\n str += str;\n count--;\n }\n str += str.substring(0, maxCount - str.length);\n return str;\n}\nvar blue = '';\nvar green = '';\nvar red = '';\nvar white = '';\nvar kReadableOperator = {\n deepStrictEqual: 'Expected values to be strictly deep-equal:',\n strictEqual: 'Expected values to be strictly equal:',\n strictEqualObject: 'Expected \"actual\" to be reference-equal to \"expected\":',\n deepEqual: 'Expected values to be loosely deep-equal:',\n equal: 'Expected values to be loosely equal:',\n notDeepStrictEqual: 'Expected \"actual\" not to be strictly deep-equal to:',\n notStrictEqual: 'Expected \"actual\" to be strictly unequal to:',\n notStrictEqualObject: 'Expected \"actual\" not to be reference-equal to \"expected\":',\n notDeepEqual: 'Expected \"actual\" not to be loosely deep-equal to:',\n notEqual: 'Expected \"actual\" to be loosely unequal to:',\n notIdentical: 'Values identical but not reference-equal:'\n};\n\n// Comparing short primitives should just show === / !== instead of using the\n// diff.\nvar kMaxShortLength = 10;\nfunction copyError(source) {\n var keys = Object.keys(source);\n var target = Object.create(Object.getPrototypeOf(source));\n keys.forEach(function (key) {\n target[key] = source[key];\n });\n Object.defineProperty(target, 'message', {\n value: source.message\n });\n return target;\n}\nfunction inspectValue(val) {\n // The util.inspect default values could be changed. This makes sure the\n // error messages contain the necessary information nevertheless.\n return inspect(val, {\n compact: false,\n customInspect: false,\n depth: 1000,\n maxArrayLength: Infinity,\n // Assert compares only enumerable properties (with a few exceptions).\n showHidden: false,\n // Having a long line as error is better than wrapping the line for\n // comparison for now.\n // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we\n // have meta information about the inspected properties (i.e., know where\n // in what line the property starts and ends).\n breakLength: Infinity,\n // Assert does not detect proxies currently.\n showProxy: false,\n sorted: true,\n // Inspect getters as we also check them when comparing entries.\n getters: true\n });\n}\nfunction createErrDiff(actual, expected, operator) {\n var other = '';\n var res = '';\n var lastPos = 0;\n var end = '';\n var skipped = false;\n var actualInspected = inspectValue(actual);\n var actualLines = actualInspected.split('\\n');\n var expectedLines = inspectValue(expected).split('\\n');\n var i = 0;\n var indicator = '';\n\n // In case both values are objects explicitly mark them as not reference equal\n // for the `strictEqual` operator.\n if (operator === 'strictEqual' && _typeof(actual) === 'object' && _typeof(expected) === 'object' && actual !== null && expected !== null) {\n operator = 'strictEqualObject';\n }\n\n // If \"actual\" and \"expected\" fit on a single line and they are not strictly\n // equal, check further special handling.\n if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {\n var inputLength = actualLines[0].length + expectedLines[0].length;\n // If the character length of \"actual\" and \"expected\" together is less than\n // kMaxShortLength and if neither is an object and at least one of them is\n // not `zero`, use the strict equal comparison to visualize the output.\n if (inputLength <= kMaxShortLength) {\n if ((_typeof(actual) !== 'object' || actual === null) && (_typeof(expected) !== 'object' || expected === null) && (actual !== 0 || expected !== 0)) {\n // -0 === +0\n return \"\".concat(kReadableOperator[operator], \"\\n\\n\") + \"\".concat(actualLines[0], \" !== \").concat(expectedLines[0], \"\\n\");\n }\n } else if (operator !== 'strictEqualObject') {\n // If the stderr is a tty and the input length is lower than the current\n // columns per line, add a mismatch indicator below the output. If it is\n // not a tty, use a default value of 80 characters.\n var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;\n if (inputLength < maxLength) {\n while (actualLines[0][i] === expectedLines[0][i]) {\n i++;\n }\n // Ignore the first characters.\n if (i > 2) {\n // Add position indicator for the first mismatch in case it is a\n // single line and the input length is less than the column length.\n indicator = \"\\n \".concat(repeat(' ', i), \"^\");\n i = 0;\n }\n }\n }\n }\n\n // Remove all ending lines that match (this optimizes the output for\n // readability by reducing the number of total changed lines).\n var a = actualLines[actualLines.length - 1];\n var b = expectedLines[expectedLines.length - 1];\n while (a === b) {\n if (i++ < 2) {\n end = \"\\n \".concat(a).concat(end);\n } else {\n other = a;\n }\n actualLines.pop();\n expectedLines.pop();\n if (actualLines.length === 0 || expectedLines.length === 0) break;\n a = actualLines[actualLines.length - 1];\n b = expectedLines[expectedLines.length - 1];\n }\n var maxLines = Math.max(actualLines.length, expectedLines.length);\n // Strict equal with identical objects that are not identical by reference.\n // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() })\n if (maxLines === 0) {\n // We have to get the result again. The lines were all removed before.\n var _actualLines = actualInspected.split('\\n');\n\n // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n if (_actualLines.length > 30) {\n _actualLines[26] = \"\".concat(blue, \"...\").concat(white);\n while (_actualLines.length > 27) {\n _actualLines.pop();\n }\n }\n return \"\".concat(kReadableOperator.notIdentical, \"\\n\\n\").concat(_actualLines.join('\\n'), \"\\n\");\n }\n if (i > 3) {\n end = \"\\n\".concat(blue, \"...\").concat(white).concat(end);\n skipped = true;\n }\n if (other !== '') {\n end = \"\\n \".concat(other).concat(end);\n other = '';\n }\n var printedLines = 0;\n var msg = kReadableOperator[operator] + \"\\n\".concat(green, \"+ actual\").concat(white, \" \").concat(red, \"- expected\").concat(white);\n var skippedMsg = \" \".concat(blue, \"...\").concat(white, \" Lines skipped\");\n for (i = 0; i < maxLines; i++) {\n // Only extra expected lines exist\n var cur = i - lastPos;\n if (actualLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(expectedLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(expectedLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the expected line to the cache.\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLines[i]);\n printedLines++;\n // Only extra actual lines exist\n } else if (expectedLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the actual line to the result.\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLines[i]);\n printedLines++;\n // Lines diverge\n } else {\n var expectedLine = expectedLines[i];\n var actualLine = actualLines[i];\n // If the lines diverge, specifically check for lines that only diverge by\n // a trailing comma. In that case it is actually identical and we should\n // mark it as such.\n var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine);\n // If the expected line has a trailing comma but is otherwise identical,\n // add a comma at the end of the actual line. Otherwise the output could\n // look weird as in:\n //\n // [\n // 1 // No comma at the end!\n // + 2\n // ]\n //\n if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) {\n divergingLines = false;\n actualLine += ',';\n }\n if (divergingLines) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the actual line to the result and cache the expected diverging\n // line so consecutive diverging lines show up as +++--- and not +-+-+-.\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLine);\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLine);\n printedLines += 2;\n // Lines are identical\n } else {\n // Add all cached information to the result before adding other things\n // and reset the cache.\n res += other;\n other = '';\n // If the last diverging line is exactly one line above or if it is the\n // very first line, add the line to the result.\n if (cur === 1 || i === 0) {\n res += \"\\n \".concat(actualLine);\n printedLines++;\n }\n }\n }\n // Inspected object to big (Show ~20 rows max)\n if (printedLines > 20 && i < maxLines - 2) {\n return \"\".concat(msg).concat(skippedMsg, \"\\n\").concat(res, \"\\n\").concat(blue, \"...\").concat(white).concat(other, \"\\n\") + \"\".concat(blue, \"...\").concat(white);\n }\n }\n return \"\".concat(msg).concat(skipped ? skippedMsg : '', \"\\n\").concat(res).concat(other).concat(end).concat(indicator);\n}\nvar AssertionError = /*#__PURE__*/function (_Error, _inspect$custom) {\n _inherits(AssertionError, _Error);\n var _super = _createSuper(AssertionError);\n function AssertionError(options) {\n var _this;\n _classCallCheck(this, AssertionError);\n if (_typeof(options) !== 'object' || options === null) {\n throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);\n }\n var message = options.message,\n operator = options.operator,\n stackStartFn = options.stackStartFn;\n var actual = options.actual,\n expected = options.expected;\n var limit = Error.stackTraceLimit;\n Error.stackTraceLimit = 0;\n if (message != null) {\n _this = _super.call(this, String(message));\n } else {\n if (process.stderr && process.stderr.isTTY) {\n // Reset on each call to make sure we handle dynamically set environment\n // variables correct.\n if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {\n blue = \"\\x1B[34m\";\n green = \"\\x1B[32m\";\n white = \"\\x1B[39m\";\n red = \"\\x1B[31m\";\n } else {\n blue = '';\n green = '';\n white = '';\n red = '';\n }\n }\n // Prevent the error stack from being visible by duplicating the error\n // in a very close way to the original in case both sides are actually\n // instances of Error.\n if (_typeof(actual) === 'object' && actual !== null && _typeof(expected) === 'object' && expected !== null && 'stack' in actual && actual instanceof Error && 'stack' in expected && expected instanceof Error) {\n actual = copyError(actual);\n expected = copyError(expected);\n }\n if (operator === 'deepStrictEqual' || operator === 'strictEqual') {\n _this = _super.call(this, createErrDiff(actual, expected, operator));\n } else if (operator === 'notDeepStrictEqual' || operator === 'notStrictEqual') {\n // In case the objects are equal but the operator requires unequal, show\n // the first object and say A equals B\n var base = kReadableOperator[operator];\n var res = inspectValue(actual).split('\\n');\n\n // In case \"actual\" is an object, it should not be reference equal.\n if (operator === 'notStrictEqual' && _typeof(actual) === 'object' && actual !== null) {\n base = kReadableOperator.notStrictEqualObject;\n }\n\n // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n if (res.length > 30) {\n res[26] = \"\".concat(blue, \"...\").concat(white);\n while (res.length > 27) {\n res.pop();\n }\n }\n\n // Only print a single input.\n if (res.length === 1) {\n _this = _super.call(this, \"\".concat(base, \" \").concat(res[0]));\n } else {\n _this = _super.call(this, \"\".concat(base, \"\\n\\n\").concat(res.join('\\n'), \"\\n\"));\n }\n } else {\n var _res = inspectValue(actual);\n var other = '';\n var knownOperators = kReadableOperator[operator];\n if (operator === 'notDeepEqual' || operator === 'notEqual') {\n _res = \"\".concat(kReadableOperator[operator], \"\\n\\n\").concat(_res);\n if (_res.length > 1024) {\n _res = \"\".concat(_res.slice(0, 1021), \"...\");\n }\n } else {\n other = \"\".concat(inspectValue(expected));\n if (_res.length > 512) {\n _res = \"\".concat(_res.slice(0, 509), \"...\");\n }\n if (other.length > 512) {\n other = \"\".concat(other.slice(0, 509), \"...\");\n }\n if (operator === 'deepEqual' || operator === 'equal') {\n _res = \"\".concat(knownOperators, \"\\n\\n\").concat(_res, \"\\n\\nshould equal\\n\\n\");\n } else {\n other = \" \".concat(operator, \" \").concat(other);\n }\n }\n _this = _super.call(this, \"\".concat(_res).concat(other));\n }\n }\n Error.stackTraceLimit = limit;\n _this.generatedMessage = !message;\n Object.defineProperty(_assertThisInitialized(_this), 'name', {\n value: 'AssertionError [ERR_ASSERTION]',\n enumerable: false,\n writable: true,\n configurable: true\n });\n _this.code = 'ERR_ASSERTION';\n _this.actual = actual;\n _this.expected = expected;\n _this.operator = operator;\n if (Error.captureStackTrace) {\n // eslint-disable-next-line no-restricted-syntax\n Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);\n }\n // Create error message including the error code in the name.\n _this.stack;\n // Reset the name.\n _this.name = 'AssertionError';\n return _possibleConstructorReturn(_this);\n }\n _createClass(AssertionError, [{\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this.name, \" [\").concat(this.code, \"]: \").concat(this.message);\n }\n }, {\n key: _inspect$custom,\n value: function value(recurseTimes, ctx) {\n // This limits the `actual` and `expected` property default inspection to\n // the minimum depth. Otherwise those values would be too verbose compared\n // to the actual error message which contains a combined view of these two\n // input values.\n return inspect(this, _objectSpread(_objectSpread({}, ctx), {}, {\n customInspect: false,\n depth: 0\n }));\n }\n }]);\n return AssertionError;\n}( /*#__PURE__*/_wrapNativeSuper(Error), inspect.custom);\nmodule.exports = AssertionError;","// Currently in sync with Node.js lib/internal/errors.js\n// https://github.com/nodejs/node/commit/3b044962c48fe313905877a96b5d0894a5404f6f\n\n/* eslint node-core/documented-errors: \"error\" */\n/* eslint node-core/alphabetize-errors: \"error\" */\n/* eslint node-core/prefer-util-format-errors: \"error\" */\n\n'use strict';\n\n// The whole point behind this internal module is to allow Node.js to no\n// longer be forced to treat every error message change as a semver-major\n// change. The NodeError classes here all expose a `code` property whose\n// value statically and permanently identifies the error. While the error\n// message may change, the code should not.\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar codes = {};\n\n// Lazy loaded\nvar assert;\nvar util;\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n var NodeError = /*#__PURE__*/function (_Base) {\n _inherits(NodeError, _Base);\n var _super = _createSuper(NodeError);\n function NodeError(arg1, arg2, arg3) {\n var _this;\n _classCallCheck(this, NodeError);\n _this = _super.call(this, getMessage(arg1, arg2, arg3));\n _this.code = code;\n return _this;\n }\n return _createClass(NodeError);\n }(Base);\n codes[code] = NodeError;\n}\n\n// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n return str.substring(this_len - search.length, this_len) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\ncreateErrorType('ERR_AMBIGUOUS_ARGUMENT', 'The \"%s\" argument is ambiguous. %s', TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n if (assert === undefined) assert = require('../assert');\n assert(typeof name === 'string', \"'name' must be a string\");\n\n // determiner: 'must be' or 'must not be'\n var determiner;\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n var msg;\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n // TODO(BridgeAR): Improve the output by showing `null` and similar.\n msg += \". Received type \".concat(_typeof(actual));\n return msg;\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_VALUE', function (name, value) {\n var reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'is invalid';\n if (util === undefined) util = require('util/');\n var inspected = util.inspect(value);\n if (inspected.length > 128) {\n inspected = \"\".concat(inspected.slice(0, 128), \"...\");\n }\n return \"The argument '\".concat(name, \"' \").concat(reason, \". Received \").concat(inspected);\n}, TypeError, RangeError);\ncreateErrorType('ERR_INVALID_RETURN_VALUE', function (input, name, value) {\n var type;\n if (value && value.constructor && value.constructor.name) {\n type = \"instance of \".concat(value.constructor.name);\n } else {\n type = \"type \".concat(_typeof(value));\n }\n return \"Expected \".concat(input, \" to be returned from the \\\"\").concat(name, \"\\\"\") + \" function but got \".concat(type, \".\");\n}, TypeError);\ncreateErrorType('ERR_MISSING_ARGS', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (assert === undefined) assert = require('../assert');\n assert(args.length > 0, 'At least one arg needs to be specified');\n var msg = 'The ';\n var len = args.length;\n args = args.map(function (a) {\n return \"\\\"\".concat(a, \"\\\"\");\n });\n switch (len) {\n case 1:\n msg += \"\".concat(args[0], \" argument\");\n break;\n case 2:\n msg += \"\".concat(args[0], \" and \").concat(args[1], \" arguments\");\n break;\n default:\n msg += args.slice(0, len - 1).join(', ');\n msg += \", and \".concat(args[len - 1], \" arguments\");\n break;\n }\n return \"\".concat(msg, \" must be specified\");\n}, TypeError);\nmodule.exports.codes = codes;","// Currently in sync with Node.js lib/internal/util/comparisons.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar regexFlagsSupported = /a/g.flags !== undefined;\nvar arrayFromSet = function arrayFromSet(set) {\n var array = [];\n set.forEach(function (value) {\n return array.push(value);\n });\n return array;\n};\nvar arrayFromMap = function arrayFromMap(map) {\n var array = [];\n map.forEach(function (value, key) {\n return array.push([key, value]);\n });\n return array;\n};\nvar objectIs = Object.is ? Object.is : require('object-is');\nvar objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () {\n return [];\n};\nvar numberIsNaN = Number.isNaN ? Number.isNaN : require('is-nan');\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\nvar hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);\nvar propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);\nvar objectToString = uncurryThis(Object.prototype.toString);\nvar _require$types = require('util/').types,\n isAnyArrayBuffer = _require$types.isAnyArrayBuffer,\n isArrayBufferView = _require$types.isArrayBufferView,\n isDate = _require$types.isDate,\n isMap = _require$types.isMap,\n isRegExp = _require$types.isRegExp,\n isSet = _require$types.isSet,\n isNativeError = _require$types.isNativeError,\n isBoxedPrimitive = _require$types.isBoxedPrimitive,\n isNumberObject = _require$types.isNumberObject,\n isStringObject = _require$types.isStringObject,\n isBooleanObject = _require$types.isBooleanObject,\n isBigIntObject = _require$types.isBigIntObject,\n isSymbolObject = _require$types.isSymbolObject,\n isFloat32Array = _require$types.isFloat32Array,\n isFloat64Array = _require$types.isFloat64Array;\nfunction isNonIndex(key) {\n if (key.length === 0 || key.length > 10) return true;\n for (var i = 0; i < key.length; i++) {\n var code = key.charCodeAt(i);\n if (code < 48 || code > 57) return true;\n }\n // The maximum size for an array is 2 ** 32 -1.\n return key.length === 10 && key >= Math.pow(2, 32);\n}\nfunction getOwnNonIndexProperties(value) {\n return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));\n}\n\n// Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js\n// original notice:\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n var x = a.length;\n var y = b.length;\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}\nvar ONLY_ENUMERABLE = undefined;\nvar kStrict = true;\nvar kLoose = false;\nvar kNoIterator = 0;\nvar kIsArray = 1;\nvar kIsSet = 2;\nvar kIsMap = 3;\n\n// Check if they have the same source and flags\nfunction areSimilarRegExps(a, b) {\n return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);\n}\nfunction areSimilarFloatArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n for (var offset = 0; offset < a.byteLength; offset++) {\n if (a[offset] !== b[offset]) {\n return false;\n }\n }\n return true;\n}\nfunction areSimilarTypedArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;\n}\nfunction areEqualArrayBuffers(buf1, buf2) {\n return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;\n}\nfunction isEqualBoxedPrimitive(val1, val2) {\n if (isNumberObject(val1)) {\n return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));\n }\n if (isStringObject(val1)) {\n return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);\n }\n if (isBooleanObject(val1)) {\n return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);\n }\n if (isBigIntObject(val1)) {\n return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);\n }\n return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);\n}\n\n// Notes: Type tags are historical [[Class]] properties that can be set by\n// FunctionTemplate::SetClassName() in C++ or Symbol.toStringTag in JS\n// and retrieved using Object.prototype.toString.call(obj) in JS\n// See https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n// for a list of tags pre-defined in the spec.\n// There are some unspecified tags in the wild too (e.g. typed array tags).\n// Since tags can be altered, they only serve fast failures\n//\n// Typed arrays and buffers are checked by comparing the content in their\n// underlying ArrayBuffer. This optimization requires that it's\n// reasonable to interpret their underlying memory in the same way,\n// which is checked by comparing their type tags.\n// (e.g. a Uint8Array and a Uint16Array with the same memory content\n// could still be different because they will be interpreted differently).\n//\n// For strict comparison, objects should have\n// a) The same built-in type tags\n// b) The same prototypes.\n\nfunction innerDeepEqual(val1, val2, strict, memos) {\n // All identical values are equivalent, as determined by ===.\n if (val1 === val2) {\n if (val1 !== 0) return true;\n return strict ? objectIs(val1, val2) : true;\n }\n\n // Check more closely if val1 and val2 are equal.\n if (strict) {\n if (_typeof(val1) !== 'object') {\n return typeof val1 === 'number' && numberIsNaN(val1) && numberIsNaN(val2);\n }\n if (_typeof(val2) !== 'object' || val1 === null || val2 === null) {\n return false;\n }\n if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {\n return false;\n }\n } else {\n if (val1 === null || _typeof(val1) !== 'object') {\n if (val2 === null || _typeof(val2) !== 'object') {\n // eslint-disable-next-line eqeqeq\n return val1 == val2;\n }\n return false;\n }\n if (val2 === null || _typeof(val2) !== 'object') {\n return false;\n }\n }\n var val1Tag = objectToString(val1);\n var val2Tag = objectToString(val2);\n if (val1Tag !== val2Tag) {\n return false;\n }\n if (Array.isArray(val1)) {\n // Check for sparse arrays and general fast path\n if (val1.length !== val2.length) {\n return false;\n }\n var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n if (keys1.length !== keys2.length) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsArray, keys1);\n }\n // [browserify] This triggers on certain types in IE (Map/Set) so we don't\n // wan't to early return out of the rest of the checks. However we can check\n // if the second value is one of these values and the first isn't.\n if (val1Tag === '[object Object]') {\n // return keyCheck(val1, val2, strict, memos, kNoIterator);\n if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {\n return false;\n }\n }\n if (isDate(val1)) {\n if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {\n return false;\n }\n } else if (isRegExp(val1)) {\n if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {\n return false;\n }\n } else if (isNativeError(val1) || val1 instanceof Error) {\n // Do not compare the stack as it might differ even though the error itself\n // is otherwise identical.\n if (val1.message !== val2.message || val1.name !== val2.name) {\n return false;\n }\n } else if (isArrayBufferView(val1)) {\n if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {\n if (!areSimilarFloatArrays(val1, val2)) {\n return false;\n }\n } else if (!areSimilarTypedArrays(val1, val2)) {\n return false;\n }\n // Buffer.compare returns true, so val1.length === val2.length. If they both\n // only contain numeric keys, we don't need to exam further than checking\n // the symbols.\n var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n if (_keys.length !== _keys2.length) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);\n } else if (isSet(val1)) {\n if (!isSet(val2) || val1.size !== val2.size) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsSet);\n } else if (isMap(val1)) {\n if (!isMap(val2) || val1.size !== val2.size) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsMap);\n } else if (isAnyArrayBuffer(val1)) {\n if (!areEqualArrayBuffers(val1, val2)) {\n return false;\n }\n } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kNoIterator);\n}\nfunction getEnumerables(val, keys) {\n return keys.filter(function (k) {\n return propertyIsEnumerable(val, k);\n });\n}\nfunction keyCheck(val1, val2, strict, memos, iterationType, aKeys) {\n // For all remaining Object pairs, including Array, objects and Maps,\n // equivalence is determined by having:\n // a) The same number of owned enumerable properties\n // b) The same set of keys/indexes (although not necessarily the same order)\n // c) Equivalent values for every corresponding key/index\n // d) For Sets and Maps, equal contents\n // Note: this accounts for both named and indexed properties on Arrays.\n if (arguments.length === 5) {\n aKeys = Object.keys(val1);\n var bKeys = Object.keys(val2);\n\n // The pair must have the same number of owned properties.\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n }\n\n // Cheap key test\n var i = 0;\n for (; i < aKeys.length; i++) {\n if (!hasOwnProperty(val2, aKeys[i])) {\n return false;\n }\n }\n if (strict && arguments.length === 5) {\n var symbolKeysA = objectGetOwnPropertySymbols(val1);\n if (symbolKeysA.length !== 0) {\n var count = 0;\n for (i = 0; i < symbolKeysA.length; i++) {\n var key = symbolKeysA[i];\n if (propertyIsEnumerable(val1, key)) {\n if (!propertyIsEnumerable(val2, key)) {\n return false;\n }\n aKeys.push(key);\n count++;\n } else if (propertyIsEnumerable(val2, key)) {\n return false;\n }\n }\n var symbolKeysB = objectGetOwnPropertySymbols(val2);\n if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {\n return false;\n }\n } else {\n var _symbolKeysB = objectGetOwnPropertySymbols(val2);\n if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {\n return false;\n }\n }\n }\n if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {\n return true;\n }\n\n // Use memos to handle cycles.\n if (memos === undefined) {\n memos = {\n val1: new Map(),\n val2: new Map(),\n position: 0\n };\n } else {\n // We prevent up to two map.has(x) calls by directly retrieving the value\n // and checking for undefined. The map can only contain numbers, so it is\n // safe to check for undefined only.\n var val2MemoA = memos.val1.get(val1);\n if (val2MemoA !== undefined) {\n var val2MemoB = memos.val2.get(val2);\n if (val2MemoB !== undefined) {\n return val2MemoA === val2MemoB;\n }\n }\n memos.position++;\n }\n memos.val1.set(val1, memos.position);\n memos.val2.set(val2, memos.position);\n var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);\n memos.val1.delete(val1);\n memos.val2.delete(val2);\n return areEq;\n}\nfunction setHasEqualElement(set, val1, strict, memo) {\n // Go looking.\n var setValues = arrayFromSet(set);\n for (var i = 0; i < setValues.length; i++) {\n var val2 = setValues[i];\n if (innerDeepEqual(val1, val2, strict, memo)) {\n // Remove the matching element to make sure we do not check that again.\n set.delete(val2);\n return true;\n }\n }\n return false;\n}\n\n// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using\n// Sadly it is not possible to detect corresponding values properly in case the\n// type is a string, number, bigint or boolean. The reason is that those values\n// can match lots of different string values (e.g., 1n == '+00001').\nfunction findLooseMatchingPrimitives(prim) {\n switch (_typeof(prim)) {\n case 'undefined':\n return null;\n case 'object':\n // Only pass in null as object!\n return undefined;\n case 'symbol':\n return false;\n case 'string':\n prim = +prim;\n // Loose equal entries exist only if the string is possible to convert to\n // a regular number and not NaN.\n // Fall through\n case 'number':\n if (numberIsNaN(prim)) {\n return false;\n }\n }\n return true;\n}\nfunction setMightHaveLoosePrim(a, b, prim) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) return altValue;\n return b.has(altValue) && !a.has(altValue);\n}\nfunction mapMightHaveLoosePrim(a, b, prim, item, memo) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) {\n return altValue;\n }\n var curB = b.get(altValue);\n if (curB === undefined && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {\n return false;\n }\n return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);\n}\nfunction setEquiv(a, b, strict, memo) {\n // This is a lazily initiated Set of entries which have to be compared\n // pairwise.\n var set = null;\n var aValues = arrayFromSet(a);\n for (var i = 0; i < aValues.length; i++) {\n var val = aValues[i];\n // Note: Checking for the objects first improves the performance for object\n // heavy sets but it is a minor slow down for primitives. As they are fast\n // to check this improves the worst case scenario instead.\n if (_typeof(val) === 'object' && val !== null) {\n if (set === null) {\n set = new Set();\n }\n // If the specified value doesn't exist in the second set its an not null\n // object (or non strict only: a not matching primitive) we'll need to go\n // hunting for something thats deep-(strict-)equal to it. To make this\n // O(n log n) complexity we have to copy these values in a new set first.\n set.add(val);\n } else if (!b.has(val)) {\n if (strict) return false;\n\n // Fast path to detect missing string, symbol, undefined and null values.\n if (!setMightHaveLoosePrim(a, b, val)) {\n return false;\n }\n if (set === null) {\n set = new Set();\n }\n set.add(val);\n }\n }\n if (set !== null) {\n var bValues = arrayFromSet(b);\n for (var _i = 0; _i < bValues.length; _i++) {\n var _val = bValues[_i];\n // We have to check if a primitive value is already\n // matching and only if it's not, go hunting for it.\n if (_typeof(_val) === 'object' && _val !== null) {\n if (!setHasEqualElement(set, _val, strict, memo)) return false;\n } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {\n return false;\n }\n }\n return set.size === 0;\n }\n return true;\n}\nfunction mapHasEqualEntry(set, map, key1, item1, strict, memo) {\n // To be able to handle cases like:\n // Map([[{}, 'a'], [{}, 'b']]) vs Map([[{}, 'b'], [{}, 'a']])\n // ... we need to consider *all* matching keys, not just the first we find.\n var setValues = arrayFromSet(set);\n for (var i = 0; i < setValues.length; i++) {\n var key2 = setValues[i];\n if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {\n set.delete(key2);\n return true;\n }\n }\n return false;\n}\nfunction mapEquiv(a, b, strict, memo) {\n var set = null;\n var aEntries = arrayFromMap(a);\n for (var i = 0; i < aEntries.length; i++) {\n var _aEntries$i = _slicedToArray(aEntries[i], 2),\n key = _aEntries$i[0],\n item1 = _aEntries$i[1];\n if (_typeof(key) === 'object' && key !== null) {\n if (set === null) {\n set = new Set();\n }\n set.add(key);\n } else {\n // By directly retrieving the value we prevent another b.has(key) check in\n // almost all possible cases.\n var item2 = b.get(key);\n if (item2 === undefined && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {\n if (strict) return false;\n // Fast path to detect missing string, symbol, undefined and null\n // keys.\n if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;\n if (set === null) {\n set = new Set();\n }\n set.add(key);\n }\n }\n }\n if (set !== null) {\n var bEntries = arrayFromMap(b);\n for (var _i2 = 0; _i2 < bEntries.length; _i2++) {\n var _bEntries$_i = _slicedToArray(bEntries[_i2], 2),\n _key = _bEntries$_i[0],\n item = _bEntries$_i[1];\n if (_typeof(_key) === 'object' && _key !== null) {\n if (!mapHasEqualEntry(set, a, _key, item, strict, memo)) return false;\n } else if (!strict && (!a.has(_key) || !innerDeepEqual(a.get(_key), item, false, memo)) && !mapHasEqualEntry(set, a, _key, item, false, memo)) {\n return false;\n }\n }\n return set.size === 0;\n }\n return true;\n}\nfunction objEquiv(a, b, strict, keys, memos, iterationType) {\n // Sets and maps don't have their entries accessible via normal object\n // properties.\n var i = 0;\n if (iterationType === kIsSet) {\n if (!setEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsMap) {\n if (!mapEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsArray) {\n for (; i < a.length; i++) {\n if (hasOwnProperty(a, i)) {\n if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {\n return false;\n }\n } else if (hasOwnProperty(b, i)) {\n return false;\n } else {\n // Array is sparse.\n var keysA = Object.keys(a);\n for (; i < keysA.length; i++) {\n var key = keysA[i];\n if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {\n return false;\n }\n }\n if (keysA.length !== Object.keys(b).length) {\n return false;\n }\n return true;\n }\n }\n }\n\n // The pair must have equivalent values for every corresponding key.\n // Possibly expensive deep test:\n for (i = 0; i < keys.length; i++) {\n var _key2 = keys[i];\n if (!innerDeepEqual(a[_key2], b[_key2], strict, memos)) {\n return false;\n }\n }\n return true;\n}\nfunction isDeepEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kLoose);\n}\nfunction isDeepStrictEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kStrict);\n}\nmodule.exports = {\n isDeepEqual: isDeepEqual,\n isDeepStrictEqual: isDeepStrictEqual\n};","'use strict'\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\n// @ts-ignore\nvar _Buffer = require('safe-buffer').Buffer\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source) }\n if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return _Buffer.alloc(0) }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (psz < source.length) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4))\n vch.fill(0x00, 0, zeroes)\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*\r\n * big.js v6.2.1\r\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\r\n * Copyright (c) 2022 Michael Mclaughlin\r\n * https://github.com/MikeMcl/big.js/LICENCE.md\r\n */\r\n;(function (GLOBAL) {\r\n 'use strict';\r\n var Big,\r\n\r\n\r\n/************************************** EDITABLE DEFAULTS *****************************************/\r\n\r\n\r\n // The default values below must be integers within the stated ranges.\r\n\r\n /*\r\n * The maximum number of decimal places (DP) of the results of operations involving division:\r\n * div and sqrt, and pow with negative exponents.\r\n */\r\n DP = 20, // 0 to MAX_DP\r\n\r\n /*\r\n * The rounding mode (RM) used when rounding to the above decimal places.\r\n *\r\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\r\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\r\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\r\n * 3 Away from zero. (ROUND_UP)\r\n */\r\n RM = 1, // 0, 1, 2 or 3\r\n\r\n // The maximum value of DP and Big.DP.\r\n MAX_DP = 1E6, // 0 to 1000000\r\n\r\n // The maximum magnitude of the exponent argument to the pow method.\r\n MAX_POWER = 1E6, // 1 to 1000000\r\n\r\n /*\r\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\r\n * (JavaScript numbers: -7)\r\n * -1000000 is the minimum recommended exponent value of a Big.\r\n */\r\n NE = -7, // 0 to -1000000\r\n\r\n /*\r\n * The positive exponent (PE) at and above which toString returns exponential notation.\r\n * (JavaScript numbers: 21)\r\n * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\r\n */\r\n PE = 21, // 0 to 1000000\r\n\r\n /*\r\n * When true, an error will be thrown if a primitive number is passed to the Big constructor,\r\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\r\n * primitive number without a loss of precision.\r\n */\r\n STRICT = false, // true or false\r\n\r\n\r\n/**************************************************************************************************/\r\n\r\n\r\n // Error messages.\r\n NAME = '[big.js] ',\r\n INVALID = NAME + 'Invalid ',\r\n INVALID_DP = INVALID + 'decimal places',\r\n INVALID_RM = INVALID + 'rounding mode',\r\n DIV_BY_ZERO = NAME + 'Division by zero',\r\n\r\n // The shared prototype object.\r\n P = {},\r\n UNDEFINED = void 0,\r\n NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\r\n\r\n\r\n /*\r\n * Create and return a Big constructor.\r\n */\r\n function _Big_() {\r\n\r\n /*\r\n * The Big constructor and exported function.\r\n * Create and return a new instance of a Big number object.\r\n *\r\n * n {number|string|Big} A numeric value.\r\n */\r\n function Big(n) {\r\n var x = this;\r\n\r\n // Enable constructor usage without new.\r\n if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);\r\n\r\n // Duplicate.\r\n if (n instanceof Big) {\r\n x.s = n.s;\r\n x.e = n.e;\r\n x.c = n.c.slice();\r\n } else {\r\n if (typeof n !== 'string') {\r\n if (Big.strict === true && typeof n !== 'bigint') {\r\n throw TypeError(INVALID + 'value');\r\n }\r\n\r\n // Minus zero?\r\n n = n === 0 && 1 / n < 0 ? '-0' : String(n);\r\n }\r\n\r\n parse(x, n);\r\n }\r\n\r\n // Retain a reference to this Big constructor.\r\n // Shadow Big.prototype.constructor which points to Object.\r\n x.constructor = Big;\r\n }\r\n\r\n Big.prototype = P;\r\n Big.DP = DP;\r\n Big.RM = RM;\r\n Big.NE = NE;\r\n Big.PE = PE;\r\n Big.strict = STRICT;\r\n Big.roundDown = 0;\r\n Big.roundHalfUp = 1;\r\n Big.roundHalfEven = 2;\r\n Big.roundUp = 3;\r\n\r\n return Big;\r\n }\r\n\r\n\r\n /*\r\n * Parse the number or string value passed to a Big constructor.\r\n *\r\n * x {Big} A Big number instance.\r\n * n {number|string} A numeric value.\r\n */\r\n function parse(x, n) {\r\n var e, i, nl;\r\n\r\n if (!NUMERIC.test(n)) {\r\n throw Error(INVALID + 'number');\r\n }\r\n\r\n // Determine sign.\r\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\r\n\r\n // Decimal point?\r\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = n.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +n.slice(i + 1);\r\n n = n.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = n.length;\r\n }\r\n\r\n nl = n.length;\r\n\r\n // Determine leading zeros.\r\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\r\n\r\n if (i == nl) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n\r\n // Determine trailing zeros.\r\n for (; nl > 0 && n.charAt(--nl) == '0';);\r\n x.e = e - i - 1;\r\n x.c = [];\r\n\r\n // Convert string to array of digits without leading/trailing zeros.\r\n for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Round Big x to a maximum of sd significant digits using rounding mode rm.\r\n *\r\n * x {Big} The Big to round.\r\n * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\r\n * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n * [more] {boolean} Whether the result of division was truncated.\r\n */\r\n function round(x, sd, rm, more) {\r\n var xc = x.c;\r\n\r\n if (rm === UNDEFINED) rm = x.constructor.RM;\r\n if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\r\n throw Error(INVALID_RM);\r\n }\r\n\r\n if (sd < 1) {\r\n more =\r\n rm === 3 && (more || !!xc[0]) || sd === 0 && (\r\n rm === 1 && xc[0] >= 5 ||\r\n rm === 2 && (xc[0] > 5 || xc[0] === 5 && (more || xc[1] !== UNDEFINED))\r\n );\r\n\r\n xc.length = 1;\r\n\r\n if (more) {\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n x.e = x.e - sd + 1;\r\n xc[0] = 1;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n } else if (sd < xc.length) {\r\n\r\n // xc[sd] is the digit after the digit that may be rounded up.\r\n more =\r\n rm === 1 && xc[sd] >= 5 ||\r\n rm === 2 && (xc[sd] > 5 || xc[sd] === 5 &&\r\n (more || xc[sd + 1] !== UNDEFINED || xc[sd - 1] & 1)) ||\r\n rm === 3 && (more || !!xc[0]);\r\n\r\n // Remove any digits after the required precision.\r\n xc.length = sd;\r\n\r\n // Round up?\r\n if (more) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up.\r\n for (; ++xc[--sd] > 9;) {\r\n xc[sd] = 0;\r\n if (sd === 0) {\r\n ++x.e;\r\n xc.unshift(1);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (sd = xc.length; !xc[--sd];) xc.pop();\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Return a string representing the value of Big x in normal or exponential notation.\r\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\r\n */\r\n function stringify(x, doExponential, isNonzero) {\r\n var e = x.e,\r\n s = x.c.join(''),\r\n n = s.length;\r\n\r\n // Exponential notation?\r\n if (doExponential) {\r\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\r\n\r\n // Normal notation.\r\n } else if (e < 0) {\r\n for (; ++e;) s = '0' + s;\r\n s = '0.' + s;\r\n } else if (e > 0) {\r\n if (++e > n) {\r\n for (e -= n; e--;) s += '0';\r\n } else if (e < n) {\r\n s = s.slice(0, e) + '.' + s.slice(e);\r\n }\r\n } else if (n > 1) {\r\n s = s.charAt(0) + '.' + s.slice(1);\r\n }\r\n\r\n return x.s < 0 && isNonzero ? '-' + s : s;\r\n }\r\n\r\n\r\n // Prototype/instance methods\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the absolute value of this Big.\r\n */\r\n P.abs = function () {\r\n var x = new this.constructor(this);\r\n x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return 1 if the value of this Big is greater than the value of Big y,\r\n * -1 if the value of this Big is less than the value of Big y, or\r\n * 0 if they have the same value.\r\n */\r\n P.cmp = function (y) {\r\n var isneg,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new x.constructor(y)).c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n isneg = i < 0;\r\n\r\n // Compare exponents.\r\n if (k != l) return k > l ^ isneg ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = -1; ++i < j;) {\r\n if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ isneg ? 1 : -1;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\r\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\n P.div = function (y) {\r\n var x = this,\r\n Big = x.constructor,\r\n a = x.c, // dividend\r\n b = (y = new Big(y)).c, // divisor\r\n k = x.s == y.s ? 1 : -1,\r\n dp = Big.DP;\r\n\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n\r\n // Divisor is zero?\r\n if (!b[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n // Dividend is 0? Return +-0.\r\n if (!a[0]) {\r\n y.s = k;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n var bl, bt, n, cmp, ri,\r\n bz = b.slice(),\r\n ai = bl = b.length,\r\n al = a.length,\r\n r = a.slice(0, bl), // remainder\r\n rl = r.length,\r\n q = y, // quotient\r\n qc = q.c = [],\r\n qi = 0,\r\n p = dp + (q.e = x.e - y.e) + 1; // precision of the result\r\n\r\n q.s = k;\r\n k = p < 0 ? 0 : p;\r\n\r\n // Create version of divisor with leading zero.\r\n bz.unshift(0);\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; rl++ < bl;) r.push(0);\r\n\r\n do {\r\n\r\n // n is how many times the divisor goes into current remainder.\r\n for (n = 0; n < 10; n++) {\r\n\r\n // Compare divisor and remainder.\r\n if (bl != (rl = r.length)) {\r\n cmp = bl > rl ? 1 : -1;\r\n } else {\r\n for (ri = -1, cmp = 0; ++ri < bl;) {\r\n if (b[ri] != r[ri]) {\r\n cmp = b[ri] > r[ri] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // If divisor < remainder, subtract divisor from remainder.\r\n if (cmp < 0) {\r\n\r\n // Remainder can't be more than 1 digit longer than divisor.\r\n // Equalise lengths using divisor with extra leading zero?\r\n for (bt = rl == bl ? b : bz; rl;) {\r\n if (r[--rl] < bt[rl]) {\r\n ri = rl;\r\n for (; ri && !r[--ri];) r[ri] = 9;\r\n --r[ri];\r\n r[rl] += 10;\r\n }\r\n r[rl] -= bt[rl];\r\n }\r\n\r\n for (; !r[0];) r.shift();\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n // Add the digit n to the result array.\r\n qc[qi++] = cmp ? n : ++n;\r\n\r\n // Update the remainder.\r\n if (r[0] && cmp) r[rl] = a[ai] || 0;\r\n else r = [a[ai]];\r\n\r\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\r\n\r\n // Leading zero? Do not remove if result is simply zero (qi == 1).\r\n if (!qc[0] && qi != 1) {\r\n\r\n // There can't be more than one zero.\r\n qc.shift();\r\n q.e--;\r\n p--;\r\n }\r\n\r\n // Round?\r\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\r\n\r\n return q;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\r\n */\r\n P.eq = function (y) {\r\n return this.cmp(y) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\r\n * false.\r\n */\r\n P.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\n P.gte = function (y) {\r\n return this.cmp(y) > -1;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\r\n */\r\n P.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\n P.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big minus the value of Big y.\r\n */\r\n P.minus = P.sub = function (y) {\r\n var i, j, t, xlty,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xc = x.c.slice(),\r\n xe = x.e,\r\n yc = y.c,\r\n ye = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (yc[0]) {\r\n y.s = -b;\r\n } else if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = 1;\r\n }\r\n return y;\r\n }\r\n\r\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\r\n if (a = xe - ye) {\r\n\r\n if (xlty = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n for (b = a; b--;) t.push(0);\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n if (xc[b] != yc[b]) {\r\n xlty = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xlty) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n /*\r\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\r\n * needs to start at yc.length.\r\n */\r\n if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0;\r\n\r\n // Subtract yc from xc.\r\n for (b = i; j > a;) {\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i];) xc[i] = 9;\r\n --xc[i];\r\n xc[j] += 10;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--b] === 0;) xc.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] === 0;) {\r\n xc.shift();\r\n --ye;\r\n }\r\n\r\n if (!xc[0]) {\r\n\r\n // n - n = +0\r\n y.s = 1;\r\n\r\n // Result must be zero.\r\n xc = [ye = 0];\r\n }\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\r\n */\r\n P.mod = function (y) {\r\n var ygtx,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n if (!y.c[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n x.s = y.s = 1;\r\n ygtx = y.cmp(x) == 1;\r\n x.s = a;\r\n y.s = b;\r\n\r\n if (ygtx) return new Big(x);\r\n\r\n a = Big.DP;\r\n b = Big.RM;\r\n Big.DP = Big.RM = 0;\r\n x = x.div(y);\r\n Big.DP = a;\r\n Big.RM = b;\r\n\r\n return this.minus(x.times(y));\r\n };\r\n \r\n \r\n /*\r\n * Return a new Big whose value is the value of this Big negated.\r\n */\r\n P.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big plus the value of Big y.\r\n */\r\n P.plus = P.add = function (y) {\r\n var e, k, t,\r\n x = this,\r\n Big = x.constructor;\r\n\r\n y = new Big(y);\r\n\r\n // Signs differ?\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e,\r\n xc = x.c,\r\n ye = y.e,\r\n yc = y.c;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (!yc[0]) {\r\n if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = x.s;\r\n }\r\n }\r\n return y;\r\n }\r\n\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents.\r\n // Note: reverse faster than unshifts.\r\n if (e = xe - ye) {\r\n if (e > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n e = -e;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; e--;) t.push(0);\r\n t.reverse();\r\n }\r\n\r\n // Point xc to the longer array.\r\n if (xc.length - yc.length < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n }\r\n\r\n e = yc.length;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\r\n for (k = 0; e; xc[e] %= 10) k = (xc[--e] = xc[e] + yc[e] + k) / 10 | 0;\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n\r\n if (k) {\r\n xc.unshift(k);\r\n ++ye;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (e = xc.length; xc[--e] === 0;) xc.pop();\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * Return a Big whose value is the value of this Big raised to the power n.\r\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\r\n * mode Big.RM.\r\n *\r\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\r\n */\r\n P.pow = function (n) {\r\n var x = this,\r\n one = new x.constructor('1'),\r\n y = one,\r\n isneg = n < 0;\r\n\r\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\r\n throw Error(INVALID + 'exponent');\r\n }\r\n\r\n if (isneg) n = -n;\r\n\r\n for (;;) {\r\n if (n & 1) y = y.times(x);\r\n n >>= 1;\r\n if (!n) break;\r\n x = x.times(x);\r\n }\r\n\r\n return isneg ? one.div(y) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\r\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\n P.prec = function (sd, rm) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n return round(new this.constructor(this), sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\r\n * using rounding mode rm, or Big.RM if rm is not specified.\r\n * If dp is negative, round to an integer which is a multiple of 10**-dp.\r\n * If dp is not specified, round to 0 decimal places.\r\n *\r\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\n P.round = function (dp, rm) {\r\n if (dp === UNDEFINED) dp = 0;\r\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n return round(new this.constructor(this), dp + this.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\r\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\n P.sqrt = function () {\r\n var r, c, t,\r\n x = this,\r\n Big = x.constructor,\r\n s = x.s,\r\n e = x.e,\r\n half = new Big('0.5');\r\n\r\n // Zero?\r\n if (!x.c[0]) return new Big(x);\r\n\r\n // Negative?\r\n if (s < 0) {\r\n throw Error(NAME + 'No square root');\r\n }\r\n\r\n // Estimate.\r\n s = Math.sqrt(x + '');\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\r\n if (s === 0 || s === 1 / 0) {\r\n c = x.c.join('');\r\n if (!(c.length + e & 1)) c += '0';\r\n s = Math.sqrt(c);\r\n e = ((e + 1) / 2 | 0) - (e < 0 || e & 1);\r\n r = new Big((s == 1 / 0 ? '5e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e);\r\n } else {\r\n r = new Big(s + '');\r\n }\r\n\r\n e = r.e + (Big.DP += 4);\r\n\r\n // Newton-Raphson iteration.\r\n do {\r\n t = r;\r\n r = half.times(t.plus(x.div(t)));\r\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\r\n\r\n return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big times the value of Big y.\r\n */\r\n P.times = P.mul = function (y) {\r\n var c,\r\n x = this,\r\n Big = x.constructor,\r\n xc = x.c,\r\n yc = (y = new Big(y)).c,\r\n a = xc.length,\r\n b = yc.length,\r\n i = x.e,\r\n j = y.e;\r\n\r\n // Determine sign of result.\r\n y.s = x.s == y.s ? 1 : -1;\r\n\r\n // Return signed 0 if either 0.\r\n if (!xc[0] || !yc[0]) {\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // Initialise exponent of result as x.e + y.e.\r\n y.e = i + j;\r\n\r\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\r\n if (a < b) {\r\n c = xc;\r\n xc = yc;\r\n yc = c;\r\n j = a;\r\n a = b;\r\n b = j;\r\n }\r\n\r\n // Initialise coefficient array of result with zeros.\r\n for (c = new Array(j = a + b); j--;) c[j] = 0;\r\n\r\n // Multiply.\r\n\r\n // i is initially xc.length.\r\n for (i = b; i--;) {\r\n b = 0;\r\n\r\n // a is yc.length.\r\n for (j = a + i; j > i;) {\r\n\r\n // Current sum of products at this digit position, plus carry.\r\n b = c[j] + yc[i] * xc[j - i - 1] + b;\r\n c[j--] = b % 10;\r\n\r\n // carry\r\n b = b / 10 | 0;\r\n }\r\n\r\n c[j] = b;\r\n }\r\n\r\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\r\n if (b) ++y.e;\r\n else c.shift();\r\n\r\n // Remove trailing zeros.\r\n for (i = c.length; !c[--i];) c.pop();\r\n y.c = c;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Big in exponential notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\n P.toExponential = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), ++dp, rm);\r\n for (; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, true, !!n);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Big in normal notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n */\r\n P.toFixed = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), dp + x.e + 1, rm);\r\n\r\n // x.e may have changed if the value is rounded up.\r\n for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, false, !!n);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Omit the sign for negative zero.\r\n */\r\n P.toJSON = P.toString = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this Big as a primitve number.\r\n */\r\n P.toNumber = function () {\r\n var n = Number(stringify(this, true, true));\r\n if (this.constructor.strict === true && !this.eq(n.toString())) {\r\n throw Error(NAME + 'Imprecise conversion');\r\n }\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Big rounded to sd significant digits using\r\n * rounding mode rm, or Big.RM if rm is not specified.\r\n * Use exponential notation if sd is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n var x = this,\r\n Big = x.constructor,\r\n n = x.c[0];\r\n\r\n if (sd !== UNDEFINED) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n x = round(new Big(x), sd, rm);\r\n for (; x.c.length < sd;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE, !!n);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Include the sign for negative zero.\r\n */\r\n P.valueOf = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n if (Big.strict === true) {\r\n throw Error(NAME + 'valueOf disallowed');\r\n }\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\r\n };\r\n\r\n\r\n // Export\r\n\r\n\r\n Big = _Big_();\r\n\r\n Big['default'] = Big.Big = Big;\r\n\r\n //AMD.\r\n if (typeof define === 'function' && define.amd) {\r\n define(function () { return Big; });\r\n\r\n // Node and other CommonJS-like environments that support module.exports.\r\n } else if (typeof module !== 'undefined' && module.exports) {\r\n module.exports = Big;\r\n\r\n //Browser.\r\n } else {\r\n GLOBAL.Big = Big;\r\n }\r\n})(this);\r\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet converter;\n/**\n * Convert a little-endian buffer into a BigInt.\n * @param buf The little-endian buffer to convert\n * @returns A BigInt with the little-endian representation of buf.\n */\nfunction toBigIntLE(buf) {\n {\n const reversed = Buffer.from(buf);\n reversed.reverse();\n const hex = reversed.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, false);\n}\nexports.toBigIntLE = toBigIntLE;\n/**\n * Convert a big-endian buffer into a BigInt\n * @param buf The big-endian buffer to convert.\n * @returns A BigInt with the big-endian representation of buf.\n */\nfunction toBigIntBE(buf) {\n {\n const hex = buf.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, true);\n}\nexports.toBigIntBE = toBigIntBE;\n/**\n * Convert a BigInt to a little-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A little-endian buffer representation of num.\n */\nfunction toBufferLE(num, width) {\n {\n const hex = num.toString(16);\n const buffer = Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n buffer.reverse();\n return buffer;\n }\n // Allocation is done here, since it is slower using napi in C\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);\n}\nexports.toBufferLE = toBufferLE;\n/**\n * Convert a BigInt to a big-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A big-endian buffer representation of num.\n */\nfunction toBufferBE(num, width) {\n {\n const hex = num.toString(16);\n return Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n }\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), true);\n}\nexports.toBufferBE = toBufferBE;\n",";(function (globalObject) {\r\n 'use strict';\r\n\r\n/*\r\n * bignumber.js v9.1.2\r\n * A JavaScript library for arbitrary-precision arithmetic.\r\n * https://github.com/MikeMcl/bignumber.js\r\n * Copyright (c) 2022 Michael Mclaughlin \r\n * MIT Licensed.\r\n *\r\n * BigNumber.prototype methods | BigNumber methods\r\n * |\r\n * absoluteValue abs | clone\r\n * comparedTo | config set\r\n * decimalPlaces dp | DECIMAL_PLACES\r\n * dividedBy div | ROUNDING_MODE\r\n * dividedToIntegerBy idiv | EXPONENTIAL_AT\r\n * exponentiatedBy pow | RANGE\r\n * integerValue | CRYPTO\r\n * isEqualTo eq | MODULO_MODE\r\n * isFinite | POW_PRECISION\r\n * isGreaterThan gt | FORMAT\r\n * isGreaterThanOrEqualTo gte | ALPHABET\r\n * isInteger | isBigNumber\r\n * isLessThan lt | maximum max\r\n * isLessThanOrEqualTo lte | minimum min\r\n * isNaN | random\r\n * isNegative | sum\r\n * isPositive |\r\n * isZero |\r\n * minus |\r\n * modulo mod |\r\n * multipliedBy times |\r\n * negated |\r\n * plus |\r\n * precision sd |\r\n * shiftedBy |\r\n * squareRoot sqrt |\r\n * toExponential |\r\n * toFixed |\r\n * toFormat |\r\n * toFraction |\r\n * toJSON |\r\n * toNumber |\r\n * toPrecision |\r\n * toString |\r\n * valueOf |\r\n *\r\n */\r\n\r\n\r\n var BigNumber,\r\n isNumeric = /^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n\r\n bignumberError = '[BigNumber Error] ',\r\n tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',\r\n\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n // EDITABLE\r\n // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n // the arguments to toExponential, toFixed, toFormat, and toPrecision.\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n /*\r\n * Create and return a BigNumber constructor.\r\n */\r\n function clone(configObject) {\r\n var div, convertBase, parseNumeric,\r\n P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },\r\n ONE = new BigNumber(1),\r\n\r\n\r\n //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------\r\n\r\n\r\n // The default values below must be integers within the inclusive ranges stated.\r\n // The values can also be changed at run-time using BigNumber.set.\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n // The rounding mode used when rounding to the above decimal places, and when using\r\n // toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n // UP 0 Away from zero.\r\n // DOWN 1 Towards zero.\r\n // CEIL 2 Towards +Infinity.\r\n // FLOOR 3 Towards -Infinity.\r\n // HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend.\r\n // This modulo mode is commonly known as 'truncated division' and is\r\n // equivalent to (a % n) in JavaScript.\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n // The remainder is always positive.\r\n //\r\n // The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n // modes are commonly used for the modulus operation.\r\n // Although the other rounding modes can also be used, they may not give useful results.\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the exponentiatedBy operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 0, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n prefix: '',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n groupSeparator: ',',\r\n decimalSeparator: '.',\r\n fractionGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n suffix: ''\r\n },\r\n\r\n // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',\r\n // '-', '.', whitespace, or repeated character.\r\n // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz',\r\n alphabetHasNormalDecimalDigits = true;\r\n\r\n\r\n //------------------------------------------------------------------------------------------\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * v {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.\r\n */\r\n function BigNumber(v, b) {\r\n var alphabet, c, caseChanged, e, i, isNum, len, str,\r\n x = this;\r\n\r\n // Enable constructor call without `new`.\r\n if (!(x instanceof BigNumber)) return new BigNumber(v, b);\r\n\r\n if (b == null) {\r\n\r\n if (v && v._isBigNumber === true) {\r\n x.s = v.s;\r\n\r\n if (!v.c || v.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else if (v.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = v.e;\r\n x.c = v.c.slice();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if ((isNum = typeof v == 'number') && v * 0 == 0) {\r\n\r\n // Use `1 / n` to handle minus zero also.\r\n x.s = 1 / v < 0 ? (v = -v, -1) : 1;\r\n\r\n // Fast path for integers, where n < 2147483648 (2**31).\r\n if (v === ~~v) {\r\n for (e = 0, i = v; i >= 10; i /= 10, e++);\r\n\r\n if (e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else {\r\n x.e = e;\r\n x.c = [v];\r\n }\r\n\r\n return;\r\n }\r\n\r\n str = String(v);\r\n } else {\r\n\r\n if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);\r\n\r\n x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n\r\n // Allow exponential notation to be used with base 10 argument, while\r\n // also rounding to DECIMAL_PLACES as with other bases.\r\n if (b == 10 && alphabetHasNormalDecimalDigits) {\r\n x = new BigNumber(v);\r\n return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);\r\n }\r\n\r\n str = String(v);\r\n\r\n if (isNum = typeof v == 'number') {\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n if (v * 0 != 0) return parseNumeric(x, str, isNum, b);\r\n\r\n x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (BigNumber.DEBUG && str.replace(/^0\\.0*|\\./, '').length > 15) {\r\n throw Error\r\n (tooManyDigits + v);\r\n }\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n alphabet = ALPHABET.slice(0, b);\r\n e = i = 0;\r\n\r\n // Check that str is a valid base b number.\r\n // Don't use RegExp, so alphabet can contain special characters.\r\n for (len = str.length; i < len; i++) {\r\n if (alphabet.indexOf(c = str.charAt(i)) < 0) {\r\n if (c == '.') {\r\n\r\n // If '.' is not the first character and it has not be found before.\r\n if (i > e) {\r\n e = len;\r\n continue;\r\n }\r\n } else if (!caseChanged) {\r\n\r\n // Allow e.g. hexadecimal 'FF' as well as 'ff'.\r\n if (str == str.toUpperCase() && (str = str.toLowerCase()) ||\r\n str == str.toLowerCase() && (str = str.toUpperCase())) {\r\n caseChanged = true;\r\n i = -1;\r\n e = 0;\r\n continue;\r\n }\r\n }\r\n\r\n return parseNumeric(x, String(v), isNum, b);\r\n }\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n isNum = false;\r\n str = convertBase(str, b, 10, x.s);\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n else e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(--len) === 48;);\r\n\r\n if (str = str.slice(i, ++len)) {\r\n len -= i;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (isNum && BigNumber.DEBUG &&\r\n len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {\r\n throw Error\r\n (tooManyDigits + (x.s * v));\r\n }\r\n\r\n // Overflow?\r\n if ((e = e - i - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE; // i < 1\r\n\r\n if (i < len) {\r\n if (i) x.c.push(+str.slice(0, i));\r\n\r\n for (len -= LOG_BASE; i < len;) {\r\n x.c.push(+str.slice(i, i += LOG_BASE));\r\n }\r\n\r\n i = LOG_BASE - (str = str.slice(i)).length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--; str += '0');\r\n x.c.push(+str);\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.clone = clone;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object with the following optional properties (if the value of a property is\r\n * a number, it must be an integer within the inclusive range stated):\r\n *\r\n * DECIMAL_PLACES {number} 0 to MAX\r\n * ROUNDING_MODE {number} 0 to 8\r\n * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]\r\n * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]\r\n * CRYPTO {boolean} true or false\r\n * MODULO_MODE {number} 0 to 9\r\n * POW_PRECISION {number} 0 to MAX\r\n * ALPHABET {string} A string of two or more unique characters which does\r\n * not contain '.'.\r\n * FORMAT {object} An object with some of the following properties:\r\n * prefix {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * groupSeparator {string}\r\n * decimalSeparator {string}\r\n * fractionGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * suffix {string}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined, except for ALPHABET.\r\n *\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = BigNumber.set = function (obj) {\r\n var p, v;\r\n\r\n if (obj != null) {\r\n\r\n if (typeof obj == 'object') {\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n DECIMAL_PLACES = v;\r\n }\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 8, p);\r\n ROUNDING_MODE = v;\r\n }\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or\r\n // [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, 0, p);\r\n intCheck(v[1], 0, MAX, p);\r\n TO_EXP_NEG = v[0];\r\n TO_EXP_POS = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);\r\n }\r\n }\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'\r\n if (obj.hasOwnProperty(p = 'RANGE')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, -1, p);\r\n intCheck(v[1], 1, MAX, p);\r\n MIN_EXP = v[0];\r\n MAX_EXP = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n if (v) {\r\n MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' cannot be zero: ' + v);\r\n }\r\n }\r\n }\r\n\r\n // CRYPTO {boolean} true or false.\r\n // '[BigNumber Error] CRYPTO not true or false: {v}'\r\n // '[BigNumber Error] crypto unavailable'\r\n if (obj.hasOwnProperty(p = 'CRYPTO')) {\r\n v = obj[p];\r\n if (v === !!v) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n CRYPTO = v;\r\n } else {\r\n CRYPTO = !v;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n } else {\r\n CRYPTO = v;\r\n }\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' not true or false: ' + v);\r\n }\r\n }\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'MODULO_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 9, p);\r\n MODULO_MODE = v;\r\n }\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'POW_PRECISION')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n POW_PRECISION = v;\r\n }\r\n\r\n // FORMAT {object}\r\n // '[BigNumber Error] FORMAT not an object: {v}'\r\n if (obj.hasOwnProperty(p = 'FORMAT')) {\r\n v = obj[p];\r\n if (typeof v == 'object') FORMAT = v;\r\n else throw Error\r\n (bignumberError + p + ' not an object: ' + v);\r\n }\r\n\r\n // ALPHABET {string}\r\n // '[BigNumber Error] ALPHABET invalid: {v}'\r\n if (obj.hasOwnProperty(p = 'ALPHABET')) {\r\n v = obj[p];\r\n\r\n // Disallow if less than two characters,\r\n // or if it contains '+', '-', '.', whitespace, or a repeated character.\r\n if (typeof v == 'string' && !/^.?$|[+\\-.\\s]|(.).*\\1/.test(v)) {\r\n alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789';\r\n ALPHABET = v;\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' invalid: ' + v);\r\n }\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Object expected: {v}'\r\n throw Error\r\n (bignumberError + 'Object expected: ' + obj);\r\n }\r\n }\r\n\r\n return {\r\n DECIMAL_PLACES: DECIMAL_PLACES,\r\n ROUNDING_MODE: ROUNDING_MODE,\r\n EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],\r\n RANGE: [MIN_EXP, MAX_EXP],\r\n CRYPTO: CRYPTO,\r\n MODULO_MODE: MODULO_MODE,\r\n POW_PRECISION: POW_PRECISION,\r\n FORMAT: FORMAT,\r\n ALPHABET: ALPHABET\r\n };\r\n };\r\n\r\n\r\n /*\r\n * Return true if v is a BigNumber instance, otherwise return false.\r\n *\r\n * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.\r\n *\r\n * v {any}\r\n *\r\n * '[BigNumber Error] Invalid BigNumber: {v}'\r\n */\r\n BigNumber.isBigNumber = function (v) {\r\n if (!v || v._isBigNumber !== true) return false;\r\n if (!BigNumber.DEBUG) return true;\r\n\r\n var i, n,\r\n c = v.c,\r\n e = v.e,\r\n s = v.s;\r\n\r\n out: if ({}.toString.call(c) == '[object Array]') {\r\n\r\n if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {\r\n\r\n // If the first element is zero, the BigNumber value must be zero.\r\n if (c[0] === 0) {\r\n if (e === 0 && c.length === 1) return true;\r\n break out;\r\n }\r\n\r\n // Calculate number of digits that c[0] should have, based on the exponent.\r\n i = (e + 1) % LOG_BASE;\r\n if (i < 1) i += LOG_BASE;\r\n\r\n // Calculate number of digits of c[0].\r\n //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {\r\n if (String(c[0]).length == i) {\r\n\r\n for (i = 0; i < c.length; i++) {\r\n n = c[i];\r\n if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;\r\n }\r\n\r\n // Last element cannot be zero, unless it is the only element.\r\n if (n !== 0) return true;\r\n }\r\n }\r\n\r\n // Infinity/NaN\r\n } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {\r\n return true;\r\n }\r\n\r\n throw Error\r\n (bignumberError + 'Invalid BigNumber: ' + v);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.maximum = BigNumber.max = function () {\r\n return maxOrMin(arguments, -1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.minimum = BigNumber.min = function () {\r\n return maxOrMin(arguments, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'\r\n * '[BigNumber Error] crypto unavailable'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor(Math.random() * pow2_53); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n if (dp == null) dp = DECIMAL_PLACES;\r\n else intCheck(dp, 0, MAX);\r\n\r\n k = mathceil(dp / LOG_BASE);\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if (crypto.getRandomValues) {\r\n\r\n a = crypto.getRandomValues(new Uint32Array(k *= 2));\r\n\r\n for (; i < k;) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if (v >= 9e15) {\r\n b = crypto.getRandomValues(new Uint32Array(2));\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n a = crypto.randomBytes(k *= 7);\r\n\r\n for (; i < k;) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +\r\n (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +\r\n (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];\r\n\r\n if (v >= 9e15) {\r\n crypto.randomBytes(7).copy(a, i);\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else {\r\n CRYPTO = false;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n }\r\n\r\n // Use Math.random.\r\n if (!CRYPTO) {\r\n\r\n for (; i < k;) {\r\n v = random53bitInt();\r\n if (v < 9e15) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if (k && dp) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor(k / v) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for (; c[i] === 0; c.pop(), i--);\r\n\r\n // Zero?\r\n if (i < 0) {\r\n c = [e = 0];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for (i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if (i < LOG_BASE) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the sum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.sum = function () {\r\n var i = 1,\r\n args = arguments,\r\n sum = new BigNumber(args[0]);\r\n for (; i < args.length;) sum = sum.plus(args[i++]);\r\n return sum;\r\n };\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Called by BigNumber and BigNumber.prototype.toString.\r\n convertBase = (function () {\r\n var decimal = '0123456789';\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. toBaseOut('255', 10, 16) returns [15, 15].\r\n * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut(str, baseIn, baseOut, alphabet) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for (; i < len;) {\r\n for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);\r\n\r\n arr[0] += alphabet.indexOf(str.charAt(i++));\r\n\r\n for (j = 0; j < arr.length; j++) {\r\n\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] == null) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n // If the caller is toString, we are converting from base 10 to baseOut.\r\n // If the caller is BigNumber, we are converting from baseIn to base 10.\r\n return function (str, baseIn, baseOut, sign, callerIsToString) {\r\n var alphabet, d, e, k, r, x, xc, y,\r\n i = str.indexOf('.'),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace('.', '');\r\n y = new BigNumber(baseIn);\r\n x = y.pow(str.length - i);\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n\r\n y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),\r\n 10, baseOut, decimal);\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n\r\n xc = toBaseOut(str, baseIn, baseOut, callerIsToString\r\n ? (alphabet = ALPHABET, decimal)\r\n : (alphabet = decimal, ALPHABET));\r\n\r\n // xc now represents str as an integer and converted to baseOut. e is the exponent.\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--k] == 0; xc.pop());\r\n\r\n // Zero?\r\n if (!xc[0]) return alphabet.charAt(0);\r\n\r\n // Does str represent an integer? If so, no need for the division.\r\n if (i < 0) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // The sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div(x, y, dp, rm, baseOut);\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n // xc now represents str converted to baseOut.\r\n\r\n // THe index of the rounding digit.\r\n d = e + dp + 1;\r\n\r\n // The rounding digit: the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n\r\n // Look at the rounding digits and mode to determine whether to round up.\r\n\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n // If the index of the rounding digit is not greater than zero, or xc represents\r\n // zero, then the result of the base conversion is zero or, if rounding up, a value\r\n // such as 0.00001.\r\n if (d < 1 || !xc[0]) {\r\n\r\n // 1^-dp or 0\r\n str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);\r\n } else {\r\n\r\n // Truncate xc to the required number of decimal places.\r\n xc.length = d;\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (--baseOut; ++xc[--d] > baseOut;) {\r\n xc[d] = 0;\r\n\r\n if (!d) {\r\n ++e;\r\n xc = [1].concat(xc);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (k = xc.length; !xc[--k];);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));\r\n\r\n // Add leading zeros, decimal point and trailing zeros as required.\r\n str = toFixedPoint(str, e, alphabet.charAt(0));\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n };\r\n })();\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply(x, k, base) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for (x = x.slice(); i--;) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;\r\n carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x = [carry].concat(x);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, cmp;\r\n\r\n if (aL != bL) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for (i = cmp = 0; i < aL; i++) {\r\n\r\n if (a[i] != b[i]) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1; a.splice(0, 1));\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function (x, y, dp, rm, base) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xc || !xc[0] || !yc || !yc[0]) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if (!base) {\r\n base = BASE;\r\n e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for (i = 0; yc[i] == (xc[i] || 0); i++);\r\n\r\n if (yc[i] > (xc[i] || 0)) e--;\r\n\r\n if (s < 0) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor(base / (yc[0] + 1));\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.\r\n // if (n > 1 || n++ == 1 && yc[0] < base / 2) {\r\n if (n > 1) {\r\n yc = multiply(yc, n, base);\r\n xc = multiply(xc, n, base);\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL; rem[remL++] = 0);\r\n yz = yc.slice();\r\n yz = [0].concat(yz);\r\n yc0 = yc[0];\r\n if (yc[1] >= base / 2) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yc, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor(rem0 / yc0);\r\n\r\n // Algorithm:\r\n // product = divisor multiplied by trial digit (n).\r\n // Compare product and remainder.\r\n // If product is greater than remainder:\r\n // Subtract divisor from product, decrement trial digit.\r\n // Subtract product from remainder.\r\n // If product was less than remainder at the last compare:\r\n // Compare new remainder and divisor.\r\n // If remainder is greater than divisor:\r\n // Subtract divisor from remainder, increment trial digit.\r\n\r\n if (n > 1) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply(yc, n, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder then trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while (compare(prod, rem, prodL, remL) == 1) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yc, prodL, base);\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if (n == 0) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if (prodL < remL) prod = [0].concat(prod);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if (cmp == -1) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while (compare(yc, rem, yL, remL) < 1) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yc, remL, base);\r\n remL = rem.length;\r\n }\r\n }\r\n } else if (cmp === 0) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if (rem[0]) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [xc[xi]];\r\n remL = 1;\r\n }\r\n } while ((xi++ < xL || rem[0] != null) && s--);\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if (!qc[0]) qc.splice(0, 1);\r\n }\r\n\r\n if (base == BASE) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);\r\n\r\n round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n: a BigNumber.\r\n * i: the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm: the rounding mode.\r\n * id: 1 (toExponential) or 2 (toPrecision).\r\n */\r\n function format(n, i, rm, id) {\r\n var c0, e, ne, len, str;\r\n\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n if (!n.c) return n.toString();\r\n\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if (i == null) {\r\n str = coeffToString(n.c);\r\n str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)\r\n ? toExponential(str, ne)\r\n : toFixedPoint(str, ne, '0');\r\n } else {\r\n n = round(new BigNumber(n), i, rm);\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString(n.c);\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {\r\n\r\n // Append zeros?\r\n for (; len < i; str += '0', len++);\r\n str = toExponential(str, e);\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint(str, e, '0');\r\n\r\n // Append zeros?\r\n if (e + 1 > len) {\r\n if (--i > 0) for (str += '.'; i--; str += '0');\r\n } else {\r\n i += e - len;\r\n if (i > 0) {\r\n if (e + 1 == len) str += '.';\r\n for (; i--; str += '0');\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n // If any number is NaN, return NaN.\r\n function maxOrMin(args, n) {\r\n var k, y,\r\n i = 1,\r\n x = new BigNumber(args[0]);\r\n\r\n for (; i < args.length; i++) {\r\n y = new BigNumber(args[i]);\r\n if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {\r\n x = y;\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise(n, c, e) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for (; !c[--j]; c.pop());\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for (j = c[0]; j >= 10; j /= 10, i++);\r\n\r\n // Overflow?\r\n if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n n.c = [n.e = 0];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function (x, str, isNum, b) {\r\n var base,\r\n s = isNum ? str : str.replace(whitespaceOrPlus, '');\r\n\r\n // No exception on ±Infinity or NaN.\r\n if (isInfinityOrNaN.test(s)) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if (!isNum) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace(basePrefix, function (m, p1, p2) {\r\n base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');\r\n }\r\n\r\n if (str != s) return new BigNumber(s, base);\r\n }\r\n\r\n // '[BigNumber Error] Not a number: {n}'\r\n // '[BigNumber Error] Not a base {b} number: {n}'\r\n if (BigNumber.DEBUG) {\r\n throw Error\r\n (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);\r\n }\r\n\r\n // NaN\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n }\r\n })();\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round(x, sd, rm, r) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ni = 0];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = mathfloor(n / pows10[d - j - 1] % 10);\r\n } else {\r\n ni = mathceil((i + 1) / LOG_BASE);\r\n\r\n if (ni >= xc.length) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for (; xc.length <= ni; xc.push(0));\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for (d = 1; k >= 10; k /= 10, d++);\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10);\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[d - j - 1] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);\r\n\r\n r = rm < 4\r\n ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xc[0]) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[LOG_BASE - i];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for (; ;) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if (ni == 0) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);\r\n j = xc[0] += k;\r\n for (k = 1; j >= 10; j /= 10, k++);\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xc[0] == BASE) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if (xc[ni] != BASE) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xc.length; xc[--i] === 0; xc.pop());\r\n }\r\n\r\n // Overflow? Infinity.\r\n if (x.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if (x.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function valueOf(n) {\r\n var str,\r\n e = n.e;\r\n\r\n if (e === null) return n.toString();\r\n\r\n str = coeffToString(n.c);\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(str, e)\r\n : toFixedPoint(str, e, '0');\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if (x.s < 0) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = function (y, b) {\r\n return compare(this, new BigNumber(y, b));\r\n };\r\n\r\n\r\n /*\r\n * If dp is undefined or null or true or false, return the number of decimal places of the\r\n * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n *\r\n * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * [dp] {number} Decimal places: integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.decimalPlaces = P.dp = function (dp, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), dp + x.e + 1, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);\r\n if (n < 0) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function (y, b) {\r\n return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y, b) {\r\n return div(this, new BigNumber(y, b), 0, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.\r\n *\r\n * If m is present, return the result modulo m.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * The modular power operation works efficiently when x, n, and m are integers, otherwise it\r\n * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.\r\n *\r\n * n {number|string|BigNumber} The exponent. An integer.\r\n * [m] {number|string|BigNumber} The modulus.\r\n *\r\n * '[BigNumber Error] Exponent not an integer: {n}'\r\n */\r\n P.exponentiatedBy = P.pow = function (n, m) {\r\n var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,\r\n x = this;\r\n\r\n n = new BigNumber(n);\r\n\r\n // Allow NaN and ±Infinity, but not other non-integers.\r\n if (n.c && !n.isInteger()) {\r\n throw Error\r\n (bignumberError + 'Exponent not an integer: ' + valueOf(n));\r\n }\r\n\r\n if (m != null) m = new BigNumber(m);\r\n\r\n // Exponent of MAX_SAFE_INTEGER is 15.\r\n nIsBig = n.e > 14;\r\n\r\n // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.\r\n if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {\r\n\r\n // The sign of the result of pow when x is negative depends on the evenness of n.\r\n // If +n overflows to ±Infinity, the evenness of n would be not be known.\r\n y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));\r\n return m ? y.mod(m) : y;\r\n }\r\n\r\n nIsNeg = n.s < 0;\r\n\r\n if (m) {\r\n\r\n // x % m returns NaN if abs(m) is zero, or m is NaN.\r\n if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);\r\n\r\n isModExp = !nIsNeg && x.isInteger() && m.isInteger();\r\n\r\n if (isModExp) x = x.mod(m);\r\n\r\n // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.\r\n // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.\r\n } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0\r\n // [1, 240000000]\r\n ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7\r\n // [80000000000000] [99999750000000]\r\n : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {\r\n\r\n // If x is negative and n is odd, k = -0, else k = 0.\r\n k = x.s < 0 && isOdd(n) ? -0 : 0;\r\n\r\n // If x >= 1, k = ±Infinity.\r\n if (x.e > -1) k = 1 / k;\r\n\r\n // If n is negative return ±0, else return ±Infinity.\r\n return new BigNumber(nIsNeg ? 1 / k : k);\r\n\r\n } else if (POW_PRECISION) {\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication\r\n // equates to truncating significant digits to POW_PRECISION + [28, 41],\r\n // i.e. there will be a minimum of 28 guard digits retained.\r\n k = mathceil(POW_PRECISION / LOG_BASE + 2);\r\n }\r\n\r\n if (nIsBig) {\r\n half = new BigNumber(0.5);\r\n if (nIsNeg) n.s = 1;\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = Math.abs(+valueOf(n));\r\n nIsOdd = i % 2;\r\n }\r\n\r\n y = new BigNumber(ONE);\r\n\r\n // Performs 54 loop iterations for n of 9007199254740991.\r\n for (; ;) {\r\n\r\n if (nIsOdd) {\r\n y = y.times(x);\r\n if (!y.c) break;\r\n\r\n if (k) {\r\n if (y.c.length > k) y.c.length = k;\r\n } else if (isModExp) {\r\n y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (i) {\r\n i = mathfloor(i / 2);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n } else {\r\n n = n.times(half);\r\n round(n, n.e + 1, 1);\r\n\r\n if (n.e > 14) {\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = +valueOf(n);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n }\r\n }\r\n\r\n x = x.times(x);\r\n\r\n if (k) {\r\n if (x.c && x.c.length > k) x.c.length = k;\r\n } else if (isModExp) {\r\n x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (isModExp) return y;\r\n if (nIsNeg) y = ONE.div(y);\r\n\r\n return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer\r\n * using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'\r\n */\r\n P.integerValue = function (rm) {\r\n var n = new BigNumber(this);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n return round(n, n.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isEqualTo = P.eq = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise return false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isGreaterThan = P.gt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isGreaterThanOrEqualTo = P.gte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = function () {\r\n return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isLessThan = P.lt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isLessThanOrEqualTo = P.lte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise return false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise return false.\r\n */\r\n P.isNegative = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is positive, otherwise return false.\r\n */\r\n P.isPositive = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise return false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = function (y, b) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0);\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if (a = xe - ye) {\r\n\r\n if (xLTy = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for (b = a; b--; t.push(0));\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n\r\n if (xc[b] != yc[b]) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n b = (j = yc.length) - (i = xc.length);\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if (b > 0) for (; b--; xc[i++] = 0);\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for (; j > a;) {\r\n\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i]; xc[i] = b);\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] == 0; xc.splice(0, 1), --ye);\r\n\r\n // Zero?\r\n if (!xc[0]) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function (y, b) {\r\n var q, s,\r\n x = this;\r\n\r\n y = new BigNumber(y, b);\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if (!x.c || !y.s || y.c && !y.c[0]) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if (!y.c || x.c && !x.c[0]) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if (MODULO_MODE == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div(x, y, 0, 3);\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div(x, y, 0, MODULO_MODE);\r\n }\r\n\r\n y = x.minus(q.times(y));\r\n\r\n // To match JavaScript %, ensure sign of zero is sign of dividend.\r\n if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value\r\n * of BigNumber(y, b).\r\n */\r\n P.multipliedBy = P.times = function (y, b) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new BigNumber(y, b)).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if (!xc || !yc || !xc[0] || !yc[0]) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if (!xc || !yc) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if (xcL < ycL) {\r\n zc = xc;\r\n xc = yc;\r\n yc = zc;\r\n i = xcL;\r\n xcL = ycL;\r\n ycL = i;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n for (i = xcL + ycL, zc = []; i--; zc.push(0));\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for (i = ycL; --i >= 0;) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for (k = xcL, j = i + k; j > i;) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;\r\n c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.splice(0, 1);\r\n }\r\n\r\n return normalise(y, zc, e);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = function (y, b) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if (!xc || !yc) return new BigNumber(a / 0);\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if (a = xe - ye) {\r\n if (a > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; a--; t.push(0));\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if (a - b < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n b = a;\r\n }\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for (a = 0; b;) {\r\n a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;\r\n xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;\r\n }\r\n\r\n if (a) {\r\n xc = [a].concat(xc);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * If sd is undefined or null or true or false, return the number of significant digits of\r\n * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n * If sd is true include integer-part trailing zeros in the count.\r\n *\r\n * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.\r\n * boolean: whether to count integer-part trailing zeros: true or false.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.precision = P.sd = function (sd, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (sd != null && sd !== !!sd) {\r\n intCheck(sd, 1, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), sd, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if (v = c[v]) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for (; v % 10 == 0; v /= 10, n--);\r\n\r\n // Add the number of digits of the first element.\r\n for (v = c[0]; v >= 10; v /= 10, n++);\r\n }\r\n\r\n if (sd && x.e + 1 > n) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'\r\n */\r\n P.shiftedBy = function (k) {\r\n intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\r\n return this.times('1e' + k);\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !c || !c[0]) {\r\n return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+valueOf(x));\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = coeffToString(c);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(+n);\r\n e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber(s + '');\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if (r.c[0]) {\r\n e = r.e;\r\n s = e + dp;\r\n if (s < 3) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for (; ;) {\r\n t = r;\r\n r = half.times(t.plus(div(x, t, dp, 1)));\r\n\r\n if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if (r.e < e) --s;\r\n n = n.slice(s - 3, s + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if (!rep) {\r\n round(t, t.e + DECIMAL_PLACES + 2, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n round(r, r.e + DECIMAL_PLACES + 2, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toExponential = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp++;\r\n }\r\n return format(this, dp, rm, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toFixed = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp = dp + this.e + 1;\r\n }\r\n return format(this, dp, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the format or FORMAT object (see BigNumber.set).\r\n *\r\n * The formatting object may contain some or all of the properties shown below.\r\n *\r\n * FORMAT = {\r\n * prefix: '',\r\n * groupSize: 3,\r\n * secondaryGroupSize: 0,\r\n * groupSeparator: ',',\r\n * decimalSeparator: '.',\r\n * fractionGroupSize: 0,\r\n * fractionGroupSeparator: '\\xA0', // non-breaking space\r\n * suffix: ''\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n * [format] {object} Formatting options. See FORMAT pbject above.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n * '[BigNumber Error] Argument not an object: {format}'\r\n */\r\n P.toFormat = function (dp, rm, format) {\r\n var str,\r\n x = this;\r\n\r\n if (format == null) {\r\n if (dp != null && rm && typeof rm == 'object') {\r\n format = rm;\r\n rm = null;\r\n } else if (dp && typeof dp == 'object') {\r\n format = dp;\r\n dp = rm = null;\r\n } else {\r\n format = FORMAT;\r\n }\r\n } else if (typeof format != 'object') {\r\n throw Error\r\n (bignumberError + 'Argument not an object: ' + format);\r\n }\r\n\r\n str = x.toFixed(dp, rm);\r\n\r\n if (x.c) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +format.groupSize,\r\n g2 = +format.secondaryGroupSize,\r\n groupSeparator = format.groupSeparator || '',\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = x.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) {\r\n i = g1;\r\n g1 = g2;\r\n g2 = i;\r\n len -= i;\r\n }\r\n\r\n if (g1 > 0 && len > 0) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr(0, i);\r\n for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);\r\n if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)\r\n ? fractionPart.replace(new RegExp('\\\\d{' + g2 + '}\\\\B', 'g'),\r\n '$&' + (format.fractionGroupSeparator || ''))\r\n : fractionPart)\r\n : intPart;\r\n }\r\n\r\n return (format.prefix || '') + str + (format.suffix || '');\r\n };\r\n\r\n\r\n /*\r\n * Return an array of two BigNumbers representing the value of this BigNumber as a simple\r\n * fraction with an integer numerator and an integer denominator.\r\n * The denominator will be a positive non-zero value less than or equal to the specified\r\n * maximum denominator. If a maximum denominator is not specified, the denominator will be\r\n * the lowest value necessary to represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.\r\n *\r\n * '[BigNumber Error] Argument {not an integer|out of range} : {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,\r\n x = this,\r\n xc = x.c;\r\n\r\n if (md != null) {\r\n n = new BigNumber(md);\r\n\r\n // Throw if md is less than one or is not an integer, unless it is Infinity.\r\n if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {\r\n throw Error\r\n (bignumberError + 'Argument ' +\r\n (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));\r\n }\r\n }\r\n\r\n if (!xc) return new BigNumber(x);\r\n\r\n d = new BigNumber(ONE);\r\n n1 = d0 = new BigNumber(ONE);\r\n d1 = n0 = new BigNumber(ONE);\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];\r\n md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for (; ;) {\r\n q = div(n, d, 0, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.comparedTo(md) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus(q.times(d2 = n1));\r\n n0 = d2;\r\n d = n.minus(q.times(d2 = d));\r\n n = d2;\r\n }\r\n\r\n d2 = div(md.minus(d0), d1, 0, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n e = e * 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(\r\n div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];\r\n\r\n MAX_EXP = exp;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +valueOf(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n if (sd != null) intCheck(sd, 1, MAX);\r\n return format(this, sd, rm, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to ALPHABET.length inclusive.\r\n *\r\n * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if (e === null) {\r\n if (s) {\r\n str = 'Infinity';\r\n if (s < 0) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n if (b == null) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(coeffToString(n.c), e)\r\n : toFixedPoint(coeffToString(n.c), e, '0');\r\n } else if (b === 10 && alphabetHasNormalDecimalDigits) {\r\n n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);\r\n str = toFixedPoint(coeffToString(n.c), n.e, '0');\r\n } else {\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);\r\n }\r\n\r\n if (s < 0 && n.c[0]) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n return valueOf(this);\r\n };\r\n\r\n\r\n P._isBigNumber = true;\r\n\r\n if (configObject != null) BigNumber.set(configObject);\r\n\r\n return BigNumber;\r\n }\r\n\r\n\r\n // PRIVATE HELPER FUNCTIONS\r\n\r\n // These functions don't need access to variables,\r\n // e.g. DECIMAL_PLACES, in the scope of the `clone` function above.\r\n\r\n\r\n function bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n }\r\n\r\n\r\n // Return a coefficient array as a string of base 10 digits.\r\n function coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for (; i < j;) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for (; z--; s = '0' + s);\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (j = r.length; r.charCodeAt(--j) === 48;);\r\n\r\n return r.slice(0, j + 1 || 1);\r\n }\r\n\r\n\r\n // Compare the value of BigNumbers x and y.\r\n function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }\r\n\r\n\r\n /*\r\n * Check that n is a primitive number, an integer, and in range, otherwise throw.\r\n */\r\n function intCheck(n, min, max, name) {\r\n if (n < min || n > max || n !== mathfloor(n)) {\r\n throw Error\r\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\r\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\r\n : ' not a primitive number: ') + String(n));\r\n }\r\n }\r\n\r\n\r\n // Assumes finite n.\r\n function isOdd(n) {\r\n var k = n.c.length - 1;\r\n return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;\r\n }\r\n\r\n\r\n function toExponential(str, e) {\r\n return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +\r\n (e < 0 ? 'e' : 'e+') + e;\r\n }\r\n\r\n\r\n function toFixedPoint(str, e, z) {\r\n var len, zs;\r\n\r\n // Negative exponent?\r\n if (e < 0) {\r\n\r\n // Prepend zeros.\r\n for (zs = z + '.'; ++e; zs += z);\r\n str = zs + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if (++e > len) {\r\n for (zs = z, e -= len; --e; zs += z);\r\n str += zs;\r\n } else if (e < len) {\r\n str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n // EXPORT\r\n\r\n\r\n BigNumber = clone();\r\n BigNumber['default'] = BigNumber.BigNumber = BigNumber;\r\n\r\n // AMD.\r\n if (typeof define == 'function' && define.amd) {\r\n define(function () { return BigNumber; });\r\n\r\n // Node.js and other environments that support module.exports.\r\n } else if (typeof module != 'undefined' && module.exports) {\r\n module.exports = BigNumber;\r\n\r\n // Browser.\r\n } else {\r\n if (!globalObject) {\r\n globalObject = typeof self != 'undefined' && self ? self : window;\r\n }\r\n\r\n globalObject.BigNumber = BigNumber;\r\n }\r\n})(this);\r\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserializeUnchecked = exports.deserialize = exports.serialize = exports.BinaryReader = exports.BinaryWriter = exports.BorshError = exports.baseDecode = exports.baseEncode = void 0;\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst bs58_1 = __importDefault(require(\"bs58\"));\n// TODO: Make sure this polyfill not included when not required\nconst encoding = __importStar(require(\"text-encoding-utf-8\"));\nconst ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\nconst textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\nfunction baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer.from(value));\n}\nexports.baseEncode = baseEncode;\nfunction baseDecode(value) {\n return Buffer.from(bs58_1.default.decode(value));\n}\nexports.baseDecode = baseDecode;\nconst INITIAL_LENGTH = 1024;\nclass BorshError extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n // NOTE: Modifying message directly as jest doesn't use .toString()\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n}\nexports.BorshError = BorshError;\n/// Binary encoder.\nclass BinaryWriter {\n constructor() {\n this.buf = Buffer.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer.concat([this.buf, Buffer.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n // Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser\n this.buf = Buffer.concat([\n Buffer.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer.alloc(INITIAL_LENGTH),\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array) {\n this.writeBuffer(Buffer.from(array));\n }\n writeArray(array, fn) {\n this.maybeResize();\n this.writeU32(array.length);\n for (const elem of array) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n}\nexports.BinaryWriter = BinaryWriter;\nfunction handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function (...args) {\n try {\n return originalMethod.apply(this, args);\n }\n catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n}\nclass BinaryReader {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n // NOTE: Using TextDecoder to fail on invalid UTF-8\n return textDecoder.decode(buf);\n }\n catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n}\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU8\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU16\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU32\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU64\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU128\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU256\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU512\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readString\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readFixedArray\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readArray\", null);\nexports.BinaryReader = BinaryReader;\nfunction capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\nfunction serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n // TODO: Handle missing values properly (make sure they never result in just skipped write)\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n }\n else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n }\n else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n }\n else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n }\n else if (fieldType.kind !== undefined) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === undefined) {\n writer.writeU8(0);\n }\n else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n }\n else {\n serializeStruct(schema, value, writer);\n }\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n }\n else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n }\n else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n}\n/// Serialize given object using schema of the form:\n/// { class_name -> [ [field_name, field_type], .. ], .. }\nfunction serialize(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n}\nexports.serialize = serialize;\nfunction deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n }\n else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n }\n else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return undefined;\n }\n if (fieldType.kind === \"map\") {\n let map = new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n}\n/// Deserializes object from bytes using schema.\nfunction deserialize(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n}\nexports.deserialize = deserialize;\n/// Deserializes object from bytes using schema, without checking the length read\nfunction deserializeUnchecked(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n}\nexports.deserializeUnchecked = deserializeUnchecked;\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","const basex = require('base-x')\nconst ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","'use strict'\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (source instanceof Uint8Array) {\n } else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength)\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source)\n }\n if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return new Uint8Array() }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (source[psz]) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = new Uint8Array(zeroes + (size - it4))\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n","/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Support for translating between Buffer instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n */\n\n'use strict';\n\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n\n /**\n * Decode from a Buffer into an JavaScript value.\n *\n * @param {Buffer} b - the buffer from which encoded data is read.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {(Number|Array|Object)} - the value of the decoded data.\n *\n * @abstract\n */\n decode(b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Encode a JavaScript value into a Buffer.\n *\n * @param {(Number|Array|Object)} src - the value to be encoded into\n * the buffer. The type accepted depends on the (sub-)type of {@link\n * Layout}.\n *\n * @param {Buffer} b - the buffer into which encoded data will be\n * written.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {Number} - the number of bytes encoded, including the\n * space skipped for internal padding, but excluding data such as\n * {@link Sequence#count|lengths} when stored {@link\n * ExternalLayout|externally}. This is the adjustment to `offset`\n * producing the offset where data for the next layout would be\n * written.\n *\n * @abstract\n */\n encode(src, b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Buffer} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nexports.Layout = Layout;\n\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nexports.nameWithProperty = nameWithProperty;\n\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Class.hasOwnProperty('layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (layout.hasOwnProperty('boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value: function(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value: function(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nexports.bindConstructorLayout = bindConstructorLayout;\n\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\n\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan, property) {\n if (undefined === elementSpan) {\n elementSpan = 1;\n }\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n\n /** @override */\n isCount() {\n return true;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\n\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n\n if (undefined === offset) {\n offset = 0;\n } else if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n\n super(layout.span, property || layout.property);\n\n /** The subordinated layout. */\n this.layout = layout;\n\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Buffer\n * being accessed. */\n this.offset = offset;\n }\n\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.decode(b, offset + this.offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\n\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super( span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\nconst V2E32 = Math.pow(2, 32);\n\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return {hi32, lo32};\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const hi32 = b.readUInt32BE(offset);\n const lo32 = b.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32BE(split.hi32, offset);\n b.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const hi32 = b.readInt32BE(offset);\n const lo32 = b.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeInt32BE(split.hi32, offset);\n b.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readFloatLE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeFloatLE(src, offset);\n return 4;\n }\n}\n\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readFloatBE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeFloatBE(src, offset);\n return 4;\n }\n}\n\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readDoubleLE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeDoubleLE(src, offset);\n return 8;\n }\n}\n\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readDoubleBE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeDoubleBE(src, offset);\n return 8;\n }\n}\n\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n\n super(span, property);\n\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n } else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\n\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n } else if (0 <= offset) {\n offset += fd.span;\n }\n }\n }\n}\n\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\n\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n\n super(property || layout.property || 'variant');\n\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\n\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n const upv = ((discr instanceof UInt)\n || (discr instanceof UIntBE));\n if (upv) {\n discr = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discr = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && upv) {\n span += discr.layout.span;\n }\n }\n super(span, property);\n\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discr;\n\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = upv;\n\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisified rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (src.hasOwnProperty(this.discriminator.property)) {\n if (this.defaultLayout\n && src.hasOwnProperty(this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || src.hasOwnProperty(vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (src.hasOwnProperty(vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n let clo = this.registry[discr];\n if (undefined === clo) {\n let contentOffset = 0;\n clo = this.defaultLayout;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[clo.property] = this.defaultLayout.decode(b, offset + contentOffset);\n } else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n return contentOffset + clo.encode(src[clo.property], b,\n offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Buffer)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Buffer}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset) {\n let variant = vb;\n if (Buffer.isBuffer(vb)) {\n if (undefined === offset) {\n offset = 0;\n }\n variant = this.discriminator.decode(vb, offset);\n }\n return this.registry[variant];\n }\n}\n\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n return contentOffset + this.layout.getSpan(b, offset + contentOffset);\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!src.hasOwnProperty(this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n }\n}\n\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = undefined;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function(v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function() {\n return value;\n };\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(value);\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n // eslint-disable-next-line no-new-wrappers\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n}\n\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n\n /** The span of this value in bits. */\n this.bits = bits;\n\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode() {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ((!Number.isInteger(value))\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n };\n}\n\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!BitField.prototype.decode.call(this, b, offset);\n }\n\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n return BitField.prototype.encode.call(this, value);\n }\n}\n/* eslint-enable no-extend-native */\n\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Buffer.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return b.slice(offset, offset + span);\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(Buffer.isBuffer(src)\n && (span === src.length))) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Buffer as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n b.write(src.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\n\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n\n /** @override */\n getSpan(b, offset) {\n if (!Buffer.isBuffer(b)) {\n throw new TypeError('b must be a Buffer');\n }\n if (undefined === offset) {\n offset = 0;\n }\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n\n /** @override */\n decode(b, offset, dest) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.getSpan(b, offset);\n return b.slice(offset, offset + span - 1).toString('utf-8');\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = src.toString();\n }\n const srcb = new Buffer(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(b, offset);\n b[offset + span] = 0;\n return span + 1;\n }\n}\n\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan)\n && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n } else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n\n super(-1, property);\n\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (!Buffer.isBuffer(b)) {\n throw new TypeError('b must be a Buffer');\n }\n if (undefined === offset) {\n offset = 0;\n }\n return b.length - offset;\n }\n\n /** @override */\n decode(b, offset, dest) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return b.slice(offset, offset + span).toString('utf-8');\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = src.toString();\n }\n const srcb = new Buffer(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(b, offset);\n return span;\n }\n}\n\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n\n /** @override */\n decode(b, offset, dest) {\n return this.value;\n }\n\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\n\nexports.ExternalLayout = ExternalLayout;\nexports.GreedyCount = GreedyCount;\nexports.OffsetLayout = OffsetLayout;\nexports.UInt = UInt;\nexports.UIntBE = UIntBE;\nexports.Int = Int;\nexports.IntBE = IntBE;\nexports.Float = Float;\nexports.FloatBE = FloatBE;\nexports.Double = Double;\nexports.DoubleBE = DoubleBE;\nexports.Sequence = Sequence;\nexports.Structure = Structure;\nexports.UnionDiscriminator = UnionDiscriminator;\nexports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\nexports.Union = Union;\nexports.VariantLayout = VariantLayout;\nexports.BitStructure = BitStructure;\nexports.BitField = BitField;\nexports.Boolean = Boolean;\nexports.Blob = Blob;\nexports.CString = CString;\nexports.UTF8 = UTF8;\nexports.Constant = Constant;\n\n/** Factory for {@link GreedyCount}. */\nexports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n\n/** Factory for {@link OffsetLayout}. */\nexports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nexports.u8 = (property => new UInt(1, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16 = (property => new UInt(2, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24 = (property => new UInt(3, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32 = (property => new UInt(4, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40 = (property => new UInt(5, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48 = (property => new UInt(6, property));\n\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64 = (property => new NearUInt64(property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16be = (property => new UIntBE(2, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24be = (property => new UIntBE(3, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32be = (property => new UIntBE(4, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40be = (property => new UIntBE(5, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48be = (property => new UIntBE(6, property));\n\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64be = (property => new NearUInt64BE(property));\n\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nexports.s8 = (property => new Int(1, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nexports.s16 = (property => new Int(2, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nexports.s24 = (property => new Int(3, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nexports.s32 = (property => new Int(4, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nexports.s40 = (property => new Int(5, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nexports.s48 = (property => new Int(6, property));\n\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64 = (property => new NearInt64(property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nexports.s16be = (property => new IntBE(2, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nexports.s24be = (property => new IntBE(3, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nexports.s32be = (property => new IntBE(4, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nexports.s40be = (property => new IntBE(5, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nexports.s48be = (property => new IntBE(6, property));\n\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64be = (property => new NearInt64BE(property));\n\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nexports.f32 = (property => new Float(property));\n\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nexports.f32be = (property => new FloatBE(property));\n\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nexports.f64 = (property => new Double(property));\n\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nexports.f64be = (property => new DoubleBE(property));\n\n/** Factory for {@link Structure} values. */\nexports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n\n/** Factory for {@link BitStructure} values. */\nexports.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n\n/** Factory for {@link Sequence} values. */\nexports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n\n/** Factory for {@link Union} values. */\nexports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nexports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n\n/** Factory for {@link Blob} values. */\nexports.blob = ((length, property) => new Blob(length, property));\n\n/** Factory for {@link CString} values. */\nexports.cstr = (property => new CString(property));\n\n/** Factory for {@link UTF8} values. */\nexports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n\n/** Factory for {@link Constant} values. */\nexports.const = ((value, property) => new Constant(value, property));\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\nvar setFunctionLength = require('set-function-length');\n\nvar $TypeError = require('es-errors/type');\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $defineProperty = require('es-define-property');\nvar $max = GetIntrinsic('%Math.max%');\n\nmodule.exports = function callBind(originalFunction) {\n\tif (typeof originalFunction !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\tvar func = $reflectApply(bind, $call, arguments);\n\treturn setFunctionLength(\n\t\tfunc,\n\t\t1 + $max(0, originalFunction.length - (arguments.length - 1)),\n\t\ttrue\n\t);\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\nconst preserveCamelCase = string => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\n\tfor (let i = 0; i < string.length; i++) {\n\t\tconst character = string[i];\n\n\t\tif (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) {\n\t\t\tstring = string.slice(0, i) + '-' + string.slice(i);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\ti++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) {\n\t\t\tstring = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst camelCase = (input, options) => {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = Object.assign({\n\t\tpascalCase: false\n\t}, options);\n\n\tconst postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x;\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tif (input.length === 1) {\n\t\treturn options.pascalCase ? input.toUpperCase() : input.toLowerCase();\n\t}\n\n\tconst hasUpperCase = input !== input.toLowerCase();\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input);\n\t}\n\n\tinput = input\n\t\t.replace(/^[_.\\- ]+/, '')\n\t\t.toLowerCase()\n\t\t.replace(/[_.\\- ]+(\\w|$)/g, (_, p1) => p1.toUpperCase())\n\t\t.replace(/\\d+(\\w|$)/g, m => m.toUpperCase());\n\n\treturn postProcess(input);\n};\n\nmodule.exports = camelCase;\n// TODO: Remove this for the next major release\nmodule.exports.default = camelCase;\n","/*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */\r\n;(function (globalScope) {\r\n 'use strict';\r\n\r\n\r\n /*\r\n * decimal.js-light v2.5.1\r\n * An arbitrary-precision Decimal type for JavaScript.\r\n * https://github.com/MikeMcl/decimal.js-light\r\n * Copyright (c) 2020 Michael Mclaughlin \r\n * MIT Expat Licence\r\n */\r\n\r\n\r\n // ----------------------------------- EDITABLE DEFAULTS ------------------------------------ //\r\n\r\n\r\n // The limit on the value of `precision`, and on the value of the first argument to\r\n // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`.\r\n var MAX_DIGITS = 1e9, // 0 to 1e9\r\n\r\n\r\n // The initial configuration properties of the Decimal constructor.\r\n Decimal = {\r\n\r\n // These values must be integers within the stated ranges (inclusive).\r\n // Most of these values can be changed during run-time using `Decimal.config`.\r\n\r\n // The maximum number of significant digits of the result of a calculation or base conversion.\r\n // E.g. `Decimal.config({ precision: 20 });`\r\n precision: 20, // 1 to MAX_DIGITS\r\n\r\n // The rounding mode used by default by `toInteger`, `toDecimalPlaces`, `toExponential`,\r\n // `toFixed`, `toPrecision` and `toSignificantDigits`.\r\n //\r\n // ROUND_UP 0 Away from zero.\r\n // ROUND_DOWN 1 Towards zero.\r\n // ROUND_CEIL 2 Towards +Infinity.\r\n // ROUND_FLOOR 3 Towards -Infinity.\r\n // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n //\r\n // E.g.\r\n // `Decimal.rounding = 4;`\r\n // `Decimal.rounding = Decimal.ROUND_HALF_UP;`\r\n rounding: 4, // 0 to 8\r\n\r\n // The exponent value at and beneath which `toString` returns exponential notation.\r\n // JavaScript numbers: -7\r\n toExpNeg: -7, // 0 to -MAX_E\r\n\r\n // The exponent value at and above which `toString` returns exponential notation.\r\n // JavaScript numbers: 21\r\n toExpPos: 21, // 0 to MAX_E\r\n\r\n // The natural logarithm of 10.\r\n // 115 digits\r\n LN10: '2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286'\r\n },\r\n\r\n\r\n // ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- //\r\n\r\n\r\n external = true,\r\n\r\n decimalError = '[DecimalError] ',\r\n invalidArgument = decimalError + 'Invalid argument: ',\r\n exponentOutOfRange = decimalError + 'Exponent out of range: ',\r\n\r\n mathfloor = Math.floor,\r\n mathpow = Math.pow,\r\n\r\n isDecimal = /^(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,\r\n\r\n ONE,\r\n BASE = 1e7,\r\n LOG_BASE = 7,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n MAX_E = mathfloor(MAX_SAFE_INTEGER / LOG_BASE), // 1286742750677284\r\n\r\n // Decimal.prototype object\r\n P = {};\r\n\r\n\r\n // Decimal prototype methods\r\n\r\n\r\n /*\r\n * absoluteValue abs\r\n * comparedTo cmp\r\n * decimalPlaces dp\r\n * dividedBy div\r\n * dividedToIntegerBy idiv\r\n * equals eq\r\n * exponent\r\n * greaterThan gt\r\n * greaterThanOrEqualTo gte\r\n * isInteger isint\r\n * isNegative isneg\r\n * isPositive ispos\r\n * isZero\r\n * lessThan lt\r\n * lessThanOrEqualTo lte\r\n * logarithm log\r\n * minus sub\r\n * modulo mod\r\n * naturalExponential exp\r\n * naturalLogarithm ln\r\n * negated neg\r\n * plus add\r\n * precision sd\r\n * squareRoot sqrt\r\n * times mul\r\n * toDecimalPlaces todp\r\n * toExponential\r\n * toFixed\r\n * toInteger toint\r\n * toNumber\r\n * toPower pow\r\n * toPrecision\r\n * toSignificantDigits tosd\r\n * toString\r\n * valueOf val\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the absolute value of this Decimal.\r\n *\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new this.constructor(this);\r\n if (x.s) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this Decimal is greater than the value of `y`,\r\n * -1 if the value of this Decimal is less than the value of `y`,\r\n * 0 if they have the same value\r\n *\r\n */\r\n P.comparedTo = P.cmp = function (y) {\r\n var i, j, xdL, ydL,\r\n x = this;\r\n\r\n y = new x.constructor(y);\r\n\r\n // Signs differ?\r\n if (x.s !== y.s) return x.s || -y.s;\r\n\r\n // Compare exponents.\r\n if (x.e !== y.e) return x.e > y.e ^ x.s < 0 ? 1 : -1;\r\n\r\n xdL = x.d.length;\r\n ydL = y.d.length;\r\n\r\n // Compare digit by digit.\r\n for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {\r\n if (x.d[i] !== y.d[i]) return x.d[i] > y.d[i] ^ x.s < 0 ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return xdL === ydL ? 0 : xdL > ydL ^ x.s < 0 ? 1 : -1;\r\n };\r\n\r\n\r\n /*\r\n * Return the number of decimal places of the value of this Decimal.\r\n *\r\n */\r\n P.decimalPlaces = P.dp = function () {\r\n var x = this,\r\n w = x.d.length - 1,\r\n dp = (w - x.e) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n w = x.d[w];\r\n if (w) for (; w % 10 == 0; w /= 10) dp--;\r\n\r\n return dp < 0 ? 0 : dp;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal divided by `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\n P.dividedBy = P.div = function (y) {\r\n return divide(this, new this.constructor(y));\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the integer part of dividing the value of this Decimal\r\n * by the value of `y`, truncated to `precision` significant digits.\r\n *\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n return round(divide(x, new Ctor(y), 0, 1), Ctor.precision);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.\r\n *\r\n */\r\n P.equals = P.eq = function (y) {\r\n return !this.cmp(y);\r\n };\r\n\r\n\r\n /*\r\n * Return the (base 10) exponent value of this Decimal (this.e is the base 10000000 exponent).\r\n *\r\n */\r\n P.exponent = function () {\r\n return getBase10Exponent(this);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than the value of `y`, otherwise return\r\n * false.\r\n *\r\n */\r\n P.greaterThan = P.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than or equal to the value of `y`,\r\n * otherwise return false.\r\n *\r\n */\r\n P.greaterThanOrEqualTo = P.gte = function (y) {\r\n return this.cmp(y) >= 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is an integer, otherwise return false.\r\n *\r\n */\r\n P.isInteger = P.isint = function () {\r\n return this.e > this.d.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is negative, otherwise return false.\r\n *\r\n */\r\n P.isNegative = P.isneg = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is positive, otherwise return false.\r\n *\r\n */\r\n P.isPositive = P.ispos = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is 0, otherwise return false.\r\n *\r\n */\r\n P.isZero = function () {\r\n return this.s === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThan = P.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThanOrEqualTo = P.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n };\r\n\r\n\r\n /*\r\n * Return the logarithm of the value of this Decimal to the specified base, truncated to\r\n * `precision` significant digits.\r\n *\r\n * If no base is specified, return log[10](x).\r\n *\r\n * log[base](x) = ln(x) / ln(base)\r\n *\r\n * The maximum error of the result is 1 ulp (unit in the last place).\r\n *\r\n * [base] {number|string|Decimal} The base of the logarithm.\r\n *\r\n */\r\n P.logarithm = P.log = function (base) {\r\n var r,\r\n x = this,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision,\r\n wpr = pr + 5;\r\n\r\n // Default base is 10.\r\n if (base === void 0) {\r\n base = new Ctor(10);\r\n } else {\r\n base = new Ctor(base);\r\n\r\n // log[-b](x) = NaN\r\n // log[0](x) = NaN\r\n // log[1](x) = NaN\r\n if (base.s < 1 || base.eq(ONE)) throw Error(decimalError + 'NaN');\r\n }\r\n\r\n // log[b](-x) = NaN\r\n // log[b](0) = -Infinity\r\n if (x.s < 1) throw Error(decimalError + (x.s ? 'NaN' : '-Infinity'));\r\n\r\n // log[b](1) = 0\r\n if (x.eq(ONE)) return new Ctor(0);\r\n\r\n external = false;\r\n r = divide(ln(x, wpr), ln(base, wpr), wpr);\r\n external = true;\r\n\r\n return round(r, pr);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal minus `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\n P.minus = P.sub = function (y) {\r\n var x = this;\r\n y = new x.constructor(y);\r\n return x.s == y.s ? subtract(x, y) : add(x, (y.s = -y.s, y));\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal modulo `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\n P.modulo = P.mod = function (y) {\r\n var q,\r\n x = this,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n y = new Ctor(y);\r\n\r\n // x % 0 = NaN\r\n if (!y.s) throw Error(decimalError + 'NaN');\r\n\r\n // Return x if x is 0.\r\n if (!x.s) return round(new Ctor(x), pr);\r\n\r\n // Prevent rounding of intermediate calculations.\r\n external = false;\r\n q = divide(x, y, 0, 1).times(y);\r\n external = true;\r\n\r\n return x.minus(q);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of the value of this Decimal,\r\n * i.e. the base e raised to the power the value of this Decimal, truncated to `precision`\r\n * significant digits.\r\n *\r\n */\r\n P.naturalExponential = P.exp = function () {\r\n return exp(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of the value of this Decimal,\r\n * truncated to `precision` significant digits.\r\n *\r\n */\r\n P.naturalLogarithm = P.ln = function () {\r\n return ln(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by\r\n * -1.\r\n *\r\n */\r\n P.negated = P.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s || 0;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal plus `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\n P.plus = P.add = function (y) {\r\n var x = this;\r\n y = new x.constructor(y);\r\n return x.s == y.s ? add(x, y) : subtract(x, (y.s = -y.s, y));\r\n };\r\n\r\n\r\n /*\r\n * Return the number of significant digits of the value of this Decimal.\r\n *\r\n * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.\r\n *\r\n */\r\n P.precision = P.sd = function (z) {\r\n var e, sd, w,\r\n x = this;\r\n\r\n if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z);\r\n\r\n e = getBase10Exponent(x) + 1;\r\n w = x.d.length - 1;\r\n sd = w * LOG_BASE + 1;\r\n w = x.d[w];\r\n\r\n // If non-zero...\r\n if (w) {\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n for (; w % 10 == 0; w /= 10) sd--;\r\n\r\n // Add the number of digits of the first word.\r\n for (w = x.d[0]; w >= 10; w /= 10) sd++;\r\n }\r\n\r\n return z && e > sd ? e : sd;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of this Decimal, truncated to `precision`\r\n * significant digits.\r\n *\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var e, n, pr, r, s, t, wpr,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n // Negative or zero?\r\n if (x.s < 1) {\r\n if (!x.s) return new Ctor(0);\r\n\r\n // sqrt(-x) = NaN\r\n throw Error(decimalError + 'NaN');\r\n }\r\n\r\n e = getBase10Exponent(x);\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+x);\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = digitsToString(x.d);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(n);\r\n e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n pr = Ctor.precision;\r\n s = wpr = pr + 3;\r\n\r\n // Newton-Raphson iteration.\r\n for (;;) {\r\n t = r;\r\n r = t.plus(divide(x, t, wpr + 2)).times(0.5);\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === (n = digitsToString(r.d)).slice(0, wpr)) {\r\n n = n.slice(wpr - 3, wpr + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or\r\n // 4999, i.e. approaching a rounding boundary, continue the iteration.\r\n if (s == wpr && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n round(t, pr + 1, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n } else if (n != '9999') {\r\n break;\r\n }\r\n\r\n wpr += 4;\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return round(r, pr);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal times `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\n P.times = P.mul = function (y) {\r\n var carry, e, i, k, r, rL, t, xdL, ydL,\r\n x = this,\r\n Ctor = x.constructor,\r\n xd = x.d,\r\n yd = (y = new Ctor(y)).d;\r\n\r\n // Return 0 if either is 0.\r\n if (!x.s || !y.s) return new Ctor(0);\r\n\r\n y.s *= x.s;\r\n e = x.e + y.e;\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Ensure xd points to the longer array.\r\n if (xdL < ydL) {\r\n r = xd;\r\n xd = yd;\r\n yd = r;\r\n rL = xdL;\r\n xdL = ydL;\r\n ydL = rL;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n r = [];\r\n rL = xdL + ydL;\r\n for (i = rL; i--;) r.push(0);\r\n\r\n // Multiply!\r\n for (i = ydL; --i >= 0;) {\r\n carry = 0;\r\n for (k = xdL + i; k > i;) {\r\n t = r[k] + yd[i] * xd[k - i - 1] + carry;\r\n r[k--] = t % BASE | 0;\r\n carry = t / BASE | 0;\r\n }\r\n\r\n r[k] = (r[k] + carry) % BASE | 0;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; !r[--rL];) r.pop();\r\n\r\n if (carry) ++e;\r\n else r.shift();\r\n\r\n y.d = r;\r\n y.e = e;\r\n\r\n return external ? round(y, Ctor.precision) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`\r\n * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.\r\n *\r\n * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toDecimalPlaces = P.todp = function (dp, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n if (dp === void 0) return x;\r\n\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n return round(x, dp + getBase10Exponent(x) + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in exponential notation rounded to\r\n * `dp` fixed decimal places using rounding mode `rounding`.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toExponential = function (dp, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = toString(x, true);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = round(new Ctor(x), dp + 1, rm);\r\n str = toString(x, true, dp + 1);\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in normal (fixed-point) notation to\r\n * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is\r\n * omitted.\r\n *\r\n * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n * (-0).toFixed(3) is '0.000'.\r\n * (-0.5).toFixed(0) is '-0'.\r\n *\r\n */\r\n P.toFixed = function (dp, rm) {\r\n var str, y,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) return toString(x);\r\n\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n y = round(new Ctor(x), dp + getBase10Exponent(x) + 1, rm);\r\n str = toString(y.abs(), false, dp + getBase10Exponent(y) + 1);\r\n\r\n // To determine whether to add the minus sign look at the value before it was rounded,\r\n // i.e. look at `x` rather than `y`.\r\n return x.isneg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using\r\n * rounding mode `rounding`.\r\n *\r\n */\r\n P.toInteger = P.toint = function () {\r\n var x = this,\r\n Ctor = x.constructor;\r\n return round(new Ctor(x), getBase10Exponent(x) + 1, Ctor.rounding);\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this Decimal converted to a number primitive.\r\n *\r\n */\r\n P.toNumber = function () {\r\n return +this;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal raised to the power `y`,\r\n * truncated to `precision` significant digits.\r\n *\r\n * For non-integer or very large exponents pow(x, y) is calculated using\r\n *\r\n * x^y = exp(y*ln(x))\r\n *\r\n * The maximum error is 1 ulp (unit in last place).\r\n *\r\n * y {number|string|Decimal} The power to which to raise this Decimal.\r\n *\r\n */\r\n P.toPower = P.pow = function (y) {\r\n var e, k, pr, r, sign, yIsInt,\r\n x = this,\r\n Ctor = x.constructor,\r\n guard = 12,\r\n yn = +(y = new Ctor(y));\r\n\r\n // pow(x, 0) = 1\r\n if (!y.s) return new Ctor(ONE);\r\n\r\n x = new Ctor(x);\r\n\r\n // pow(0, y > 0) = 0\r\n // pow(0, y < 0) = Infinity\r\n if (!x.s) {\r\n if (y.s < 1) throw Error(decimalError + 'Infinity');\r\n return x;\r\n }\r\n\r\n // pow(1, y) = 1\r\n if (x.eq(ONE)) return x;\r\n\r\n pr = Ctor.precision;\r\n\r\n // pow(x, 1) = x\r\n if (y.eq(ONE)) return round(x, pr);\r\n\r\n e = y.e;\r\n k = y.d.length - 1;\r\n yIsInt = e >= k;\r\n sign = x.s;\r\n\r\n if (!yIsInt) {\r\n\r\n // pow(x < 0, y non-integer) = NaN\r\n if (sign < 0) throw Error(decimalError + 'NaN');\r\n\r\n // If y is a small integer use the 'exponentiation by squaring' algorithm.\r\n } else if ((k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {\r\n r = new Ctor(ONE);\r\n\r\n // Max k of 9007199254740991 takes 53 loop iterations.\r\n // Maximum digits array length; leaves [28, 34] guard digits.\r\n e = Math.ceil(pr / LOG_BASE + 4);\r\n\r\n external = false;\r\n\r\n for (;;) {\r\n if (k % 2) {\r\n r = r.times(x);\r\n truncate(r.d, e);\r\n }\r\n\r\n k = mathfloor(k / 2);\r\n if (k === 0) break;\r\n\r\n x = x.times(x);\r\n truncate(x.d, e);\r\n }\r\n\r\n external = true;\r\n\r\n return y.s < 0 ? new Ctor(ONE).div(r) : round(r, pr);\r\n }\r\n\r\n // Result is negative if x is negative and the last digit of integer y is odd.\r\n sign = sign < 0 && y.d[Math.max(e, k)] & 1 ? -1 : 1;\r\n\r\n x.s = 1;\r\n external = false;\r\n r = y.times(ln(x, pr + guard));\r\n external = true;\r\n r = exp(r);\r\n r.s = sign;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal rounded to `sd` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * Return exponential notation if `sd` is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n var e, str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n e = getBase10Exponent(x);\r\n str = toString(x, e <= Ctor.toExpNeg || e >= Ctor.toExpPos);\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = round(new Ctor(x), sd, rm);\r\n e = getBase10Exponent(x);\r\n str = toString(x, sd <= e || e <= Ctor.toExpNeg, sd);\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`\r\n * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if\r\n * omitted.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toSignificantDigits = P.tosd = function (sd, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n }\r\n\r\n return round(new Ctor(x), sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal.\r\n *\r\n * Return exponential notation if this Decimal has a positive exponent equal to or greater than\r\n * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.\r\n *\r\n */\r\n P.toString = P.valueOf = P.val = P.toJSON = function () {\r\n var x = this,\r\n e = getBase10Exponent(x),\r\n Ctor = x.constructor;\r\n\r\n return toString(x, e <= Ctor.toExpNeg || e >= Ctor.toExpPos);\r\n };\r\n\r\n\r\n // Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.\r\n\r\n\r\n /*\r\n * add P.minus, P.plus\r\n * checkInt32 P.todp, P.toExponential, P.toFixed, P.toPrecision, P.tosd\r\n * digitsToString P.log, P.sqrt, P.pow, toString, exp, ln\r\n * divide P.div, P.idiv, P.log, P.mod, P.sqrt, exp, ln\r\n * exp P.exp, P.pow\r\n * getBase10Exponent P.exponent, P.sd, P.toint, P.sqrt, P.todp, P.toFixed, P.toPrecision,\r\n * P.toString, divide, round, toString, exp, ln\r\n * getLn10 P.log, ln\r\n * getZeroString digitsToString, toString\r\n * ln P.log, P.ln, P.pow, exp\r\n * parseDecimal Decimal\r\n * round P.abs, P.idiv, P.log, P.minus, P.mod, P.neg, P.plus, P.toint, P.sqrt,\r\n * P.times, P.todp, P.toExponential, P.toFixed, P.pow, P.toPrecision, P.tosd,\r\n * divide, getLn10, exp, ln\r\n * subtract P.minus, P.plus\r\n * toString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf\r\n * truncate P.pow\r\n *\r\n * Throws: P.log, P.mod, P.sd, P.sqrt, P.pow, checkInt32, divide, round,\r\n * getLn10, exp, ln, parseDecimal, Decimal, config\r\n */\r\n\r\n\r\n function add(x, y) {\r\n var carry, d, e, i, k, len, xd, yd,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n // If either is zero...\r\n if (!x.s || !y.s) {\r\n\r\n // Return x if y is zero.\r\n // Return y if y is non-zero.\r\n if (!y.s) y = new Ctor(x);\r\n return external ? round(y, pr) : y;\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n k = x.e;\r\n e = y.e;\r\n xd = xd.slice();\r\n i = k - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (i) {\r\n if (i < 0) {\r\n d = xd;\r\n i = -i;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = k;\r\n len = xd.length;\r\n }\r\n\r\n // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1.\r\n k = Math.ceil(pr / LOG_BASE);\r\n len = k > len ? k + 1 : len + 1;\r\n\r\n if (i > len) {\r\n i = len;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts.\r\n d.reverse();\r\n for (; i--;) d.push(0);\r\n d.reverse();\r\n }\r\n\r\n len = xd.length;\r\n i = yd.length;\r\n\r\n // If yd is longer than xd, swap xd and yd so xd points to the longer array.\r\n if (len - i < 0) {\r\n i = len;\r\n d = yd;\r\n yd = xd;\r\n xd = d;\r\n }\r\n\r\n // Only start adding at yd.length - 1 as the further digits of xd can be left as they are.\r\n for (carry = 0; i;) {\r\n carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0;\r\n xd[i] %= BASE;\r\n }\r\n\r\n if (carry) {\r\n xd.unshift(carry);\r\n ++e;\r\n }\r\n\r\n // Remove trailing zeros.\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n for (len = xd.length; xd[--len] == 0;) xd.pop();\r\n\r\n y.d = xd;\r\n y.e = e;\r\n\r\n return external ? round(y, pr) : y;\r\n }\r\n\r\n\r\n function checkInt32(i, min, max) {\r\n if (i !== ~~i || i < min || i > max) {\r\n throw Error(invalidArgument + i);\r\n }\r\n }\r\n\r\n\r\n function digitsToString(d) {\r\n var i, k, ws,\r\n indexOfLastWord = d.length - 1,\r\n str = '',\r\n w = d[0];\r\n\r\n if (indexOfLastWord > 0) {\r\n str += w;\r\n for (i = 1; i < indexOfLastWord; i++) {\r\n ws = d[i] + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n str += ws;\r\n }\r\n\r\n w = d[i];\r\n ws = w + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n } else if (w === 0) {\r\n return '0';\r\n }\r\n\r\n // Remove trailing zeros of last w.\r\n for (; w % 10 === 0;) w /= 10;\r\n\r\n return str + w;\r\n }\r\n\r\n\r\n var divide = (function () {\r\n\r\n // Assumes non-zero x and k, and hence non-zero result.\r\n function multiplyInteger(x, k) {\r\n var temp,\r\n carry = 0,\r\n i = x.length;\r\n\r\n for (x = x.slice(); i--;) {\r\n temp = x[i] * k + carry;\r\n x[i] = temp % BASE | 0;\r\n carry = temp / BASE | 0;\r\n }\r\n\r\n if (carry) x.unshift(carry);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, r;\r\n\r\n if (aL != bL) {\r\n r = aL > bL ? 1 : -1;\r\n } else {\r\n for (i = r = 0; i < aL; i++) {\r\n if (a[i] != b[i]) {\r\n r = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n function subtract(a, b, aL) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * BASE + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1;) a.shift();\r\n }\r\n\r\n return function (x, y, pr, dp) {\r\n var cmp, e, i, k, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0, yL, yz,\r\n Ctor = x.constructor,\r\n sign = x.s == y.s ? 1 : -1,\r\n xd = x.d,\r\n yd = y.d;\r\n\r\n // Either 0?\r\n if (!x.s) return new Ctor(x);\r\n if (!y.s) throw Error(decimalError + 'Division by zero');\r\n\r\n e = x.e - y.e;\r\n yL = yd.length;\r\n xL = xd.length;\r\n q = new Ctor(sign);\r\n qd = q.d = [];\r\n\r\n // Result exponent may be one less than e.\r\n for (i = 0; yd[i] == (xd[i] || 0); ) ++i;\r\n if (yd[i] > (xd[i] || 0)) --e;\r\n\r\n if (pr == null) {\r\n sd = pr = Ctor.precision;\r\n } else if (dp) {\r\n sd = pr + (getBase10Exponent(x) - getBase10Exponent(y)) + 1;\r\n } else {\r\n sd = pr;\r\n }\r\n\r\n if (sd < 0) return new Ctor(0);\r\n\r\n // Convert precision in number of base 10 digits to base 1e7 digits.\r\n sd = sd / LOG_BASE + 2 | 0;\r\n i = 0;\r\n\r\n // divisor < 1e7\r\n if (yL == 1) {\r\n k = 0;\r\n yd = yd[0];\r\n sd++;\r\n\r\n // k is the carry.\r\n for (; (i < xL || k) && sd--; i++) {\r\n t = k * BASE + (xd[i] || 0);\r\n qd[i] = t / yd | 0;\r\n k = t % yd | 0;\r\n }\r\n\r\n // divisor >= 1e7\r\n } else {\r\n\r\n // Normalise xd and yd so highest order digit of yd is >= BASE/2\r\n k = BASE / (yd[0] + 1) | 0;\r\n\r\n if (k > 1) {\r\n yd = multiplyInteger(yd, k);\r\n xd = multiplyInteger(xd, k);\r\n yL = yd.length;\r\n xL = xd.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xd.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL;) rem[remL++] = 0;\r\n\r\n yz = yd.slice();\r\n yz.unshift(0);\r\n yd0 = yd[0];\r\n\r\n if (yd[1] >= BASE / 2) ++yd0;\r\n\r\n do {\r\n k = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, k.\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * BASE + (rem[1] || 0);\r\n\r\n // k will be how many times the divisor goes into the current remainder.\r\n k = rem0 / yd0 | 0;\r\n\r\n // Algorithm:\r\n // 1. product = divisor * trial digit (k)\r\n // 2. if product > remainder: product -= divisor, k--\r\n // 3. remainder -= product\r\n // 4. if product was < remainder at 2:\r\n // 5. compare new remainder and divisor\r\n // 6. If remainder > divisor: remainder -= divisor, k++\r\n\r\n if (k > 1) {\r\n if (k >= BASE) k = BASE - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiplyInteger(yd, k);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n cmp = compare(prod, rem, prodL, remL);\r\n\r\n // product > remainder.\r\n if (cmp == 1) {\r\n k--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yd, prodL);\r\n }\r\n } else {\r\n\r\n // cmp is -1.\r\n // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1\r\n // to avoid it. If k is 1 there is a need to compare yd and rem again below.\r\n if (k == 0) cmp = k = 1;\r\n prod = yd.slice();\r\n }\r\n\r\n prodL = prod.length;\r\n if (prodL < remL) prod.unshift(0);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL);\r\n\r\n // If product was < previous remainder.\r\n if (cmp == -1) {\r\n remL = rem.length;\r\n\r\n // Compare divisor and new remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n if (cmp < 1) {\r\n k++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yd, remL);\r\n }\r\n }\r\n\r\n remL = rem.length;\r\n } else if (cmp === 0) {\r\n k++;\r\n rem = [0];\r\n } // if cmp === 1, k will be 0\r\n\r\n // Add the next digit, k, to the result array.\r\n qd[i++] = k;\r\n\r\n // Update the remainder.\r\n if (cmp && rem[0]) {\r\n rem[remL++] = xd[xi] || 0;\r\n } else {\r\n rem = [xd[xi]];\r\n remL = 1;\r\n }\r\n\r\n } while ((xi++ < xL || rem[0] !== void 0) && sd--);\r\n }\r\n\r\n // Leading zero?\r\n if (!qd[0]) qd.shift();\r\n\r\n q.e = e;\r\n\r\n return round(q, dp ? pr + getBase10Exponent(q) + 1 : pr);\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of `x` truncated to `sd`\r\n * significant digits.\r\n *\r\n * Taylor/Maclaurin series.\r\n *\r\n * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...\r\n *\r\n * Argument reduction:\r\n * Repeat x = x / 32, k += 5, until |x| < 0.1\r\n * exp(x) = exp(x / 2^k)^(2^k)\r\n *\r\n * Previously, the argument was initially reduced by\r\n * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10)\r\n * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was\r\n * found to be slower than just dividing repeatedly by 32 as above.\r\n *\r\n * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)\r\n *\r\n * exp(x) is non-terminating for any finite, non-zero x.\r\n *\r\n */\r\n function exp(x, sd) {\r\n var denominator, guard, pow, sum, t, wpr,\r\n i = 0,\r\n k = 0,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n if (getBase10Exponent(x) > 16) throw Error(exponentOutOfRange + getBase10Exponent(x));\r\n\r\n // exp(0) = 1\r\n if (!x.s) return new Ctor(ONE);\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n t = new Ctor(0.03125);\r\n\r\n while (x.abs().gte(0.1)) {\r\n x = x.times(t); // x = x / 2^5\r\n k += 5;\r\n }\r\n\r\n // Estimate the precision increase necessary to ensure the first 4 rounding digits are correct.\r\n guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0;\r\n wpr += guard;\r\n denominator = pow = sum = new Ctor(ONE);\r\n Ctor.precision = wpr;\r\n\r\n for (;;) {\r\n pow = round(pow.times(x), wpr);\r\n denominator = denominator.times(++i);\r\n t = sum.plus(divide(pow, denominator, wpr));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n while (k--) sum = round(sum.times(sum), wpr);\r\n Ctor.precision = pr;\r\n return sd == null ? (external = true, round(sum, pr)) : sum;\r\n }\r\n\r\n sum = t;\r\n }\r\n }\r\n\r\n\r\n // Calculate the base 10 exponent from the base 1e7 exponent.\r\n function getBase10Exponent(x) {\r\n var e = x.e * LOG_BASE,\r\n w = x.d[0];\r\n\r\n // Add the number of digits of the first word of the digits array.\r\n for (; w >= 10; w /= 10) e++;\r\n return e;\r\n }\r\n\r\n\r\n function getLn10(Ctor, sd, pr) {\r\n\r\n if (sd > Ctor.LN10.sd()) {\r\n\r\n\r\n // Reset global state in case the exception is caught.\r\n external = true;\r\n if (pr) Ctor.precision = pr;\r\n throw Error(decimalError + 'LN10 precision limit exceeded');\r\n }\r\n\r\n return round(new Ctor(Ctor.LN10), sd);\r\n }\r\n\r\n\r\n function getZeroString(k) {\r\n var zs = '';\r\n for (; k--;) zs += '0';\r\n return zs;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of `x` truncated to `sd` significant\r\n * digits.\r\n *\r\n * ln(n) is non-terminating (n != 1)\r\n *\r\n */\r\n function ln(y, sd) {\r\n var c, c0, denominator, e, numerator, sum, t, wpr, x2,\r\n n = 1,\r\n guard = 10,\r\n x = y,\r\n xd = x.d,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n // ln(-x) = NaN\r\n // ln(0) = -Infinity\r\n if (x.s < 1) throw Error(decimalError + (x.s ? 'NaN' : '-Infinity'));\r\n\r\n // ln(1) = 0\r\n if (x.eq(ONE)) return new Ctor(0);\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n if (x.eq(10)) {\r\n if (sd == null) external = true;\r\n return getLn10(Ctor, wpr);\r\n }\r\n\r\n wpr += guard;\r\n Ctor.precision = wpr;\r\n c = digitsToString(xd);\r\n c0 = c.charAt(0);\r\n e = getBase10Exponent(x);\r\n\r\n if (Math.abs(e) < 1.5e15) {\r\n\r\n // Argument reduction.\r\n // The series converges faster the closer the argument is to 1, so using\r\n // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b\r\n // multiply the argument by itself until the leading digits of the significand are 7, 8, 9,\r\n // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can\r\n // later be divided by this number, then separate out the power of 10 using\r\n // ln(a*10^b) = ln(a) + b*ln(10).\r\n\r\n // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14).\r\n //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) {\r\n // max n is 6 (gives 0.7 - 1.3)\r\n while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) {\r\n x = x.times(y);\r\n c = digitsToString(x.d);\r\n c0 = c.charAt(0);\r\n n++;\r\n }\r\n\r\n e = getBase10Exponent(x);\r\n\r\n if (c0 > 1) {\r\n x = new Ctor('0.' + c);\r\n e++;\r\n } else {\r\n x = new Ctor(c0 + '.' + c.slice(1));\r\n }\r\n } else {\r\n\r\n // The argument reduction method above may result in overflow if the argument y is a massive\r\n // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this\r\n // function using ln(x*10^e) = ln(x) + e*ln(10).\r\n t = getLn10(Ctor, wpr + 2, pr).times(e + '');\r\n x = ln(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t);\r\n\r\n Ctor.precision = pr;\r\n return sd == null ? (external = true, round(x, pr)) : x;\r\n }\r\n\r\n // x is reduced to a value near 1.\r\n\r\n // Taylor series.\r\n // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...)\r\n // where x = (y - 1)/(y + 1) (|x| < 1)\r\n sum = numerator = x = divide(x.minus(ONE), x.plus(ONE), wpr);\r\n x2 = round(x.times(x), wpr);\r\n denominator = 3;\r\n\r\n for (;;) {\r\n numerator = round(numerator.times(x2), wpr);\r\n t = sum.plus(divide(numerator, new Ctor(denominator), wpr));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n sum = sum.times(2);\r\n\r\n // Reverse the argument reduction.\r\n if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + ''));\r\n sum = divide(sum, new Ctor(n), wpr);\r\n\r\n Ctor.precision = pr;\r\n return sd == null ? (external = true, round(sum, pr)) : sum;\r\n }\r\n\r\n sum = t;\r\n denominator += 2;\r\n }\r\n }\r\n\r\n\r\n /*\r\n * Parse the value of a new Decimal `x` from string `str`.\r\n */\r\n function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48;) ++i;\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48;) --len;\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n e = e - i - 1;\r\n x.e = mathfloor(e / LOG_BASE);\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external && (x.e > MAX_E || x.e < -MAX_E)) throw Error(exponentOutOfRange + e);\r\n } else {\r\n\r\n // Zero.\r\n x.s = 0;\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Round `x` to `sd` significant digits, using rounding mode `rm` if present (truncate otherwise).\r\n */\r\n function round(x, sd, rm) {\r\n var i, j, k, n, rd, doRound, w, xdi,\r\n xd = x.d;\r\n\r\n // rd: the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // w: the word of xd which contains the rounding digit, a base 1e7 number.\r\n // xdi: the index of w within xd.\r\n // n: the number of digits of w.\r\n // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if\r\n // they had leading zeros)\r\n // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero).\r\n\r\n // Get the length of the first word of the digits array xd.\r\n for (n = 1, k = xd[0]; k >= 10; k /= 10) n++;\r\n i = sd - n;\r\n\r\n // Is the rounding digit in the first word of xd?\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n w = xd[xdi = 0];\r\n } else {\r\n xdi = Math.ceil((i + 1) / LOG_BASE);\r\n k = xd.length;\r\n if (xdi >= k) return x;\r\n w = k = xd[xdi];\r\n\r\n // Get the number of digits of w.\r\n for (n = 1; k >= 10; k /= 10) n++;\r\n\r\n // Get the index of rd within w.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within w, adjusted for leading zeros.\r\n // The number of leading zeros of w is given by LOG_BASE - n.\r\n j = i - LOG_BASE + n;\r\n }\r\n\r\n if (rm !== void 0) {\r\n k = mathpow(10, n - j - 1);\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = w / k % 10 | 0;\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n doRound = sd < 0 || xd[xdi + 1] !== void 0 || w % k;\r\n\r\n // The expression `w % mathpow(10, n - j - 1)` returns all the digits of w to the right of the\r\n // digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression will give\r\n // 714.\r\n\r\n doRound = rm < 4\r\n ? (rd || doRound) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || doRound || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? w / mathpow(10, n - j) : 0 : xd[xdi - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n }\r\n\r\n if (sd < 1 || !xd[0]) {\r\n if (doRound) {\r\n k = getBase10Exponent(x);\r\n xd.length = 1;\r\n\r\n // Convert sd to decimal places.\r\n sd = sd - k - 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE);\r\n x.e = mathfloor(-sd / LOG_BASE) || 0;\r\n } else {\r\n xd.length = 1;\r\n\r\n // Zero.\r\n xd[0] = x.e = x.s = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xd.length = xdi;\r\n k = 1;\r\n xdi--;\r\n } else {\r\n xd.length = xdi + 1;\r\n k = mathpow(10, LOG_BASE - i);\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of w.\r\n xd[xdi] = j > 0 ? (w / mathpow(10, n - j) % mathpow(10, j) | 0) * k : 0;\r\n }\r\n\r\n if (doRound) {\r\n for (;;) {\r\n\r\n // Is the digit to be rounded up in the first word of xd?\r\n if (xdi == 0) {\r\n if ((xd[0] += k) == BASE) {\r\n xd[0] = 1;\r\n ++x.e;\r\n }\r\n\r\n break;\r\n } else {\r\n xd[xdi] += k;\r\n if (xd[xdi] != BASE) break;\r\n xd[xdi--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xd.length; xd[--i] === 0;) xd.pop();\r\n\r\n if (external && (x.e > MAX_E || x.e < -MAX_E)) {\r\n throw Error(exponentOutOfRange + getBase10Exponent(x));\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function subtract(x, y) {\r\n var d, e, i, j, k, len, xd, xe, xLTy, yd,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n // Return y negated if x is zero.\r\n // Return x if y is zero and x is non-zero.\r\n if (!x.s || !y.s) {\r\n if (y.s) y.s = -y.s;\r\n else y = new Ctor(x);\r\n return external ? round(y, pr) : y;\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n\r\n // x and y are non-zero numbers with the same sign.\r\n\r\n e = y.e;\r\n xe = x.e;\r\n xd = xd.slice();\r\n k = xe - e;\r\n\r\n // If exponents differ...\r\n if (k) {\r\n xLTy = k < 0;\r\n\r\n if (xLTy) {\r\n d = xd;\r\n k = -k;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = xe;\r\n len = xd.length;\r\n }\r\n\r\n // Numbers with massively different exponents would result in a very high number of zeros\r\n // needing to be prepended, but this can be avoided while still ensuring correct rounding by\r\n // limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`.\r\n i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2;\r\n\r\n if (k > i) {\r\n k = i;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents.\r\n d.reverse();\r\n for (i = k; i--;) d.push(0);\r\n d.reverse();\r\n\r\n // Base 1e7 exponents equal.\r\n } else {\r\n\r\n // Check digits to determine which is the bigger number.\r\n\r\n i = xd.length;\r\n len = yd.length;\r\n xLTy = i < len;\r\n if (xLTy) len = i;\r\n\r\n for (i = 0; i < len; i++) {\r\n if (xd[i] != yd[i]) {\r\n xLTy = xd[i] < yd[i];\r\n break;\r\n }\r\n }\r\n\r\n k = 0;\r\n }\r\n\r\n if (xLTy) {\r\n d = xd;\r\n xd = yd;\r\n yd = d;\r\n y.s = -y.s;\r\n }\r\n\r\n len = xd.length;\r\n\r\n // Append zeros to xd if shorter.\r\n // Don't add zeros to yd if shorter as subtraction only needs to start at yd length.\r\n for (i = yd.length - len; i > 0; --i) xd[len++] = 0;\r\n\r\n // Subtract yd from xd.\r\n for (i = yd.length; i > k;) {\r\n if (xd[--i] < yd[i]) {\r\n for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1;\r\n --xd[j];\r\n xd[i] += BASE;\r\n }\r\n\r\n xd[i] -= yd[i];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] === 0;) xd.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xd[0] === 0; xd.shift()) --e;\r\n\r\n // Zero?\r\n if (!xd[0]) return new Ctor(0);\r\n\r\n y.d = xd;\r\n y.e = e;\r\n\r\n //return external && xd.length >= pr / LOG_BASE ? round(y, pr) : y;\r\n return external ? round(y, pr) : y;\r\n }\r\n\r\n\r\n function toString(x, isExp, sd) {\r\n var k,\r\n e = getBase10Exponent(x),\r\n str = digitsToString(x.d),\r\n len = str.length;\r\n\r\n if (isExp) {\r\n if (sd && (k = sd - len) > 0) {\r\n str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k);\r\n } else if (len > 1) {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n\r\n str = str + (e < 0 ? 'e' : 'e+') + e;\r\n } else if (e < 0) {\r\n str = '0.' + getZeroString(-e - 1) + str;\r\n if (sd && (k = sd - len) > 0) str += getZeroString(k);\r\n } else if (e >= len) {\r\n str += getZeroString(e + 1 - len);\r\n if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k);\r\n } else {\r\n if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k);\r\n if (sd && (k = sd - len) > 0) {\r\n if (e + 1 === len) str += '.';\r\n str += getZeroString(k);\r\n }\r\n }\r\n\r\n return x.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Does not strip trailing zeros.\r\n function truncate(arr, len) {\r\n if (arr.length > len) {\r\n arr.length = len;\r\n return true;\r\n }\r\n }\r\n\r\n\r\n // Decimal methods\r\n\r\n\r\n /*\r\n * clone\r\n * config/set\r\n */\r\n\r\n\r\n /*\r\n * Create and return a Decimal constructor with the same configuration properties as this Decimal\r\n * constructor.\r\n *\r\n */\r\n function clone(obj) {\r\n var i, p, ps;\r\n\r\n /*\r\n * The Decimal constructor and exported function.\r\n * Return a new Decimal instance.\r\n *\r\n * value {number|string|Decimal} A numeric value.\r\n *\r\n */\r\n function Decimal(value) {\r\n var x = this;\r\n\r\n // Decimal called without new.\r\n if (!(x instanceof Decimal)) return new Decimal(value);\r\n\r\n // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor\r\n // which points to Object.\r\n x.constructor = Decimal;\r\n\r\n // Duplicate.\r\n if (value instanceof Decimal) {\r\n x.s = value.s;\r\n x.e = value.e;\r\n x.d = (value = value.d) ? value.slice() : value;\r\n return;\r\n }\r\n\r\n if (typeof value === 'number') {\r\n\r\n // Reject Infinity/NaN.\r\n if (value * 0 !== 0) {\r\n throw Error(invalidArgument + value);\r\n }\r\n\r\n if (value > 0) {\r\n x.s = 1;\r\n } else if (value < 0) {\r\n value = -value;\r\n x.s = -1;\r\n } else {\r\n x.s = 0;\r\n x.e = 0;\r\n x.d = [0];\r\n return;\r\n }\r\n\r\n // Fast path for small integers.\r\n if (value === ~~value && value < 1e7) {\r\n x.e = 0;\r\n x.d = [value];\r\n return;\r\n }\r\n\r\n return parseDecimal(x, value.toString());\r\n } else if (typeof value !== 'string') {\r\n throw Error(invalidArgument + value);\r\n }\r\n\r\n // Minus sign?\r\n if (value.charCodeAt(0) === 45) {\r\n value = value.slice(1);\r\n x.s = -1;\r\n } else {\r\n x.s = 1;\r\n }\r\n\r\n if (isDecimal.test(value)) parseDecimal(x, value);\r\n else throw Error(invalidArgument + value);\r\n }\r\n\r\n Decimal.prototype = P;\r\n\r\n Decimal.ROUND_UP = 0;\r\n Decimal.ROUND_DOWN = 1;\r\n Decimal.ROUND_CEIL = 2;\r\n Decimal.ROUND_FLOOR = 3;\r\n Decimal.ROUND_HALF_UP = 4;\r\n Decimal.ROUND_HALF_DOWN = 5;\r\n Decimal.ROUND_HALF_EVEN = 6;\r\n Decimal.ROUND_HALF_CEIL = 7;\r\n Decimal.ROUND_HALF_FLOOR = 8;\r\n\r\n Decimal.clone = clone;\r\n Decimal.config = Decimal.set = config;\r\n\r\n if (obj === void 0) obj = {};\r\n if (obj) {\r\n ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'LN10'];\r\n for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p];\r\n }\r\n\r\n Decimal.config(obj);\r\n\r\n return Decimal;\r\n }\r\n\r\n\r\n /*\r\n * Configure global settings for a Decimal constructor.\r\n *\r\n * `obj` is an object with one or more of the following properties,\r\n *\r\n * precision {number}\r\n * rounding {number}\r\n * toExpNeg {number}\r\n * toExpPos {number}\r\n *\r\n * E.g. Decimal.config({ precision: 20, rounding: 4 })\r\n *\r\n */\r\n function config(obj) {\r\n if (!obj || typeof obj !== 'object') {\r\n throw Error(decimalError + 'Object expected');\r\n }\r\n var i, p, v,\r\n ps = [\r\n 'precision', 1, MAX_DIGITS,\r\n 'rounding', 0, 8,\r\n 'toExpNeg', -1 / 0, 0,\r\n 'toExpPos', 0, 1 / 0\r\n ];\r\n\r\n for (i = 0; i < ps.length; i += 3) {\r\n if ((v = obj[p = ps[i]]) !== void 0) {\r\n if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v;\r\n else throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n if ((v = obj[p = 'LN10']) !== void 0) {\r\n if (v == Math.LN10) this[p] = new this(v);\r\n else throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n\r\n // Create and configure initial Decimal constructor.\r\n Decimal = clone(Decimal);\r\n\r\n Decimal['default'] = Decimal.Decimal = Decimal;\r\n\r\n // Internal constant.\r\n ONE = new Decimal(1);\r\n\r\n\r\n // Export.\r\n\r\n\r\n // AMD.\r\n if (typeof define == 'function' && define.amd) {\r\n define(function () {\r\n return Decimal;\r\n });\r\n\r\n // Node and other environments that support module.exports.\r\n } else if (typeof module != 'undefined' && module.exports) {\r\n module.exports = Decimal;\r\n\r\n // Browser.\r\n } else {\r\n if (!globalScope) {\r\n globalScope = typeof self != 'undefined' && self && self.self == self\r\n ? self : Function('return this')();\r\n }\r\n\r\n globalScope.Decimal = Decimal;\r\n }\r\n})(this);\r\n",";(function (globalScope) {\r\n 'use strict';\r\n\r\n\r\n /*!\r\n * decimal.js v10.4.3\r\n * An arbitrary-precision Decimal type for JavaScript.\r\n * https://github.com/MikeMcl/decimal.js\r\n * Copyright (c) 2022 Michael Mclaughlin \r\n * MIT Licence\r\n */\r\n\r\n\r\n // ----------------------------------- EDITABLE DEFAULTS ------------------------------------ //\r\n\r\n\r\n // The maximum exponent magnitude.\r\n // The limit on the value of `toExpNeg`, `toExpPos`, `minE` and `maxE`.\r\n var EXP_LIMIT = 9e15, // 0 to 9e15\r\n\r\n // The limit on the value of `precision`, and on the value of the first argument to\r\n // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`.\r\n MAX_DIGITS = 1e9, // 0 to 1e9\r\n\r\n // Base conversion alphabet.\r\n NUMERALS = '0123456789abcdef',\r\n\r\n // The natural logarithm of 10 (1025 digits).\r\n LN10 = '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058',\r\n\r\n // Pi (1025 digits).\r\n PI = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789',\r\n\r\n\r\n // The initial configuration properties of the Decimal constructor.\r\n DEFAULTS = {\r\n\r\n // These values must be integers within the stated ranges (inclusive).\r\n // Most of these values can be changed at run-time using the `Decimal.config` method.\r\n\r\n // The maximum number of significant digits of the result of a calculation or base conversion.\r\n // E.g. `Decimal.config({ precision: 20 });`\r\n precision: 20, // 1 to MAX_DIGITS\r\n\r\n // The rounding mode used when rounding to `precision`.\r\n //\r\n // ROUND_UP 0 Away from zero.\r\n // ROUND_DOWN 1 Towards zero.\r\n // ROUND_CEIL 2 Towards +Infinity.\r\n // ROUND_FLOOR 3 Towards -Infinity.\r\n // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n //\r\n // E.g.\r\n // `Decimal.rounding = 4;`\r\n // `Decimal.rounding = Decimal.ROUND_HALF_UP;`\r\n rounding: 4, // 0 to 8\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend (JavaScript %).\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 The IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive.\r\n //\r\n // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian\r\n // division (9) are commonly used for the modulus operation. The other rounding modes can also\r\n // be used, but they may not give useful results.\r\n modulo: 1, // 0 to 9\r\n\r\n // The exponent value at and beneath which `toString` returns exponential notation.\r\n // JavaScript numbers: -7\r\n toExpNeg: -7, // 0 to -EXP_LIMIT\r\n\r\n // The exponent value at and above which `toString` returns exponential notation.\r\n // JavaScript numbers: 21\r\n toExpPos: 21, // 0 to EXP_LIMIT\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // JavaScript numbers: -324 (5e-324)\r\n minE: -EXP_LIMIT, // -1 to -EXP_LIMIT\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // JavaScript numbers: 308 (1.7976931348623157e+308)\r\n maxE: EXP_LIMIT, // 1 to EXP_LIMIT\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n crypto: false // true/false\r\n },\r\n\r\n\r\n // ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- //\r\n\r\n\r\n Decimal, inexact, noConflict, quadrant,\r\n external = true,\r\n\r\n decimalError = '[DecimalError] ',\r\n invalidArgument = decimalError + 'Invalid argument: ',\r\n precisionLimitExceeded = decimalError + 'Precision limit exceeded',\r\n cryptoUnavailable = decimalError + 'crypto unavailable',\r\n tag = '[object Decimal]',\r\n\r\n mathfloor = Math.floor,\r\n mathpow = Math.pow,\r\n\r\n isBinary = /^0b([01]+(\\.[01]*)?|\\.[01]+)(p[+-]?\\d+)?$/i,\r\n isHex = /^0x([0-9a-f]+(\\.[0-9a-f]*)?|\\.[0-9a-f]+)(p[+-]?\\d+)?$/i,\r\n isOctal = /^0o([0-7]+(\\.[0-7]*)?|\\.[0-7]+)(p[+-]?\\d+)?$/i,\r\n isDecimal = /^(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,\r\n\r\n BASE = 1e7,\r\n LOG_BASE = 7,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n\r\n LN10_PRECISION = LN10.length - 1,\r\n PI_PRECISION = PI.length - 1,\r\n\r\n // Decimal.prototype object\r\n P = { toStringTag: tag };\r\n\r\n\r\n // Decimal prototype methods\r\n\r\n\r\n /*\r\n * absoluteValue abs\r\n * ceil\r\n * clampedTo clamp\r\n * comparedTo cmp\r\n * cosine cos\r\n * cubeRoot cbrt\r\n * decimalPlaces dp\r\n * dividedBy div\r\n * dividedToIntegerBy divToInt\r\n * equals eq\r\n * floor\r\n * greaterThan gt\r\n * greaterThanOrEqualTo gte\r\n * hyperbolicCosine cosh\r\n * hyperbolicSine sinh\r\n * hyperbolicTangent tanh\r\n * inverseCosine acos\r\n * inverseHyperbolicCosine acosh\r\n * inverseHyperbolicSine asinh\r\n * inverseHyperbolicTangent atanh\r\n * inverseSine asin\r\n * inverseTangent atan\r\n * isFinite\r\n * isInteger isInt\r\n * isNaN\r\n * isNegative isNeg\r\n * isPositive isPos\r\n * isZero\r\n * lessThan lt\r\n * lessThanOrEqualTo lte\r\n * logarithm log\r\n * [maximum] [max]\r\n * [minimum] [min]\r\n * minus sub\r\n * modulo mod\r\n * naturalExponential exp\r\n * naturalLogarithm ln\r\n * negated neg\r\n * plus add\r\n * precision sd\r\n * round\r\n * sine sin\r\n * squareRoot sqrt\r\n * tangent tan\r\n * times mul\r\n * toBinary\r\n * toDecimalPlaces toDP\r\n * toExponential\r\n * toFixed\r\n * toFraction\r\n * toHexadecimal toHex\r\n * toNearest\r\n * toNumber\r\n * toOctal\r\n * toPower pow\r\n * toPrecision\r\n * toSignificantDigits toSD\r\n * toString\r\n * truncated trunc\r\n * valueOf toJSON\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the absolute value of this Decimal.\r\n *\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new this.constructor(this);\r\n if (x.s < 0) x.s = 1;\r\n return finalise(x);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the\r\n * direction of positive Infinity.\r\n *\r\n */\r\n P.ceil = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal clamped to the range\r\n * delineated by `min` and `max`.\r\n *\r\n * min {number|string|Decimal}\r\n * max {number|string|Decimal}\r\n *\r\n */\r\n P.clampedTo = P.clamp = function (min, max) {\r\n var k,\r\n x = this,\r\n Ctor = x.constructor;\r\n min = new Ctor(min);\r\n max = new Ctor(max);\r\n if (!min.s || !max.s) return new Ctor(NaN);\r\n if (min.gt(max)) throw Error(invalidArgument + max);\r\n k = x.cmp(min);\r\n return k < 0 ? min : x.cmp(max) > 0 ? max : new Ctor(x);\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this Decimal is greater than the value of `y`,\r\n * -1 if the value of this Decimal is less than the value of `y`,\r\n * 0 if they have the same value,\r\n * NaN if the value of either Decimal is NaN.\r\n *\r\n */\r\n P.comparedTo = P.cmp = function (y) {\r\n var i, j, xdL, ydL,\r\n x = this,\r\n xd = x.d,\r\n yd = (y = new x.constructor(y)).d,\r\n xs = x.s,\r\n ys = y.s;\r\n\r\n // Either NaN or ±Infinity?\r\n if (!xd || !yd) {\r\n return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1;\r\n }\r\n\r\n // Either zero?\r\n if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0;\r\n\r\n // Signs differ?\r\n if (xs !== ys) return xs;\r\n\r\n // Compare exponents.\r\n if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1;\r\n\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Compare digit by digit.\r\n for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {\r\n if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cosine of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * cos(0) = 1\r\n * cos(-0) = 1\r\n * cos(Infinity) = NaN\r\n * cos(-Infinity) = NaN\r\n * cos(NaN) = NaN\r\n *\r\n */\r\n P.cosine = P.cos = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.d) return new Ctor(NaN);\r\n\r\n // cos(0) = cos(-0) = 1\r\n if (!x.d[0]) return new Ctor(1);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;\r\n Ctor.rounding = 1;\r\n\r\n x = cosine(Ctor, toLessThanHalfPi(Ctor, x));\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n *\r\n * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * cbrt(0) = 0\r\n * cbrt(-0) = -0\r\n * cbrt(1) = 1\r\n * cbrt(-1) = -1\r\n * cbrt(N) = N\r\n * cbrt(-I) = -I\r\n * cbrt(I) = I\r\n *\r\n * Math.cbrt(x) = (x < 0 ? -Math.pow(-x, 1/3) : Math.pow(x, 1/3))\r\n *\r\n */\r\n P.cubeRoot = P.cbrt = function () {\r\n var e, m, n, r, rep, s, sd, t, t3, t3plusx,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = x.s * mathpow(x.s * x, 1 / 3);\r\n\r\n // Math.cbrt underflow/overflow?\r\n // Pass x to Math.pow as integer, then adjust the exponent of the result.\r\n if (!s || Math.abs(s) == 1 / 0) {\r\n n = digitsToString(x.d);\r\n e = x.e;\r\n\r\n // Adjust n exponent so it is a multiple of 3 away from x exponent.\r\n if (s = (e - n.length + 1) % 3) n += (s == 1 || s == -2 ? '0' : '00');\r\n s = mathpow(n, 1 / 3);\r\n\r\n // Rarely, e may be one less than the result exponent value.\r\n e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2));\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n r.s = x.s;\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n sd = (e = Ctor.precision) + 3;\r\n\r\n // Halley's method.\r\n // TODO? Compare Newton's method.\r\n for (;;) {\r\n t = r;\r\n t3 = t.times(t).times(t);\r\n t3plusx = t3.plus(x);\r\n r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1);\r\n\r\n // TODO? Replace with for-loop and checkRoundingDigits.\r\n if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {\r\n n = n.slice(sd - 3, sd + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999\r\n // , i.e. approaching a rounding boundary, continue the iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n if (!rep) {\r\n finalise(t, e + 1, 0);\r\n\r\n if (t.times(t).times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n sd += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.\r\n // If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n finalise(r, e + 1, 1);\r\n m = !r.times(r).times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, e, Ctor.rounding, m);\r\n };\r\n\r\n\r\n /*\r\n * Return the number of decimal places of the value of this Decimal.\r\n *\r\n */\r\n P.decimalPlaces = P.dp = function () {\r\n var w,\r\n d = this.d,\r\n n = NaN;\r\n\r\n if (d) {\r\n w = d.length - 1;\r\n n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n w = d[w];\r\n if (w) for (; w % 10 == 0; w /= 10) n--;\r\n if (n < 0) n = 0;\r\n }\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal divided by `y`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.dividedBy = P.div = function (y) {\r\n return divide(this, new this.constructor(y));\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the integer part of dividing the value of this Decimal\r\n * by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.dividedToIntegerBy = P.divToInt = function (y) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.\r\n *\r\n */\r\n P.equals = P.eq = function (y) {\r\n return this.cmp(y) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the\r\n * direction of negative Infinity.\r\n *\r\n */\r\n P.floor = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 3);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than the value of `y`, otherwise return\r\n * false.\r\n *\r\n */\r\n P.greaterThan = P.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than or equal to the value of `y`,\r\n * otherwise return false.\r\n *\r\n */\r\n P.greaterThanOrEqualTo = P.gte = function (y) {\r\n var k = this.cmp(y);\r\n return k == 1 || k === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [1, Infinity]\r\n *\r\n * cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ...\r\n *\r\n * cosh(0) = 1\r\n * cosh(-0) = 1\r\n * cosh(Infinity) = Infinity\r\n * cosh(-Infinity) = Infinity\r\n * cosh(NaN) = NaN\r\n *\r\n * x time taken (ms) result\r\n * 1000 9 9.8503555700852349694e+433\r\n * 10000 25 4.4034091128314607936e+4342\r\n * 100000 171 1.4033316802130615897e+43429\r\n * 1000000 3817 1.5166076984010437725e+434294\r\n * 10000000 abandoned after 2 minute wait\r\n *\r\n * TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x))\r\n *\r\n */\r\n P.hyperbolicCosine = P.cosh = function () {\r\n var k, n, pr, rm, len,\r\n x = this,\r\n Ctor = x.constructor,\r\n one = new Ctor(1);\r\n\r\n if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN);\r\n if (x.isZero()) return one;\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n len = x.d.length;\r\n\r\n // Argument reduction: cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1\r\n // i.e. cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4))\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n // TODO? Estimation reused from cosine() and may not be optimal here.\r\n if (len < 32) {\r\n k = Math.ceil(len / 3);\r\n n = (1 / tinyPow(4, k)).toString();\r\n } else {\r\n k = 16;\r\n n = '2.3283064365386962890625e-10';\r\n }\r\n\r\n x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true);\r\n\r\n // Reverse argument reduction\r\n var cosh2_x,\r\n i = k,\r\n d8 = new Ctor(8);\r\n for (; i--;) {\r\n cosh2_x = x.times(x);\r\n x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8))));\r\n }\r\n\r\n return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ...\r\n *\r\n * sinh(0) = 0\r\n * sinh(-0) = -0\r\n * sinh(Infinity) = Infinity\r\n * sinh(-Infinity) = -Infinity\r\n * sinh(NaN) = NaN\r\n *\r\n * x time taken (ms)\r\n * 10 2 ms\r\n * 100 5 ms\r\n * 1000 14 ms\r\n * 10000 82 ms\r\n * 100000 886 ms 1.4033316802130615897e+43429\r\n * 200000 2613 ms\r\n * 300000 5407 ms\r\n * 400000 8824 ms\r\n * 500000 13026 ms 8.7080643612718084129e+217146\r\n * 1000000 48543 ms\r\n *\r\n * TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x))\r\n *\r\n */\r\n P.hyperbolicSine = P.sinh = function () {\r\n var k, pr, rm, len,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n len = x.d.length;\r\n\r\n if (len < 3) {\r\n x = taylorSeries(Ctor, 2, x, x, true);\r\n } else {\r\n\r\n // Alternative argument reduction: sinh(3x) = sinh(x)(3 + 4sinh^2(x))\r\n // i.e. sinh(x) = sinh(x/3)(3 + 4sinh^2(x/3))\r\n // 3 multiplications and 1 addition\r\n\r\n // Argument reduction: sinh(5x) = sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x)))\r\n // i.e. sinh(x) = sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5)))\r\n // 4 multiplications and 2 additions\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n k = 1.4 * Math.sqrt(len);\r\n k = k > 16 ? 16 : k | 0;\r\n\r\n x = x.times(1 / tinyPow(5, k));\r\n x = taylorSeries(Ctor, 2, x, x, true);\r\n\r\n // Reverse argument reduction\r\n var sinh2_x,\r\n d5 = new Ctor(5),\r\n d16 = new Ctor(16),\r\n d20 = new Ctor(20);\r\n for (; k--;) {\r\n sinh2_x = x.times(x);\r\n x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20))));\r\n }\r\n }\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * tanh(x) = sinh(x) / cosh(x)\r\n *\r\n * tanh(0) = 0\r\n * tanh(-0) = -0\r\n * tanh(Infinity) = 1\r\n * tanh(-Infinity) = -1\r\n * tanh(NaN) = NaN\r\n *\r\n */\r\n P.hyperbolicTangent = P.tanh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(x.s);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 7;\r\n Ctor.rounding = 1;\r\n\r\n return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of\r\n * this Decimal.\r\n *\r\n * Domain: [-1, 1]\r\n * Range: [0, pi]\r\n *\r\n * acos(x) = pi/2 - asin(x)\r\n *\r\n * acos(0) = pi/2\r\n * acos(-0) = pi/2\r\n * acos(1) = 0\r\n * acos(-1) = pi\r\n * acos(1/2) = pi/3\r\n * acos(-1/2) = 2*pi/3\r\n * acos(|x| > 1) = NaN\r\n * acos(NaN) = NaN\r\n *\r\n */\r\n P.inverseCosine = P.acos = function () {\r\n var halfPi,\r\n x = this,\r\n Ctor = x.constructor,\r\n k = x.abs().cmp(1),\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding;\r\n\r\n if (k !== -1) {\r\n return k === 0\r\n // |x| is 1\r\n ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0)\r\n // |x| > 1 or x is NaN\r\n : new Ctor(NaN);\r\n }\r\n\r\n if (x.isZero()) return getPi(Ctor, pr + 4, rm).times(0.5);\r\n\r\n // TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3\r\n\r\n Ctor.precision = pr + 6;\r\n Ctor.rounding = 1;\r\n\r\n x = x.asin();\r\n halfPi = getPi(Ctor, pr + 4, rm).times(0.5);\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return halfPi.minus(x);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the\r\n * value of this Decimal.\r\n *\r\n * Domain: [1, Infinity]\r\n * Range: [0, Infinity]\r\n *\r\n * acosh(x) = ln(x + sqrt(x^2 - 1))\r\n *\r\n * acosh(x < 1) = NaN\r\n * acosh(NaN) = NaN\r\n * acosh(Infinity) = Infinity\r\n * acosh(-Infinity) = NaN\r\n * acosh(0) = NaN\r\n * acosh(-0) = NaN\r\n * acosh(1) = 0\r\n * acosh(-1) = NaN\r\n *\r\n */\r\n P.inverseHyperbolicCosine = P.acosh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (x.lte(1)) return new Ctor(x.eq(1) ? 0 : NaN);\r\n if (!x.isFinite()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n external = false;\r\n\r\n x = x.times(x).minus(1).sqrt().plus(x);\r\n\r\n external = true;\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.ln();\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value\r\n * of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * asinh(x) = ln(x + sqrt(x^2 + 1))\r\n *\r\n * asinh(NaN) = NaN\r\n * asinh(Infinity) = Infinity\r\n * asinh(-Infinity) = -Infinity\r\n * asinh(0) = 0\r\n * asinh(-0) = -0\r\n *\r\n */\r\n P.inverseHyperbolicSine = P.asinh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6;\r\n Ctor.rounding = 1;\r\n external = false;\r\n\r\n x = x.times(x).plus(1).sqrt().plus(x);\r\n\r\n external = true;\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.ln();\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the\r\n * value of this Decimal.\r\n *\r\n * Domain: [-1, 1]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * atanh(x) = 0.5 * ln((1 + x) / (1 - x))\r\n *\r\n * atanh(|x| > 1) = NaN\r\n * atanh(NaN) = NaN\r\n * atanh(Infinity) = NaN\r\n * atanh(-Infinity) = NaN\r\n * atanh(0) = 0\r\n * atanh(-0) = -0\r\n * atanh(1) = Infinity\r\n * atanh(-1) = -Infinity\r\n *\r\n */\r\n P.inverseHyperbolicTangent = P.atanh = function () {\r\n var pr, rm, wpr, xsd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.e >= 0) return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n xsd = x.sd();\r\n\r\n if (Math.max(xsd, pr) < 2 * -x.e - 1) return finalise(new Ctor(x), pr, rm, true);\r\n\r\n Ctor.precision = wpr = xsd - x.e;\r\n\r\n x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1);\r\n\r\n Ctor.precision = pr + 4;\r\n Ctor.rounding = 1;\r\n\r\n x = x.ln();\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.times(0.5);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi/2, pi/2]\r\n *\r\n * asin(x) = 2*atan(x/(1 + sqrt(1 - x^2)))\r\n *\r\n * asin(0) = 0\r\n * asin(-0) = -0\r\n * asin(1/2) = pi/6\r\n * asin(-1/2) = -pi/6\r\n * asin(1) = pi/2\r\n * asin(-1) = -pi/2\r\n * asin(|x| > 1) = NaN\r\n * asin(NaN) = NaN\r\n *\r\n * TODO? Compare performance of Taylor series.\r\n *\r\n */\r\n P.inverseSine = P.asin = function () {\r\n var halfPi, k,\r\n pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n k = x.abs().cmp(1);\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n if (k !== -1) {\r\n\r\n // |x| is 1\r\n if (k === 0) {\r\n halfPi = getPi(Ctor, pr + 4, rm).times(0.5);\r\n halfPi.s = x.s;\r\n return halfPi;\r\n }\r\n\r\n // |x| > 1 or x is NaN\r\n return new Ctor(NaN);\r\n }\r\n\r\n // TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6\r\n\r\n Ctor.precision = pr + 6;\r\n Ctor.rounding = 1;\r\n\r\n x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan();\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.times(2);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value\r\n * of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi/2, pi/2]\r\n *\r\n * atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...\r\n *\r\n * atan(0) = 0\r\n * atan(-0) = -0\r\n * atan(1) = pi/4\r\n * atan(-1) = -pi/4\r\n * atan(Infinity) = pi/2\r\n * atan(-Infinity) = -pi/2\r\n * atan(NaN) = NaN\r\n *\r\n */\r\n P.inverseTangent = P.atan = function () {\r\n var i, j, k, n, px, t, r, wpr, x2,\r\n x = this,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding;\r\n\r\n if (!x.isFinite()) {\r\n if (!x.s) return new Ctor(NaN);\r\n if (pr + 4 <= PI_PRECISION) {\r\n r = getPi(Ctor, pr + 4, rm).times(0.5);\r\n r.s = x.s;\r\n return r;\r\n }\r\n } else if (x.isZero()) {\r\n return new Ctor(x);\r\n } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) {\r\n r = getPi(Ctor, pr + 4, rm).times(0.25);\r\n r.s = x.s;\r\n return r;\r\n }\r\n\r\n Ctor.precision = wpr = pr + 10;\r\n Ctor.rounding = 1;\r\n\r\n // TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x);\r\n\r\n // Argument reduction\r\n // Ensure |x| < 0.42\r\n // atan(x) = 2 * atan(x / (1 + sqrt(1 + x^2)))\r\n\r\n k = Math.min(28, wpr / LOG_BASE + 2 | 0);\r\n\r\n for (i = k; i; --i) x = x.div(x.times(x).plus(1).sqrt().plus(1));\r\n\r\n external = false;\r\n\r\n j = Math.ceil(wpr / LOG_BASE);\r\n n = 1;\r\n x2 = x.times(x);\r\n r = new Ctor(x);\r\n px = x;\r\n\r\n // atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...\r\n for (; i !== -1;) {\r\n px = px.times(x2);\r\n t = r.minus(px.div(n += 2));\r\n\r\n px = px.times(x2);\r\n r = t.plus(px.div(n += 2));\r\n\r\n if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--;);\r\n }\r\n\r\n if (k) r = r.times(2 << (k - 1));\r\n\r\n external = true;\r\n\r\n return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is a finite number, otherwise return false.\r\n *\r\n */\r\n P.isFinite = function () {\r\n return !!this.d;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is an integer, otherwise return false.\r\n *\r\n */\r\n P.isInteger = P.isInt = function () {\r\n return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is NaN, otherwise return false.\r\n *\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is negative, otherwise return false.\r\n *\r\n */\r\n P.isNegative = P.isNeg = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is positive, otherwise return false.\r\n *\r\n */\r\n P.isPositive = P.isPos = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is 0 or -0, otherwise return false.\r\n *\r\n */\r\n P.isZero = function () {\r\n return !!this.d && this.d[0] === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThan = P.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThanOrEqualTo = P.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n };\r\n\r\n\r\n /*\r\n * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * If no base is specified, return log[10](arg).\r\n *\r\n * log[base](arg) = ln(arg) / ln(base)\r\n *\r\n * The result will always be correctly rounded if the base of the log is 10, and 'almost always'\r\n * otherwise:\r\n *\r\n * Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen\r\n * rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error\r\n * between the result and the correctly rounded result will be one ulp (unit in the last place).\r\n *\r\n * log[-b](a) = NaN\r\n * log[0](a) = NaN\r\n * log[1](a) = NaN\r\n * log[NaN](a) = NaN\r\n * log[Infinity](a) = NaN\r\n * log[b](0) = -Infinity\r\n * log[b](-0) = -Infinity\r\n * log[b](-a) = NaN\r\n * log[b](1) = 0\r\n * log[b](Infinity) = Infinity\r\n * log[b](NaN) = NaN\r\n *\r\n * [base] {number|string|Decimal} The base of the logarithm.\r\n *\r\n */\r\n P.logarithm = P.log = function (base) {\r\n var isBase10, d, denominator, k, inf, num, sd, r,\r\n arg = this,\r\n Ctor = arg.constructor,\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding,\r\n guard = 5;\r\n\r\n // Default base is 10.\r\n if (base == null) {\r\n base = new Ctor(10);\r\n isBase10 = true;\r\n } else {\r\n base = new Ctor(base);\r\n d = base.d;\r\n\r\n // Return NaN if base is negative, or non-finite, or is 0 or 1.\r\n if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN);\r\n\r\n isBase10 = base.eq(10);\r\n }\r\n\r\n d = arg.d;\r\n\r\n // Is arg negative, non-finite, 0 or 1?\r\n if (arg.s < 0 || !d || !d[0] || arg.eq(1)) {\r\n return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0);\r\n }\r\n\r\n // The result will have a non-terminating decimal expansion if base is 10 and arg is not an\r\n // integer power of 10.\r\n if (isBase10) {\r\n if (d.length > 1) {\r\n inf = true;\r\n } else {\r\n for (k = d[0]; k % 10 === 0;) k /= 10;\r\n inf = k !== 1;\r\n }\r\n }\r\n\r\n external = false;\r\n sd = pr + guard;\r\n num = naturalLogarithm(arg, sd);\r\n denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);\r\n\r\n // The result will have 5 rounding digits.\r\n r = divide(num, denominator, sd, 1);\r\n\r\n // If at a rounding boundary, i.e. the result's rounding digits are [49]9999 or [50]0000,\r\n // calculate 10 further digits.\r\n //\r\n // If the result is known to have an infinite decimal expansion, repeat this until it is clear\r\n // that the result is above or below the boundary. Otherwise, if after calculating the 10\r\n // further digits, the last 14 are nines, round up and assume the result is exact.\r\n // Also assume the result is exact if the last 14 are zero.\r\n //\r\n // Example of a result that will be incorrectly rounded:\r\n // log[1048576](4503599627370502) = 2.60000000000000009610279511444746...\r\n // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it\r\n // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so\r\n // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal\r\n // place is still 2.6.\r\n if (checkRoundingDigits(r.d, k = pr, rm)) {\r\n\r\n do {\r\n sd += 10;\r\n num = naturalLogarithm(arg, sd);\r\n denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);\r\n r = divide(num, denominator, sd, 1);\r\n\r\n if (!inf) {\r\n\r\n // Check for 14 nines from the 2nd rounding digit, as the first may be 4.\r\n if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) {\r\n r = finalise(r, pr + 1, 0);\r\n }\r\n\r\n break;\r\n }\r\n } while (checkRoundingDigits(r.d, k += 10, rm));\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, pr, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the maximum of the arguments and the value of this Decimal.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n P.max = function () {\r\n Array.prototype.push.call(arguments, this);\r\n return maxOrMin(this.constructor, arguments, 'lt');\r\n };\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the minimum of the arguments and the value of this Decimal.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n P.min = function () {\r\n Array.prototype.push.call(arguments, this);\r\n return maxOrMin(this.constructor, arguments, 'gt');\r\n };\r\n */\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal minus `y`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.minus = P.sub = function (y) {\r\n var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // If either is not finite...\r\n if (!x.d || !y.d) {\r\n\r\n // Return NaN if either is NaN.\r\n if (!x.s || !y.s) y = new Ctor(NaN);\r\n\r\n // Return y negated if x is finite and y is ±Infinity.\r\n else if (x.d) y.s = -y.s;\r\n\r\n // Return x if y is finite and x is ±Infinity.\r\n // Return x if both are ±Infinity with different signs.\r\n // Return NaN if both are ±Infinity with the same sign.\r\n else y = new Ctor(y.d || x.s !== y.s ? x : NaN);\r\n\r\n return y;\r\n }\r\n\r\n // If signs differ...\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.plus(y);\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n // If either is zero...\r\n if (!xd[0] || !yd[0]) {\r\n\r\n // Return y negated if x is zero and y is non-zero.\r\n if (yd[0]) y.s = -y.s;\r\n\r\n // Return x if y is zero and x is non-zero.\r\n else if (xd[0]) y = new Ctor(x);\r\n\r\n // Return zero if both are zero.\r\n // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity.\r\n else return new Ctor(rm === 3 ? -0 : 0);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n }\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n // Calculate base 1e7 exponents.\r\n e = mathfloor(y.e / LOG_BASE);\r\n xe = mathfloor(x.e / LOG_BASE);\r\n\r\n xd = xd.slice();\r\n k = xe - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (k) {\r\n xLTy = k < 0;\r\n\r\n if (xLTy) {\r\n d = xd;\r\n k = -k;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = xe;\r\n len = xd.length;\r\n }\r\n\r\n // Numbers with massively different exponents would result in a very high number of\r\n // zeros needing to be prepended, but this can be avoided while still ensuring correct\r\n // rounding by limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`.\r\n i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2;\r\n\r\n if (k > i) {\r\n k = i;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents.\r\n d.reverse();\r\n for (i = k; i--;) d.push(0);\r\n d.reverse();\r\n\r\n // Base 1e7 exponents equal.\r\n } else {\r\n\r\n // Check digits to determine which is the bigger number.\r\n\r\n i = xd.length;\r\n len = yd.length;\r\n xLTy = i < len;\r\n if (xLTy) len = i;\r\n\r\n for (i = 0; i < len; i++) {\r\n if (xd[i] != yd[i]) {\r\n xLTy = xd[i] < yd[i];\r\n break;\r\n }\r\n }\r\n\r\n k = 0;\r\n }\r\n\r\n if (xLTy) {\r\n d = xd;\r\n xd = yd;\r\n yd = d;\r\n y.s = -y.s;\r\n }\r\n\r\n len = xd.length;\r\n\r\n // Append zeros to `xd` if shorter.\r\n // Don't add zeros to `yd` if shorter as subtraction only needs to start at `yd` length.\r\n for (i = yd.length - len; i > 0; --i) xd[len++] = 0;\r\n\r\n // Subtract yd from xd.\r\n for (i = yd.length; i > k;) {\r\n\r\n if (xd[--i] < yd[i]) {\r\n for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1;\r\n --xd[j];\r\n xd[i] += BASE;\r\n }\r\n\r\n xd[i] -= yd[i];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] === 0;) xd.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xd[0] === 0; xd.shift()) --e;\r\n\r\n // Zero?\r\n if (!xd[0]) return new Ctor(rm === 3 ? -0 : 0);\r\n\r\n y.d = xd;\r\n y.e = getBase10Exponent(xd, e);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal modulo `y`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * The result depends on the modulo mode.\r\n *\r\n */\r\n P.modulo = P.mod = function (y) {\r\n var q,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // Return NaN if x is ±Infinity or NaN, or y is NaN or ±0.\r\n if (!x.d || !y.s || y.d && !y.d[0]) return new Ctor(NaN);\r\n\r\n // Return x if y is ±Infinity or x is ±0.\r\n if (!y.d || x.d && !x.d[0]) {\r\n return finalise(new Ctor(x), Ctor.precision, Ctor.rounding);\r\n }\r\n\r\n // Prevent rounding of intermediate calculations.\r\n external = false;\r\n\r\n if (Ctor.modulo == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // result = x - q * y where 0 <= result < abs(y)\r\n q = divide(x, y.abs(), 0, 3, 1);\r\n q.s *= y.s;\r\n } else {\r\n q = divide(x, y, 0, Ctor.modulo, 1);\r\n }\r\n\r\n q = q.times(y);\r\n\r\n external = true;\r\n\r\n return x.minus(q);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of the value of this Decimal,\r\n * i.e. the base e raised to the power the value of this Decimal, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.naturalExponential = P.exp = function () {\r\n return naturalExponential(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of the value of this Decimal,\r\n * rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.naturalLogarithm = P.ln = function () {\r\n return naturalLogarithm(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by\r\n * -1.\r\n *\r\n */\r\n P.negated = P.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s;\r\n return finalise(x);\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal plus `y`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.plus = P.add = function (y) {\r\n var carry, d, e, i, k, len, pr, rm, xd, yd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // If either is not finite...\r\n if (!x.d || !y.d) {\r\n\r\n // Return NaN if either is NaN.\r\n if (!x.s || !y.s) y = new Ctor(NaN);\r\n\r\n // Return x if y is finite and x is ±Infinity.\r\n // Return x if both are ±Infinity with the same sign.\r\n // Return NaN if both are ±Infinity with different signs.\r\n // Return y if x is finite and y is ±Infinity.\r\n else if (!x.d) y = new Ctor(y.d || x.s === y.s ? x : NaN);\r\n\r\n return y;\r\n }\r\n\r\n // If signs differ...\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.minus(y);\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n // If either is zero...\r\n if (!xd[0] || !yd[0]) {\r\n\r\n // Return x if y is zero.\r\n // Return y if y is non-zero.\r\n if (!yd[0]) y = new Ctor(x);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n }\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n // Calculate base 1e7 exponents.\r\n k = mathfloor(x.e / LOG_BASE);\r\n e = mathfloor(y.e / LOG_BASE);\r\n\r\n xd = xd.slice();\r\n i = k - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (i) {\r\n\r\n if (i < 0) {\r\n d = xd;\r\n i = -i;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = k;\r\n len = xd.length;\r\n }\r\n\r\n // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1.\r\n k = Math.ceil(pr / LOG_BASE);\r\n len = k > len ? k + 1 : len + 1;\r\n\r\n if (i > len) {\r\n i = len;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts.\r\n d.reverse();\r\n for (; i--;) d.push(0);\r\n d.reverse();\r\n }\r\n\r\n len = xd.length;\r\n i = yd.length;\r\n\r\n // If yd is longer than xd, swap xd and yd so xd points to the longer array.\r\n if (len - i < 0) {\r\n i = len;\r\n d = yd;\r\n yd = xd;\r\n xd = d;\r\n }\r\n\r\n // Only start adding at yd.length - 1 as the further digits of xd can be left as they are.\r\n for (carry = 0; i;) {\r\n carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0;\r\n xd[i] %= BASE;\r\n }\r\n\r\n if (carry) {\r\n xd.unshift(carry);\r\n ++e;\r\n }\r\n\r\n // Remove trailing zeros.\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n for (len = xd.length; xd[--len] == 0;) xd.pop();\r\n\r\n y.d = xd;\r\n y.e = getBase10Exponent(xd, e);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return the number of significant digits of the value of this Decimal.\r\n *\r\n * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.\r\n *\r\n */\r\n P.precision = P.sd = function (z) {\r\n var k,\r\n x = this;\r\n\r\n if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z);\r\n\r\n if (x.d) {\r\n k = getPrecision(x.d);\r\n if (z && x.e + 1 > k) k = x.e + 1;\r\n } else {\r\n k = NaN;\r\n }\r\n\r\n return k;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using\r\n * rounding mode `rounding`.\r\n *\r\n */\r\n P.round = function () {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n return finalise(new Ctor(x), x.e + 1, Ctor.rounding);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sine of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * sin(x) = x - x^3/3! + x^5/5! - ...\r\n *\r\n * sin(0) = 0\r\n * sin(-0) = -0\r\n * sin(Infinity) = NaN\r\n * sin(-Infinity) = NaN\r\n * sin(NaN) = NaN\r\n *\r\n */\r\n P.sine = P.sin = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;\r\n Ctor.rounding = 1;\r\n\r\n x = sine(Ctor, toLessThanHalfPi(Ctor, x));\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, sd, r, rep, t,\r\n x = this,\r\n d = x.d,\r\n e = x.e,\r\n s = x.s,\r\n Ctor = x.constructor;\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !d || !d[0]) {\r\n return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0);\r\n }\r\n\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+x);\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = digitsToString(d);\r\n\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(n);\r\n e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n sd = (e = Ctor.precision) + 3;\r\n\r\n // Newton-Raphson iteration.\r\n for (;;) {\r\n t = r;\r\n r = t.plus(divide(x, t, sd + 2, 1)).times(0.5);\r\n\r\n // TODO? Replace with for-loop and checkRoundingDigits.\r\n if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {\r\n n = n.slice(sd - 3, sd + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or\r\n // 4999, i.e. approaching a rounding boundary, continue the iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n if (!rep) {\r\n finalise(t, e + 1, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n sd += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.\r\n // If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n finalise(r, e + 1, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, e, Ctor.rounding, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the tangent of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * tan(0) = 0\r\n * tan(-0) = -0\r\n * tan(Infinity) = NaN\r\n * tan(-Infinity) = NaN\r\n * tan(NaN) = NaN\r\n *\r\n */\r\n P.tangent = P.tan = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 10;\r\n Ctor.rounding = 1;\r\n\r\n x = x.sin();\r\n x.s = 1;\r\n x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0);\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new Decimal whose value is this Decimal times `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.times = P.mul = function (y) {\r\n var carry, e, i, k, r, rL, t, xdL, ydL,\r\n x = this,\r\n Ctor = x.constructor,\r\n xd = x.d,\r\n yd = (y = new Ctor(y)).d;\r\n\r\n y.s *= x.s;\r\n\r\n // If either is NaN, ±Infinity or ±0...\r\n if (!xd || !xd[0] || !yd || !yd[0]) {\r\n\r\n return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd\r\n\r\n // Return NaN if either is NaN.\r\n // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity.\r\n ? NaN\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n // Return ±0 if either is ±0.\r\n : !xd || !yd ? y.s / 0 : y.s * 0);\r\n }\r\n\r\n e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE);\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Ensure xd points to the longer array.\r\n if (xdL < ydL) {\r\n r = xd;\r\n xd = yd;\r\n yd = r;\r\n rL = xdL;\r\n xdL = ydL;\r\n ydL = rL;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n r = [];\r\n rL = xdL + ydL;\r\n for (i = rL; i--;) r.push(0);\r\n\r\n // Multiply!\r\n for (i = ydL; --i >= 0;) {\r\n carry = 0;\r\n for (k = xdL + i; k > i;) {\r\n t = r[k] + yd[i] * xd[k - i - 1] + carry;\r\n r[k--] = t % BASE | 0;\r\n carry = t / BASE | 0;\r\n }\r\n\r\n r[k] = (r[k] + carry) % BASE | 0;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; !r[--rL];) r.pop();\r\n\r\n if (carry) ++e;\r\n else r.shift();\r\n\r\n y.d = r;\r\n y.e = getBase10Exponent(r, e);\r\n\r\n return external ? finalise(y, Ctor.precision, Ctor.rounding) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 2, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toBinary = function (sd, rm) {\r\n return toStringBinary(this, 2, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`\r\n * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.\r\n *\r\n * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toDecimalPlaces = P.toDP = function (dp, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n if (dp === void 0) return x;\r\n\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n return finalise(x, dp + x.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in exponential notation rounded to\r\n * `dp` fixed decimal places using rounding mode `rounding`.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toExponential = function (dp, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = finiteToString(x, true);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = finalise(new Ctor(x), dp + 1, rm);\r\n str = finiteToString(x, true, dp + 1);\r\n }\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in normal (fixed-point) notation to\r\n * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is\r\n * omitted.\r\n *\r\n * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n * (-0).toFixed(3) is '0.000'.\r\n * (-0.5).toFixed(0) is '-0'.\r\n *\r\n */\r\n P.toFixed = function (dp, rm) {\r\n var str, y,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = finiteToString(x);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n y = finalise(new Ctor(x), dp + x.e + 1, rm);\r\n str = finiteToString(y, false, dp + y.e + 1);\r\n }\r\n\r\n // To determine whether to add the minus sign look at the value before it was rounded,\r\n // i.e. look at `x` rather than `y`.\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return an array representing the value of this Decimal as a simple fraction with an integer\r\n * numerator and an integer denominator.\r\n *\r\n * The denominator will be a positive non-zero value less than or equal to the specified maximum\r\n * denominator. If a maximum denominator is not specified, the denominator will be the lowest\r\n * value necessary to represent the number exactly.\r\n *\r\n * [maxD] {number|string|Decimal} Maximum denominator. Integer >= 1 and < Infinity.\r\n *\r\n */\r\n P.toFraction = function (maxD) {\r\n var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r,\r\n x = this,\r\n xd = x.d,\r\n Ctor = x.constructor;\r\n\r\n if (!xd) return new Ctor(x);\r\n\r\n n1 = d0 = new Ctor(1);\r\n d1 = n0 = new Ctor(0);\r\n\r\n d = new Ctor(d1);\r\n e = d.e = getPrecision(xd) - x.e - 1;\r\n k = e % LOG_BASE;\r\n d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k);\r\n\r\n if (maxD == null) {\r\n\r\n // d is 10**e, the minimum max-denominator needed.\r\n maxD = e > 0 ? d : n1;\r\n } else {\r\n n = new Ctor(maxD);\r\n if (!n.isInt() || n.lt(n1)) throw Error(invalidArgument + n);\r\n maxD = n.gt(d) ? (e > 0 ? d : n1) : n;\r\n }\r\n\r\n external = false;\r\n n = new Ctor(digitsToString(xd));\r\n pr = Ctor.precision;\r\n Ctor.precision = e = xd.length * LOG_BASE * 2;\r\n\r\n for (;;) {\r\n q = divide(n, d, 0, 1, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.cmp(maxD) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n d2 = n1;\r\n n1 = n0.plus(q.times(d2));\r\n n0 = d2;\r\n d2 = d;\r\n d = n.minus(q.times(d2));\r\n n = d2;\r\n }\r\n\r\n d2 = divide(maxD.minus(d0), d1, 0, 1, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1?\r\n r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1\r\n ? [n1, d1] : [n0, d0];\r\n\r\n Ctor.precision = pr;\r\n external = true;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 16, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toHexadecimal = P.toHex = function (sd, rm) {\r\n return toStringBinary(this, 16, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding\r\n * mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal.\r\n *\r\n * The return value will always have the same sign as this Decimal, unless either this Decimal\r\n * or `y` is NaN, in which case the return value will be also be NaN.\r\n *\r\n * The return value is not affected by the value of `precision`.\r\n *\r\n * y {number|string|Decimal} The magnitude to round to a multiple of.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toNearest() rounding mode not an integer: {rm}'\r\n * 'toNearest() rounding mode out of range: {rm}'\r\n *\r\n */\r\n P.toNearest = function (y, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n\r\n if (y == null) {\r\n\r\n // If x is not finite, return x.\r\n if (!x.d) return x;\r\n\r\n y = new Ctor(1);\r\n rm = Ctor.rounding;\r\n } else {\r\n y = new Ctor(y);\r\n if (rm === void 0) {\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(rm, 0, 8);\r\n }\r\n\r\n // If x is not finite, return x if y is not NaN, else NaN.\r\n if (!x.d) return y.s ? x : y;\r\n\r\n // If y is not finite, return Infinity with the sign of x if y is Infinity, else NaN.\r\n if (!y.d) {\r\n if (y.s) y.s = x.s;\r\n return y;\r\n }\r\n }\r\n\r\n // If y is not zero, calculate the nearest multiple of y to x.\r\n if (y.d[0]) {\r\n external = false;\r\n x = divide(x, y, 0, rm, 1).times(y);\r\n external = true;\r\n finalise(x);\r\n\r\n // If y is zero, return zero with the sign of x.\r\n } else {\r\n y.s = x.s;\r\n x = y;\r\n }\r\n\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this Decimal converted to a number primitive.\r\n * Zero keeps its sign.\r\n *\r\n */\r\n P.toNumber = function () {\r\n return +this;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 8, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toOctal = function (sd, rm) {\r\n return toStringBinary(this, 8, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal raised to the power `y`, rounded\r\n * to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * ECMAScript compliant.\r\n *\r\n * pow(x, NaN) = NaN\r\n * pow(x, ±0) = 1\r\n\r\n * pow(NaN, non-zero) = NaN\r\n * pow(abs(x) > 1, +Infinity) = +Infinity\r\n * pow(abs(x) > 1, -Infinity) = +0\r\n * pow(abs(x) == 1, ±Infinity) = NaN\r\n * pow(abs(x) < 1, +Infinity) = +0\r\n * pow(abs(x) < 1, -Infinity) = +Infinity\r\n * pow(+Infinity, y > 0) = +Infinity\r\n * pow(+Infinity, y < 0) = +0\r\n * pow(-Infinity, odd integer > 0) = -Infinity\r\n * pow(-Infinity, even integer > 0) = +Infinity\r\n * pow(-Infinity, odd integer < 0) = -0\r\n * pow(-Infinity, even integer < 0) = +0\r\n * pow(+0, y > 0) = +0\r\n * pow(+0, y < 0) = +Infinity\r\n * pow(-0, odd integer > 0) = -0\r\n * pow(-0, even integer > 0) = +0\r\n * pow(-0, odd integer < 0) = -Infinity\r\n * pow(-0, even integer < 0) = +Infinity\r\n * pow(finite x < 0, finite non-integer) = NaN\r\n *\r\n * For non-integer or very large exponents pow(x, y) is calculated using\r\n *\r\n * x^y = exp(y*ln(x))\r\n *\r\n * Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the\r\n * probability of an incorrectly rounded result\r\n * P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14\r\n * i.e. 1 in 250,000,000,000,000\r\n *\r\n * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place).\r\n *\r\n * y {number|string|Decimal} The power to which to raise this Decimal.\r\n *\r\n */\r\n P.toPower = P.pow = function (y) {\r\n var e, k, pr, r, rm, s,\r\n x = this,\r\n Ctor = x.constructor,\r\n yn = +(y = new Ctor(y));\r\n\r\n // Either ±Infinity, NaN or ±0?\r\n if (!x.d || !y.d || !x.d[0] || !y.d[0]) return new Ctor(mathpow(+x, yn));\r\n\r\n x = new Ctor(x);\r\n\r\n if (x.eq(1)) return x;\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n if (y.eq(1)) return finalise(x, pr, rm);\r\n\r\n // y exponent\r\n e = mathfloor(y.e / LOG_BASE);\r\n\r\n // If y is a small integer use the 'exponentiation by squaring' algorithm.\r\n if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {\r\n r = intPow(Ctor, x, k, pr);\r\n return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm);\r\n }\r\n\r\n s = x.s;\r\n\r\n // if x is negative\r\n if (s < 0) {\r\n\r\n // if y is not an integer\r\n if (e < y.d.length - 1) return new Ctor(NaN);\r\n\r\n // Result is positive if x is negative and the last digit of integer y is even.\r\n if ((y.d[e] & 1) == 0) s = 1;\r\n\r\n // if x.eq(-1)\r\n if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) {\r\n x.s = s;\r\n return x;\r\n }\r\n }\r\n\r\n // Estimate result exponent.\r\n // x^y = 10^e, where e = y * log10(x)\r\n // log10(x) = log10(x_significand) + x_exponent\r\n // log10(x_significand) = ln(x_significand) / ln(10)\r\n k = mathpow(+x, yn);\r\n e = k == 0 || !isFinite(k)\r\n ? mathfloor(yn * (Math.log('0.' + digitsToString(x.d)) / Math.LN10 + x.e + 1))\r\n : new Ctor(k + '').e;\r\n\r\n // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1.\r\n\r\n // Overflow/underflow?\r\n if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) return new Ctor(e > 0 ? s / 0 : 0);\r\n\r\n external = false;\r\n Ctor.rounding = x.s = 1;\r\n\r\n // Estimate the extra guard digits needed to ensure five correct rounding digits from\r\n // naturalLogarithm(x). Example of failure without these extra digits (precision: 10):\r\n // new Decimal(2.32456).pow('2087987436534566.46411')\r\n // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815\r\n k = Math.min(12, (e + '').length);\r\n\r\n // r = x^y = exp(y*ln(x))\r\n r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr);\r\n\r\n // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40)\r\n if (r.d) {\r\n\r\n // Truncate to the required precision plus five rounding digits.\r\n r = finalise(r, pr + 5, 1);\r\n\r\n // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate\r\n // the result.\r\n if (checkRoundingDigits(r.d, pr, rm)) {\r\n e = pr + 10;\r\n\r\n // Truncate to the increased precision plus five rounding digits.\r\n r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1);\r\n\r\n // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9).\r\n if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) {\r\n r = finalise(r, pr + 1, 0);\r\n }\r\n }\r\n }\r\n\r\n r.s = s;\r\n external = true;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(r, pr, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal rounded to `sd` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * Return exponential notation if `sd` is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = finalise(new Ctor(x), sd, rm);\r\n str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd);\r\n }\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`\r\n * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if\r\n * omitted.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toSD() digits out of range: {sd}'\r\n * 'toSD() digits not an integer: {sd}'\r\n * 'toSD() rounding mode not an integer: {rm}'\r\n * 'toSD() rounding mode out of range: {rm}'\r\n *\r\n */\r\n P.toSignificantDigits = P.toSD = function (sd, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n }\r\n\r\n return finalise(new Ctor(x), sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal.\r\n *\r\n * Return exponential notation if this Decimal has a positive exponent equal to or greater than\r\n * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.\r\n *\r\n */\r\n P.toString = function () {\r\n var x = this,\r\n Ctor = x.constructor,\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal truncated to a whole number.\r\n *\r\n */\r\n P.truncated = P.trunc = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal.\r\n * Unlike `toString`, negative zero will include the minus sign.\r\n *\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n var x = this,\r\n Ctor = x.constructor,\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n\r\n return x.isNeg() ? '-' + str : str;\r\n };\r\n\r\n\r\n // Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.\r\n\r\n\r\n /*\r\n * digitsToString P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower,\r\n * finiteToString, naturalExponential, naturalLogarithm\r\n * checkInt32 P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest,\r\n * P.toPrecision, P.toSignificantDigits, toStringBinary, random\r\n * checkRoundingDigits P.logarithm, P.toPower, naturalExponential, naturalLogarithm\r\n * convertBase toStringBinary, parseOther\r\n * cos P.cos\r\n * divide P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy,\r\n * P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction,\r\n * P.toNearest, toStringBinary, naturalExponential, naturalLogarithm,\r\n * taylorSeries, atan2, parseOther\r\n * finalise P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh,\r\n * P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus,\r\n * P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot,\r\n * P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed,\r\n * P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits,\r\n * P.truncated, divide, getLn10, getPi, naturalExponential,\r\n * naturalLogarithm, ceil, floor, round, trunc\r\n * finiteToString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf,\r\n * toStringBinary\r\n * getBase10Exponent P.minus, P.plus, P.times, parseOther\r\n * getLn10 P.logarithm, naturalLogarithm\r\n * getPi P.acos, P.asin, P.atan, toLessThanHalfPi, atan2\r\n * getPrecision P.precision, P.toFraction\r\n * getZeroString digitsToString, finiteToString\r\n * intPow P.toPower, parseOther\r\n * isOdd toLessThanHalfPi\r\n * maxOrMin max, min\r\n * naturalExponential P.naturalExponential, P.toPower\r\n * naturalLogarithm P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm,\r\n * P.toPower, naturalExponential\r\n * nonFiniteToString finiteToString, toStringBinary\r\n * parseDecimal Decimal\r\n * parseOther Decimal\r\n * sin P.sin\r\n * taylorSeries P.cosh, P.sinh, cos, sin\r\n * toLessThanHalfPi P.cos, P.sin\r\n * toStringBinary P.toBinary, P.toHexadecimal, P.toOctal\r\n * truncate intPow\r\n *\r\n * Throws: P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi,\r\n * naturalLogarithm, config, parseOther, random, Decimal\r\n */\r\n\r\n\r\n function digitsToString(d) {\r\n var i, k, ws,\r\n indexOfLastWord = d.length - 1,\r\n str = '',\r\n w = d[0];\r\n\r\n if (indexOfLastWord > 0) {\r\n str += w;\r\n for (i = 1; i < indexOfLastWord; i++) {\r\n ws = d[i] + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n str += ws;\r\n }\r\n\r\n w = d[i];\r\n ws = w + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n } else if (w === 0) {\r\n return '0';\r\n }\r\n\r\n // Remove trailing zeros of last w.\r\n for (; w % 10 === 0;) w /= 10;\r\n\r\n return str + w;\r\n }\r\n\r\n\r\n function checkInt32(i, min, max) {\r\n if (i !== ~~i || i < min || i > max) {\r\n throw Error(invalidArgument + i);\r\n }\r\n }\r\n\r\n\r\n /*\r\n * Check 5 rounding digits if `repeating` is null, 4 otherwise.\r\n * `repeating == null` if caller is `log` or `pow`,\r\n * `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`.\r\n */\r\n function checkRoundingDigits(d, i, rm, repeating) {\r\n var di, k, r, rd;\r\n\r\n // Get the length of the first word of the array d.\r\n for (k = d[0]; k >= 10; k /= 10) --i;\r\n\r\n // Is the rounding digit in the first word of d?\r\n if (--i < 0) {\r\n i += LOG_BASE;\r\n di = 0;\r\n } else {\r\n di = Math.ceil((i + 1) / LOG_BASE);\r\n i %= LOG_BASE;\r\n }\r\n\r\n // i is the index (0 - 6) of the rounding digit.\r\n // E.g. if within the word 3487563 the first rounding digit is 5,\r\n // then i = 4, k = 1000, rd = 3487563 % 1000 = 563\r\n k = mathpow(10, LOG_BASE - i);\r\n rd = d[di] % k | 0;\r\n\r\n if (repeating == null) {\r\n if (i < 3) {\r\n if (i == 0) rd = rd / 100 | 0;\r\n else if (i == 1) rd = rd / 10 | 0;\r\n r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 50000 || rd == 0;\r\n } else {\r\n r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) &&\r\n (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 ||\r\n (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0;\r\n }\r\n } else {\r\n if (i < 4) {\r\n if (i == 0) rd = rd / 1000 | 0;\r\n else if (i == 1) rd = rd / 100 | 0;\r\n else if (i == 2) rd = rd / 10 | 0;\r\n r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999;\r\n } else {\r\n r = ((repeating || rm < 4) && rd + 1 == k ||\r\n (!repeating && rm > 3) && rd + 1 == k / 2) &&\r\n (d[di + 1] / k / 1000 | 0) == mathpow(10, i - 3) - 1;\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n\r\n // Convert string of `baseIn` to an array of numbers of `baseOut`.\r\n // Eg. convertBase('255', 10, 16) returns [15, 15].\r\n // Eg. convertBase('ff', 16, 10) returns [2, 5, 5].\r\n function convertBase(str, baseIn, baseOut) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n strL = str.length;\r\n\r\n for (; i < strL;) {\r\n for (arrL = arr.length; arrL--;) arr[arrL] *= baseIn;\r\n arr[0] += NUMERALS.indexOf(str.charAt(i++));\r\n for (j = 0; j < arr.length; j++) {\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] === void 0) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n\r\n /*\r\n * cos(x) = 1 - x^2/2! + x^4/4! - ...\r\n * |x| < pi/2\r\n *\r\n */\r\n function cosine(Ctor, x) {\r\n var k, len, y;\r\n\r\n if (x.isZero()) return x;\r\n\r\n // Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1\r\n // i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n len = x.d.length;\r\n if (len < 32) {\r\n k = Math.ceil(len / 3);\r\n y = (1 / tinyPow(4, k)).toString();\r\n } else {\r\n k = 16;\r\n y = '2.3283064365386962890625e-10';\r\n }\r\n\r\n Ctor.precision += k;\r\n\r\n x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1));\r\n\r\n // Reverse argument reduction\r\n for (var i = k; i--;) {\r\n var cos2x = x.times(x);\r\n x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1);\r\n }\r\n\r\n Ctor.precision -= k;\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Perform division in the specified base.\r\n */\r\n var divide = (function () {\r\n\r\n // Assumes non-zero x and k, and hence non-zero result.\r\n function multiplyInteger(x, k, base) {\r\n var temp,\r\n carry = 0,\r\n i = x.length;\r\n\r\n for (x = x.slice(); i--;) {\r\n temp = x[i] * k + carry;\r\n x[i] = temp % base | 0;\r\n carry = temp / base | 0;\r\n }\r\n\r\n if (carry) x.unshift(carry);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, r;\r\n\r\n if (aL != bL) {\r\n r = aL > bL ? 1 : -1;\r\n } else {\r\n for (i = r = 0; i < aL; i++) {\r\n if (a[i] != b[i]) {\r\n r = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1;) a.shift();\r\n }\r\n\r\n return function (x, y, pr, rm, dp, base) {\r\n var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0,\r\n yL, yz,\r\n Ctor = x.constructor,\r\n sign = x.s == y.s ? 1 : -1,\r\n xd = x.d,\r\n yd = y.d;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xd || !xd[0] || !yd || !yd[0]) {\r\n\r\n return new Ctor(// Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN :\r\n\r\n // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.\r\n xd && xd[0] == 0 || !yd ? sign * 0 : sign / 0);\r\n }\r\n\r\n if (base) {\r\n logBase = 1;\r\n e = x.e - y.e;\r\n } else {\r\n base = BASE;\r\n logBase = LOG_BASE;\r\n e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase);\r\n }\r\n\r\n yL = yd.length;\r\n xL = xd.length;\r\n q = new Ctor(sign);\r\n qd = q.d = [];\r\n\r\n // Result exponent may be one less than e.\r\n // The digit array of a Decimal from toStringBinary may have trailing zeros.\r\n for (i = 0; yd[i] == (xd[i] || 0); i++);\r\n\r\n if (yd[i] > (xd[i] || 0)) e--;\r\n\r\n if (pr == null) {\r\n sd = pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else if (dp) {\r\n sd = pr + (x.e - y.e) + 1;\r\n } else {\r\n sd = pr;\r\n }\r\n\r\n if (sd < 0) {\r\n qd.push(1);\r\n more = true;\r\n } else {\r\n\r\n // Convert precision in number of base 10 digits to base 1e7 digits.\r\n sd = sd / logBase + 2 | 0;\r\n i = 0;\r\n\r\n // divisor < 1e7\r\n if (yL == 1) {\r\n k = 0;\r\n yd = yd[0];\r\n sd++;\r\n\r\n // k is the carry.\r\n for (; (i < xL || k) && sd--; i++) {\r\n t = k * base + (xd[i] || 0);\r\n qd[i] = t / yd | 0;\r\n k = t % yd | 0;\r\n }\r\n\r\n more = k || i < xL;\r\n\r\n // divisor >= 1e7\r\n } else {\r\n\r\n // Normalise xd and yd so highest order digit of yd is >= base/2\r\n k = base / (yd[0] + 1) | 0;\r\n\r\n if (k > 1) {\r\n yd = multiplyInteger(yd, k, base);\r\n xd = multiplyInteger(xd, k, base);\r\n yL = yd.length;\r\n xL = xd.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xd.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL;) rem[remL++] = 0;\r\n\r\n yz = yd.slice();\r\n yz.unshift(0);\r\n yd0 = yd[0];\r\n\r\n if (yd[1] >= base / 2) ++yd0;\r\n\r\n do {\r\n k = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, k.\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // k will be how many times the divisor goes into the current remainder.\r\n k = rem0 / yd0 | 0;\r\n\r\n // Algorithm:\r\n // 1. product = divisor * trial digit (k)\r\n // 2. if product > remainder: product -= divisor, k--\r\n // 3. remainder -= product\r\n // 4. if product was < remainder at 2:\r\n // 5. compare new remainder and divisor\r\n // 6. If remainder > divisor: remainder -= divisor, k++\r\n\r\n if (k > 1) {\r\n if (k >= base) k = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiplyInteger(yd, k, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n cmp = compare(prod, rem, prodL, remL);\r\n\r\n // product > remainder.\r\n if (cmp == 1) {\r\n k--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yd, prodL, base);\r\n }\r\n } else {\r\n\r\n // cmp is -1.\r\n // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1\r\n // to avoid it. If k is 1 there is a need to compare yd and rem again below.\r\n if (k == 0) cmp = k = 1;\r\n prod = yd.slice();\r\n }\r\n\r\n prodL = prod.length;\r\n if (prodL < remL) prod.unshift(0);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n\r\n // If product was < previous remainder.\r\n if (cmp == -1) {\r\n remL = rem.length;\r\n\r\n // Compare divisor and new remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n if (cmp < 1) {\r\n k++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yd, remL, base);\r\n }\r\n }\r\n\r\n remL = rem.length;\r\n } else if (cmp === 0) {\r\n k++;\r\n rem = [0];\r\n } // if cmp === 1, k will be 0\r\n\r\n // Add the next digit, k, to the result array.\r\n qd[i++] = k;\r\n\r\n // Update the remainder.\r\n if (cmp && rem[0]) {\r\n rem[remL++] = xd[xi] || 0;\r\n } else {\r\n rem = [xd[xi]];\r\n remL = 1;\r\n }\r\n\r\n } while ((xi++ < xL || rem[0] !== void 0) && sd--);\r\n\r\n more = rem[0] !== void 0;\r\n }\r\n\r\n // Leading zero?\r\n if (!qd[0]) qd.shift();\r\n }\r\n\r\n // logBase is 1 when divide is being used for base conversion.\r\n if (logBase == 1) {\r\n q.e = e;\r\n inexact = more;\r\n } else {\r\n\r\n // To calculate q.e, first get the number of digits of qd[0].\r\n for (i = 1, k = qd[0]; k >= 10; k /= 10) i++;\r\n q.e = i + e * logBase - 1;\r\n\r\n finalise(q, dp ? pr + q.e + 1 : pr, rm, more);\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Round `x` to `sd` significant digits using rounding mode `rm`.\r\n * Check for over/under-flow.\r\n */\r\n function finalise(x, sd, rm, isTruncated) {\r\n var digits, i, j, k, rd, roundUp, w, xd, xdi,\r\n Ctor = x.constructor;\r\n\r\n // Don't round if sd is null or undefined.\r\n out: if (sd != null) {\r\n xd = x.d;\r\n\r\n // Infinity/NaN.\r\n if (!xd) return x;\r\n\r\n // rd: the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // w: the word of xd containing rd, a base 1e7 number.\r\n // xdi: the index of w within xd.\r\n // digits: the number of digits of w.\r\n // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if\r\n // they had leading zeros)\r\n // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero).\r\n\r\n // Get the length of the first word of the digits array xd.\r\n for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++;\r\n i = sd - digits;\r\n\r\n // Is the rounding digit in the first word of xd?\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n w = xd[xdi = 0];\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = w / mathpow(10, digits - j - 1) % 10 | 0;\r\n } else {\r\n xdi = Math.ceil((i + 1) / LOG_BASE);\r\n k = xd.length;\r\n if (xdi >= k) {\r\n if (isTruncated) {\r\n\r\n // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`.\r\n for (; k++ <= xdi;) xd.push(0);\r\n w = rd = 0;\r\n digits = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n w = k = xd[xdi];\r\n\r\n // Get the number of digits of w.\r\n for (digits = 1; k >= 10; k /= 10) digits++;\r\n\r\n // Get the index of rd within w.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within w, adjusted for leading zeros.\r\n // The number of leading zeros of w is given by LOG_BASE - digits.\r\n j = i - LOG_BASE + digits;\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0;\r\n }\r\n }\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n isTruncated = isTruncated || sd < 0 ||\r\n xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1));\r\n\r\n // The expression `w % mathpow(10, digits - j - 1)` returns all the digits of w to the right\r\n // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression\r\n // will give 714.\r\n\r\n roundUp = rm < 4\r\n ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xd[0]) {\r\n xd.length = 0;\r\n if (roundUp) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE);\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xd[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xd.length = xdi;\r\n k = 1;\r\n xdi--;\r\n } else {\r\n xd.length = xdi + 1;\r\n k = mathpow(10, LOG_BASE - i);\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of w.\r\n xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0;\r\n }\r\n\r\n if (roundUp) {\r\n for (;;) {\r\n\r\n // Is the digit to be rounded up in the first word of xd?\r\n if (xdi == 0) {\r\n\r\n // i will be the length of xd[0] before k is added.\r\n for (i = 1, j = xd[0]; j >= 10; j /= 10) i++;\r\n j = xd[0] += k;\r\n for (k = 1; j >= 10; j /= 10) k++;\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xd[0] == BASE) xd[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xd[xdi] += k;\r\n if (xd[xdi] != BASE) break;\r\n xd[xdi--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xd.length; xd[--i] === 0;) xd.pop();\r\n }\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > Ctor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < Ctor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // Ctor.underflow = true;\r\n } // else Ctor.underflow = false;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function finiteToString(x, isExp, sd) {\r\n if (!x.isFinite()) return nonFiniteToString(x);\r\n var k,\r\n e = x.e,\r\n str = digitsToString(x.d),\r\n len = str.length;\r\n\r\n if (isExp) {\r\n if (sd && (k = sd - len) > 0) {\r\n str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k);\r\n } else if (len > 1) {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n\r\n str = str + (x.e < 0 ? 'e' : 'e+') + x.e;\r\n } else if (e < 0) {\r\n str = '0.' + getZeroString(-e - 1) + str;\r\n if (sd && (k = sd - len) > 0) str += getZeroString(k);\r\n } else if (e >= len) {\r\n str += getZeroString(e + 1 - len);\r\n if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k);\r\n } else {\r\n if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k);\r\n if (sd && (k = sd - len) > 0) {\r\n if (e + 1 === len) str += '.';\r\n str += getZeroString(k);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n // Calculate the base 10 exponent from the base 1e7 exponent.\r\n function getBase10Exponent(digits, e) {\r\n var w = digits[0];\r\n\r\n // Add the number of digits of the first word of the digits array.\r\n for ( e *= LOG_BASE; w >= 10; w /= 10) e++;\r\n return e;\r\n }\r\n\r\n\r\n function getLn10(Ctor, sd, pr) {\r\n if (sd > LN10_PRECISION) {\r\n\r\n // Reset global state in case the exception is caught.\r\n external = true;\r\n if (pr) Ctor.precision = pr;\r\n throw Error(precisionLimitExceeded);\r\n }\r\n return finalise(new Ctor(LN10), sd, 1, true);\r\n }\r\n\r\n\r\n function getPi(Ctor, sd, rm) {\r\n if (sd > PI_PRECISION) throw Error(precisionLimitExceeded);\r\n return finalise(new Ctor(PI), sd, rm, true);\r\n }\r\n\r\n\r\n function getPrecision(digits) {\r\n var w = digits.length - 1,\r\n len = w * LOG_BASE + 1;\r\n\r\n w = digits[w];\r\n\r\n // If non-zero...\r\n if (w) {\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n for (; w % 10 == 0; w /= 10) len--;\r\n\r\n // Add the number of digits of the first word.\r\n for (w = digits[0]; w >= 10; w /= 10) len++;\r\n }\r\n\r\n return len;\r\n }\r\n\r\n\r\n function getZeroString(k) {\r\n var zs = '';\r\n for (; k--;) zs += '0';\r\n return zs;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of Decimal `x` to the power `n`, where `n` is an\r\n * integer of type number.\r\n *\r\n * Implements 'exponentiation by squaring'. Called by `pow` and `parseOther`.\r\n *\r\n */\r\n function intPow(Ctor, x, n, pr) {\r\n var isTruncated,\r\n r = new Ctor(1),\r\n\r\n // Max n of 9007199254740991 takes 53 loop iterations.\r\n // Maximum digits array length; leaves [28, 34] guard digits.\r\n k = Math.ceil(pr / LOG_BASE + 4);\r\n\r\n external = false;\r\n\r\n for (;;) {\r\n if (n % 2) {\r\n r = r.times(x);\r\n if (truncate(r.d, k)) isTruncated = true;\r\n }\r\n\r\n n = mathfloor(n / 2);\r\n if (n === 0) {\r\n\r\n // To ensure correct rounding when r.d is truncated, increment the last word if it is zero.\r\n n = r.d.length - 1;\r\n if (isTruncated && r.d[n] === 0) ++r.d[n];\r\n break;\r\n }\r\n\r\n x = x.times(x);\r\n truncate(x.d, k);\r\n }\r\n\r\n external = true;\r\n\r\n return r;\r\n }\r\n\r\n\r\n function isOdd(n) {\r\n return n.d[n.d.length - 1] & 1;\r\n }\r\n\r\n\r\n /*\r\n * Handle `max` and `min`. `ltgt` is 'lt' or 'gt'.\r\n */\r\n function maxOrMin(Ctor, args, ltgt) {\r\n var y,\r\n x = new Ctor(args[0]),\r\n i = 0;\r\n\r\n for (; ++i < args.length;) {\r\n y = new Ctor(args[i]);\r\n if (!y.s) {\r\n x = y;\r\n break;\r\n } else if (x[ltgt](y)) {\r\n x = y;\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of `x` rounded to `sd` significant\r\n * digits.\r\n *\r\n * Taylor/Maclaurin series.\r\n *\r\n * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...\r\n *\r\n * Argument reduction:\r\n * Repeat x = x / 32, k += 5, until |x| < 0.1\r\n * exp(x) = exp(x / 2^k)^(2^k)\r\n *\r\n * Previously, the argument was initially reduced by\r\n * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10)\r\n * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was\r\n * found to be slower than just dividing repeatedly by 32 as above.\r\n *\r\n * Max integer argument: exp('20723265836946413') = 6.3e+9000000000000000\r\n * Min integer argument: exp('-20723265836946411') = 1.2e-9000000000000000\r\n * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)\r\n *\r\n * exp(Infinity) = Infinity\r\n * exp(-Infinity) = 0\r\n * exp(NaN) = NaN\r\n * exp(±0) = 1\r\n *\r\n * exp(x) is non-terminating for any finite, non-zero x.\r\n *\r\n * The result will always be correctly rounded.\r\n *\r\n */\r\n function naturalExponential(x, sd) {\r\n var denominator, guard, j, pow, sum, t, wpr,\r\n rep = 0,\r\n i = 0,\r\n k = 0,\r\n Ctor = x.constructor,\r\n rm = Ctor.rounding,\r\n pr = Ctor.precision;\r\n\r\n // 0/NaN/Infinity?\r\n if (!x.d || !x.d[0] || x.e > 17) {\r\n\r\n return new Ctor(x.d\r\n ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0\r\n : x.s ? x.s < 0 ? 0 : x : 0 / 0);\r\n }\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n t = new Ctor(0.03125);\r\n\r\n // while abs(x) >= 0.1\r\n while (x.e > -2) {\r\n\r\n // x = x / 2^5\r\n x = x.times(t);\r\n k += 5;\r\n }\r\n\r\n // Use 2 * log10(2^k) + 5 (empirically derived) to estimate the increase in precision\r\n // necessary to ensure the first 4 rounding digits are correct.\r\n guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0;\r\n wpr += guard;\r\n denominator = pow = sum = new Ctor(1);\r\n Ctor.precision = wpr;\r\n\r\n for (;;) {\r\n pow = finalise(pow.times(x), wpr, 1);\r\n denominator = denominator.times(++i);\r\n t = sum.plus(divide(pow, denominator, wpr, 1));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n j = k;\r\n while (j--) sum = finalise(sum.times(sum), wpr, 1);\r\n\r\n // Check to see if the first 4 rounding digits are [49]999.\r\n // If so, repeat the summation with a higher precision, otherwise\r\n // e.g. with precision: 18, rounding: 1\r\n // exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123)\r\n // `wpr - guard` is the index of first rounding digit.\r\n if (sd == null) {\r\n\r\n if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {\r\n Ctor.precision = wpr += 10;\r\n denominator = pow = t = new Ctor(1);\r\n i = 0;\r\n rep++;\r\n } else {\r\n return finalise(sum, Ctor.precision = pr, rm, external = true);\r\n }\r\n } else {\r\n Ctor.precision = pr;\r\n return sum;\r\n }\r\n }\r\n\r\n sum = t;\r\n }\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant\r\n * digits.\r\n *\r\n * ln(-n) = NaN\r\n * ln(0) = -Infinity\r\n * ln(-0) = -Infinity\r\n * ln(1) = 0\r\n * ln(Infinity) = Infinity\r\n * ln(-Infinity) = NaN\r\n * ln(NaN) = NaN\r\n *\r\n * ln(n) (n != 1) is non-terminating.\r\n *\r\n */\r\n function naturalLogarithm(y, sd) {\r\n var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2,\r\n n = 1,\r\n guard = 10,\r\n x = y,\r\n xd = x.d,\r\n Ctor = x.constructor,\r\n rm = Ctor.rounding,\r\n pr = Ctor.precision;\r\n\r\n // Is x negative or Infinity, NaN, 0 or 1?\r\n if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) {\r\n return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x);\r\n }\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n Ctor.precision = wpr += guard;\r\n c = digitsToString(xd);\r\n c0 = c.charAt(0);\r\n\r\n if (Math.abs(e = x.e) < 1.5e15) {\r\n\r\n // Argument reduction.\r\n // The series converges faster the closer the argument is to 1, so using\r\n // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b\r\n // multiply the argument by itself until the leading digits of the significand are 7, 8, 9,\r\n // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can\r\n // later be divided by this number, then separate out the power of 10 using\r\n // ln(a*10^b) = ln(a) + b*ln(10).\r\n\r\n // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14).\r\n //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) {\r\n // max n is 6 (gives 0.7 - 1.3)\r\n while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) {\r\n x = x.times(y);\r\n c = digitsToString(x.d);\r\n c0 = c.charAt(0);\r\n n++;\r\n }\r\n\r\n e = x.e;\r\n\r\n if (c0 > 1) {\r\n x = new Ctor('0.' + c);\r\n e++;\r\n } else {\r\n x = new Ctor(c0 + '.' + c.slice(1));\r\n }\r\n } else {\r\n\r\n // The argument reduction method above may result in overflow if the argument y is a massive\r\n // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this\r\n // function using ln(x*10^e) = ln(x) + e*ln(10).\r\n t = getLn10(Ctor, wpr + 2, pr).times(e + '');\r\n x = naturalLogarithm(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t);\r\n Ctor.precision = pr;\r\n\r\n return sd == null ? finalise(x, pr, rm, external = true) : x;\r\n }\r\n\r\n // x1 is x reduced to a value near 1.\r\n x1 = x;\r\n\r\n // Taylor series.\r\n // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...)\r\n // where x = (y - 1)/(y + 1) (|x| < 1)\r\n sum = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1);\r\n x2 = finalise(x.times(x), wpr, 1);\r\n denominator = 3;\r\n\r\n for (;;) {\r\n numerator = finalise(numerator.times(x2), wpr, 1);\r\n t = sum.plus(divide(numerator, new Ctor(denominator), wpr, 1));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n sum = sum.times(2);\r\n\r\n // Reverse the argument reduction. Check that e is not 0 because, besides preventing an\r\n // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0.\r\n if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + ''));\r\n sum = divide(sum, new Ctor(n), wpr, 1);\r\n\r\n // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has\r\n // been repeated previously) and the first 4 rounding digits 9999?\r\n // If so, restart the summation with a higher precision, otherwise\r\n // e.g. with precision: 12, rounding: 1\r\n // ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463.\r\n // `wpr - guard` is the index of first rounding digit.\r\n if (sd == null) {\r\n if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {\r\n Ctor.precision = wpr += guard;\r\n t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1);\r\n x2 = finalise(x.times(x), wpr, 1);\r\n denominator = rep = 1;\r\n } else {\r\n return finalise(sum, Ctor.precision = pr, rm, external = true);\r\n }\r\n } else {\r\n Ctor.precision = pr;\r\n return sum;\r\n }\r\n }\r\n\r\n sum = t;\r\n denominator += 2;\r\n }\r\n }\r\n\r\n\r\n // ±Infinity, NaN.\r\n function nonFiniteToString(x) {\r\n // Unsigned.\r\n return String(x.s * x.s / 0);\r\n }\r\n\r\n\r\n /*\r\n * Parse the value of a new Decimal `x` from string `str`.\r\n */\r\n function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Parse the value of a new Decimal `x` from a string `str`, which is not a decimal value.\r\n */\r\n function parseOther(x, str) {\r\n var base, Ctor, divisor, i, isFloat, len, p, xd, xe;\r\n\r\n if (str.indexOf('_') > -1) {\r\n str = str.replace(/(\\d)_(?=\\d)/g, '$1');\r\n if (isDecimal.test(str)) return parseDecimal(x, str);\r\n } else if (str === 'Infinity' || str === 'NaN') {\r\n if (!+str) x.s = NaN;\r\n x.e = NaN;\r\n x.d = null;\r\n return x;\r\n }\r\n\r\n if (isHex.test(str)) {\r\n base = 16;\r\n str = str.toLowerCase();\r\n } else if (isBinary.test(str)) {\r\n base = 2;\r\n } else if (isOctal.test(str)) {\r\n base = 8;\r\n } else {\r\n throw Error(invalidArgument + str);\r\n }\r\n\r\n // Is there a binary exponent part?\r\n i = str.search(/p/i);\r\n\r\n if (i > 0) {\r\n p = +str.slice(i + 1);\r\n str = str.substring(2, i);\r\n } else {\r\n str = str.slice(2);\r\n }\r\n\r\n // Convert `str` as an integer then divide the result by `base` raised to a power such that the\r\n // fraction part will be restored.\r\n i = str.indexOf('.');\r\n isFloat = i >= 0;\r\n Ctor = x.constructor;\r\n\r\n if (isFloat) {\r\n str = str.replace('.', '');\r\n len = str.length;\r\n i = len - i;\r\n\r\n // log[10](16) = 1.2041... , log[10](88) = 1.9444....\r\n divisor = intPow(Ctor, new Ctor(base), i, i * 2);\r\n }\r\n\r\n xd = convertBase(str, base, BASE);\r\n xe = xd.length - 1;\r\n\r\n // Remove trailing zeros.\r\n for (i = xe; xd[i] === 0; --i) xd.pop();\r\n if (i < 0) return new Ctor(x.s * 0);\r\n x.e = getBase10Exponent(xd, xe);\r\n x.d = xd;\r\n external = false;\r\n\r\n // At what precision to perform the division to ensure exact conversion?\r\n // maxDecimalIntegerPartDigitCount = ceil(log[10](b) * otherBaseIntegerPartDigitCount)\r\n // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412\r\n // E.g. ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits.\r\n // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount\r\n // Therefore using 4 * the number of digits of str will always be enough.\r\n if (isFloat) x = divide(x, divisor, len * 4);\r\n\r\n // Multiply by the binary exponent part if present.\r\n if (p) x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p));\r\n external = true;\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * sin(x) = x - x^3/3! + x^5/5! - ...\r\n * |x| < pi/2\r\n *\r\n */\r\n function sine(Ctor, x) {\r\n var k,\r\n len = x.d.length;\r\n\r\n if (len < 3) {\r\n return x.isZero() ? x : taylorSeries(Ctor, 2, x, x);\r\n }\r\n\r\n // Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x)\r\n // i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5)\r\n // and sin(x) = sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20))\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n k = 1.4 * Math.sqrt(len);\r\n k = k > 16 ? 16 : k | 0;\r\n\r\n x = x.times(1 / tinyPow(5, k));\r\n x = taylorSeries(Ctor, 2, x, x);\r\n\r\n // Reverse argument reduction\r\n var sin2_x,\r\n d5 = new Ctor(5),\r\n d16 = new Ctor(16),\r\n d20 = new Ctor(20);\r\n for (; k--;) {\r\n sin2_x = x.times(x);\r\n x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20))));\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n // Calculate Taylor series for `cos`, `cosh`, `sin` and `sinh`.\r\n function taylorSeries(Ctor, n, x, y, isHyperbolic) {\r\n var j, t, u, x2,\r\n i = 1,\r\n pr = Ctor.precision,\r\n k = Math.ceil(pr / LOG_BASE);\r\n\r\n external = false;\r\n x2 = x.times(x);\r\n u = new Ctor(y);\r\n\r\n for (;;) {\r\n t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1);\r\n u = isHyperbolic ? y.plus(t) : y.minus(t);\r\n y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1);\r\n t = u.plus(y);\r\n\r\n if (t.d[k] !== void 0) {\r\n for (j = k; t.d[j] === u.d[j] && j--;);\r\n if (j == -1) break;\r\n }\r\n\r\n j = u;\r\n u = y;\r\n y = t;\r\n t = j;\r\n i++;\r\n }\r\n\r\n external = true;\r\n t.d.length = k + 1;\r\n\r\n return t;\r\n }\r\n\r\n\r\n // Exponent e must be positive and non-zero.\r\n function tinyPow(b, e) {\r\n var n = b;\r\n while (--e) n *= b;\r\n return n;\r\n }\r\n\r\n\r\n // Return the absolute value of `x` reduced to less than or equal to half pi.\r\n function toLessThanHalfPi(Ctor, x) {\r\n var t,\r\n isNeg = x.s < 0,\r\n pi = getPi(Ctor, Ctor.precision, 1),\r\n halfPi = pi.times(0.5);\r\n\r\n x = x.abs();\r\n\r\n if (x.lte(halfPi)) {\r\n quadrant = isNeg ? 4 : 1;\r\n return x;\r\n }\r\n\r\n t = x.divToInt(pi);\r\n\r\n if (t.isZero()) {\r\n quadrant = isNeg ? 3 : 2;\r\n } else {\r\n x = x.minus(t.times(pi));\r\n\r\n // 0 <= x < pi\r\n if (x.lte(halfPi)) {\r\n quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1);\r\n return x;\r\n }\r\n\r\n quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2);\r\n }\r\n\r\n return x.minus(pi).abs();\r\n }\r\n\r\n\r\n /*\r\n * Return the value of Decimal `x` as a string in base `baseOut`.\r\n *\r\n * If the optional `sd` argument is present include a binary exponent suffix.\r\n */\r\n function toStringBinary(x, baseOut, sd, rm) {\r\n var base, e, i, k, len, roundUp, str, xd, y,\r\n Ctor = x.constructor,\r\n isExp = sd !== void 0;\r\n\r\n if (isExp) {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n } else {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n }\r\n\r\n if (!x.isFinite()) {\r\n str = nonFiniteToString(x);\r\n } else {\r\n str = finiteToString(x);\r\n i = str.indexOf('.');\r\n\r\n // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required:\r\n // maxBinaryExponent = floor((decimalExponent + 1) * log[2](10))\r\n // minBinaryExponent = floor(decimalExponent * log[2](10))\r\n // log[2](10) = 3.321928094887362347870319429489390175864\r\n\r\n if (isExp) {\r\n base = 2;\r\n if (baseOut == 16) {\r\n sd = sd * 4 - 3;\r\n } else if (baseOut == 8) {\r\n sd = sd * 3 - 2;\r\n }\r\n } else {\r\n base = baseOut;\r\n }\r\n\r\n // Convert the number as an integer then divide the result by its base raised to a power such\r\n // that the fraction part will be restored.\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n str = str.replace('.', '');\r\n y = new Ctor(1);\r\n y.e = str.length - i;\r\n y.d = convertBase(finiteToString(y), 10, base);\r\n y.e = y.d.length;\r\n }\r\n\r\n xd = convertBase(str, 10, base);\r\n e = len = xd.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] == 0;) xd.pop();\r\n\r\n if (!xd[0]) {\r\n str = isExp ? '0p+0' : '0';\r\n } else {\r\n if (i < 0) {\r\n e--;\r\n } else {\r\n x = new Ctor(x);\r\n x.d = xd;\r\n x.e = e;\r\n x = divide(x, y, sd, rm, 0, base);\r\n xd = x.d;\r\n e = x.e;\r\n roundUp = inexact;\r\n }\r\n\r\n // The rounding digit, i.e. the digit after the digit that may be rounded up.\r\n i = xd[sd];\r\n k = base / 2;\r\n roundUp = roundUp || xd[sd + 1] !== void 0;\r\n\r\n roundUp = rm < 4\r\n ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2))\r\n : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 ||\r\n rm === (x.s < 0 ? 8 : 7));\r\n\r\n xd.length = sd;\r\n\r\n if (roundUp) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (; ++xd[--sd] > base - 1;) {\r\n xd[sd] = 0;\r\n if (!sd) {\r\n ++e;\r\n xd.unshift(1);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (len = xd.length; !xd[len - 1]; --len);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i < len; i++) str += NUMERALS.charAt(xd[i]);\r\n\r\n // Add binary exponent suffix?\r\n if (isExp) {\r\n if (len > 1) {\r\n if (baseOut == 16 || baseOut == 8) {\r\n i = baseOut == 16 ? 4 : 3;\r\n for (--len; len % i; len++) str += '0';\r\n xd = convertBase(str, base, baseOut);\r\n for (len = xd.length; !xd[len - 1]; --len);\r\n\r\n // xd[0] will always be be 1\r\n for (i = 1, str = '1.'; i < len; i++) str += NUMERALS.charAt(xd[i]);\r\n } else {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n }\r\n\r\n str = str + (e < 0 ? 'p' : 'p+') + e;\r\n } else if (e < 0) {\r\n for (; ++e;) str = '0' + str;\r\n str = '0.' + str;\r\n } else {\r\n if (++e > len) for (e -= len; e-- ;) str += '0';\r\n else if (e < len) str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n str = (baseOut == 16 ? '0x' : baseOut == 2 ? '0b' : baseOut == 8 ? '0o' : '') + str;\r\n }\r\n\r\n return x.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Does not strip trailing zeros.\r\n function truncate(arr, len) {\r\n if (arr.length > len) {\r\n arr.length = len;\r\n return true;\r\n }\r\n }\r\n\r\n\r\n // Decimal methods\r\n\r\n\r\n /*\r\n * abs\r\n * acos\r\n * acosh\r\n * add\r\n * asin\r\n * asinh\r\n * atan\r\n * atanh\r\n * atan2\r\n * cbrt\r\n * ceil\r\n * clamp\r\n * clone\r\n * config\r\n * cos\r\n * cosh\r\n * div\r\n * exp\r\n * floor\r\n * hypot\r\n * ln\r\n * log\r\n * log2\r\n * log10\r\n * max\r\n * min\r\n * mod\r\n * mul\r\n * pow\r\n * random\r\n * round\r\n * set\r\n * sign\r\n * sin\r\n * sinh\r\n * sqrt\r\n * sub\r\n * sum\r\n * tan\r\n * tanh\r\n * trunc\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the absolute value of `x`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function abs(x) {\r\n return new this(x).abs();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arccosine in radians of `x`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function acos(x) {\r\n return new this(x).acos();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function acosh(x) {\r\n return new this(x).acosh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function add(x, y) {\r\n return new this(x).plus(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arcsine in radians of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function asin(x) {\r\n return new this(x).asin();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic sine of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function asinh(x) {\r\n return new this(x).asinh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent in radians of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function atan(x) {\r\n return new this(x).atan();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function atanh(x) {\r\n return new this(x).atanh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi\r\n * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi, pi]\r\n *\r\n * y {number|string|Decimal} The y-coordinate.\r\n * x {number|string|Decimal} The x-coordinate.\r\n *\r\n * atan2(±0, -0) = ±pi\r\n * atan2(±0, +0) = ±0\r\n * atan2(±0, -x) = ±pi for x > 0\r\n * atan2(±0, x) = ±0 for x > 0\r\n * atan2(-y, ±0) = -pi/2 for y > 0\r\n * atan2(y, ±0) = pi/2 for y > 0\r\n * atan2(±y, -Infinity) = ±pi for finite y > 0\r\n * atan2(±y, +Infinity) = ±0 for finite y > 0\r\n * atan2(±Infinity, x) = ±pi/2 for finite x\r\n * atan2(±Infinity, -Infinity) = ±3*pi/4\r\n * atan2(±Infinity, +Infinity) = ±pi/4\r\n * atan2(NaN, x) = NaN\r\n * atan2(y, NaN) = NaN\r\n *\r\n */\r\n function atan2(y, x) {\r\n y = new this(y);\r\n x = new this(x);\r\n var r,\r\n pr = this.precision,\r\n rm = this.rounding,\r\n wpr = pr + 4;\r\n\r\n // Either NaN\r\n if (!y.s || !x.s) {\r\n r = new this(NaN);\r\n\r\n // Both ±Infinity\r\n } else if (!y.d && !x.d) {\r\n r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75);\r\n r.s = y.s;\r\n\r\n // x is ±Infinity or y is ±0\r\n } else if (!x.d || y.isZero()) {\r\n r = x.s < 0 ? getPi(this, pr, rm) : new this(0);\r\n r.s = y.s;\r\n\r\n // y is ±Infinity or x is ±0\r\n } else if (!y.d || x.isZero()) {\r\n r = getPi(this, wpr, 1).times(0.5);\r\n r.s = y.s;\r\n\r\n // Both non-zero and finite\r\n } else if (x.s < 0) {\r\n this.precision = wpr;\r\n this.rounding = 1;\r\n r = this.atan(divide(y, x, wpr, 1));\r\n x = getPi(this, wpr, 1);\r\n this.precision = pr;\r\n this.rounding = rm;\r\n r = y.s < 0 ? r.minus(x) : r.plus(x);\r\n } else {\r\n r = this.atan(divide(y, x, wpr, 1));\r\n }\r\n\r\n return r;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cube root of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function cbrt(x) {\r\n return new this(x).cbrt();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` rounded to an integer using `ROUND_CEIL`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function ceil(x) {\r\n return finalise(x = new this(x), x.e + 1, 2);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` clamped to the range delineated by `min` and `max`.\r\n *\r\n * x {number|string|Decimal}\r\n * min {number|string|Decimal}\r\n * max {number|string|Decimal}\r\n *\r\n */\r\n function clamp(x, min, max) {\r\n return new this(x).clamp(min, max);\r\n }\r\n\r\n\r\n /*\r\n * Configure global settings for a Decimal constructor.\r\n *\r\n * `obj` is an object with one or more of the following properties,\r\n *\r\n * precision {number}\r\n * rounding {number}\r\n * toExpNeg {number}\r\n * toExpPos {number}\r\n * maxE {number}\r\n * minE {number}\r\n * modulo {number}\r\n * crypto {boolean|number}\r\n * defaults {true}\r\n *\r\n * E.g. Decimal.config({ precision: 20, rounding: 4 })\r\n *\r\n */\r\n function config(obj) {\r\n if (!obj || typeof obj !== 'object') throw Error(decimalError + 'Object expected');\r\n var i, p, v,\r\n useDefaults = obj.defaults === true,\r\n ps = [\r\n 'precision', 1, MAX_DIGITS,\r\n 'rounding', 0, 8,\r\n 'toExpNeg', -EXP_LIMIT, 0,\r\n 'toExpPos', 0, EXP_LIMIT,\r\n 'maxE', 0, EXP_LIMIT,\r\n 'minE', -EXP_LIMIT, 0,\r\n 'modulo', 0, 9\r\n ];\r\n\r\n for (i = 0; i < ps.length; i += 3) {\r\n if (p = ps[i], useDefaults) this[p] = DEFAULTS[p];\r\n if ((v = obj[p]) !== void 0) {\r\n if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v;\r\n else throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n if (p = 'crypto', useDefaults) this[p] = DEFAULTS[p];\r\n if ((v = obj[p]) !== void 0) {\r\n if (v === true || v === false || v === 0 || v === 1) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n this[p] = true;\r\n } else {\r\n throw Error(cryptoUnavailable);\r\n }\r\n } else {\r\n this[p] = false;\r\n }\r\n } else {\r\n throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cosine of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function cos(x) {\r\n return new this(x).cos();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic cosine of `x`, rounded to precision\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function cosh(x) {\r\n return new this(x).cosh();\r\n }\r\n\r\n\r\n /*\r\n * Create and return a Decimal constructor with the same configuration properties as this Decimal\r\n * constructor.\r\n *\r\n */\r\n function clone(obj) {\r\n var i, p, ps;\r\n\r\n /*\r\n * The Decimal constructor and exported function.\r\n * Return a new Decimal instance.\r\n *\r\n * v {number|string|Decimal} A numeric value.\r\n *\r\n */\r\n function Decimal(v) {\r\n var e, i, t,\r\n x = this;\r\n\r\n // Decimal called without new.\r\n if (!(x instanceof Decimal)) return new Decimal(v);\r\n\r\n // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor\r\n // which points to Object.\r\n x.constructor = Decimal;\r\n\r\n // Duplicate.\r\n if (isDecimalInstance(v)) {\r\n x.s = v.s;\r\n\r\n if (external) {\r\n if (!v.d || v.e > Decimal.maxE) {\r\n\r\n // Infinity.\r\n x.e = NaN;\r\n x.d = null;\r\n } else if (v.e < Decimal.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n } else {\r\n x.e = v.e;\r\n x.d = v.d.slice();\r\n }\r\n } else {\r\n x.e = v.e;\r\n x.d = v.d ? v.d.slice() : v.d;\r\n }\r\n\r\n return;\r\n }\r\n\r\n t = typeof v;\r\n\r\n if (t === 'number') {\r\n if (v === 0) {\r\n x.s = 1 / v < 0 ? -1 : 1;\r\n x.e = 0;\r\n x.d = [0];\r\n return;\r\n }\r\n\r\n if (v < 0) {\r\n v = -v;\r\n x.s = -1;\r\n } else {\r\n x.s = 1;\r\n }\r\n\r\n // Fast path for small integers.\r\n if (v === ~~v && v < 1e7) {\r\n for (e = 0, i = v; i >= 10; i /= 10) e++;\r\n\r\n if (external) {\r\n if (e > Decimal.maxE) {\r\n x.e = NaN;\r\n x.d = null;\r\n } else if (e < Decimal.minE) {\r\n x.e = 0;\r\n x.d = [0];\r\n } else {\r\n x.e = e;\r\n x.d = [v];\r\n }\r\n } else {\r\n x.e = e;\r\n x.d = [v];\r\n }\r\n\r\n return;\r\n\r\n // Infinity, NaN.\r\n } else if (v * 0 !== 0) {\r\n if (!v) x.s = NaN;\r\n x.e = NaN;\r\n x.d = null;\r\n return;\r\n }\r\n\r\n return parseDecimal(x, v.toString());\r\n\r\n } else if (t !== 'string') {\r\n throw Error(invalidArgument + v);\r\n }\r\n\r\n // Minus sign?\r\n if ((i = v.charCodeAt(0)) === 45) {\r\n v = v.slice(1);\r\n x.s = -1;\r\n } else {\r\n // Plus sign?\r\n if (i === 43) v = v.slice(1);\r\n x.s = 1;\r\n }\r\n\r\n return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);\r\n }\r\n\r\n Decimal.prototype = P;\r\n\r\n Decimal.ROUND_UP = 0;\r\n Decimal.ROUND_DOWN = 1;\r\n Decimal.ROUND_CEIL = 2;\r\n Decimal.ROUND_FLOOR = 3;\r\n Decimal.ROUND_HALF_UP = 4;\r\n Decimal.ROUND_HALF_DOWN = 5;\r\n Decimal.ROUND_HALF_EVEN = 6;\r\n Decimal.ROUND_HALF_CEIL = 7;\r\n Decimal.ROUND_HALF_FLOOR = 8;\r\n Decimal.EUCLID = 9;\r\n\r\n Decimal.config = Decimal.set = config;\r\n Decimal.clone = clone;\r\n Decimal.isDecimal = isDecimalInstance;\r\n\r\n Decimal.abs = abs;\r\n Decimal.acos = acos;\r\n Decimal.acosh = acosh; // ES6\r\n Decimal.add = add;\r\n Decimal.asin = asin;\r\n Decimal.asinh = asinh; // ES6\r\n Decimal.atan = atan;\r\n Decimal.atanh = atanh; // ES6\r\n Decimal.atan2 = atan2;\r\n Decimal.cbrt = cbrt; // ES6\r\n Decimal.ceil = ceil;\r\n Decimal.clamp = clamp;\r\n Decimal.cos = cos;\r\n Decimal.cosh = cosh; // ES6\r\n Decimal.div = div;\r\n Decimal.exp = exp;\r\n Decimal.floor = floor;\r\n Decimal.hypot = hypot; // ES6\r\n Decimal.ln = ln;\r\n Decimal.log = log;\r\n Decimal.log10 = log10; // ES6\r\n Decimal.log2 = log2; // ES6\r\n Decimal.max = max;\r\n Decimal.min = min;\r\n Decimal.mod = mod;\r\n Decimal.mul = mul;\r\n Decimal.pow = pow;\r\n Decimal.random = random;\r\n Decimal.round = round;\r\n Decimal.sign = sign; // ES6\r\n Decimal.sin = sin;\r\n Decimal.sinh = sinh; // ES6\r\n Decimal.sqrt = sqrt;\r\n Decimal.sub = sub;\r\n Decimal.sum = sum;\r\n Decimal.tan = tan;\r\n Decimal.tanh = tanh; // ES6\r\n Decimal.trunc = trunc; // ES6\r\n\r\n if (obj === void 0) obj = {};\r\n if (obj) {\r\n if (obj.defaults !== true) {\r\n ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'];\r\n for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p];\r\n }\r\n }\r\n\r\n Decimal.config(obj);\r\n\r\n return Decimal;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function div(x, y) {\r\n return new this(x).div(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} The power to which to raise the base of the natural log.\r\n *\r\n */\r\n function exp(x) {\r\n return new this(x).exp();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` round to an integer using `ROUND_FLOOR`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function floor(x) {\r\n return finalise(x = new this(x), x.e + 1, 3);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of the sum of the squares of the arguments,\r\n * rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * hypot(a, b, ...) = sqrt(a^2 + b^2 + ...)\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function hypot() {\r\n var i, n,\r\n t = new this(0);\r\n\r\n external = false;\r\n\r\n for (i = 0; i < arguments.length;) {\r\n n = new this(arguments[i++]);\r\n if (!n.d) {\r\n if (n.s) {\r\n external = true;\r\n return new this(1 / 0);\r\n }\r\n t = n;\r\n } else if (t.d) {\r\n t = t.plus(n.times(n));\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return t.sqrt();\r\n }\r\n\r\n\r\n /*\r\n * Return true if object is a Decimal instance (where Decimal is any Decimal constructor),\r\n * otherwise return false.\r\n *\r\n */\r\n function isDecimalInstance(obj) {\r\n return obj instanceof Decimal || obj && obj.toStringTag === tag || false;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function ln(x) {\r\n return new this(x).ln();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the log of `x` to the base `y`, or to base 10 if no base\r\n * is specified, rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * log[y](x)\r\n *\r\n * x {number|string|Decimal} The argument of the logarithm.\r\n * y {number|string|Decimal} The base of the logarithm.\r\n *\r\n */\r\n function log(x, y) {\r\n return new this(x).log(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the base 2 logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function log2(x) {\r\n return new this(x).log(2);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the base 10 logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function log10(x) {\r\n return new this(x).log(10);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function max() {\r\n return maxOrMin(this, arguments, 'lt');\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function min() {\r\n return maxOrMin(this, arguments, 'gt');\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function mod(x, y) {\r\n return new this(x).mod(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function mul(x, y) {\r\n return new this(x).mul(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} The base.\r\n * y {number|string|Decimal} The exponent.\r\n *\r\n */\r\n function pow(x, y) {\r\n return new this(x).pow(y);\r\n }\r\n\r\n\r\n /*\r\n * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with\r\n * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros\r\n * are produced).\r\n *\r\n * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive.\r\n *\r\n */\r\n function random(sd) {\r\n var d, e, k, n,\r\n i = 0,\r\n r = new this(1),\r\n rd = [];\r\n\r\n if (sd === void 0) sd = this.precision;\r\n else checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n k = Math.ceil(sd / LOG_BASE);\r\n\r\n if (!this.crypto) {\r\n for (; i < k;) rd[i++] = Math.random() * 1e7 | 0;\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n } else if (crypto.getRandomValues) {\r\n d = crypto.getRandomValues(new Uint32Array(k));\r\n\r\n for (; i < k;) {\r\n n = d[i];\r\n\r\n // 0 <= n < 4294967296\r\n // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865).\r\n if (n >= 4.29e9) {\r\n d[i] = crypto.getRandomValues(new Uint32Array(1))[0];\r\n } else {\r\n\r\n // 0 <= n <= 4289999999\r\n // 0 <= (n % 1e7) <= 9999999\r\n rd[i++] = n % 1e7;\r\n }\r\n }\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n d = crypto.randomBytes(k *= 4);\r\n\r\n for (; i < k;) {\r\n\r\n // 0 <= n < 2147483648\r\n n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24);\r\n\r\n // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286).\r\n if (n >= 2.14e9) {\r\n crypto.randomBytes(4).copy(d, i);\r\n } else {\r\n\r\n // 0 <= n <= 2139999999\r\n // 0 <= (n % 1e7) <= 9999999\r\n rd.push(n % 1e7);\r\n i += 4;\r\n }\r\n }\r\n\r\n i = k / 4;\r\n } else {\r\n throw Error(cryptoUnavailable);\r\n }\r\n\r\n k = rd[--i];\r\n sd %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to sd.\r\n if (k && sd) {\r\n n = mathpow(10, LOG_BASE - sd);\r\n rd[i] = (k / n | 0) * n;\r\n }\r\n\r\n // Remove trailing words which are zero.\r\n for (; rd[i] === 0; i--) rd.pop();\r\n\r\n // Zero?\r\n if (i < 0) {\r\n e = 0;\r\n rd = [0];\r\n } else {\r\n e = -1;\r\n\r\n // Remove leading words which are zero and adjust exponent accordingly.\r\n for (; rd[0] === 0; e -= LOG_BASE) rd.shift();\r\n\r\n // Count the digits of the first word of rd to determine leading zeros.\r\n for (k = 1, n = rd[0]; n >= 10; n /= 10) k++;\r\n\r\n // Adjust the exponent for leading zeros of the first word of rd.\r\n if (k < LOG_BASE) e -= LOG_BASE - k;\r\n }\r\n\r\n r.e = e;\r\n r.d = rd;\r\n\r\n return r;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`.\r\n *\r\n * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL).\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function round(x) {\r\n return finalise(x = new this(x), x.e + 1, this.rounding);\r\n }\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if x > 0,\r\n * -1 if x < 0,\r\n * 0 if x is 0,\r\n * -0 if x is -0,\r\n * NaN otherwise\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function sign(x) {\r\n x = new this(x);\r\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function sin(x) {\r\n return new this(x).sin();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function sinh(x) {\r\n return new this(x).sinh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function sqrt(x) {\r\n return new this(x).sqrt();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function sub(x, y) {\r\n return new this(x).sub(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sum of the arguments, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * Only the result is rounded, not the intermediate calculations.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function sum() {\r\n var i = 0,\r\n args = arguments,\r\n x = new this(args[i]);\r\n\r\n external = false;\r\n for (; x.s && ++i < args.length;) x = x.plus(args[i]);\r\n external = true;\r\n\r\n return finalise(x, this.precision, this.rounding);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function tan(x) {\r\n return new this(x).tan();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function tanh(x) {\r\n return new this(x).tanh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` truncated to an integer.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function trunc(x) {\r\n return finalise(x = new this(x), x.e + 1, 1);\r\n }\r\n\r\n\r\n // Create and configure initial Decimal constructor.\r\n Decimal = clone(DEFAULTS);\r\n Decimal.prototype.constructor = Decimal;\r\n Decimal['default'] = Decimal.Decimal = Decimal;\r\n\r\n // Create the internal constants from their string values.\r\n LN10 = new Decimal(LN10);\r\n PI = new Decimal(PI);\r\n\r\n\r\n // Export.\r\n\r\n\r\n // AMD.\r\n if (typeof define == 'function' && define.amd) {\r\n define(function () {\r\n return Decimal;\r\n });\r\n\r\n // Node and other environments that support module.exports.\r\n } else if (typeof module != 'undefined' && module.exports) {\r\n if (typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol') {\r\n P[Symbol['for']('nodejs.util.inspect.custom')] = P.toString;\r\n P[Symbol.toStringTag] = 'Decimal';\r\n }\r\n\r\n module.exports = Decimal;\r\n\r\n // Browser.\r\n } else {\r\n if (!globalScope) {\r\n globalScope = typeof self != 'undefined' && self && self.self == self ? self : window;\r\n }\r\n\r\n noConflict = globalScope.Decimal;\r\n Decimal.noConflict = function () {\r\n globalScope.Decimal = noConflict;\r\n return Decimal;\r\n };\r\n\r\n globalScope.Decimal = Decimal;\r\n }\r\n})(this);\r\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\n\nvar gopd = require('gopd');\n\n/** @type {import('.')} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","'use strict';\n\nfunction assign(obj, props) {\n for (const key in props) {\n Object.defineProperty(obj, key, {\n value: props[key],\n enumerable: true,\n configurable: true,\n });\n }\n\n return obj;\n}\n\nfunction createError(err, code, props) {\n if (!err || typeof err === 'string') {\n throw new TypeError('Please pass an Error to err-code');\n }\n\n if (!props) {\n props = {};\n }\n\n if (typeof code === 'object') {\n props = code;\n code = undefined;\n }\n\n if (code != null) {\n props.code = code;\n }\n\n try {\n return assign(err, props);\n } catch (_) {\n props.message = err.message;\n props.stack = err.stack;\n\n const ErrClass = function () {};\n\n ErrClass.prototype = Object.create(Object.getPrototypeOf(err));\n\n return assign(new ErrClass(), props);\n }\n}\n\nmodule.exports = createError;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\n/** @type {import('.')} */\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n","'use strict';\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Error;\n","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n","'use strict';\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n","'use strict';\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar undefined;\n\nvar $Error = require('es-errors');\nvar $EvalError = require('es-errors/eval');\nvar $RangeError = require('es-errors/range');\nvar $ReferenceError = require('es-errors/ref');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar $URIError = require('es-errors/uri');\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\treturn !!$defineProperty;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!$defineProperty) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\t__proto__: null,\n\tfoo: {}\n};\n\nvar $Object = Object;\n\n/** @type {import('.')} */\nmodule.exports = function hasProto() {\n\t// @ts-expect-error: TS errors on an inherited property for some reason\n\treturn { __proto__: test }.foo === test.foo\n\t\t&& !(test instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar GeneratorFunction;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\tif (!getProto) {\n\t\treturn false;\n\t}\n\tif (typeof GeneratorFunction === 'undefined') {\n\t\tvar generatorFunc = getGeneratorFunc();\n\t\tGeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;\n\t}\n\treturn getProto(fn) === GeneratorFunction;\n};\n","'use strict';\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function isNaN(value) {\n\treturn value !== value;\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Number);\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) {\n\t\treturn Number.isNaN;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function shimNumberIsNaN() {\n\tvar polyfill = getPolyfill();\n\tdefine(Number, { isNaN: polyfill }, {\n\t\tisNaN: function testIsNaN() {\n\t\t\treturn Number.isNaN !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar whichTypedArray = require('which-typed-array');\n\n/** @type {import('.')} */\nmodule.exports = function isTypedArray(value) {\n\treturn !!whichTypedArray(value);\n};\n","'use strict';\n\nconst uuid = require('uuid').v4;\nconst generateRequest = require('../../generateRequest');\n\n/**\n * Constructor for a Jayson Browser Client that does not depend any node.js core libraries\n * @class ClientBrowser\n * @param {Function} callServer Method that calls the server, receives the stringified request and a regular node-style callback\n * @param {Object} [options]\n * @param {Function} [options.reviver] Reviver function for JSON\n * @param {Function} [options.replacer] Replacer function for JSON\n * @param {Number} [options.version=2] JSON-RPC version to use (1|2)\n * @param {Function} [options.generator] Function to use for generating request IDs\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @return {ClientBrowser}\n */\nconst ClientBrowser = function(callServer, options) {\n if(!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n\n if (!options) {\n options = {};\n }\n\n this.options = {\n reviver: typeof options.reviver !== 'undefined' ? options.reviver : null,\n replacer: typeof options.replacer !== 'undefined' ? options.replacer : null,\n generator: typeof options.generator !== 'undefined' ? options.generator : function() { return uuid(); },\n version: typeof options.version !== 'undefined' ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === 'boolean' ? options.notificationIdNull : false,\n };\n\n this.callServer = callServer;\n};\n\nmodule.exports = ClientBrowser;\n\n/**\n * Creates a request and dispatches it if given a callback.\n * @param {String|Array} method A batch request if passed an Array, or a method name if passed a String\n * @param {Array|Object} [params] Parameters for the method\n * @param {String|Number} [id] Optional id. If undefined an id will be generated. If null it creates a notification request\n * @param {Function} [callback] Request callback. If specified, executes the request rather than only returning it.\n * @throws {TypeError} Invalid parameters\n * @return {Object} JSON-RPC 1.0 or 2.0 compatible request\n */\nClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n\n // is this a batch request?\n const isBatch = Array.isArray(method) && typeof params === 'function';\n\n if (this.options.version === 1 && isBatch) {\n throw new TypeError('JSON-RPC 1.0 does not support batching');\n }\n\n // is this a raw request?\n const isRaw = !isBatch && method && typeof method === 'object' && typeof params === 'function';\n\n if(isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if(typeof id === 'function') {\n callback = id;\n // specifically undefined because \"null\" is a notification request\n id = undefined;\n }\n\n const hasCallback = typeof callback === 'function';\n\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull,\n });\n } catch(err) {\n if(hasCallback) {\n return callback(err);\n }\n throw err;\n }\n\n // no callback means we should just return a raw request\n if(!hasCallback) {\n return request;\n }\n\n }\n\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch(err) {\n return callback(err);\n }\n\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n\n // always return the raw request\n return request;\n};\n\n/**\n * Parses a response from a server\n * @param {Object} err Error to pass on that is unrelated to the actual response\n * @param {String} responseText JSON-RPC 1.0 or 2.0 response\n * @param {Function} callback Callback that will receive different arguments depending on the amount of parameters\n * @private\n */\nClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if(err) {\n callback(err);\n return;\n }\n\n if(!responseText) {\n // empty response text, assume that is correct because it could be a\n // notification which jayson does not give any body for\n return callback();\n }\n\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch(err) {\n return callback(err);\n }\n\n if(callback.length === 3) {\n // if callback length is 3, we split callback arguments on error and response\n\n // is batch response?\n if(Array.isArray(response)) {\n\n // neccesary to split strictly on validity according to spec here\n const isError = function(res) {\n return typeof res.error !== 'undefined';\n };\n\n const isNotError = function (res) {\n return !isError(res);\n };\n\n return callback(null, response.filter(isError), response.filter(isNotError));\n \n } else {\n\n // split regardless of validity\n return callback(null, response.error, response.result);\n \n }\n \n }\n\n callback(null, response);\n};\n","'use strict';\n\nconst uuid = require('uuid').v4;\n\n/**\n * Generates a JSON-RPC 1.0 or 2.0 request\n * @param {String} method Name of method to call\n * @param {Array|Object} params Array of parameters passed to the method as specified, or an object of parameter names and corresponding value\n * @param {String|Number|null} [id] Request ID can be a string, number, null for explicit notification or left out for automatic generation\n * @param {Object} [options]\n * @param {Number} [options.version=2] JSON-RPC version to use (1 or 2)\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @param {Function} [options.generator] Passed the request, and the options object and is expected to return a request ID\n * @throws {TypeError} If any of the parameters are invalid\n * @return {Object} A JSON-RPC 1.0 or 2.0 request\n * @memberOf Utils\n */\nconst generateRequest = function(method, params, id, options) {\n if(typeof method !== 'string') {\n throw new TypeError(method + ' must be a string');\n }\n\n options = options || {};\n\n // check valid version provided\n const version = typeof options.version === 'number' ? options.version : 2;\n if (version !== 1 && version !== 2) {\n throw new TypeError(version + ' must be 1 or 2');\n }\n\n const request = {\n method: method\n };\n\n if(version === 2) {\n request.jsonrpc = '2.0';\n }\n\n if(params) {\n // params given, but invalid?\n if(typeof params !== 'object' && !Array.isArray(params)) {\n throw new TypeError(params + ' must be an object, array or omitted');\n }\n request.params = params;\n }\n\n // if id was left out, generate one (null means explicit notification)\n if(typeof(id) === 'undefined') {\n const generator = typeof options.generator === 'function' ? options.generator : function() { return uuid(); };\n request.id = generator(request, options);\n } else if (version === 2 && id === null) {\n // we have a version 2 notification\n if (options.notificationIdNull) {\n request.id = null; // id will not be set at all unless option provided\n }\n } else {\n request.id = id;\n }\n\n return request;\n};\n\nmodule.exports = generateRequest;\n","/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var ERROR = 'input is invalid type';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA256_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var EXTRA = [-2147483648, 8388608, 32768, 128];\n var SHIFT = [24, 16, 8, 0];\n var K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ];\n var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];\n\n var blocks = [];\n\n if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (outputType, is224) {\n return function (message) {\n return new Sha256(is224, true).update(message)[outputType]();\n };\n };\n\n var createMethod = function (is224) {\n var method = createOutputMethod('hex', is224);\n if (NODE_JS) {\n method = nodeWrap(method, is224);\n }\n method.create = function () {\n return new Sha256(is224);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createOutputMethod(type, is224);\n }\n return method;\n };\n\n var nodeWrap = function (method, is224) {\n var crypto = eval(\"require('crypto')\");\n var Buffer = eval(\"require('buffer').Buffer\");\n var algorithm = is224 ? 'sha224' : 'sha256';\n var nodeMethod = function (message) {\n if (typeof message === 'string') {\n return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');\n } else {\n if (message === null || message === undefined) {\n throw new Error(ERROR);\n } else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n }\n }\n if (Array.isArray(message) || ArrayBuffer.isView(message) ||\n message.constructor === Buffer) {\n return crypto.createHash(algorithm).update(new Buffer(message)).digest('hex');\n } else {\n return method(message);\n }\n };\n return nodeMethod;\n };\n\n var createHmacOutputMethod = function (outputType, is224) {\n return function (key, message) {\n return new HmacSha256(key, is224, true).update(message)[outputType]();\n };\n };\n\n var createHmacMethod = function (is224) {\n var method = createHmacOutputMethod('hex', is224);\n method.create = function (key) {\n return new HmacSha256(key, is224);\n };\n method.update = function (key, message) {\n return method.create(key).update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createHmacOutputMethod(type, is224);\n }\n return method;\n };\n\n function Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else { // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n }\n\n Sha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code, index = 0, i, length = message.length, blocks = this.blocks;\n\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n };\n\n Sha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n blocks[14] = this.hBytes << 3 | this.bytes >>> 29;\n blocks[15] = this.bytes << 3;\n this.hash();\n };\n\n Sha256.prototype.hash = function () {\n var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6,\n h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = t1 - 150054599 << 0;\n d = t1 + 24177077 << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = t1 - 1521486534 << 0;\n d = t1 + 143694565 << 0;\n }\n this.first = false;\n } else {\n s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));\n s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = d + t1 << 0;\n d = t1 + t2 << 0;\n }\n s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10));\n s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (h & e) ^ (~h & f);\n t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = c + t1 << 0;\n c = t1 + t2 << 0;\n s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10));\n s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = b + t1 << 0;\n b = t1 + t2 << 0;\n s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10));\n s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = a + t1 << 0;\n a = t1 + t2 << 0;\n }\n\n this.h0 = this.h0 + a << 0;\n this.h1 = this.h1 + b << 0;\n this.h2 = this.h2 + c << 0;\n this.h3 = this.h3 + d << 0;\n this.h4 = this.h4 + e << 0;\n this.h5 = this.h5 + f << 0;\n this.h6 = this.h6 + g << 0;\n this.h7 = this.h7 + h << 0;\n };\n\n Sha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +\n HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +\n HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +\n HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +\n HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +\n HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +\n HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +\n HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +\n HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +\n HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +\n HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +\n HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +\n HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] +\n HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +\n HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +\n HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +\n HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] +\n HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] +\n HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] +\n HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] +\n HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] +\n HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] +\n HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] +\n HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] +\n HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] +\n HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] +\n HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] +\n HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F];\n if (!this.is224) {\n hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] +\n HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] +\n HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] +\n HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F];\n }\n return hex;\n };\n\n Sha256.prototype.toString = Sha256.prototype.hex;\n\n Sha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var arr = [\n (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF,\n (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF,\n (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF,\n (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF,\n (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF,\n (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF,\n (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF\n ];\n if (!this.is224) {\n arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF);\n }\n return arr;\n };\n\n Sha256.prototype.array = Sha256.prototype.digest;\n\n Sha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n };\n\n function HmacSha256(key, is224, sharedMemory) {\n var i, type = typeof key;\n if (type === 'string') {\n var bytes = [], length = key.length, index = 0, code;\n for (i = 0; i < length; ++i) {\n code = key.charCodeAt(i);\n if (code < 0x80) {\n bytes[index++] = code;\n } else if (code < 0x800) {\n bytes[index++] = (0xc0 | (code >> 6));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes[index++] = (0xe0 | (code >> 12));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));\n bytes[index++] = (0xf0 | (code >> 18));\n bytes[index++] = (0x80 | ((code >> 12) & 0x3f));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n }\n }\n key = bytes;\n } else {\n if (type === 'object') {\n if (key === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {\n key = new Uint8Array(key);\n } else if (!Array.isArray(key)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n }\n\n if (key.length > 64) {\n key = (new Sha256(is224, true)).update(key).array();\n }\n\n var oKeyPad = [], iKeyPad = [];\n for (i = 0; i < 64; ++i) {\n var b = key[i] || 0;\n oKeyPad[i] = 0x5c ^ b;\n iKeyPad[i] = 0x36 ^ b;\n }\n\n Sha256.call(this, is224, sharedMemory);\n\n this.update(iKeyPad);\n this.oKeyPad = oKeyPad;\n this.inner = true;\n this.sharedMemory = sharedMemory;\n }\n HmacSha256.prototype = new Sha256();\n\n HmacSha256.prototype.finalize = function () {\n Sha256.prototype.finalize.call(this);\n if (this.inner) {\n this.inner = false;\n var innerHash = this.array();\n Sha256.call(this, this.is224, this.sharedMemory);\n this.update(this.oKeyPad);\n this.update(innerHash);\n Sha256.prototype.finalize.call(this);\n }\n };\n\n var exports = createMethod();\n exports.sha256 = exports;\n exports.sha224 = createMethod(true);\n exports.sha256.hmac = createHmacMethod();\n exports.sha224.hmac = createHmacMethod(true);\n\n if (COMMON_JS) {\n module.exports = exports;\n } else {\n root.sha256 = exports.sha256;\n root.sha224 = exports.sha224;\n if (AMD) {\n define(function () {\n return exports;\n });\n }\n }\n})();\n","/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.9.3\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2023\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n\n var isArray = root.JS_SHA3_NO_NODE_JS || !Array.isArray\n ? function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n }\n : Array.isArray;\n\n var isView = (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView))\n ? function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n }\n : ArrayBuffer.isView;\n\n // [message: string, isString: bool]\n var formatMessage = function (message) {\n var type = typeof message;\n if (type === 'string') {\n return [message, true];\n }\n if (type !== 'object' || message === null) {\n throw new Error(INPUT_ERROR);\n }\n if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n return [new Uint8Array(message), false];\n }\n if (!isArray(message) && !isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n return [message, false];\n }\n\n var empty = function (message) {\n return formatMessage(message)[0].length === 0;\n };\n\n var cloneArray = function (array) {\n var newArray = [];\n for (var i = 0; i < array.length; ++i) {\n newArray[i] = array[i];\n }\n return newArray;\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, outputBits);\n };\n method.update = function (message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits, padding);\n };\n\n var createCshakeMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createCshakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits, n, s) {\n if (empty(n) && empty(s)) {\n return methods['shake' + bits].create(outputBits);\n } else {\n return new Keccak(bits, padding, outputBits).bytepad([n, s], w);\n }\n };\n method.update = function (message, outputBits, n, s) {\n return method.create(outputBits, n, s).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits, padding);\n };\n\n var createKmacMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createKmacOutputMethod(bits, padding, 'hex');\n method.create = function (key, outputBits, s) {\n return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w);\n };\n method.update = function (key, message, outputBits, s) {\n return method.create(key, outputBits, s).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits, padding);\n };\n\n var algorithms = [\n { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod },\n { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod },\n { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n\n var methods = {}, methodNames = [];\n\n for (var i = 0; i < algorithms.length; ++i) {\n var algorithm = algorithms[i];\n var bits = algorithm.bits;\n for (var j = 0; j < bits.length; ++j) {\n var methodName = algorithm.name + '_' + bits[j];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);\n if (algorithm.name !== 'sha3') {\n var newMethodName = algorithm.name + bits[j];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n\n function Keccak(bits, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = (1600 - (bits << 1)) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n\n for (var i = 0; i < 50; ++i) {\n this.s[i] = 0;\n }\n }\n\n Keccak.prototype.update = function (message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var result = formatMessage(message);\n message = result[0];\n var isString = result[1];\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length,\n blockCount = this.blockCount, index = 0, s = this.s, i, code;\n\n while (index < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n if (isString) {\n for (i = this.start; index < length && i < byteCount; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n } else {\n for (i = this.start; index < length && i < byteCount; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n }\n this.lastByteIndex = i;\n if (i >= byteCount) {\n this.start = i - byteCount;\n this.block = blocks[blockCount];\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n this.reset = true;\n } else {\n this.start = i;\n }\n }\n return this;\n };\n\n Keccak.prototype.encode = function (x, right) {\n var o = x & 255, n = 1;\n var bytes = [o];\n x = x >> 8;\n o = x & 255;\n while (o > 0) {\n bytes.unshift(o);\n x = x >> 8;\n o = x & 255;\n ++n;\n }\n if (right) {\n bytes.push(n);\n } else {\n bytes.unshift(n);\n }\n this.update(bytes);\n return bytes.length;\n };\n\n Keccak.prototype.encodeString = function (str) {\n var result = formatMessage(str);\n str = result[0];\n var isString = result[1];\n var bytes = 0, length = str.length;\n if (isString) {\n for (var i = 0; i < str.length; ++i) {\n var code = str.charCodeAt(i);\n if (code < 0x80) {\n bytes += 1;\n } else if (code < 0x800) {\n bytes += 2;\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes += 3;\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));\n bytes += 4;\n }\n }\n } else {\n bytes = length;\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n\n Keccak.prototype.bytepad = function (strs, w) {\n var bytes = this.encode(w);\n for (var i = 0; i < strs.length; ++i) {\n bytes += this.encodeString(strs[i]);\n }\n var paddingBytes = (w - bytes % w) % w;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n\n Keccak.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;\n blocks[i >> 2] |= this.padding[i & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n blocks[blockCount - 1] |= 0x80000000;\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n };\n\n Keccak.prototype.toString = Keccak.prototype.hex = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var hex = '', block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +\n HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +\n HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +\n HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];\n }\n if (j % blockCount === 0) {\n s = cloneArray(s);\n f(s);\n i = 0;\n }\n }\n if (extraBytes) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];\n if (extraBytes > 1) {\n hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];\n }\n }\n return hex;\n };\n\n Keccak.prototype.arrayBuffer = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var bytes = this.outputBits >> 3;\n var buffer;\n if (extraBytes) {\n buffer = new ArrayBuffer((outputBlocks + 1) << 2);\n } else {\n buffer = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer);\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n array[j] = s[i];\n }\n if (j % blockCount === 0) {\n s = cloneArray(s);\n f(s);\n }\n }\n if (extraBytes) {\n array[j] = s[i];\n buffer = buffer.slice(0, bytes);\n }\n return buffer;\n };\n\n Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;\n\n Keccak.prototype.digest = Keccak.prototype.array = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var array = [], offset, block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n array[offset + 1] = (block >> 8) & 0xFF;\n array[offset + 2] = (block >> 16) & 0xFF;\n array[offset + 3] = (block >> 24) & 0xFF;\n }\n if (j % blockCount === 0) {\n s = cloneArray(s);\n f(s);\n }\n }\n if (extraBytes) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n if (extraBytes > 1) {\n array[offset + 1] = (block >> 8) & 0xFF;\n }\n if (extraBytes > 2) {\n array[offset + 2] = (block >> 16) & 0xFF;\n }\n }\n return array;\n };\n\n function Kmac(bits, padding, outputBits) {\n Keccak.call(this, bits, padding, outputBits);\n }\n\n Kmac.prototype = new Keccak();\n\n Kmac.prototype.finalize = function () {\n this.encode(this.outputBits, true);\n return Keccak.prototype.finalize.call(this);\n };\n\n var f = function (s) {\n var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,\n b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,\n b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,\n b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n = 0; n < 48; n += 2) {\n c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];\n c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];\n c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];\n c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];\n c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];\n c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];\n c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];\n c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];\n c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];\n c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];\n\n h = c8 ^ ((c2 << 1) | (c3 >>> 31));\n l = c9 ^ ((c3 << 1) | (c2 >>> 31));\n s[0] ^= h;\n s[1] ^= l;\n s[10] ^= h;\n s[11] ^= l;\n s[20] ^= h;\n s[21] ^= l;\n s[30] ^= h;\n s[31] ^= l;\n s[40] ^= h;\n s[41] ^= l;\n h = c0 ^ ((c4 << 1) | (c5 >>> 31));\n l = c1 ^ ((c5 << 1) | (c4 >>> 31));\n s[2] ^= h;\n s[3] ^= l;\n s[12] ^= h;\n s[13] ^= l;\n s[22] ^= h;\n s[23] ^= l;\n s[32] ^= h;\n s[33] ^= l;\n s[42] ^= h;\n s[43] ^= l;\n h = c2 ^ ((c6 << 1) | (c7 >>> 31));\n l = c3 ^ ((c7 << 1) | (c6 >>> 31));\n s[4] ^= h;\n s[5] ^= l;\n s[14] ^= h;\n s[15] ^= l;\n s[24] ^= h;\n s[25] ^= l;\n s[34] ^= h;\n s[35] ^= l;\n s[44] ^= h;\n s[45] ^= l;\n h = c4 ^ ((c8 << 1) | (c9 >>> 31));\n l = c5 ^ ((c9 << 1) | (c8 >>> 31));\n s[6] ^= h;\n s[7] ^= l;\n s[16] ^= h;\n s[17] ^= l;\n s[26] ^= h;\n s[27] ^= l;\n s[36] ^= h;\n s[37] ^= l;\n s[46] ^= h;\n s[47] ^= l;\n h = c6 ^ ((c0 << 1) | (c1 >>> 31));\n l = c7 ^ ((c1 << 1) | (c0 >>> 31));\n s[8] ^= h;\n s[9] ^= l;\n s[18] ^= h;\n s[19] ^= l;\n s[28] ^= h;\n s[29] ^= l;\n s[38] ^= h;\n s[39] ^= l;\n s[48] ^= h;\n s[49] ^= l;\n\n b0 = s[0];\n b1 = s[1];\n b32 = (s[11] << 4) | (s[10] >>> 28);\n b33 = (s[10] << 4) | (s[11] >>> 28);\n b14 = (s[20] << 3) | (s[21] >>> 29);\n b15 = (s[21] << 3) | (s[20] >>> 29);\n b46 = (s[31] << 9) | (s[30] >>> 23);\n b47 = (s[30] << 9) | (s[31] >>> 23);\n b28 = (s[40] << 18) | (s[41] >>> 14);\n b29 = (s[41] << 18) | (s[40] >>> 14);\n b20 = (s[2] << 1) | (s[3] >>> 31);\n b21 = (s[3] << 1) | (s[2] >>> 31);\n b2 = (s[13] << 12) | (s[12] >>> 20);\n b3 = (s[12] << 12) | (s[13] >>> 20);\n b34 = (s[22] << 10) | (s[23] >>> 22);\n b35 = (s[23] << 10) | (s[22] >>> 22);\n b16 = (s[33] << 13) | (s[32] >>> 19);\n b17 = (s[32] << 13) | (s[33] >>> 19);\n b48 = (s[42] << 2) | (s[43] >>> 30);\n b49 = (s[43] << 2) | (s[42] >>> 30);\n b40 = (s[5] << 30) | (s[4] >>> 2);\n b41 = (s[4] << 30) | (s[5] >>> 2);\n b22 = (s[14] << 6) | (s[15] >>> 26);\n b23 = (s[15] << 6) | (s[14] >>> 26);\n b4 = (s[25] << 11) | (s[24] >>> 21);\n b5 = (s[24] << 11) | (s[25] >>> 21);\n b36 = (s[34] << 15) | (s[35] >>> 17);\n b37 = (s[35] << 15) | (s[34] >>> 17);\n b18 = (s[45] << 29) | (s[44] >>> 3);\n b19 = (s[44] << 29) | (s[45] >>> 3);\n b10 = (s[6] << 28) | (s[7] >>> 4);\n b11 = (s[7] << 28) | (s[6] >>> 4);\n b42 = (s[17] << 23) | (s[16] >>> 9);\n b43 = (s[16] << 23) | (s[17] >>> 9);\n b24 = (s[26] << 25) | (s[27] >>> 7);\n b25 = (s[27] << 25) | (s[26] >>> 7);\n b6 = (s[36] << 21) | (s[37] >>> 11);\n b7 = (s[37] << 21) | (s[36] >>> 11);\n b38 = (s[47] << 24) | (s[46] >>> 8);\n b39 = (s[46] << 24) | (s[47] >>> 8);\n b30 = (s[8] << 27) | (s[9] >>> 5);\n b31 = (s[9] << 27) | (s[8] >>> 5);\n b12 = (s[18] << 20) | (s[19] >>> 12);\n b13 = (s[19] << 20) | (s[18] >>> 12);\n b44 = (s[29] << 7) | (s[28] >>> 25);\n b45 = (s[28] << 7) | (s[29] >>> 25);\n b26 = (s[38] << 8) | (s[39] >>> 24);\n b27 = (s[39] << 8) | (s[38] >>> 24);\n b8 = (s[48] << 14) | (s[49] >>> 18);\n b9 = (s[49] << 14) | (s[48] >>> 18);\n\n s[0] = b0 ^ (~b2 & b4);\n s[1] = b1 ^ (~b3 & b5);\n s[10] = b10 ^ (~b12 & b14);\n s[11] = b11 ^ (~b13 & b15);\n s[20] = b20 ^ (~b22 & b24);\n s[21] = b21 ^ (~b23 & b25);\n s[30] = b30 ^ (~b32 & b34);\n s[31] = b31 ^ (~b33 & b35);\n s[40] = b40 ^ (~b42 & b44);\n s[41] = b41 ^ (~b43 & b45);\n s[2] = b2 ^ (~b4 & b6);\n s[3] = b3 ^ (~b5 & b7);\n s[12] = b12 ^ (~b14 & b16);\n s[13] = b13 ^ (~b15 & b17);\n s[22] = b22 ^ (~b24 & b26);\n s[23] = b23 ^ (~b25 & b27);\n s[32] = b32 ^ (~b34 & b36);\n s[33] = b33 ^ (~b35 & b37);\n s[42] = b42 ^ (~b44 & b46);\n s[43] = b43 ^ (~b45 & b47);\n s[4] = b4 ^ (~b6 & b8);\n s[5] = b5 ^ (~b7 & b9);\n s[14] = b14 ^ (~b16 & b18);\n s[15] = b15 ^ (~b17 & b19);\n s[24] = b24 ^ (~b26 & b28);\n s[25] = b25 ^ (~b27 & b29);\n s[34] = b34 ^ (~b36 & b38);\n s[35] = b35 ^ (~b37 & b39);\n s[44] = b44 ^ (~b46 & b48);\n s[45] = b45 ^ (~b47 & b49);\n s[6] = b6 ^ (~b8 & b0);\n s[7] = b7 ^ (~b9 & b1);\n s[16] = b16 ^ (~b18 & b10);\n s[17] = b17 ^ (~b19 & b11);\n s[26] = b26 ^ (~b28 & b20);\n s[27] = b27 ^ (~b29 & b21);\n s[36] = b36 ^ (~b38 & b30);\n s[37] = b37 ^ (~b39 & b31);\n s[46] = b46 ^ (~b48 & b40);\n s[47] = b47 ^ (~b49 & b41);\n s[8] = b8 ^ (~b0 & b2);\n s[9] = b9 ^ (~b1 & b3);\n s[18] = b18 ^ (~b10 & b12);\n s[19] = b19 ^ (~b11 & b13);\n s[28] = b28 ^ (~b20 & b22);\n s[29] = b29 ^ (~b21 & b23);\n s[38] = b38 ^ (~b30 & b32);\n s[39] = b39 ^ (~b31 & b33);\n s[48] = b48 ^ (~b40 & b42);\n s[49] = b49 ^ (~b41 & b43);\n\n s[0] ^= RC[n];\n s[1] ^= RC[n + 1];\n }\n };\n\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i = 0; i < methodNames.length; ++i) {\n root[methodNames[i]] = methods[methodNames[i]];\n }\n if (AMD) {\n define(function () {\n return methods;\n });\n }\n }\n})();\n","(function(i,_){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=_():\"function\"==typeof define&&define.amd?define(_):(i=i||self,i.JSBI=_())})(this,function(){'use strict';var i=Math.imul,_=Math.clz32,t=Math.abs,e=Math.max,g=Math.floor;class o extends Array{constructor(i,_){if(super(i),this.sign=_,i>o.__kMaxLength)throw new RangeError(\"Maximum BigInt size exceeded\")}static BigInt(i){var _=Number.isFinite;if(\"number\"==typeof i){if(0===i)return o.__zero();if(o.__isOneDigitInt(i))return 0>i?o.__oneDigit(-i,!0):o.__oneDigit(i,!1);if(!_(i)||g(i)!==i)throw new RangeError(\"The number \"+i+\" cannot be converted to BigInt because it is not an integer\");return o.__fromDouble(i)}if(\"string\"==typeof i){const _=o.__fromString(i);if(null===_)throw new SyntaxError(\"Cannot convert \"+i+\" to a BigInt\");return _}if(\"boolean\"==typeof i)return!0===i?o.__oneDigit(1,!1):o.__zero();if(\"object\"==typeof i){if(i.constructor===o)return i;const _=o.__toPrimitive(i);return o.BigInt(_)}throw new TypeError(\"Cannot convert \"+i+\" to a BigInt\")}toDebugString(){const i=[\"BigInt[\"];for(const _ of this)i.push((_?(_>>>0).toString(16):_)+\", \");return i.push(\"]\"),i.join(\"\")}toString(i=10){if(2>i||36>>=12;const u=r-12;let d=12<=r?0:s<<20+r,h=20+r;for(0>>30-u,d=s<>>30-h,h-=30;const m=o.__decideRounding(i,h,l,s);if((1===m||0===m&&1==(1&d))&&(d=d+1>>>0,0===d&&(a++,0!=a>>>20&&(a=0,g++,1023=o.__kMaxLengthBits)throw new RangeError(\"BigInt too big\");if(1===i.length&&2===i.__digit(0)){const _=1+(0|t/30),e=i.sign&&0!=(1&t),n=new o(_,e);n.__initializeDigits();const g=1<>=1;0!==t;t>>=1)n=o.multiply(n,n),0!=(1&t)&&(null===e?e=n:e=o.multiply(e,n));return e}static multiply(_,t){if(0===_.length)return _;if(0===t.length)return t;let i=_.length+t.length;30<=_.__clzmsd()+t.__clzmsd()&&i--;const e=new o(i,_.sign!==t.sign);e.__initializeDigits();for(let n=0;n<_.length;n++)o.__multiplyAccumulate(t,_.__digit(n),e,n);return e.__trim()}static divide(i,_){if(0===_.length)throw new RangeError(\"Division by zero\");if(0>o.__absoluteCompare(i,_))return o.__zero();const t=i.sign!==_.sign,e=_.__unsignedDigit(0);let n;if(1===_.length&&32767>=e){if(1===e)return t===i.sign?i:o.unaryMinus(i);n=o.__absoluteDivSmall(i,e,null)}else n=o.__absoluteDivLarge(i,_,!0,!1);return n.sign=t,n.__trim()}static remainder(i,_){if(0===_.length)throw new RangeError(\"Division by zero\");if(0>o.__absoluteCompare(i,_))return i;const t=_.__unsignedDigit(0);if(1===_.length&&32767>=t){if(1===t)return o.__zero();const _=o.__absoluteModSmall(i,t);return 0===_?o.__zero():o.__oneDigit(_,i.sign)}const e=o.__absoluteDivLarge(i,_,!1,!0);return e.sign=i.sign,e.__trim()}static add(i,_){const t=i.sign;return t===_.sign?o.__absoluteAdd(i,_,t):0<=o.__absoluteCompare(i,_)?o.__absoluteSub(i,_,t):o.__absoluteSub(_,i,!t)}static subtract(i,_){const t=i.sign;return t===_.sign?0<=o.__absoluteCompare(i,_)?o.__absoluteSub(i,_,t):o.__absoluteSub(_,i,!t):o.__absoluteAdd(i,_,t)}static leftShift(i,_){return 0===_.length||0===i.length?i:_.sign?o.__rightShiftByAbsolute(i,_):o.__leftShiftByAbsolute(i,_)}static signedRightShift(i,_){return 0===_.length||0===i.length?i:_.sign?o.__leftShiftByAbsolute(i,_):o.__rightShiftByAbsolute(i,_)}static unsignedRightShift(){throw new TypeError(\"BigInts have no unsigned right shift; use >> instead\")}static lessThan(i,_){return 0>o.__compareToBigInt(i,_)}static lessThanOrEqual(i,_){return 0>=o.__compareToBigInt(i,_)}static greaterThan(i,_){return 0_)throw new RangeError(\"Invalid value: not (convertible to) a safe integer\");if(0===_)return o.__zero();if(_>=o.__kMaxLengthBits)return t;const e=0|(_+29)/30;if(t.lengthi)throw new RangeError(\"Invalid value: not (convertible to) a safe integer\");if(0===i)return o.__zero();if(_.sign){if(i>o.__kMaxLengthBits)throw new RangeError(\"BigInt too big\");return o.__truncateAndSubFromPowerOfTwo(i,_,!1)}if(i>=o.__kMaxLengthBits)return _;const t=0|(i+29)/30;if(_.length>>e)return _}return o.__truncateToNBits(i,_)}static ADD(i,_){if(i=o.__toPrimitive(i),_=o.__toPrimitive(_),\"string\"==typeof i)return\"string\"!=typeof _&&(_=_.toString()),i+_;if(\"string\"==typeof _)return i.toString()+_;if(i=o.__toNumeric(i),_=o.__toNumeric(_),o.__isBigInt(i)&&o.__isBigInt(_))return o.add(i,_);if(\"number\"==typeof i&&\"number\"==typeof _)return i+_;throw new TypeError(\"Cannot mix BigInt and other types, use explicit conversions\")}static LT(i,_){return o.__compare(i,_,0)}static LE(i,_){return o.__compare(i,_,1)}static GT(i,_){return o.__compare(i,_,2)}static GE(i,_){return o.__compare(i,_,3)}static EQ(i,_){for(;;){if(o.__isBigInt(i))return o.__isBigInt(_)?o.equal(i,_):o.EQ(_,i);if(\"number\"==typeof i){if(o.__isBigInt(_))return o.__equalToNumber(_,i);if(\"object\"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if(\"string\"==typeof i){if(o.__isBigInt(_))return i=o.__fromString(i),null!==i&&o.equal(i,_);if(\"object\"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if(\"boolean\"==typeof i){if(o.__isBigInt(_))return o.__equalToNumber(_,+i);if(\"object\"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if(\"symbol\"==typeof i){if(o.__isBigInt(_))return!1;if(\"object\"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if(\"object\"==typeof i){if(\"object\"==typeof _&&_.constructor!==o)return i==_;i=o.__toPrimitive(i)}else return i==_}}static NE(i,_){return!o.EQ(i,_)}static __zero(){return new o(0,!1)}static __oneDigit(i,_){const t=new o(1,_);return t.__setDigit(0,i),t}__copy(){const _=new o(this.length,this.sign);for(let t=0;t_)n=-_-1;else{if(0===t)return-1;t--,e=i.__digit(t),n=29}let g=1<>>20,t=_-1023,e=(0|t/30)+1,n=new o(e,0>i);let g=1048575&o.__kBitConversionInts[1]|1048576,s=o.__kBitConversionInts[0];const l=20,r=t%30;let a,u=0;if(20>r){const i=l-r;u=i+32,a=g>>>i,g=g<<32-i|s>>>i,s<<=32-i}else if(20===r)u=32,a=g,g=s,s=0;else{const i=r-l;u=32-i,a=g<>>32-i,g=s<>>2,g=g<<30|s>>>2,s<<=30):a=0,n.__setDigit(_,a);return n.__trim()}static __isWhitespace(i){return!!(13>=i&&9<=i)||(159>=i?32==i:131071>=i?160==i||5760==i:196607>=i?(i&=131071,10>=i||40==i||41==i||47==i||95==i||4096==i):65279==i)}static __fromString(i,_=0){let t=0;const e=i.length;let n=0;if(n===e)return o.__zero();let g=i.charCodeAt(n);for(;o.__isWhitespace(g);){if(++n===e)return o.__zero();g=i.charCodeAt(n)}if(43===g){if(++n===e)return null;g=i.charCodeAt(n),t=1}else if(45===g){if(++n===e)return null;g=i.charCodeAt(n),t=-1}if(0===_){if(_=10,48===g){if(++n===e)return o.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(_=16,++n===e)return null;g=i.charCodeAt(n)}else if(79===g||111===g){if(_=8,++n===e)return null;g=i.charCodeAt(n)}else if(66===g||98===g){if(_=2,++n===e)return null;g=i.charCodeAt(n)}}}else if(16===_&&48===g){if(++n===e)return o.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(++n===e)return null;g=i.charCodeAt(n)}}if(0!=t&&10!==_)return null;for(;48===g;){if(++n===e)return o.__zero();g=i.charCodeAt(n)}const s=e-n;let l=o.__kMaxBitsPerChar[_],r=o.__kBitsPerCharTableMultiplier-1;if(s>1073741824/l)return null;const a=l*s+r>>>o.__kBitsPerCharTableShift,u=new o(0|(a+29)/30,!1),h=10>_?_:10,b=10<_?_-10:0;if(0==(_&_-1)){l>>=o.__kBitsPerCharTableShift;const _=[],t=[];let s=!1;do{let o=0,r=0;for(;;){let _;if(g-48>>>0>>0>>0>>0>>o.__kBitsPerCharTableShift)/30;u.__inplaceMultiplyAdd(D,a,c)}while(!t)}if(n!==e){if(!o.__isWhitespace(g))return null;for(n++;n>>l-o)}if(0!==g){if(n>=_.length)throw new Error(\"implementation bug\");_.__setDigit(n++,g)}for(;n<_.length;n++)_.__setDigit(n,0)}static __toStringBasePowerOfTwo(_,i){const t=_.length;let e=i-1;e=(85&e>>>1)+(85&e),e=(51&e>>>2)+(51&e),e=(15&e>>>4)+(15&e);const n=e,g=i-1,s=_.__digit(t-1),l=o.__clz30(s);let r=0|(30*t-l+n-1)/n;if(_.sign&&r++,268435456>>s,h=30-s;h>=n;)a[u--]=o.__kConversionChars[d&g],d>>>=n,h-=n}const m=(d|s<>>n-h;0!==d;)a[u--]=o.__kConversionChars[d&g],d>>>=n;if(_.sign&&(a[u--]=\"-\"),-1!=u)throw new Error(\"implementation bug\");return a.join(\"\")}static __toStringGeneric(_,i,t){const e=_.length;if(0===e)return\"\";if(1===e){let e=_.__unsignedDigit(0).toString(i);return!1===t&&_.sign&&(e=\"-\"+e),e}const n=30*e-o.__clz30(_.__digit(e-1)),g=o.__kMaxBitsPerChar[i],s=g-1;let l=n*o.__kBitsPerCharTableMultiplier;l+=s-1,l=0|l/s;const r=l+1>>1,a=o.exponentiate(o.__oneDigit(i,!1),o.__oneDigit(r,!1));let u,d;const h=a.__unsignedDigit(0);if(1===a.length&&32767>=h){u=new o(_.length,!1),u.__initializeDigits();let t=0;for(let e=2*_.length-1;0<=e;e--){const i=t<<15|_.__halfDigit(e);u.__setHalfDigit(e,0|i/h),t=0|i%h}d=t.toString(i)}else{const t=o.__absoluteDivLarge(_,a,!0,!0);u=t.quotient;const e=t.remainder.__trim();d=o.__toStringGeneric(e,i,!0)}u.__trim();let m=o.__toStringGeneric(u,i,!0);for(;d.lengthe?o.__absoluteLess(t):0}static __compareToNumber(i,_){if(o.__isOneDigitInt(_)){const e=i.sign,n=0>_;if(e!==n)return o.__unequalSign(e);if(0===i.length){if(n)throw new Error(\"implementation bug\");return 0===_?0:-1}if(1g?o.__absoluteGreater(e):s_)return o.__unequalSign(t);if(0===_)throw new Error(\"implementation bug: should be handled elsewhere\");if(0===i.length)return-1;o.__kBitConversionDouble[0]=_;const e=2047&o.__kBitConversionInts[1]>>>20;if(2047==e)throw new Error(\"implementation bug: handled elsewhere\");const n=e-1023;if(0>n)return o.__absoluteGreater(t);const g=i.length;let s=i.__digit(g-1);const l=o.__clz30(s),r=30*g-l,a=n+1;if(ra)return o.__absoluteGreater(t);let u=1048576|1048575&o.__kBitConversionInts[1],d=o.__kBitConversionInts[0];const h=20,m=29-l;if(m!==(0|(r-1)%30))throw new Error(\"implementation bug\");let b,D=0;if(20>m){const i=h-m;D=i+32,b=u>>>i,u=u<<32-i|d>>>i,d<<=32-i}else if(20===m)D=32,b=u,u=d,d=0;else{const i=m-h;D=32-i,b=u<>>32-i,u=d<>>=0,b>>>=0,s>b)return o.__absoluteGreater(t);if(s>>2,u=u<<30|d>>>2,d<<=30):b=0;const _=i.__unsignedDigit(e);if(_>b)return o.__absoluteGreater(t);if(__&&i.__unsignedDigit(0)===t(_):0===o.__compareToDouble(i,_)}static __comparisonResultToBool(i,_){return 0===_?0>i:1===_?0>=i:2===_?0_;case 3:return i>=_;}if(o.__isBigInt(i)&&\"string\"==typeof _)return _=o.__fromString(_),null!==_&&o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if(\"string\"==typeof i&&o.__isBigInt(_))return i=o.__fromString(i),null!==i&&o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if(i=o.__toNumeric(i),_=o.__toNumeric(_),o.__isBigInt(i)){if(o.__isBigInt(_))return o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if(\"number\"!=typeof _)throw new Error(\"implementation bug\");return o.__comparisonResultToBool(o.__compareToNumber(i,_),t)}if(\"number\"!=typeof i)throw new Error(\"implementation bug\");if(o.__isBigInt(_))return o.__comparisonResultToBool(o.__compareToNumber(_,i),2^t);if(\"number\"!=typeof _)throw new Error(\"implementation bug\");return 0===t?i<_:1===t?i<=_:2===t?i>_:3===t?i>=_:void 0}__clzmsd(){return o.__clz30(this.__digit(this.length-1))}static __absoluteAdd(_,t,e){if(_.length>>30,g.__setDigit(l,1073741823&i)}for(;l<_.length;l++){const i=_.__digit(l)+s;s=i>>>30,g.__setDigit(l,1073741823&i)}return l>>30,n.__setDigit(s,1073741823&i)}for(;s<_.length;s++){const i=_.__digit(s)-g;g=1&i>>>30,n.__setDigit(s,1073741823&i)}return n.__trim()}static __absoluteAddOne(_,i,t=null){const e=_.length;null===t?t=new o(e,i):t.sign=i;let n=1;for(let g=0;g>>30,t.__setDigit(g,1073741823&i)}return 0!=n&&t.__setDigitGrow(e,1),t}static __absoluteSubOne(_,t){const e=_.length;t=t||e;const n=new o(t,!1);let g=1;for(let o=0;o>>30,n.__setDigit(o,1073741823&i)}if(0!=g)throw new Error(\"implementation bug\");for(let g=e;gn?0:_.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(_,t,e,n){if(0===t)return;const g=32767&t,s=t>>>15;let l=0,r=0;for(let a,u=0;u<_.length;u++,n++){a=e.__digit(n);const i=_.__digit(u),t=32767&i,d=i>>>15,h=o.__imul(t,g),m=o.__imul(t,s),b=o.__imul(d,g),D=o.__imul(d,s);a+=r+h+l,l=a>>>30,a&=1073741823,a+=((32767&m)<<15)+((32767&b)<<15),l+=a>>>30,r=D+(m>>>15)+(b>>>15),e.__setDigit(n,1073741823&a)}for(;0!=l||0!==r;n++){let i=e.__digit(n);i+=l+r,r=0,l=i>>>30,e.__setDigit(n,1073741823&i)}}static __internalMultiplyAdd(_,t,e,g,s){let l=e,a=0;for(let n=0;n>>15,t),u=e+((32767&g)<<15)+a+l;l=u>>>30,a=g>>>15,s.__setDigit(n,1073741823&u)}if(s.length>g)for(s.__setDigit(g++,l+a);gthis.length&&(t=this.length);const e=32767&i,n=i>>>15;let g=0,s=_;for(let l=0;l>>15,r=o.__imul(_,e),a=o.__imul(_,n),u=o.__imul(t,e),d=o.__imul(t,n);let h=s+r+g;g=h>>>30,h&=1073741823,h+=((32767&a)<<15)+((32767&u)<<15),g+=h>>>30,s=d+(a>>>15)+(u>>>15),this.__setDigit(l,1073741823&h)}if(0!=g||0!==s)throw new Error(\"implementation bug\")}static __absoluteDivSmall(_,t,e=null){null===e&&(e=new o(_.length,!1));let n=0;for(let g,o=2*_.length-1;0<=o;o-=2){g=(n<<15|_.__halfDigit(o))>>>0;const i=0|g/t;n=0|g%t,g=(n<<15|_.__halfDigit(o-1))>>>0;const s=0|g/t;n=0|g%t,e.__setDigit(o>>>1,i<<15|s)}return e}static __absoluteModSmall(_,t){let e=0;for(let n=2*_.length-1;0<=n;n--){const i=(e<<15|_.__halfDigit(n))>>>0;e=0|i%t}return e}static __absoluteDivLarge(i,_,t,e){const g=_.__halfDigitLength(),n=_.length,s=i.__halfDigitLength()-g;let l=null;t&&(l=new o(s+2>>>1,!1),l.__initializeDigits());const r=new o(g+2>>>1,!1);r.__initializeDigits();const a=o.__clz15(_.__halfDigit(g-1));0>>0;a=0|t/u;let e=0|t%u;const n=_.__halfDigit(g-2),s=d.__halfDigit(m+g-2);for(;o.__imul(a,n)>>>0>(e<<16|s)>>>0&&(a--,e+=u,!(32767>>1,h|a))}if(e)return d.__inplaceRightShift(a),t?{quotient:l,remainder:d}:d;if(t)return l;throw new Error(\"unreachable\")}static __clz15(i){return o.__clz30(i)-15}__inplaceAdd(_,t,e){let n=0;for(let g=0;g>>15,this.__setHalfDigit(t+g,32767&i)}return n}__inplaceSub(_,t,e){let n=0;if(1&t){t>>=1;let g=this.__digit(t),o=32767&g,s=0;for(;s>>1;s++){const i=_.__digit(s),e=(g>>>15)-(32767&i)-n;n=1&e>>>15,this.__setDigit(t+s,(32767&e)<<15|32767&o),g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15}const i=_.__digit(s),l=(g>>>15)-(32767&i)-n;n=1&l>>>15,this.__setDigit(t+s,(32767&l)<<15|32767&o);if(t+s+1>=this.length)throw new RangeError(\"out of bounds\");0==(1&e)&&(g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15,this.__setDigit(t+_.length,1073709056&g|32767&o))}else{t>>=1;let g=0;for(;g<_.length-1;g++){const i=this.__digit(t+g),e=_.__digit(g),o=(32767&i)-(32767&e)-n;n=1&o>>>15;const s=(i>>>15)-(e>>>15)-n;n=1&s>>>15,this.__setDigit(t+g,(32767&s)<<15|32767&o)}const i=this.__digit(t+g),o=_.__digit(g),s=(32767&i)-(32767&o)-n;n=1&s>>>15;let l=0;0==(1&e)&&(l=(i>>>15)-(o>>>15)-n,n=1&l>>>15),this.__setDigit(t+g,(32767&l)<<15|32767&s)}return n}__inplaceRightShift(_){if(0===_)return;let t=this.__digit(0)>>>_;const e=this.length-1;for(let n=0;n>>_}this.__setDigit(e,t)}static __specialLeftShift(_,t,e){const g=_.length,n=new o(g+e,!1);if(0===t){for(let t=0;t>>30-t}return 0t)throw new RangeError(\"BigInt too big\");const e=0|t/30,n=t%30,g=_.length,s=0!==n&&0!=_.__digit(g-1)>>>30-n,l=g+e+(s?1:0),r=new o(l,_.sign);if(0===n){let t=0;for(;t>>30-n}if(s)r.__setDigit(g+e,t);else if(0!==t)throw new Error(\"implementation bug\")}return r.__trim()}static __rightShiftByAbsolute(_,i){const t=_.length,e=_.sign,n=o.__toShiftAmount(i);if(0>n)return o.__rightShiftByMaximum(e);const g=0|n/30,s=n%30;let l=t-g;if(0>=l)return o.__rightShiftByMaximum(e);let r=!1;if(e){if(0!=(_.__digit(g)&(1<>>s;const n=t-g-1;for(let t=0;t>>s}a.__setDigit(n,e)}return r&&(a=o.__absoluteAddOne(a,!0,a)),a.__trim()}static __rightShiftByMaximum(i){return i?o.__oneDigit(1,!0):o.__zero()}static __toShiftAmount(i){if(1o.__kMaxLengthBits?-1:_}static __toPrimitive(i,_=\"default\"){if(\"object\"!=typeof i)return i;if(i.constructor===o)return i;if(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol.toPrimitive){const t=i[Symbol.toPrimitive];if(t){const i=t(_);if(\"object\"!=typeof i)return i;throw new TypeError(\"Cannot convert object to primitive value\")}}const t=i.valueOf;if(t){const _=t.call(i);if(\"object\"!=typeof _)return _}const e=i.toString;if(e){const _=e.call(i);if(\"object\"!=typeof _)return _}throw new TypeError(\"Cannot convert object to primitive value\")}static __toNumeric(i){return o.__isBigInt(i)?i:+i}static __isBigInt(i){return\"object\"==typeof i&&null!==i&&i.constructor===o}static __truncateToNBits(i,_){const t=0|(i+29)/30,e=new o(t,_.sign),n=t-1;for(let t=0;t>>_}return e.__setDigit(n,g),e.__trim()}static __truncateAndSubFromPowerOfTwo(_,t,e){var n=Math.min;const g=0|(_+29)/30,s=new o(g,e);let l=0;const r=g-1;let a=0;for(const i=n(r,t.length);l>>30,s.__setDigit(l,1073741823&i)}for(;l>>i;const _=1<<32-i;h=_-u-a,h&=_-1}return s.__setDigit(r,h),s.__trim()}__digit(_){return this[_]}__unsignedDigit(_){return this[_]>>>0}__setDigit(_,i){this[_]=0|i}__setDigitGrow(_,i){this[_]=0|i}__halfDigitLength(){const i=this.length;return 32767>=this.__unsignedDigit(i-1)?2*i-1:2*i}__halfDigit(_){return 32767&this[_>>>1]>>>15*(1&_)}__setHalfDigit(_,i){const t=_>>>1,e=this.__digit(t),n=1&_?32767&e|i<<15:1073709056&e|32767&i;this.__setDigit(t,n)}static __digitPow(i,_){let t=1;for(;0<_;)1&_&&(t*=i),_>>>=1,i*=i;return t}static __isOneDigitInt(i){return(1073741823&i)===i}}return o.__kMaxLength=33554432,o.__kMaxLengthBits=o.__kMaxLength<<5,o.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],o.__kBitsPerCharTableShift=5,o.__kBitsPerCharTableMultiplier=1<>>0)/_)},o.__imul=i||function(i,_){return 0|i*_},o});\n//# sourceMappingURL=jsbi-umd.js.map\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","\"use strict\";\nmodule.exports = function() {\n return Object.assign;\n};\n\n//# sourceMappingURL=polyfill.js.map","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/_app\",\n function () {\n return require(\"private-next-pages/_app.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/_app\"])\n });\n }\n ","const isBrowser = typeof document !== \"undefined\";\n\nexport { isBrowser };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nconst useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","import { useRef } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';\n\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\nexport { useIsMounted };\n","const noop = (any) => any;\n\nexport { noop };\n","const MotionGlobalConfig = {\n skipAnimations: false,\n useManualTiming: false,\n};\n\nexport { MotionGlobalConfig };\n","class Queue {\n constructor() {\n this.order = [];\n this.scheduled = new Set();\n }\n add(process) {\n if (!this.scheduled.has(process)) {\n this.scheduled.add(process);\n this.order.push(process);\n return true;\n }\n }\n remove(process) {\n const index = this.order.indexOf(process);\n if (index !== -1) {\n this.order.splice(index, 1);\n this.scheduled.delete(process);\n }\n }\n clear() {\n this.order.length = 0;\n this.scheduled.clear();\n }\n}\nfunction createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Queue();\n let nextFrame = new Queue();\n let numToRun = 0;\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (queue.add(callback) && addToCurrentFrame && isProcessing) {\n // If we're adding it to the currently running queue, update its measured size\n numToRun = thisFrame.order.length;\n }\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.remove(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [thisFrame, nextFrame] = [nextFrame, thisFrame];\n // Clear the next frame queue\n nextFrame.clear();\n // Execute this frame\n numToRun = thisFrame.order.length;\n if (numToRun) {\n for (let i = 0; i < numToRun; i++) {\n const callback = thisFrame.order[i];\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(frameData);\n }\n }\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n","import { MotionGlobalConfig } from '../utils/GlobalConfig.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst stepsOrder = [\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0,\n timestamp: 0,\n isProcessing: false,\n };\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(() => (runNextFrame = true));\n return acc;\n }, {});\n const processStep = (stepId) => {\n steps[stepId].process(state);\n };\n const processBatch = () => {\n const timestamp = MotionGlobalConfig.useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n state.timestamp = timestamp;\n state.isProcessing = true;\n stepsOrder.forEach(processStep);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => stepsOrder.forEach((key) => steps[key].cancel(process));\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher, stepsOrder };\n","import { noop } from '../utils/noop.mjs';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps, } = createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, steps };\n","import { useState, useCallback } from 'react';\nimport { useIsMounted } from './use-is-mounted.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction useForceUpdate() {\n const isMounted = useIsMounted();\n const [forcedRenderCount, setForcedRenderCount] = useState(0);\n const forceRender = useCallback(() => {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n const deferredForceRender = useCallback(() => frame.postRender(forceRender), [forceRender]);\n return [deferredForceRender, forcedRenderCount];\n}\n\nexport { useForceUpdate };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nconst PresenceContext = createContext(null);\n\nexport { PresenceContext };\n","import { useRef } from 'react';\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nfunction useConstant(init) {\n const ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\nexport { useConstant };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nconst MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","import { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (element && prevProps.isPresent && !this.props.isPresent) {\n const size = this.props.sizeRef.current;\n size.height = element.offsetHeight || 0;\n size.width = element.offsetWidth || 0;\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left } = size.current;\n if (isPresent || !ref.current || !width || !height)\n return;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n document.head.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n top: ${top}px !important;\n left: ${left}px !important;\n }\n `);\n }\n return () => {\n document.head.removeChild(style);\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, children: React.cloneElement(children, { ref }) }));\n}\n\nexport { PopChild };\n","import { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n const context = useMemo(() => ({\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => presenceChildren.delete(childId);\n },\n }), \n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n presenceAffectsLayout ? [Math.random()] : [isPresent]);\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n if (mode === \"popLayout\") {\n children = jsx(PopChild, { isPresent: isPresent, children: children });\n }\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n","import { createContext } from 'react';\n\nconst LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n","import { useEffect } from 'react';\n\nfunction useUnmountEffect(callback) {\n return useEffect(() => () => callback(), []);\n}\n\nexport { useUnmountEffect };\n","import { noop } from './noop.mjs';\n\nlet warning = noop;\nlet invariant = noop;\nif (process.env.NODE_ENV !== \"production\") {\n warning = (check, message) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(message);\n }\n };\n invariant = (check, message) => {\n if (!check) {\n throw new Error(message);\n }\n };\n}\n\nexport { invariant, warning };\n","import { jsx, Fragment } from 'react/jsx-runtime';\nimport { useContext, useRef, cloneElement, Children, isValidElement } from 'react';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { useIsMounted } from '../../utils/use-is-mounted.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { useUnmountEffect } from '../../utils/use-unmount-effect.mjs';\nimport { invariant } from '../../utils/errors.mjs';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction updateChildLookup(children, allChildren) {\n children.forEach((child) => {\n const key = getChildKey(child);\n allChildren.set(key, child);\n });\n}\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * \n * {items.map(item => (\n * \n * ))}\n * \n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, exitBeforeEnter, presenceAffectsLayout = true, mode = \"sync\", }) => {\n invariant(!exitBeforeEnter, \"Replace exitBeforeEnter with mode='wait'\");\n // We want to force a re-render once all exiting animations have finished. We\n // either use a local forceRender function, or one from a parent context if it exists.\n const forceRender = useContext(LayoutGroupContext).forceRender || useForceUpdate()[0];\n const isMounted = useIsMounted();\n // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key\n const filteredChildren = onlyElements(children);\n let childrenToRender = filteredChildren;\n const exitingChildren = useRef(new Map()).current;\n // Keep a living record of the children we're actually rendering so we\n // can diff to figure out which are entering and exiting\n const presentChildren = useRef(childrenToRender);\n // A lookup table to quickly reference components by key\n const allChildren = useRef(new Map()).current;\n // If this is the initial component render, just deal with logic surrounding whether\n // we play onMount animations or not.\n const isInitialRender = useRef(true);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n updateChildLookup(filteredChildren, allChildren);\n presentChildren.current = childrenToRender;\n });\n useUnmountEffect(() => {\n isInitialRender.current = true;\n allChildren.clear();\n exitingChildren.clear();\n });\n if (isInitialRender.current) {\n return (jsx(Fragment, { children: childrenToRender.map((child) => (jsx(PresenceChild, { isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)))) }));\n }\n // If this is a subsequent render, deal with entering and exiting children\n childrenToRender = [...childrenToRender];\n // Diff the keys of the currently-present and target children to update our\n // exiting list.\n const presentKeys = presentChildren.current.map(getChildKey);\n const targetKeys = filteredChildren.map(getChildKey);\n // Diff the present children with our target children and mark those that are exiting\n const numPresent = presentKeys.length;\n for (let i = 0; i < numPresent; i++) {\n const key = presentKeys[i];\n if (targetKeys.indexOf(key) === -1 && !exitingChildren.has(key)) {\n exitingChildren.set(key, undefined);\n }\n }\n // If we currently have exiting children, and we're deferring rendering incoming children\n // until after all current children have exiting, empty the childrenToRender array\n if (mode === \"wait\" && exitingChildren.size) {\n childrenToRender = [];\n }\n // Loop through all currently exiting components and clone them to overwrite `animate`\n // with any `exit` prop they might have defined.\n exitingChildren.forEach((component, key) => {\n // If this component is actually entering again, early return\n if (targetKeys.indexOf(key) !== -1)\n return;\n const child = allChildren.get(key);\n if (!child)\n return;\n const insertionIndex = presentKeys.indexOf(key);\n let exitingComponent = component;\n if (!exitingComponent) {\n const onExit = () => {\n // clean up the exiting children map\n exitingChildren.delete(key);\n // compute the keys of children that were rendered once but are no longer present\n // this could happen in case of too many fast consequent renderings\n // @link https://github.com/framer/motion/issues/2023\n const leftOverKeys = Array.from(allChildren.keys()).filter((childKey) => !targetKeys.includes(childKey));\n // clean up the all children map\n leftOverKeys.forEach((leftOverKey) => allChildren.delete(leftOverKey));\n // make sure to render only the children that are actually visible\n presentChildren.current = filteredChildren.filter((presentChild) => {\n const presentChildKey = getChildKey(presentChild);\n return (\n // filter out the node exiting\n presentChildKey === key ||\n // filter out the leftover children\n leftOverKeys.includes(presentChildKey));\n });\n // Defer re-rendering until all exiting children have indeed left\n if (!exitingChildren.size) {\n if (isMounted.current === false)\n return;\n forceRender();\n onExitComplete && onExitComplete();\n }\n };\n exitingComponent = (jsx(PresenceChild, { isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)));\n exitingChildren.set(key, exitingComponent);\n }\n childrenToRender.splice(insertionIndex, 0, exitingComponent);\n });\n // Add `MotionContext` even to children that don't need it to ensure we're rendering\n // the same tree between renders\n childrenToRender = childrenToRender.map((child) => {\n const key = child.key;\n return exitingChildren.has(key) ? (child) : (jsx(PresenceChild, { isPresent: true, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)));\n });\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n childrenToRender.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n return (jsx(Fragment, { children: exitingChildren.size\n ? childrenToRender\n : childrenToRender.map((child) => cloneElement(child)) }));\n};\n\nexport { AnimatePresence };\n","import { useState, useCallback, useLayoutEffect, useEffect, useRef, useMemo, useReducer } from 'react';\nimport debounce from 'lodash.debounce';\n\n// src/useBoolean/useBoolean.ts\nfunction useBoolean(defaultValue) {\n const [value, setValue] = useState(!!defaultValue);\n const setTrue = useCallback(() => {\n setValue(true);\n }, []);\n const setFalse = useCallback(() => {\n setValue(false);\n }, []);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return { value, setValue, setTrue, setFalse, toggle };\n}\nvar useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\n// src/useEventListener/useEventListener.ts\nfunction useEventListener(eventName, handler, element, options) {\n const savedHandler = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n useEffect(() => {\n const targetElement = (element == null ? void 0 : element.current) ?? window;\n if (!(targetElement && targetElement.addEventListener))\n return;\n const listener = (event) => {\n savedHandler.current(event);\n };\n targetElement.addEventListener(eventName, listener, options);\n return () => {\n targetElement.removeEventListener(eventName, listener, options);\n };\n }, [eventName, element, options]);\n}\n\n// src/useClickAnyWhere/useClickAnyWhere.ts\nfunction useClickAnyWhere(handler) {\n useEventListener(\"click\", (event) => {\n handler(event);\n });\n}\nfunction useCopyToClipboard() {\n const [copiedText, setCopiedText] = useState(null);\n const copy = useCallback(async (text) => {\n if (!(navigator == null ? void 0 : navigator.clipboard)) {\n console.warn(\"Clipboard not supported\");\n return false;\n }\n try {\n await navigator.clipboard.writeText(text);\n setCopiedText(text);\n return true;\n } catch (error) {\n console.warn(\"Copy failed\", error);\n setCopiedText(null);\n return false;\n }\n }, []);\n return [copiedText, copy];\n}\nfunction useCounter(initialValue) {\n const [count, setCount] = useState(initialValue ?? 0);\n const increment = () => {\n setCount((x) => x + 1);\n };\n const decrement = () => {\n setCount((x) => x - 1);\n };\n const reset = () => {\n setCount(initialValue ?? 0);\n };\n return {\n count,\n increment,\n decrement,\n reset,\n setCount\n };\n}\nfunction useInterval(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (delay === null) {\n return;\n }\n const id = setInterval(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearInterval(id);\n };\n }, [delay]);\n}\n\n// src/useCountdown/useCountdown.ts\nfunction useCountdown(countdownOptions) {\n let isDeprecated = false;\n let countStart, intervalMs, isIncrement, countStop;\n if (\"seconds\" in countdownOptions) {\n console.warn(\n \"[useCountdown:DEPRECATED] new interface is already available (see https://usehooks-ts.com/react-hook/use-countdown), the old version will retire on usehooks-ts@3.\"\n );\n isDeprecated = true;\n countStart = countdownOptions.seconds;\n intervalMs = countdownOptions.interval;\n isIncrement = countdownOptions.isIncrement;\n } else {\n ({ countStart, intervalMs, isIncrement, countStop } = countdownOptions);\n }\n intervalMs = intervalMs ?? 1e3;\n isIncrement = isIncrement ?? false;\n countStop = countStop ?? 0;\n const {\n count,\n increment,\n decrement,\n reset: resetCounter\n } = useCounter(countStart);\n const {\n value: isCountdownRunning,\n setTrue: startCountdown,\n setFalse: stopCountdown\n } = useBoolean(false);\n const resetCountdown = () => {\n stopCountdown();\n resetCounter();\n };\n const countdownCallback = useCallback(() => {\n if (count === countStop) {\n stopCountdown();\n return;\n }\n if (isIncrement) {\n increment();\n } else {\n decrement();\n }\n }, [count, countStop, decrement, increment, isIncrement, stopCountdown]);\n useInterval(countdownCallback, isCountdownRunning ? intervalMs : null);\n return isDeprecated ? [\n count,\n {\n start: startCountdown,\n stop: stopCountdown,\n reset: resetCountdown\n }\n ] : [\n count,\n {\n startCountdown,\n stopCountdown,\n resetCountdown\n }\n ];\n}\nfunction useEventCallback(fn) {\n const ref = useRef(() => {\n throw new Error(\"Cannot call an event handler while rendering.\");\n });\n useIsomorphicLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n return useCallback((...args) => ref.current(...args), [ref]);\n}\n\n// src/useLocalStorage/useLocalStorage.ts\nvar IS_SERVER = typeof window === \"undefined\";\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER) {\n return initialValueToUse;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER) {\n console.warn(\n `Tried setting localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.localStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting localStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if ((event == null ? void 0 : event.key) && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return [storedValue, setValue];\n}\nvar IS_SERVER2 = typeof window === \"undefined\";\nfunction useMediaQuery(query, options) {\n const defaultValue = typeof options === \"boolean\" ? options : (options == null ? void 0 : options.defaultValue) ?? false;\n const initializeWithValue = typeof options === \"boolean\" ? void 0 : (options == null ? void 0 : options.initializeWithValue) ?? void 0;\n const getMatches = (query2) => {\n if (IS_SERVER2) {\n return defaultValue;\n }\n return window.matchMedia(query2).matches;\n };\n const [matches, setMatches] = useState(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n function handleChange() {\n setMatches(getMatches(query));\n }\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n handleChange();\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener(\"change\", handleChange);\n }\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener(\"change\", handleChange);\n }\n };\n }, [query]);\n return matches;\n}\n\n// src/useDarkMode/useDarkMode.ts\nvar COLOR_SCHEME_QUERY = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY = \"usehooks-ts-dark-mode\";\nfunction useDarkMode(options, localStorageKeyProps = LOCAL_STORAGE_KEY) {\n const counter = useRef(0);\n counter.current++;\n const defaultValue = typeof options === \"boolean\" ? options : options == null ? void 0 : options.defaultValue;\n const localStorageKey = typeof options === \"boolean\" ? localStorageKeyProps ?? LOCAL_STORAGE_KEY : (options == null ? void 0 : options.localStorageKey) ?? LOCAL_STORAGE_KEY;\n const initializeWithValue = typeof options === \"boolean\" ? void 0 : (options == null ? void 0 : options.initializeWithValue) ?? void 0;\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY, {\n initializeWithValue,\n defaultValue\n });\n const [isDarkMode, setDarkMode] = useLocalStorage(\n localStorageKey,\n defaultValue ?? isDarkOS ?? false,\n { initializeWithValue }\n );\n useIsomorphicLayoutEffect(() => {\n if (isDarkOS !== isDarkMode) {\n setDarkMode(isDarkOS);\n }\n }, [isDarkOS]);\n return {\n isDarkMode,\n toggle: () => {\n setDarkMode((prev) => !prev);\n },\n enable: () => {\n setDarkMode(true);\n },\n disable: () => {\n setDarkMode(false);\n },\n set: (value) => {\n setDarkMode(value);\n }\n };\n}\nfunction useDebounce(value, delay) {\n const [debouncedValue, setDebouncedValue] = useState(value);\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedValue(value);\n }, delay ?? 500);\n return () => {\n clearTimeout(timer);\n };\n }, [value, delay]);\n return debouncedValue;\n}\nfunction useUnmount(func) {\n const funcRef = useRef(func);\n funcRef.current = func;\n useEffect(\n () => () => {\n funcRef.current();\n },\n []\n );\n}\n\n// src/useDebounceCallback/useDebounceCallback.ts\nfunction useDebounceCallback(func, delay = 500, options) {\n const debouncedFunc = useRef();\n useUnmount(() => {\n if (debouncedFunc.current) {\n debouncedFunc.current.cancel();\n }\n });\n const debounced = useMemo(() => {\n const debouncedFuncInstance = debounce(func, delay, options);\n const wrappedFunc = (...args) => {\n return debouncedFuncInstance(...args);\n };\n wrappedFunc.cancel = () => {\n debouncedFuncInstance.cancel();\n };\n wrappedFunc.isPending = () => {\n return !!debouncedFunc.current;\n };\n wrappedFunc.flush = () => {\n return debouncedFuncInstance.flush();\n };\n return wrappedFunc;\n }, [func, delay, options]);\n useEffect(() => {\n debouncedFunc.current = debounce(func, delay, options);\n }, [func, delay, options]);\n return debounced;\n}\nfunction useDebounceValue(initialValue, delay, options) {\n const eq = (options == null ? void 0 : options.equalityFn) ?? ((left, right) => left === right);\n const unwrappedInitialValue = initialValue instanceof Function ? initialValue() : initialValue;\n const [debouncedValue, setDebouncedValue] = useState(unwrappedInitialValue);\n const previousValueRef = useRef(unwrappedInitialValue);\n const updateDebouncedValue = useDebounceCallback(\n setDebouncedValue,\n delay,\n options\n );\n if (!eq(previousValueRef.current, unwrappedInitialValue)) {\n updateDebouncedValue(unwrappedInitialValue);\n previousValueRef.current = unwrappedInitialValue;\n }\n return [debouncedValue, updateDebouncedValue];\n}\nfunction useDocumentTitle(title, options = {}) {\n const { preserveTitleOnUnmount = true } = options;\n const defaultTitle = useRef(null);\n useIsomorphicLayoutEffect(() => {\n defaultTitle.current = window.document.title;\n }, []);\n useIsomorphicLayoutEffect(() => {\n window.document.title = title;\n }, [title]);\n useUnmount(() => {\n if (!preserveTitleOnUnmount && defaultTitle.current) {\n window.document.title = defaultTitle.current;\n }\n });\n}\nfunction useEffectOnce(effect) {\n useEffect(effect, []);\n}\nfunction useElementSize(options = {}) {\n const { initializeWithValue = true } = options;\n const [ref, setRef] = useState(null);\n const readValue = useCallback(() => {\n return {\n width: (ref == null ? void 0 : ref.offsetWidth) ?? void 0,\n height: (ref == null ? void 0 : ref.offsetHeight) ?? void 0\n };\n }, [ref == null ? void 0 : ref.offsetHeight, ref == null ? void 0 : ref.offsetWidth]);\n const [size, setSize] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return { width: void 0, height: void 0 };\n });\n const handleSize = useCallback(() => {\n setSize(readValue());\n }, [ref == null ? void 0 : ref.offsetHeight, ref == null ? void 0 : ref.offsetWidth]);\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, [ref == null ? void 0 : ref.offsetHeight, ref == null ? void 0 : ref.offsetWidth]);\n const result = [setRef, size];\n result.ref = result[0];\n result.width = size.width;\n result.height = size.height;\n return result;\n}\nfunction useFetch(url, options) {\n const cache = useRef({});\n const cancelRequest = useRef(false);\n const initialState = {\n error: void 0,\n data: void 0\n };\n const fetchReducer = (state2, action) => {\n switch (action.type) {\n case \"loading\":\n return { ...initialState };\n case \"fetched\":\n return { ...initialState, data: action.payload };\n case \"error\":\n return { ...initialState, error: action.payload };\n default:\n return state2;\n }\n };\n const [state, dispatch] = useReducer(fetchReducer, initialState);\n useEffect(() => {\n if (!url)\n return;\n cancelRequest.current = false;\n const fetchData = async () => {\n dispatch({ type: \"loading\" });\n const currentCache = cache.current[url];\n if (currentCache) {\n dispatch({ type: \"fetched\", payload: currentCache });\n return;\n }\n try {\n const response = await fetch(url, options);\n if (!response.ok) {\n throw new Error(response.statusText);\n }\n const data = await response.json();\n cache.current[url] = data;\n if (cancelRequest.current)\n return;\n dispatch({ type: \"fetched\", payload: data });\n } catch (error) {\n if (cancelRequest.current)\n return;\n dispatch({ type: \"error\", payload: error });\n }\n };\n void fetchData();\n return () => {\n cancelRequest.current = true;\n };\n }, [url]);\n return state;\n}\nfunction useHover(elementRef) {\n const [value, setValue] = useState(false);\n const handleMouseEnter = () => {\n setValue(true);\n };\n const handleMouseLeave = () => {\n setValue(false);\n };\n useEventListener(\"mouseenter\", handleMouseEnter, elementRef);\n useEventListener(\"mouseleave\", handleMouseLeave, elementRef);\n return value;\n}\nfunction useImageOnLoad() {\n const [isLoaded, setIsLoaded] = useState(false);\n const handleImageOnLoad = () => {\n setIsLoaded(true);\n };\n const css = {\n // Thumbnail style.\n thumbnail: {\n visibility: isLoaded ? \"hidden\" : \"visible\",\n filter: \"blur(8px)\",\n transition: \"visibility 0ms ease-out 500ms\"\n },\n // Full image style.\n fullSize: {\n opacity: isLoaded ? 1 : 0,\n transition: \"opacity 500ms ease-in 0ms\"\n }\n };\n return { handleImageOnLoad, css };\n}\nfunction useIntersectionObserver(optionsOrLegacyRef, legacyOptions) {\n var _a;\n const isLegacySignature = \"current\" in optionsOrLegacyRef;\n const options = isLegacySignature ? legacyOptions : optionsOrLegacyRef;\n const {\n threshold = 0,\n root = null,\n rootMargin = \"0%\",\n freezeOnceVisible = false,\n initialIsIntersecting = false\n } = options ?? {};\n const [newRef, setNewRef] = useState(null);\n const ref = isLegacySignature ? optionsOrLegacyRef.current : newRef;\n const [state, setState] = useState(() => ({\n isIntersecting: initialIsIntersecting,\n entry: void 0\n }));\n const callbackRef = useRef();\n callbackRef.current = options == null ? void 0 : options.onChange;\n const frozen = ((_a = state.entry) == null ? void 0 : _a.isIntersecting) && freezeOnceVisible;\n useEffect(() => {\n if (!ref)\n return;\n if (!(\"IntersectionObserver\" in window))\n return;\n if (frozen)\n return;\n let unobserve;\n const observer = new IntersectionObserver(\n (entries) => {\n const thresholds = Array.isArray(observer.thresholds) ? observer.thresholds : [observer.thresholds];\n entries.forEach((entry) => {\n const isIntersecting = entry.isIntersecting && thresholds.some((threshold2) => entry.intersectionRatio >= threshold2);\n setState({ isIntersecting, entry });\n if (callbackRef.current) {\n callbackRef.current(isIntersecting, entry);\n }\n if (isIntersecting && freezeOnceVisible && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n });\n },\n { threshold, root, rootMargin }\n );\n observer.observe(ref);\n return () => {\n observer.disconnect();\n };\n }, [\n ref,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold),\n root,\n rootMargin,\n frozen,\n freezeOnceVisible\n ]);\n const prevRef = useRef(null);\n useEffect(() => {\n var _a2;\n if (!ref && ((_a2 = state.entry) == null ? void 0 : _a2.target) && !freezeOnceVisible && !frozen && prevRef.current !== state.entry.target) {\n prevRef.current = state.entry.target;\n setState({ isIntersecting: initialIsIntersecting, entry: void 0 });\n }\n }, [ref, state.entry, freezeOnceVisible, frozen, initialIsIntersecting]);\n if (isLegacySignature) {\n return state.entry;\n }\n const result = [\n setNewRef,\n !!state.isIntersecting,\n state.entry\n ];\n result.ref = result[0];\n result.isIntersecting = result[1];\n result.entry = result[2];\n return result;\n}\nfunction useIsClient() {\n const [isClient, setClient] = useState(false);\n useEffect(() => {\n setClient(true);\n }, []);\n return isClient;\n}\nfunction useIsFirstRender() {\n const isFirst = useRef(true);\n if (isFirst.current) {\n isFirst.current = false;\n return true;\n }\n return isFirst.current;\n}\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return useCallback(() => isMounted.current, []);\n}\nfunction useLockedBody(initialLocked = false, rootId = \"___gatsby\") {\n const [locked, setLocked] = useState(initialLocked);\n useIsomorphicLayoutEffect(() => {\n if (!locked) {\n return;\n }\n const originalOverflow = document.body.style.overflow;\n const originalPaddingRight = document.body.style.paddingRight;\n document.body.style.overflow = \"hidden\";\n const root = document.getElementById(rootId);\n const scrollBarWidth = root ? root.offsetWidth - root.scrollWidth : 0;\n if (scrollBarWidth) {\n document.body.style.paddingRight = `${scrollBarWidth}px`;\n }\n return () => {\n document.body.style.overflow = originalOverflow;\n if (scrollBarWidth) {\n document.body.style.paddingRight = originalPaddingRight;\n }\n };\n }, [locked]);\n useEffect(() => {\n if (locked !== initialLocked) {\n setLocked(initialLocked);\n }\n }, [initialLocked]);\n return [locked, setLocked];\n}\nfunction useMap(initialState = /* @__PURE__ */ new Map()) {\n const [map, setMap] = useState(new Map(initialState));\n const actions = {\n set: useCallback((key, value) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.set(key, value);\n return copy;\n });\n }, []),\n setAll: useCallback((entries) => {\n setMap(() => new Map(entries));\n }, []),\n remove: useCallback((key) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.delete(key);\n return copy;\n });\n }, []),\n reset: useCallback(() => {\n setMap(() => /* @__PURE__ */ new Map());\n }, [])\n };\n return [map, actions];\n}\n\n// src/useOnClickOutside/useOnClickOutside.ts\nfunction useOnClickOutside(ref, handler, eventType = \"mousedown\") {\n useEventListener(eventType, (event) => {\n const target = event.target;\n if (!target || !target.isConnected) {\n return;\n }\n const isOutside = Array.isArray(ref) ? ref.every((r) => r.current && !r.current.contains(target)) : ref.current && !ref.current.contains(target);\n if (isOutside) {\n handler(event);\n }\n });\n}\nvar IS_SERVER3 = typeof window === \"undefined\";\nfunction useReadLocalStorage(key, options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER3) {\n initializeWithValue = false;\n }\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return null;\n }\n return parsed;\n },\n [options]\n );\n const readValue = useCallback(() => {\n if (IS_SERVER3) {\n return null;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : null;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return null;\n }\n }, [key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return void 0;\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if ((event == null ? void 0 : event.key) && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return storedValue;\n}\nvar initialSize = {\n width: void 0,\n height: void 0\n};\nfunction useResizeObserver(options) {\n const { ref, box = \"content-box\" } = options;\n const [{ width, height }, setSize] = useState(initialSize);\n const isMounted = useIsMounted();\n const previousSize = useRef({ ...initialSize });\n const onResize = useRef(void 0);\n onResize.current = options == null ? void 0 : options.onResize;\n useEffect(() => {\n if (!(ref == null ? void 0 : ref.current))\n return;\n if (typeof window === \"undefined\" || !(\"ResizeObserver\" in window))\n return;\n const observer = new ResizeObserver(([entry]) => {\n const boxProp = box === \"border-box\" ? \"borderBoxSize\" : box === \"device-pixel-content-box\" ? \"devicePixelContentBoxSize\" : \"contentBoxSize\";\n const newWidth = extractSize(entry, boxProp, \"inlineSize\");\n const newHeight = extractSize(entry, boxProp, \"blockSize\");\n const hasChanged = previousSize.current.width !== newWidth || previousSize.current.height !== newHeight;\n if (hasChanged) {\n const newSize = { width: newWidth, height: newHeight };\n previousSize.current.width = newWidth;\n previousSize.current.height = newHeight;\n if (onResize == null ? void 0 : onResize.current) {\n onResize.current(newSize);\n } else {\n if (isMounted()) {\n setSize(newSize);\n }\n }\n }\n });\n observer.observe(ref.current, { box });\n return () => {\n observer.disconnect();\n };\n }, [box, ref, isMounted]);\n return { width, height };\n}\nfunction extractSize(entry, box, sizeType) {\n if (!entry[box]) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"];\n }\n return void 0;\n }\n return Array.isArray(entry[box]) ? entry[box][0][sizeType] : (\n // @ts-ignore Support Firefox's non-standard behavior\n entry[box][sizeType]\n );\n}\nvar IS_SERVER4 = typeof window === \"undefined\";\nfunction useScreen(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER4) {\n initializeWithValue = false;\n }\n const readScreen = () => {\n if (IS_SERVER4) {\n return void 0;\n }\n return window.screen;\n };\n const [screen, setScreen] = useState(() => {\n if (initializeWithValue) {\n return readScreen();\n }\n return void 0;\n });\n const debouncedSetScreen = useDebounceCallback(\n setScreen,\n options == null ? void 0 : options.debounceDelay\n );\n function handleSize() {\n const newScreen = readScreen();\n const setSize = (options == null ? void 0 : options.debounceDelay) ? debouncedSetScreen : setScreen;\n if (newScreen) {\n const {\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n } = newScreen;\n setSize({\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n });\n }\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return screen;\n}\nvar cachedScriptStatuses = /* @__PURE__ */ new Map();\nfunction getScriptNode(src) {\n const node = document.querySelector(\n `script[src=\"${src}\"]`\n );\n const status = node == null ? void 0 : node.getAttribute(\"data-status\");\n return {\n node,\n status\n };\n}\nfunction useScript(src, options) {\n const [status, setStatus] = useState(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return \"idle\";\n }\n if (typeof window === \"undefined\") {\n return \"loading\";\n }\n return cachedScriptStatuses.get(src) ?? \"loading\";\n });\n useEffect(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return;\n }\n const cachedScriptStatus = cachedScriptStatuses.get(src);\n if (cachedScriptStatus === \"ready\" || cachedScriptStatus === \"error\") {\n setStatus(cachedScriptStatus);\n return;\n }\n const script = getScriptNode(src);\n let scriptNode = script.node;\n if (!scriptNode) {\n scriptNode = document.createElement(\"script\");\n scriptNode.src = src;\n scriptNode.async = true;\n if (options == null ? void 0 : options.id) {\n scriptNode.id = options.id;\n }\n scriptNode.setAttribute(\"data-status\", \"loading\");\n document.body.appendChild(scriptNode);\n const setAttributeFromEvent = (event) => {\n const scriptStatus = event.type === \"load\" ? \"ready\" : \"error\";\n scriptNode == null ? void 0 : scriptNode.setAttribute(\"data-status\", scriptStatus);\n };\n scriptNode.addEventListener(\"load\", setAttributeFromEvent);\n scriptNode.addEventListener(\"error\", setAttributeFromEvent);\n } else {\n setStatus(script.status ?? cachedScriptStatus ?? \"loading\");\n }\n const setStateFromEvent = (event) => {\n const newStatus = event.type === \"load\" ? \"ready\" : \"error\";\n setStatus(newStatus);\n cachedScriptStatuses.set(src, newStatus);\n };\n scriptNode.addEventListener(\"load\", setStateFromEvent);\n scriptNode.addEventListener(\"error\", setStateFromEvent);\n return () => {\n if (scriptNode) {\n scriptNode.removeEventListener(\"load\", setStateFromEvent);\n scriptNode.removeEventListener(\"error\", setStateFromEvent);\n }\n if (scriptNode && (options == null ? void 0 : options.removeOnUnmount)) {\n scriptNode.remove();\n cachedScriptStatuses.delete(src);\n }\n };\n }, [src, options == null ? void 0 : options.shouldPreventLoad, options == null ? void 0 : options.removeOnUnmount, options == null ? void 0 : options.id]);\n return status;\n}\nvar IS_SERVER5 = typeof window === \"undefined\";\nfunction useScrollLock(options = {}) {\n const { autoLock = true, lockTarget, widthReflow = true } = options;\n const [isLocked, setIsLocked] = useState(false);\n const target = useRef(null);\n const originalStyle = useRef(null);\n const lock = () => {\n if (target.current) {\n const { overflow, paddingRight } = target.current.style;\n originalStyle.current = { overflow, paddingRight };\n if (widthReflow) {\n const offsetWidth = target.current === document.body ? window.innerWidth : target.current.offsetWidth;\n const currentPaddingRight = parseInt(window.getComputedStyle(target.current).paddingRight, 10) || 0;\n const scrollbarWidth = offsetWidth - target.current.scrollWidth;\n target.current.style.paddingRight = `${scrollbarWidth + currentPaddingRight}px`;\n }\n target.current.style.overflow = \"hidden\";\n setIsLocked(true);\n }\n };\n const unlock = () => {\n if (target.current && originalStyle.current) {\n target.current.style.overflow = originalStyle.current.overflow;\n if (widthReflow) {\n target.current.style.paddingRight = originalStyle.current.paddingRight;\n }\n }\n setIsLocked(false);\n };\n useIsomorphicLayoutEffect(() => {\n if (IS_SERVER5)\n return;\n if (lockTarget) {\n target.current = typeof lockTarget === \"string\" ? document.querySelector(lockTarget) : lockTarget;\n }\n if (!target.current) {\n target.current = document.body;\n }\n if (autoLock) {\n lock();\n }\n return () => {\n unlock();\n };\n }, [autoLock, lockTarget, widthReflow]);\n return { isLocked, lock, unlock };\n}\nvar IS_SERVER6 = typeof window === \"undefined\";\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER6) {\n return initialValueToUse;\n }\n try {\n const raw = window.sessionStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading sessionStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER6) {\n console.warn(\n `Tried setting sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.sessionStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting sessionStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if ((event == null ? void 0 : event.key) && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"session-storage\", handleStorageChange);\n return [storedValue, setValue];\n}\n\n// src/useSsr/useSsr.ts\nfunction useSsr() {\n var _a;\n const isDOM = (\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n typeof window !== \"undefined\" && !!((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement)\n );\n return {\n isBrowser: isDOM,\n isServer: !isDOM\n };\n}\nfunction useStep(maxStep) {\n const [currentStep, setCurrentStep] = useState(1);\n const canGoToNextStep = currentStep + 1 <= maxStep;\n const canGoToPrevStep = currentStep - 1 > 0;\n const setStep = useCallback(\n (step) => {\n const newStep = step instanceof Function ? step(currentStep) : step;\n if (newStep >= 1 && newStep <= maxStep) {\n setCurrentStep(newStep);\n return;\n }\n throw new Error(\"Step not valid\");\n },\n [maxStep, currentStep]\n );\n const goToNextStep = useCallback(() => {\n if (canGoToNextStep) {\n setCurrentStep((step) => step + 1);\n }\n }, [canGoToNextStep]);\n const goToPrevStep = useCallback(() => {\n if (canGoToPrevStep) {\n setCurrentStep((step) => step - 1);\n }\n }, [canGoToPrevStep]);\n const reset = useCallback(() => {\n setCurrentStep(1);\n }, []);\n return [\n currentStep,\n {\n goToNextStep,\n goToPrevStep,\n canGoToNextStep,\n canGoToPrevStep,\n setStep,\n reset\n }\n ];\n}\n\n// src/useTernaryDarkMode/useTernaryDarkMode.ts\nvar COLOR_SCHEME_QUERY2 = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY2 = \"usehooks-ts-ternary-dark-mode\";\nfunction useTernaryDarkMode(options) {\n const defaultValue = typeof options === \"string\" ? \"system\" : (options == null ? void 0 : options.defaultValue) ?? \"system\";\n const localStorageKey = typeof options === \"string\" ? options : (options == null ? void 0 : options.localStorageKey) ?? LOCAL_STORAGE_KEY2;\n const initializeWithValue = typeof options === \"string\" ? void 0 : (options == null ? void 0 : options.initializeWithValue) ?? void 0;\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY2, { initializeWithValue });\n const [mode, setMode] = useLocalStorage(localStorageKey, defaultValue, {\n initializeWithValue\n });\n const isDarkMode = mode === \"dark\" || mode === \"system\" && isDarkOS;\n const toggleTernaryDarkMode = () => {\n const modes = [\"light\", \"system\", \"dark\"];\n setMode((prevMode) => {\n const nextIndex = (modes.indexOf(prevMode) + 1) % modes.length;\n return modes[nextIndex];\n });\n };\n return {\n isDarkMode,\n ternaryDarkMode: mode,\n setTernaryDarkMode: setMode,\n toggleTernaryDarkMode\n };\n}\nfunction useTimeout(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (!delay && delay !== 0) {\n return;\n }\n const id = setTimeout(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearTimeout(id);\n };\n }, [delay]);\n}\nfunction useToggle(defaultValue) {\n const [value, setValue] = useState(!!defaultValue);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return [value, toggle, setValue];\n}\nfunction useUpdateEffect(effect, deps) {\n const isFirst = useIsFirstRender();\n useEffect(() => {\n if (!isFirst) {\n return effect();\n }\n }, deps);\n}\nvar IS_SERVER7 = typeof window === \"undefined\";\nfunction useWindowSize(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER7) {\n initializeWithValue = false;\n }\n const [windowSize, setWindowSize] = useState(() => {\n if (initializeWithValue) {\n return {\n width: window.innerWidth,\n height: window.innerHeight\n };\n }\n return {\n width: void 0,\n height: void 0\n };\n });\n const debouncedSetWindowSize = useDebounceCallback(\n setWindowSize,\n options == null ? void 0 : options.debounceDelay\n );\n function handleSize() {\n const setSize = (options == null ? void 0 : options.debounceDelay) ? debouncedSetWindowSize : setWindowSize;\n setSize({\n width: window.innerWidth,\n height: window.innerHeight\n });\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return windowSize;\n}\n\nexport { useBoolean, useClickAnyWhere, useCopyToClipboard, useCountdown, useCounter, useDarkMode, useDebounce, useDebounceCallback, useDebounceValue, useDocumentTitle, useEffectOnce, useElementSize, useEventCallback, useEventListener, useFetch, useHover, useImageOnLoad, useIntersectionObserver, useInterval, useIsClient, useIsFirstRender, useIsMounted, useIsomorphicLayoutEffect, useLocalStorage, useLockedBody, useMap, useMediaQuery, useOnClickOutside, useReadLocalStorage, useResizeObserver, useScreen, useScript, useScrollLock, useSessionStorage, useSsr, useStep, useTernaryDarkMode, useTimeout, useToggle, useUnmount, useUpdateEffect, useWindowSize };\n","/* eslint-disable no-console */\nimport {\n Dispatch,\n SetStateAction,\n useCallback,\n useEffect,\n useState,\n} from 'react'\n\nimport { useEventCallback, useEventListener } from 'usehooks-ts'\n\ndeclare global {\n interface WindowEventMap {\n 'local-storage': CustomEvent;\n }\n}\n\ntype SetValue = Dispatch>\n\nfunction useLocalStorage(key: string, initialValue: T): [T, SetValue] {\n const readValue = useCallback((): T => {\n if (typeof window === 'undefined') {\n return initialValue\n }\n\n try {\n const item = window.localStorage.getItem(key)\n return item ? (JSON.parse(item) as T) : initialValue\n } catch (error) {\n console.warn(`Error reading localStorage key “${key}”:`, error)\n return initialValue\n }\n }, [initialValue, key])\n\n const [storedValue, setStoredValue] = useState(readValue)\n\n const setValue: SetValue = useEventCallback((value) => {\n // Prevent build error \"window is undefined\" but keeps working\n if (typeof window === 'undefined') {\n console.warn(\n `Tried setting localStorage key “${key}” even though environment is not a client`,\n )\n }\n\n try {\n const newValue = value instanceof Function ? value(storedValue) : value\n window.localStorage.setItem(key, JSON.stringify(newValue))\n setStoredValue(newValue)\n window.dispatchEvent(new Event('local-storage'))\n } catch (error) {\n console.warn(`Error setting localStorage key “${key}”:`, error)\n }\n })\n\n useEffect(() => {\n setStoredValue(readValue())\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const handleStorageChange = useCallback(\n (event: StorageEvent | CustomEvent) => {\n if ((event as StorageEvent)?.key && (event as StorageEvent).key !== key) {\n return\n }\n setStoredValue(readValue())\n },\n [key, readValue],\n )\n\n useEventListener('storage', handleStorageChange)\n useEventListener('local-storage', handleStorageChange)\n\n return [storedValue, setValue]\n}\n\nexport default useLocalStorage\n","import * as React from 'react';\nconst ThemeContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'ThemeContext';\n}\nexport default ThemeContext;","import * as React from 'react';\nimport ThemeContext from './ThemeContext';\nexport default function useTheme() {\n const theme = React.useContext(ThemeContext);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n return theme;\n}","const hasSymbol = typeof Symbol === 'function' && Symbol.for;\nexport default hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@mui/utils';\nimport ThemeContext from '../useTheme/ThemeContext';\nimport useTheme from '../useTheme';\nimport nested from './nested';\n\n// To support composition of theme.\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(outerTheme);\n if (process.env.NODE_ENV !== 'production') {\n if (!mergedTheme) {\n console.error(['MUI: You should return an object from your theme function, i.e.', ' ({})} />'].join('\\n'));\n }\n }\n return mergedTheme;\n }\n return _extends({}, outerTheme, localTheme);\n}\n\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme\n } = props;\n const outerTheme = useTheme();\n if (process.env.NODE_ENV !== 'production') {\n if (outerTheme === null && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', ' outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const theme = React.useMemo(() => {\n const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);\n if (output != null) {\n output[nested] = outerTheme !== null;\n }\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/_jsx(ThemeContext.Provider, {\n value: theme,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeProvider as MuiThemeProvider, useTheme as usePrivateTheme } from '@mui/private-theming';\nimport exactProp from '@mui/utils/exactProp';\nimport { ThemeContext as StyledEngineThemeContext } from '@mui/styled-engine';\nimport useThemeWithoutDefault from '../useThemeWithoutDefault';\nimport RtlProvider from '../RtlProvider';\nimport DefaultPropsProvider from '../DefaultPropsProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst EMPTY_THEME = {};\nfunction useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {\n return React.useMemo(() => {\n const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(resolvedTheme);\n const result = themeId ? _extends({}, upperTheme, {\n [themeId]: mergedTheme\n }) : mergedTheme;\n // must return a function for the private theme to NOT merge with the upper theme.\n // see the test case \"use provided theme from a callback\" in ThemeProvider.test.js\n if (isPrivate) {\n return () => result;\n }\n return result;\n }\n return themeId ? _extends({}, upperTheme, {\n [themeId]: localTheme\n }) : _extends({}, upperTheme, localTheme);\n }, [themeId, upperTheme, localTheme, isPrivate]);\n}\n\n/**\n * This component makes the `theme` available down the React tree.\n * It should preferably be used at **the root of your component tree**.\n *\n * // existing use case\n * // theme scoping\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme,\n themeId\n } = props;\n const upperTheme = useThemeWithoutDefault(EMPTY_THEME);\n const upperPrivateTheme = usePrivateTheme() || EMPTY_THEME;\n if (process.env.NODE_ENV !== 'production') {\n if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', ' outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);\n const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);\n const rtlValue = engineTheme.direction === 'rtl';\n return /*#__PURE__*/_jsx(MuiThemeProvider, {\n theme: privateTheme,\n children: /*#__PURE__*/_jsx(StyledEngineThemeContext.Provider, {\n value: engineTheme,\n children: /*#__PURE__*/_jsx(RtlProvider, {\n value: rtlValue,\n children: /*#__PURE__*/_jsx(DefaultPropsProvider, {\n value: engineTheme == null ? void 0 : engineTheme.components,\n children: children\n })\n })\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,\n /**\n * The design system's unique id for getting the corresponded theme when there are multiple design systems.\n */\n themeId: PropTypes.string\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"theme\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeProvider as SystemThemeProvider } from '@mui/system';\nimport THEME_ID from './identifier';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function ThemeProvider(_ref) {\n let {\n theme: themeInput\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n const scopedTheme = themeInput[THEME_ID];\n return /*#__PURE__*/_jsx(SystemThemeProvider, _extends({}, props, {\n themeId: scopedTheme ? THEME_ID : undefined,\n theme: scopedTheme || themeInput\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired\n} : void 0;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useDefaultProps } from '../DefaultPropsProvider';\nimport GlobalStyles from '../GlobalStyles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const html = (theme, enableColorScheme) => _extends({\n WebkitFontSmoothing: 'antialiased',\n // Antialiasing.\n MozOsxFontSmoothing: 'grayscale',\n // Antialiasing.\n // Change from `box-sizing: content-box` so that `width`\n // is not affected by `padding` or `border`.\n boxSizing: 'border-box',\n // Fix font resize problem in iOS\n WebkitTextSizeAdjust: '100%'\n}, enableColorScheme && !theme.vars && {\n colorScheme: theme.palette.mode\n});\nexport const body = theme => _extends({\n color: (theme.vars || theme).palette.text.primary\n}, theme.typography.body1, {\n backgroundColor: (theme.vars || theme).palette.background.default,\n '@media print': {\n // Save printer ink.\n backgroundColor: (theme.vars || theme).palette.common.white\n }\n});\nexport const styles = (theme, enableColorScheme = false) => {\n var _theme$components;\n const colorSchemeStyles = {};\n if (enableColorScheme && theme.colorSchemes) {\n Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {\n var _scheme$palette;\n colorSchemeStyles[theme.getColorSchemeSelector(key).replace(/\\s*&/, '')] = {\n colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode\n };\n });\n }\n let defaultStyles = _extends({\n html: html(theme, enableColorScheme),\n '*, *::before, *::after': {\n boxSizing: 'inherit'\n },\n 'strong, b': {\n fontWeight: theme.typography.fontWeightBold\n },\n body: _extends({\n margin: 0\n }, body(theme), {\n // Add support for document.body.requestFullScreen().\n // Other elements, if background transparent, are not supported.\n '&::backdrop': {\n backgroundColor: (theme.vars || theme).palette.background.default\n }\n })\n }, colorSchemeStyles);\n const themeOverrides = (_theme$components = theme.components) == null || (_theme$components = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components.styleOverrides;\n if (themeOverrides) {\n defaultStyles = [defaultStyles, themeOverrides];\n }\n return defaultStyles;\n};\n\n/**\n * Kickstart an elegant, consistent, and simple baseline to build upon.\n */\nfunction CssBaseline(inProps) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiCssBaseline'\n });\n const {\n children,\n enableColorScheme = false\n } = props;\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(GlobalStyles, {\n styles: theme => styles(theme, enableColorScheme)\n }), children]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? CssBaseline.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * You can wrap a node.\n */\n children: PropTypes.node,\n /**\n * Enable `color-scheme` CSS property to use `theme.palette.mode`.\n * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme\n * For browser support, check out https://caniuse.com/?search=color-scheme\n * @default false\n */\n enableColorScheme: PropTypes.bool\n} : void 0;\nexport default CssBaseline;","import type { PaletteMode, ThemeOptions } from '@mui/material';\n\nconst breakpoints = {\n values: {\n xs: 0,\n sm: 640,\n md: 810,\n lg: 1200,\n xl: 1500,\n },\n};\n\nconst fontFamily = 'Inter Variable';\nconst typography = {\n fontFamily: fontFamily,\n h1: {\n fontFamily: fontFamily,\n },\n h2: {\n fontFamily: fontFamily,\n },\n h3: {\n fontFamily: fontFamily,\n },\n h4: {\n fontFamily: fontFamily,\n },\n h5: {\n fontFamily: fontFamily,\n },\n h6: {\n fontFamily: fontFamily,\n fontWeight: 700,\n },\n};\n\nconst settings = {\n light: {\n palette: {\n mode: 'light',\n background: {\n default: '#FFFFFF',\n },\n primary: {\n main: '#00782A',\n },\n secondary: {\n main: '#F5A302',\n },\n text: {\n primary: '#000000',\n secondary: '#F5A302',\n },\n },\n typography,\n components: {},\n breakpoints,\n },\n};\n\nconst getThemeOptions = (mode: PaletteMode) =>\n settings['light'] as ThemeOptions;\n\nexport default getThemeOptions;\n","import {\n createContext,\n ReactElement,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport useLocalStorage from '@/hooks/use-local-storage';\nimport type {\n PaletteMode,\n ThemeOptions,\n} from '@mui/material';\nimport {\n createTheme,\n CssBaseline,\n ThemeProvider,\n} from '@mui/material';\n\nimport getThemeOptions from './options';\n\ninterface ThemeContextValues {\n themeMode: PaletteMode;\n themeOptions: ThemeOptions;\n toggleThemeMode: (newMode?: PaletteMode) => void;\n}\n\nconst ThemeContext = createContext({} as ThemeContextValues)\n\nconst localStorageThemeModeKeyName = 'THEME_MODE'\n\nfunction Provider({ children }: HocProps): ReactElement {\n const preferredMode = 'light'\n const [savedThemeMode, setSavedThemeMode] = useLocalStorage(localStorageThemeModeKeyName, preferredMode)\n const [mode, setMode] = useState((savedThemeMode as PaletteMode) ?? preferredMode)\n\n const contextValues = useMemo(() => {\n const themeOptions = createTheme(getThemeOptions(mode))\n return {\n themeMode: mode,\n themeOptions,\n toggleThemeMode: (newMode?: PaletteMode) => {\n setMode(\n (prevMode: PaletteMode) =>\n (newMode as PaletteMode) ?? (prevMode === 'light' ? 'dark' : 'light'),\n )\n },\n }\n }, [mode])\n\n useEffect(() => {\n document.documentElement.setAttribute('data-theme', mode)\n if (mode === 'dark') {\n document.documentElement.classList.add('dark')\n } else {\n document.documentElement.classList.remove('dark')\n }\n setSavedThemeMode(mode)\n }, [mode, setSavedThemeMode])\n\n return (\n \n \n \n {children}\n \n \n )\n}\n\nexport default Provider\n","export var WalletAdapterNetwork;\n(function (WalletAdapterNetwork) {\n WalletAdapterNetwork[\"Mainnet\"] = \"mainnet-beta\";\n WalletAdapterNetwork[\"Testnet\"] = \"testnet\";\n WalletAdapterNetwork[\"Devnet\"] = \"devnet\";\n})(WalletAdapterNetwork || (WalletAdapterNetwork = {}));\n//# sourceMappingURL=types.js.map","import { createContext, useContext } from 'react';\nexport const ConnectionContext = createContext({});\nexport function useConnection() {\n return useContext(ConnectionContext);\n}\n//# sourceMappingURL=useConnection.js.map","import { Connection } from '@solana/web3.js';\nimport React, { useMemo } from 'react';\nimport { ConnectionContext } from './useConnection.js';\nexport const ConnectionProvider = ({ children, endpoint, config = { commitment: 'confirmed' }, }) => {\n const connection = useMemo(() => new Connection(endpoint, config), [endpoint, config]);\n return React.createElement(ConnectionContext.Provider, { value: { connection } }, children);\n};\n//# sourceMappingURL=ConnectionProvider.js.map","export class WalletError extends Error {\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n constructor(message, error) {\n super(message);\n this.error = error;\n }\n}\nexport class WalletNotReadyError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotReadyError';\n }\n}\nexport class WalletLoadError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletLoadError';\n }\n}\nexport class WalletConfigError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletConfigError';\n }\n}\nexport class WalletConnectionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletConnectionError';\n }\n}\nexport class WalletDisconnectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletDisconnectedError';\n }\n}\nexport class WalletDisconnectionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletDisconnectionError';\n }\n}\nexport class WalletAccountError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletAccountError';\n }\n}\nexport class WalletPublicKeyError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletPublicKeyError';\n }\n}\nexport class WalletKeypairError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletKeypairError';\n }\n}\nexport class WalletNotConnectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotConnectedError';\n }\n}\nexport class WalletSendTransactionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSendTransactionError';\n }\n}\nexport class WalletSignTransactionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignTransactionError';\n }\n}\nexport class WalletSignMessageError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignMessageError';\n }\n}\nexport class WalletSignInError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignInError';\n }\n}\nexport class WalletTimeoutError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletTimeoutError';\n }\n}\nexport class WalletWindowBlockedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletWindowBlockedError';\n }\n}\nexport class WalletWindowClosedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletWindowClosedError';\n }\n}\n//# sourceMappingURL=errors.js.map","import EventEmitter from 'eventemitter3';\nimport { WalletNotConnectedError } from './errors.js';\nexport { EventEmitter };\n/**\n * A wallet's readiness describes a series of states that the wallet can be in,\n * depending on what kind of wallet it is. An installable wallet (eg. a browser\n * extension like Phantom) might be `Installed` if we've found the Phantom API\n * in the global scope, or `NotDetected` otherwise. A loadable, zero-install\n * runtime (eg. Torus Wallet) might simply signal that it's `Loadable`. Use this\n * metadata to personalize the wallet list for each user (eg. to show their\n * installed wallets first).\n */\nexport var WalletReadyState;\n(function (WalletReadyState) {\n /**\n * User-installable wallets can typically be detected by scanning for an API\n * that they've injected into the global context. If such an API is present,\n * we consider the wallet to have been installed.\n */\n WalletReadyState[\"Installed\"] = \"Installed\";\n WalletReadyState[\"NotDetected\"] = \"NotDetected\";\n /**\n * Loadable wallets are always available to you. Since you can load them at\n * any time, it's meaningless to say that they have been detected.\n */\n WalletReadyState[\"Loadable\"] = \"Loadable\";\n /**\n * If a wallet is not supported on a given platform (eg. server-rendering, or\n * mobile) then it will stay in the `Unsupported` state.\n */\n WalletReadyState[\"Unsupported\"] = \"Unsupported\";\n})(WalletReadyState || (WalletReadyState = {}));\nexport class BaseWalletAdapter extends EventEmitter {\n get connected() {\n return !!this.publicKey;\n }\n async autoConnect() {\n await this.connect();\n }\n async prepareTransaction(transaction, connection, options = {}) {\n const publicKey = this.publicKey;\n if (!publicKey)\n throw new WalletNotConnectedError();\n transaction.feePayer = transaction.feePayer || publicKey;\n transaction.recentBlockhash =\n transaction.recentBlockhash ||\n (await connection.getLatestBlockhash({\n commitment: options.preflightCommitment,\n minContextSlot: options.minContextSlot,\n })).blockhash;\n return transaction;\n }\n}\nexport function scopePollingDetectionStrategy(detect) {\n // Early return when server-side rendering\n if (typeof window === 'undefined' || typeof document === 'undefined')\n return;\n const disposers = [];\n function detectAndDispose() {\n const detected = detect();\n if (detected) {\n for (const dispose of disposers) {\n dispose();\n }\n }\n }\n // Strategy #1: Try detecting every second.\n const interval = \n // TODO: #334 Replace with idle callback strategy.\n setInterval(detectAndDispose, 1000);\n disposers.push(() => clearInterval(interval));\n // Strategy #2: Detect as soon as the DOM becomes 'ready'/'interactive'.\n if (\n // Implies that `DOMContentLoaded` has not yet fired.\n document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', detectAndDispose, { once: true });\n disposers.push(() => document.removeEventListener('DOMContentLoaded', detectAndDispose));\n }\n // Strategy #3: Detect after the `window` has fully loaded.\n if (\n // If the `complete` state has been reached, we're too late.\n document.readyState !== 'complete') {\n window.addEventListener('load', detectAndDispose, { once: true });\n disposers.push(() => window.removeEventListener('load', detectAndDispose));\n }\n // Strategy #4: Detect synchronously, now.\n detectAndDispose();\n}\n/**\n * Users on iOS can be redirected into a wallet's in-app browser automatically,\n * if that wallet has a universal link configured to do so\n * But should not be redirected from within a webview, eg. if they're already\n * inside a wallet's browser\n * This function can be used to identify users who are on iOS and can be redirected\n *\n * @returns true if the user can be redirected\n */\nexport function isIosAndRedirectable() {\n // SSR: return false\n if (!navigator)\n return false;\n const userAgent = navigator.userAgent.toLowerCase();\n // if on iOS the user agent will contain either iPhone or iPad\n // caveat: if requesting desktop site then this won't work\n const isIos = userAgent.includes('iphone') || userAgent.includes('ipad');\n // if in a webview then it will not include Safari\n // note that other iOS browsers also include Safari\n // so we will redirect only if Safari is also included\n const isSafari = userAgent.includes('safari');\n return isIos && isSafari;\n}\n//# sourceMappingURL=adapter.js.map","export function isVersionedTransaction(transaction) {\n return 'version' in transaction;\n}\n//# sourceMappingURL=transaction.js.map","import { BaseWalletAdapter, } from './adapter.js';\nimport { WalletSendTransactionError, WalletSignTransactionError } from './errors.js';\nimport { isVersionedTransaction } from './transaction.js';\nexport class BaseSignerWalletAdapter extends BaseWalletAdapter {\n async sendTransaction(transaction, connection, options = {}) {\n let emit = true;\n try {\n if (isVersionedTransaction(transaction)) {\n if (!this.supportedTransactionVersions)\n throw new WalletSendTransactionError(`Sending versioned transactions isn't supported by this wallet`);\n if (!this.supportedTransactionVersions.has(transaction.version))\n throw new WalletSendTransactionError(`Sending transaction version ${transaction.version} isn't supported by this wallet`);\n try {\n transaction = await this.signTransaction(transaction);\n const rawTransaction = transaction.serialize();\n return await connection.sendRawTransaction(rawTransaction, options);\n }\n catch (error) {\n // If the error was thrown by `signTransaction`, rethrow it and don't emit a duplicate event\n if (error instanceof WalletSignTransactionError) {\n emit = false;\n throw error;\n }\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n else {\n try {\n const { signers, ...sendOptions } = options;\n transaction = await this.prepareTransaction(transaction, connection, sendOptions);\n signers?.length && transaction.partialSign(...signers);\n transaction = await this.signTransaction(transaction);\n const rawTransaction = transaction.serialize();\n return await connection.sendRawTransaction(rawTransaction, sendOptions);\n }\n catch (error) {\n // If the error was thrown by `signTransaction`, rethrow it and don't emit a duplicate event\n if (error instanceof WalletSignTransactionError) {\n emit = false;\n throw error;\n }\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n }\n catch (error) {\n if (emit) {\n this.emit('error', error);\n }\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n for (const transaction of transactions) {\n if (isVersionedTransaction(transaction)) {\n if (!this.supportedTransactionVersions)\n throw new WalletSignTransactionError(`Signing versioned transactions isn't supported by this wallet`);\n if (!this.supportedTransactionVersions.has(transaction.version))\n throw new WalletSignTransactionError(`Signing transaction version ${transaction.version} isn't supported by this wallet`);\n }\n }\n const signedTransactions = [];\n for (const transaction of transactions) {\n signedTransactions.push(await this.signTransaction(transaction));\n }\n return signedTransactions;\n }\n}\nexport class BaseMessageSignerWalletAdapter extends BaseSignerWalletAdapter {\n}\nexport class BaseSignInMessageSignerWalletAdapter extends BaseMessageSignerWalletAdapter {\n}\n//# sourceMappingURL=signer.js.map","import { verifyMessageSignature } from './signMessage.js';\nimport { arraysEqual } from './util.js';\n/**\n * TODO: docs\n */\nexport function verifySignIn(input, output) {\n const { signedMessage, signature, account: { publicKey }, } = output;\n const message = deriveSignInMessage(input, output);\n return !!message && verifyMessageSignature({ message, signedMessage, signature, publicKey });\n}\n/**\n * TODO: docs\n */\nexport function deriveSignInMessage(input, output) {\n const text = deriveSignInMessageText(input, output);\n if (!text)\n return null;\n return new TextEncoder().encode(text);\n}\n/**\n * TODO: docs\n */\nexport function deriveSignInMessageText(input, output) {\n const parsed = parseSignInMessage(output.signedMessage);\n if (!parsed)\n return null;\n if (input.domain && input.domain !== parsed.domain)\n return null;\n if (input.address && input.address !== parsed.address)\n return null;\n if (input.statement !== parsed.statement)\n return null;\n if (input.uri !== parsed.uri)\n return null;\n if (input.version !== parsed.version)\n return null;\n if (input.chainId !== parsed.chainId)\n return null;\n if (input.nonce !== parsed.nonce)\n return null;\n if (input.issuedAt !== parsed.issuedAt)\n return null;\n if (input.expirationTime !== parsed.expirationTime)\n return null;\n if (input.notBefore !== parsed.notBefore)\n return null;\n if (input.requestId !== parsed.requestId)\n return null;\n if (input.resources) {\n if (!parsed.resources)\n return null;\n if (!arraysEqual(input.resources, parsed.resources))\n return null;\n }\n else if (parsed.resources)\n return null;\n return createSignInMessageText(parsed);\n}\n/**\n * TODO: docs\n */\nexport function parseSignInMessage(message) {\n const text = new TextDecoder().decode(message);\n return parseSignInMessageText(text);\n}\n// TODO: implement https://github.com/solana-labs/solana/blob/master/docs/src/proposals/off-chain-message-signing.md\nconst DOMAIN = '(?[^\\\\n]+?) wants you to sign in with your Solana account:\\\\n';\nconst ADDRESS = '(?
[^\\\\n]+)(?:\\\\n|$)';\nconst STATEMENT = '(?:\\\\n(?[\\\\S\\\\s]*?)(?:\\\\n|$))??';\nconst URI = '(?:\\\\nURI: (?[^\\\\n]+))?';\nconst VERSION = '(?:\\\\nVersion: (?[^\\\\n]+))?';\nconst CHAIN_ID = '(?:\\\\nChain ID: (?[^\\\\n]+))?';\nconst NONCE = '(?:\\\\nNonce: (?[^\\\\n]+))?';\nconst ISSUED_AT = '(?:\\\\nIssued At: (?[^\\\\n]+))?';\nconst EXPIRATION_TIME = '(?:\\\\nExpiration Time: (?[^\\\\n]+))?';\nconst NOT_BEFORE = '(?:\\\\nNot Before: (?[^\\\\n]+))?';\nconst REQUEST_ID = '(?:\\\\nRequest ID: (?[^\\\\n]+))?';\nconst RESOURCES = '(?:\\\\nResources:(?(?:\\\\n- [^\\\\n]+)*))?';\nconst FIELDS = `${URI}${VERSION}${CHAIN_ID}${NONCE}${ISSUED_AT}${EXPIRATION_TIME}${NOT_BEFORE}${REQUEST_ID}${RESOURCES}`;\nconst MESSAGE = new RegExp(`^${DOMAIN}${ADDRESS}${STATEMENT}${FIELDS}\\\\n*$`);\n/**\n * TODO: docs\n */\nexport function parseSignInMessageText(text) {\n const match = MESSAGE.exec(text);\n if (!match)\n return null;\n const groups = match.groups;\n if (!groups)\n return null;\n return {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n domain: groups.domain,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n address: groups.address,\n statement: groups.statement,\n uri: groups.uri,\n version: groups.version,\n nonce: groups.nonce,\n chainId: groups.chainId,\n issuedAt: groups.issuedAt,\n expirationTime: groups.expirationTime,\n notBefore: groups.notBefore,\n requestId: groups.requestId,\n resources: groups.resources?.split('\\n- ').slice(1),\n };\n}\n/**\n * TODO: docs\n */\nexport function createSignInMessage(input) {\n const text = createSignInMessageText(input);\n return new TextEncoder().encode(text);\n}\n/**\n * TODO: docs\n */\nexport function createSignInMessageText(input) {\n // ${domain} wants you to sign in with your Solana account:\n // ${address}\n //\n // ${statement}\n //\n // URI: ${uri}\n // Version: ${version}\n // Chain ID: ${chain}\n // Nonce: ${nonce}\n // Issued At: ${issued-at}\n // Expiration Time: ${expiration-time}\n // Not Before: ${not-before}\n // Request ID: ${request-id}\n // Resources:\n // - ${resources[0]}\n // - ${resources[1]}\n // ...\n // - ${resources[n]}\n let message = `${input.domain} wants you to sign in with your Solana account:\\n`;\n message += `${input.address}`;\n if (input.statement) {\n message += `\\n\\n${input.statement}`;\n }\n const fields = [];\n if (input.uri) {\n fields.push(`URI: ${input.uri}`);\n }\n if (input.version) {\n fields.push(`Version: ${input.version}`);\n }\n if (input.chainId) {\n fields.push(`Chain ID: ${input.chainId}`);\n }\n if (input.nonce) {\n fields.push(`Nonce: ${input.nonce}`);\n }\n if (input.issuedAt) {\n fields.push(`Issued At: ${input.issuedAt}`);\n }\n if (input.expirationTime) {\n fields.push(`Expiration Time: ${input.expirationTime}`);\n }\n if (input.notBefore) {\n fields.push(`Not Before: ${input.notBefore}`);\n }\n if (input.requestId) {\n fields.push(`Request ID: ${input.requestId}`);\n }\n if (input.resources) {\n fields.push(`Resources:`);\n for (const resource of input.resources) {\n fields.push(`- ${resource}`);\n }\n }\n if (fields.length) {\n message += `\\n\\n${fields.join('\\n')}`;\n }\n return message;\n}\n//# sourceMappingURL=signIn.js.map","import { createSignInMessageText } from '@solana/wallet-standard-util';\n\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst SolanaMobileWalletAdapterErrorCode = {\n ERROR_ASSOCIATION_PORT_OUT_OF_RANGE: 'ERROR_ASSOCIATION_PORT_OUT_OF_RANGE',\n ERROR_FORBIDDEN_WALLET_BASE_URL: 'ERROR_FORBIDDEN_WALLET_BASE_URL',\n ERROR_SECURE_CONTEXT_REQUIRED: 'ERROR_SECURE_CONTEXT_REQUIRED',\n ERROR_SESSION_CLOSED: 'ERROR_SESSION_CLOSED',\n ERROR_SESSION_TIMEOUT: 'ERROR_SESSION_TIMEOUT',\n ERROR_WALLET_NOT_FOUND: 'ERROR_WALLET_NOT_FOUND',\n ERROR_INVALID_PROTOCOL_VERSION: 'ERROR_INVALID_PROTOCOL_VERSION',\n};\nclass SolanaMobileWalletAdapterError extends Error {\n constructor(...args) {\n const [code, message, data] = args;\n super(message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaMobileWalletAdapterError';\n }\n}\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst SolanaMobileWalletAdapterProtocolErrorCode = {\n // Keep these in sync with `mobilewalletadapter/common/ProtocolContract.java`.\n ERROR_AUTHORIZATION_FAILED: -1,\n ERROR_INVALID_PAYLOADS: -2,\n ERROR_NOT_SIGNED: -3,\n ERROR_NOT_SUBMITTED: -4,\n ERROR_TOO_MANY_PAYLOADS: -5,\n ERROR_ATTEST_ORIGIN_ANDROID: -100,\n};\nclass SolanaMobileWalletAdapterProtocolError extends Error {\n constructor(...args) {\n const [jsonRpcMessageId, code, message, data] = args;\n super(message);\n this.code = code;\n this.data = data;\n this.jsonRpcMessageId = jsonRpcMessageId;\n this.name = 'SolanaMobileWalletAdapterProtocolError';\n }\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction createHelloReq(ecdhPublicKey, associationKeypairPrivateKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const publicKeyBuffer = yield crypto.subtle.exportKey('raw', ecdhPublicKey);\n const signatureBuffer = yield crypto.subtle.sign({ hash: 'SHA-256', name: 'ECDSA' }, associationKeypairPrivateKey, publicKeyBuffer);\n const response = new Uint8Array(publicKeyBuffer.byteLength + signatureBuffer.byteLength);\n response.set(new Uint8Array(publicKeyBuffer), 0);\n response.set(new Uint8Array(signatureBuffer), publicKeyBuffer.byteLength);\n return response;\n });\n}\n\nfunction encode(input) {\n return window.btoa(input);\n}\n\nfunction createSIWSMessage(payload) {\n return createSignInMessageText(payload);\n}\nfunction createSIWSMessageBase64(payload) {\n return encode(createSIWSMessage(payload));\n}\n\n// optional features\nconst SolanaSignTransactions = 'solana:signTransactions';\nconst SolanaCloneAuthorization = 'solana:cloneAuthorization';\nconst SolanaSignInWithSolana = 'solana:signInWithSolana';\n\n/**\n * Creates a {@link MobileWallet} proxy that handles backwards compatibility and API to RPC conversion.\n *\n * @param protocolVersion the protocol version in use for this session/request\n * @param protocolRequestHandler callback function that handles sending the RPC request to the wallet endpoint.\n * @returns a {@link MobileWallet} proxy\n */\nfunction createMobileWalletProxy(protocolVersion, protocolRequestHandler) {\n return new Proxy({}, {\n get(target, p) {\n if (target[p] == null) {\n target[p] = function (inputParams) {\n return __awaiter(this, void 0, void 0, function* () {\n const { method, params } = handleMobileWalletRequest(p, inputParams, protocolVersion);\n const result = yield protocolRequestHandler(method, params);\n // if the request tried to sign in but the wallet did not return a sign in result, fallback on message signing\n if (method === 'authorize' && params.sign_in_payload && !result.sign_in_result) {\n result['sign_in_result'] = yield signInFallback(params.sign_in_payload, result, protocolRequestHandler);\n }\n return handleMobileWalletResponse(p, result, protocolVersion);\n });\n };\n }\n return target[p];\n },\n defineProperty() {\n return false;\n },\n deleteProperty() {\n return false;\n },\n });\n}\n/**\n * Handles all {@link MobileWallet} API requests and determines the correct MWA RPC method and params to call.\n * This handles backwards compatibility, based on the provided @protocolVersion.\n *\n * @param methodName the name of {@link MobileWallet} method that was called\n * @param methodParams the parameters that were passed to the method\n * @param protocolVersion the protocol version in use for this session/request\n * @returns the RPC request method and params that should be sent to the wallet endpoint\n */\nfunction handleMobileWalletRequest(methodName, methodParams, protocolVersion) {\n let params = methodParams;\n let method = methodName\n .toString()\n .replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)\n .toLowerCase();\n switch (methodName) {\n case 'authorize': {\n let { chain } = params;\n if (protocolVersion === 'legacy') {\n switch (chain) {\n case 'solana:testnet': {\n chain = 'testnet';\n break;\n }\n case 'solana:devnet': {\n chain = 'devnet';\n break;\n }\n case 'solana:mainnet': {\n chain = 'mainnet-beta';\n break;\n }\n default: {\n chain = params.cluster;\n }\n }\n params.cluster = chain;\n }\n else {\n switch (chain) {\n case 'testnet':\n case 'devnet': {\n chain = `solana:${chain}`;\n break;\n }\n case 'mainnet-beta': {\n chain = 'solana:mainnet';\n break;\n }\n }\n params.chain = chain;\n }\n }\n case 'reauthorize': {\n const { auth_token, identity } = params;\n if (auth_token) {\n switch (protocolVersion) {\n case 'legacy': {\n method = 'reauthorize';\n params = { auth_token: auth_token, identity: identity };\n break;\n }\n default: {\n method = 'authorize';\n break;\n }\n }\n }\n break;\n }\n }\n return { method, params };\n}\n/**\n * Handles all {@link MobileWallet} API responses and modifies the response for backwards compatibility, if needed\n *\n * @param method the {@link MobileWallet} method that was called\n * @param response the original response that was returned by the method call\n * @param protocolVersion the protocol version in use for this session/request\n * @returns the possibly modified response\n */\nfunction handleMobileWalletResponse(method, response, protocolVersion) {\n switch (method) {\n case 'getCapabilities': {\n const capabilities = response;\n switch (protocolVersion) {\n case 'legacy': {\n const features = [SolanaSignTransactions];\n if (capabilities.supports_clone_authorization === true) {\n features.push(SolanaCloneAuthorization);\n }\n return Object.assign(Object.assign({}, capabilities), { features: features });\n }\n case 'v1': {\n return Object.assign(Object.assign({}, capabilities), { supports_sign_and_send_transactions: true, supports_clone_authorization: capabilities.features.includes(SolanaCloneAuthorization) });\n }\n }\n }\n }\n return response;\n}\nfunction signInFallback(signInPayload, authorizationResult, protocolRequestHandler) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const domain = (_a = signInPayload.domain) !== null && _a !== void 0 ? _a : window.location.host;\n const address = authorizationResult.accounts[0].address;\n const siwsMessage = createSIWSMessageBase64(Object.assign(Object.assign({}, signInPayload), { domain, address }));\n const signMessageResult = yield protocolRequestHandler('sign_messages', {\n addresses: [address],\n payloads: [siwsMessage]\n });\n const signInResult = {\n address: address,\n signed_message: siwsMessage,\n signature: signMessageResult.signed_payloads[0].slice(siwsMessage.length)\n };\n return signInResult;\n });\n}\n\nconst SEQUENCE_NUMBER_BYTES = 4;\nfunction createSequenceNumberVector(sequenceNumber) {\n if (sequenceNumber >= 4294967296) {\n throw new Error('Outbound sequence number overflow. The maximum sequence number is 32-bytes.');\n }\n const byteArray = new ArrayBuffer(SEQUENCE_NUMBER_BYTES);\n const view = new DataView(byteArray);\n view.setUint32(0, sequenceNumber, /* littleEndian */ false);\n return new Uint8Array(byteArray);\n}\n\nconst INITIALIZATION_VECTOR_BYTES = 12;\nconst ENCODED_PUBLIC_KEY_LENGTH_BYTES = 65;\nfunction encryptMessage(plaintext, sequenceNumber, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = createSequenceNumberVector(sequenceNumber);\n const initializationVector = new Uint8Array(INITIALIZATION_VECTOR_BYTES);\n crypto.getRandomValues(initializationVector);\n const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, new TextEncoder().encode(plaintext));\n const response = new Uint8Array(sequenceNumberVector.byteLength + initializationVector.byteLength + ciphertext.byteLength);\n response.set(new Uint8Array(sequenceNumberVector), 0);\n response.set(new Uint8Array(initializationVector), sequenceNumberVector.byteLength);\n response.set(new Uint8Array(ciphertext), sequenceNumberVector.byteLength + initializationVector.byteLength);\n return response;\n });\n}\nfunction decryptMessage(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = message.slice(0, SEQUENCE_NUMBER_BYTES);\n const initializationVector = message.slice(SEQUENCE_NUMBER_BYTES, SEQUENCE_NUMBER_BYTES + INITIALIZATION_VECTOR_BYTES);\n const ciphertext = message.slice(SEQUENCE_NUMBER_BYTES + INITIALIZATION_VECTOR_BYTES);\n const plaintextBuffer = yield crypto.subtle.decrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, ciphertext);\n const plaintext = getUtf8Decoder().decode(plaintextBuffer);\n return plaintext;\n });\n}\nfunction getAlgorithmParams(sequenceNumber, initializationVector) {\n return {\n additionalData: sequenceNumber,\n iv: initializationVector,\n name: 'AES-GCM',\n tagLength: 128, // 16 byte tag => 128 bits\n };\n}\nlet _utf8Decoder;\nfunction getUtf8Decoder() {\n if (_utf8Decoder === undefined) {\n _utf8Decoder = new TextDecoder('utf-8');\n }\n return _utf8Decoder;\n}\n\nfunction generateAssociationKeypair() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield crypto.subtle.generateKey({\n name: 'ECDSA',\n namedCurve: 'P-256',\n }, false /* extractable */, ['sign'] /* keyUsages */);\n });\n}\n\nfunction generateECDHKeypair() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield crypto.subtle.generateKey({\n name: 'ECDH',\n namedCurve: 'P-256',\n }, false /* extractable */, ['deriveKey', 'deriveBits'] /* keyUsages */);\n });\n}\n\nfunction encryptJsonRpcMessage(jsonRpcMessage, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = JSON.stringify(jsonRpcMessage);\n const sequenceNumber = jsonRpcMessage.id;\n return encryptMessage(plaintext, sequenceNumber, sharedSecret);\n });\n}\nfunction decryptJsonRpcMessage(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = yield decryptMessage(message, sharedSecret);\n const jsonRpcMessage = JSON.parse(plaintext);\n if (Object.hasOwnProperty.call(jsonRpcMessage, 'error')) {\n throw new SolanaMobileWalletAdapterProtocolError(jsonRpcMessage.id, jsonRpcMessage.error.code, jsonRpcMessage.error.message);\n }\n return jsonRpcMessage;\n });\n}\n\nfunction parseHelloRsp(payloadBuffer, // The X9.62-encoded wallet endpoint ephemeral ECDH public keypoint.\nassociationPublicKey, ecdhPrivateKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const [associationPublicKeyBuffer, walletPublicKey] = yield Promise.all([\n crypto.subtle.exportKey('raw', associationPublicKey),\n crypto.subtle.importKey('raw', payloadBuffer.slice(0, ENCODED_PUBLIC_KEY_LENGTH_BYTES), { name: 'ECDH', namedCurve: 'P-256' }, false /* extractable */, [] /* keyUsages */),\n ]);\n const sharedSecret = yield crypto.subtle.deriveBits({ name: 'ECDH', public: walletPublicKey }, ecdhPrivateKey, 256);\n const ecdhSecretKey = yield crypto.subtle.importKey('raw', sharedSecret, 'HKDF', false /* extractable */, ['deriveKey'] /* keyUsages */);\n const aesKeyMaterialVal = yield crypto.subtle.deriveKey({\n name: 'HKDF',\n hash: 'SHA-256',\n salt: new Uint8Array(associationPublicKeyBuffer),\n info: new Uint8Array(),\n }, ecdhSecretKey, { name: 'AES-GCM', length: 128 }, false /* extractable */, ['encrypt', 'decrypt']);\n return aesKeyMaterialVal;\n });\n}\n\nfunction parseSessionProps(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = yield decryptMessage(message, sharedSecret);\n const jsonProperties = JSON.parse(plaintext);\n let protocolVersion = 'legacy';\n if (Object.hasOwnProperty.call(jsonProperties, 'v')) {\n switch (jsonProperties.v) {\n case 1:\n case '1':\n case 'v1':\n protocolVersion = 'v1';\n break;\n case 'legacy':\n protocolVersion = 'legacy';\n break;\n default:\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_INVALID_PROTOCOL_VERSION, `Unknown/unsupported protocol version: ${jsonProperties.v}`);\n }\n }\n return ({\n protocol_version: protocolVersion\n });\n });\n}\n\nfunction getRandomAssociationPort() {\n return assertAssociationPort(49152 + Math.floor(Math.random() * (65535 - 49152 + 1)));\n}\nfunction assertAssociationPort(port) {\n if (port < 49152 || port > 65535) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_ASSOCIATION_PORT_OUT_OF_RANGE, `Association port number must be between 49152 and 65535. ${port} given.`, { port });\n }\n return port;\n}\n\n// https://stackoverflow.com/a/9458996/802047\nfunction arrayBufferToBase64String(buffer) {\n let binary = '';\n const bytes = new Uint8Array(buffer);\n const len = bytes.byteLength;\n for (let ii = 0; ii < len; ii++) {\n binary += String.fromCharCode(bytes[ii]);\n }\n return window.btoa(binary);\n}\n\nfunction getStringWithURLUnsafeCharactersReplaced(unsafeBase64EncodedString) {\n return unsafeBase64EncodedString.replace(/[/+=]/g, (m) => ({\n '/': '_',\n '+': '-',\n '=': '.',\n }[m]));\n}\n\nconst INTENT_NAME = 'solana-wallet';\nfunction getPathParts(pathString) {\n return (pathString\n // Strip leading and trailing slashes\n .replace(/(^\\/+|\\/+$)/g, '')\n // Return an array of directories\n .split('/'));\n}\nfunction getIntentURL(methodPathname, intentUrlBase) {\n let baseUrl = null;\n if (intentUrlBase) {\n try {\n baseUrl = new URL(intentUrlBase);\n }\n catch (_a) { } // eslint-disable-line no-empty\n if ((baseUrl === null || baseUrl === void 0 ? void 0 : baseUrl.protocol) !== 'https:') {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Base URLs supplied by wallets must be valid `https` URLs');\n }\n }\n baseUrl || (baseUrl = new URL(`${INTENT_NAME}:/`));\n const pathname = methodPathname.startsWith('/')\n ? // Method is an absolute path. Replace it wholesale.\n methodPathname\n : // Method is a relative path. Merge it with the existing one.\n [...getPathParts(baseUrl.pathname), ...getPathParts(methodPathname)].join('/');\n return new URL(pathname, baseUrl);\n}\nfunction getAssociateAndroidIntentURL(associationPublicKey, putativePort, associationURLBase, protocolVersions = ['v1']) {\n return __awaiter(this, void 0, void 0, function* () {\n const associationPort = assertAssociationPort(putativePort);\n const exportedKey = yield crypto.subtle.exportKey('raw', associationPublicKey);\n const encodedKey = arrayBufferToBase64String(exportedKey);\n const url = getIntentURL('v1/associate/local', associationURLBase);\n url.searchParams.set('association', getStringWithURLUnsafeCharactersReplaced(encodedKey));\n url.searchParams.set('port', `${associationPort}`);\n protocolVersions.forEach((version) => {\n url.searchParams.set('v', version);\n });\n return url;\n });\n}\n\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst Browser = {\n Firefox: 0,\n Other: 1,\n};\nfunction assertUnreachable(x) {\n return x;\n}\nfunction getBrowser() {\n return navigator.userAgent.indexOf('Firefox/') !== -1 ? Browser.Firefox : Browser.Other;\n}\nfunction getDetectionPromise() {\n // Chrome and others silently fail if a custom protocol is not supported.\n // For these, we wait to see if the browser is navigated away from in\n // a reasonable amount of time (ie. the native wallet opened).\n return new Promise((resolve, reject) => {\n function cleanup() {\n clearTimeout(timeoutId);\n window.removeEventListener('blur', handleBlur);\n }\n function handleBlur() {\n cleanup();\n resolve();\n }\n window.addEventListener('blur', handleBlur);\n const timeoutId = setTimeout(() => {\n cleanup();\n reject();\n }, 2000);\n });\n}\nlet _frame = null;\nfunction launchUrlThroughHiddenFrame(url) {\n if (_frame == null) {\n _frame = document.createElement('iframe');\n _frame.style.display = 'none';\n document.body.appendChild(_frame);\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _frame.contentWindow.location.href = url.toString();\n}\nfunction startSession(associationPublicKey, associationURLBase) {\n return __awaiter(this, void 0, void 0, function* () {\n const randomAssociationPort = getRandomAssociationPort();\n const associationUrl = yield getAssociateAndroidIntentURL(associationPublicKey, randomAssociationPort, associationURLBase);\n if (associationUrl.protocol === 'https:') {\n // The association URL is an Android 'App Link' or iOS 'Universal Link'.\n // These are regular web URLs that are designed to launch an app if it\n // is installed or load the actual target webpage if not.\n window.location.assign(associationUrl);\n }\n else {\n // The association URL has a custom protocol (eg. `solana-wallet:`)\n try {\n const browser = getBrowser();\n switch (browser) {\n case Browser.Firefox:\n // If a custom protocol is not supported in Firefox, it throws.\n launchUrlThroughHiddenFrame(associationUrl);\n // If we reached this line, it's supported.\n break;\n case Browser.Other: {\n const detectionPromise = getDetectionPromise();\n window.location.assign(associationUrl);\n yield detectionPromise;\n break;\n }\n default:\n assertUnreachable(browser);\n }\n }\n catch (e) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_WALLET_NOT_FOUND, 'Found no installed wallet that supports the mobile wallet protocol.');\n }\n }\n return randomAssociationPort;\n });\n}\n\nconst WEBSOCKET_CONNECTION_CONFIG = {\n /**\n * 300 milliseconds is a generally accepted threshold for what someone\n * would consider an acceptable response time for a user interface\n * after having performed a low-attention tapping task. We set the initial\n * interval at which we wait for the wallet to set up the websocket at\n * half this, as per the Nyquist frequency, with a progressive backoff\n * sequence from there. The total wait time is 30s, which allows for the\n * user to be presented with a disambiguation dialog, select a wallet, and\n * for the wallet app to subsequently start.\n */\n retryDelayScheduleMs: [150, 150, 200, 500, 500, 750, 750, 1000],\n timeoutMs: 30000,\n};\nconst WEBSOCKET_PROTOCOL = 'com.solana.mobilewalletadapter.v1';\nfunction assertSecureContext() {\n if (typeof window === 'undefined' || window.isSecureContext !== true) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SECURE_CONTEXT_REQUIRED, 'The mobile wallet adapter protocol must be used in a secure context (`https`).');\n }\n}\nfunction assertSecureEndpointSpecificURI(walletUriBase) {\n let url;\n try {\n url = new URL(walletUriBase);\n }\n catch (_a) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Invalid base URL supplied by wallet');\n }\n if (url.protocol !== 'https:') {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Base URLs supplied by wallets must be valid `https` URLs');\n }\n}\nfunction getSequenceNumberFromByteArray(byteArray) {\n const view = new DataView(byteArray);\n return view.getUint32(0, /* littleEndian */ false);\n}\nfunction transact(callback, config) {\n return __awaiter(this, void 0, void 0, function* () {\n assertSecureContext();\n const associationKeypair = yield generateAssociationKeypair();\n const sessionPort = yield startSession(associationKeypair.publicKey, config === null || config === void 0 ? void 0 : config.baseUri);\n const websocketURL = `ws://localhost:${sessionPort}/solana-wallet`;\n let connectionStartTime;\n const getNextRetryDelayMs = (() => {\n const schedule = [...WEBSOCKET_CONNECTION_CONFIG.retryDelayScheduleMs];\n return () => (schedule.length > 1 ? schedule.shift() : schedule[0]);\n })();\n let nextJsonRpcMessageId = 1;\n let lastKnownInboundSequenceNumber = 0;\n let state = { __type: 'disconnected' };\n return new Promise((resolve, reject) => {\n let socket;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const jsonRpcResponsePromises = {};\n const handleOpen = () => __awaiter(this, void 0, void 0, function* () {\n if (state.__type !== 'connecting') {\n console.warn('Expected adapter state to be `connecting` at the moment the websocket opens. ' +\n `Got \\`${state.__type}\\`.`);\n return;\n }\n const { associationKeypair } = state;\n socket.removeEventListener('open', handleOpen);\n const ecdhKeypair = yield generateECDHKeypair();\n socket.send(yield createHelloReq(ecdhKeypair.publicKey, associationKeypair.privateKey));\n state = {\n __type: 'hello_req_sent',\n associationPublicKey: associationKeypair.publicKey,\n ecdhPrivateKey: ecdhKeypair.privateKey,\n };\n });\n const handleClose = (evt) => {\n if (evt.wasClean) {\n state = { __type: 'disconnected' };\n }\n else {\n reject(new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SESSION_CLOSED, `The wallet session dropped unexpectedly (${evt.code}: ${evt.reason}).`, { closeEvent: evt }));\n }\n disposeSocket();\n };\n const handleError = (_evt) => __awaiter(this, void 0, void 0, function* () {\n disposeSocket();\n if (Date.now() - connectionStartTime >= WEBSOCKET_CONNECTION_CONFIG.timeoutMs) {\n reject(new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SESSION_TIMEOUT, `Failed to connect to the wallet websocket on port ${sessionPort}.`));\n }\n else {\n yield new Promise((resolve) => {\n const retryDelayMs = getNextRetryDelayMs();\n retryWaitTimeoutId = window.setTimeout(resolve, retryDelayMs);\n });\n attemptSocketConnection();\n }\n });\n const handleMessage = (evt) => __awaiter(this, void 0, void 0, function* () {\n const responseBuffer = yield evt.data.arrayBuffer();\n switch (state.__type) {\n case 'connected':\n try {\n const sequenceNumberVector = responseBuffer.slice(0, SEQUENCE_NUMBER_BYTES);\n const sequenceNumber = getSequenceNumberFromByteArray(sequenceNumberVector);\n if (sequenceNumber !== (lastKnownInboundSequenceNumber + 1)) {\n throw new Error('Encrypted message has invalid sequence number');\n }\n lastKnownInboundSequenceNumber = sequenceNumber;\n const jsonRpcMessage = yield decryptJsonRpcMessage(responseBuffer, state.sharedSecret);\n const responsePromise = jsonRpcResponsePromises[jsonRpcMessage.id];\n delete jsonRpcResponsePromises[jsonRpcMessage.id];\n responsePromise.resolve(jsonRpcMessage.result);\n }\n catch (e) {\n if (e instanceof SolanaMobileWalletAdapterProtocolError) {\n const responsePromise = jsonRpcResponsePromises[e.jsonRpcMessageId];\n delete jsonRpcResponsePromises[e.jsonRpcMessageId];\n responsePromise.reject(e);\n }\n else {\n throw e;\n }\n }\n break;\n case 'hello_req_sent': {\n const sharedSecret = yield parseHelloRsp(responseBuffer, state.associationPublicKey, state.ecdhPrivateKey);\n const sessionPropertiesBuffer = responseBuffer.slice(ENCODED_PUBLIC_KEY_LENGTH_BYTES);\n const sessionProperties = sessionPropertiesBuffer.byteLength !== 0\n ? yield (() => __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = sessionPropertiesBuffer.slice(0, SEQUENCE_NUMBER_BYTES);\n const sequenceNumber = getSequenceNumberFromByteArray(sequenceNumberVector);\n if (sequenceNumber !== (lastKnownInboundSequenceNumber + 1)) {\n throw new Error('Encrypted message has invalid sequence number');\n }\n lastKnownInboundSequenceNumber = sequenceNumber;\n return parseSessionProps(sessionPropertiesBuffer, sharedSecret);\n }))() : { protocol_version: 'legacy' };\n state = { __type: 'connected', sharedSecret, sessionProperties };\n const wallet = createMobileWalletProxy(sessionProperties.protocol_version, (method, params) => __awaiter(this, void 0, void 0, function* () {\n const id = nextJsonRpcMessageId++;\n socket.send(yield encryptJsonRpcMessage({\n id,\n jsonrpc: '2.0',\n method,\n params: params !== null && params !== void 0 ? params : {},\n }, sharedSecret));\n return new Promise((resolve, reject) => {\n jsonRpcResponsePromises[id] = {\n resolve(result) {\n switch (method) {\n case 'authorize':\n case 'reauthorize': {\n const { wallet_uri_base } = result;\n if (wallet_uri_base != null) {\n try {\n assertSecureEndpointSpecificURI(wallet_uri_base);\n }\n catch (e) {\n reject(e);\n return;\n }\n }\n break;\n }\n }\n resolve(result);\n },\n reject,\n };\n });\n }));\n try {\n resolve(yield callback(wallet));\n }\n catch (e) {\n reject(e);\n }\n finally {\n disposeSocket();\n socket.close();\n }\n break;\n }\n }\n });\n let disposeSocket;\n let retryWaitTimeoutId;\n const attemptSocketConnection = () => {\n if (disposeSocket) {\n disposeSocket();\n }\n state = { __type: 'connecting', associationKeypair };\n if (connectionStartTime === undefined) {\n connectionStartTime = Date.now();\n }\n socket = new WebSocket(websocketURL, [WEBSOCKET_PROTOCOL]);\n socket.addEventListener('open', handleOpen);\n socket.addEventListener('close', handleClose);\n socket.addEventListener('error', handleError);\n socket.addEventListener('message', handleMessage);\n disposeSocket = () => {\n window.clearTimeout(retryWaitTimeoutId);\n socket.removeEventListener('open', handleOpen);\n socket.removeEventListener('close', handleClose);\n socket.removeEventListener('error', handleError);\n socket.removeEventListener('message', handleMessage);\n };\n };\n attemptSocketConnection();\n });\n });\n}\n\nexport { SolanaCloneAuthorization, SolanaMobileWalletAdapterError, SolanaMobileWalletAdapterErrorCode, SolanaMobileWalletAdapterProtocolError, SolanaMobileWalletAdapterProtocolErrorCode, SolanaSignInWithSolana, SolanaSignTransactions, transact };\n","import { VersionedMessage, Transaction, VersionedTransaction, SIGNATURE_LENGTH_IN_BYTES } from '@solana/web3.js';\nimport { transact as transact$1 } from '@solana-mobile/mobile-wallet-adapter-protocol';\nimport bs58 from 'bs58';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction fromUint8Array(byteArray) {\n return window.btoa(String.fromCharCode.call(null, ...byteArray));\n}\nfunction toUint8Array(base64EncodedByteArray) {\n return new Uint8Array(window\n .atob(base64EncodedByteArray)\n .split('')\n .map((c) => c.charCodeAt(0)));\n}\n\nfunction getPayloadFromTransaction(transaction) {\n const serializedTransaction = 'version' in transaction\n ? transaction.serialize()\n : transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n });\n const payload = fromUint8Array(serializedTransaction);\n return payload;\n}\nfunction getTransactionFromWireMessage(byteArray) {\n const numSignatures = byteArray[0];\n const messageOffset = numSignatures * SIGNATURE_LENGTH_IN_BYTES + 1;\n const version = VersionedMessage.deserializeMessageVersion(byteArray.slice(messageOffset, byteArray.length));\n if (version === 'legacy') {\n return Transaction.from(byteArray);\n }\n else {\n return VersionedTransaction.deserialize(byteArray);\n }\n}\nfunction transact(callback, config) {\n return __awaiter(this, void 0, void 0, function* () {\n const augmentedCallback = (wallet) => {\n const augmentedAPI = new Proxy({}, {\n get(target, p) {\n if (target[p] == null) {\n switch (p) {\n case 'signAndSendTransactions':\n target[p] = function (_a) {\n var { minContextSlot, commitment, skipPreflight, maxRetries, waitForCommitmentToSendNextTransaction, transactions } = _a, rest = __rest(_a, [\"minContextSlot\", \"commitment\", \"skipPreflight\", \"maxRetries\", \"waitForCommitmentToSendNextTransaction\", \"transactions\"]);\n return __awaiter(this, void 0, void 0, function* () {\n const payloads = transactions.map(getPayloadFromTransaction);\n const options = {\n min_context_slot: minContextSlot,\n commitment: commitment,\n skip_preflight: skipPreflight,\n max_retries: maxRetries,\n wait_for_commitment_to_send_next_transaction: waitForCommitmentToSendNextTransaction\n };\n const { signatures: base64EncodedSignatures } = yield wallet.signAndSendTransactions(Object.assign(Object.assign(Object.assign({}, rest), (Object.values(options).some(element => element != null)\n ? { options: options }\n : null)), { payloads }));\n const signatures = base64EncodedSignatures.map(toUint8Array).map(bs58.encode);\n return signatures;\n });\n };\n break;\n case 'signMessages':\n target[p] = function (_a) {\n var { payloads } = _a, rest = __rest(_a, [\"payloads\"]);\n return __awaiter(this, void 0, void 0, function* () {\n const base64EncodedPayloads = payloads.map(fromUint8Array);\n const { signed_payloads: base64EncodedSignedMessages } = yield wallet.signMessages(Object.assign(Object.assign({}, rest), { payloads: base64EncodedPayloads }));\n const signedMessages = base64EncodedSignedMessages.map(toUint8Array);\n return signedMessages;\n });\n };\n break;\n case 'signTransactions':\n target[p] = function (_a) {\n var { transactions } = _a, rest = __rest(_a, [\"transactions\"]);\n return __awaiter(this, void 0, void 0, function* () {\n const payloads = transactions.map(getPayloadFromTransaction);\n const { signed_payloads: base64EncodedCompiledTransactions } = yield wallet.signTransactions(Object.assign(Object.assign({}, rest), { payloads }));\n const compiledTransactions = base64EncodedCompiledTransactions.map(toUint8Array);\n const signedTransactions = compiledTransactions.map(getTransactionFromWireMessage);\n return signedTransactions;\n });\n };\n break;\n default: {\n target[p] = wallet[p];\n break;\n }\n }\n }\n return target[p];\n },\n defineProperty() {\n return false;\n },\n deleteProperty() {\n return false;\n },\n });\n return callback(augmentedAPI);\n };\n return yield transact$1(augmentedCallback, config);\n });\n}\n\nexport { transact };\n","import { BaseSignInMessageSignerWalletAdapter, WalletReadyState, WalletPublicKeyError, WalletNotReadyError, WalletConnectionError, WalletDisconnectedError, WalletNotConnectedError, WalletSignTransactionError, WalletSendTransactionError, WalletSignMessageError } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nimport { transact } from '@solana-mobile/mobile-wallet-adapter-protocol-web3js';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction toUint8Array(base64EncodedByteArray) {\n return new Uint8Array(window\n .atob(base64EncodedByteArray)\n .split('')\n .map((c) => c.charCodeAt(0)));\n}\n\nfunction getIsSupported() {\n return (typeof window !== 'undefined' &&\n window.isSecureContext &&\n typeof document !== 'undefined' &&\n /android/i.test(navigator.userAgent));\n}\n\nconst SolanaMobileWalletAdapterWalletName = 'Mobile Wallet Adapter';\nconst SIGNATURE_LENGTH_IN_BYTES = 64;\nfunction getPublicKeyFromAddress(address) {\n const publicKeyByteArray = toUint8Array(address);\n return new PublicKey(publicKeyByteArray);\n}\nfunction isVersionedTransaction(transaction) {\n return 'version' in transaction;\n}\nclass SolanaMobileWalletAdapter extends BaseSignInMessageSignerWalletAdapter {\n constructor(config) {\n var _a;\n super();\n this.supportedTransactionVersions = new Set(\n // FIXME(#244): We can't actually know what versions are supported until we know which wallet we're talking to.\n ['legacy', 0]);\n this.name = SolanaMobileWalletAdapterWalletName;\n this.url = 'https://solanamobile.com/wallets';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI4IiB3aWR0aD0iMjgiIHZpZXdCb3g9Ii0zIDAgMjggMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0RDQjhGRiI+PHBhdGggZD0iTTE3LjQgMTcuNEgxNXYyLjRoMi40di0yLjRabTEuMi05LjZoLTIuNHYyLjRoMi40VjcuOFoiLz48cGF0aCBkPSJNMjEuNiAzVjBoLTIuNHYzaC0zLjZWMGgtMi40djNoLTIuNHY2LjZINC41YTIuMSAyLjEgMCAxIDEgMC00LjJoMi43VjNINC41QTQuNSA0LjUgMCAwIDAgMCA3LjVWMjRoMjEuNnYtNi42aC0yLjR2NC4ySDIuNFYxMS41Yy41LjMgMS4yLjQgMS44LjVoNy41QTYuNiA2LjYgMCAwIDAgMjQgOVYzaC0yLjRabTAgNS43YTQuMiA0LjIgMCAxIDEtOC40IDBWNS40aDguNHYzLjNaIi8+PC9nPjwvc3ZnPg==';\n this._connecting = false;\n /**\n * Every time the connection is recycled in some way (eg. `disconnect()` is called)\n * increment this and use it to make sure that `transact` calls from the previous\n * 'generation' don't continue to do work and throw exceptions.\n */\n this._connectionGeneration = 0;\n this._readyState = getIsSupported() ? WalletReadyState.Loadable : WalletReadyState.Unsupported;\n this._authorizationResultCache = config.authorizationResultCache;\n this._addressSelector = config.addressSelector;\n this._appIdentity = config.appIdentity;\n this._chain = (_a = config.chain) !== null && _a !== void 0 ? _a : config.cluster;\n this._onWalletNotFound = config.onWalletNotFound;\n if (this._readyState !== WalletReadyState.Unsupported) {\n this._authorizationResultCache.get().then((authorizationResult) => {\n if (authorizationResult) {\n // Having a prior authorization result is, right now, the best\n // indication that a mobile wallet is installed. There is no API\n // we can use to test for whether the association URI is supported.\n this.declareWalletAsInstalled();\n }\n });\n }\n }\n get publicKey() {\n if (this._publicKey == null && this._selectedAddress != null) {\n try {\n this._publicKey = getPublicKeyFromAddress(this._selectedAddress);\n }\n catch (e) {\n throw new WalletPublicKeyError((e instanceof Error && (e === null || e === void 0 ? void 0 : e.message)) || 'Unknown error', e);\n }\n }\n return this._publicKey ? this._publicKey : null;\n }\n get connected() {\n return !!this._authorizationResult;\n }\n get connecting() {\n return this._connecting;\n }\n get readyState() {\n return this._readyState;\n }\n declareWalletAsInstalled() {\n if (this._readyState !== WalletReadyState.Installed) {\n this.emit('readyStateChange', (this._readyState = WalletReadyState.Installed));\n }\n }\n runWithGuard(callback) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n return yield callback();\n }\n catch (e) {\n this.emit('error', e);\n throw e;\n }\n });\n }\n /** @deprecated Use `autoConnect()` instead. */\n autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.autoConnect();\n });\n }\n autoConnect() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.connecting || this.connected) {\n return;\n }\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n const cachedAuthorizationResult = yield this._authorizationResultCache.get();\n if (cachedAuthorizationResult) {\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this.handleAuthorizationResult(cachedAuthorizationResult);\n }\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n connect() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.connecting || this.connected) {\n return;\n }\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n yield this.performAuthorization();\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n performAuthorization(signInPayload) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const cachedAuthorizationResult = yield this._authorizationResultCache.get();\n if (cachedAuthorizationResult) {\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this.handleAuthorizationResult(cachedAuthorizationResult);\n return cachedAuthorizationResult;\n }\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n const authorizationResult = yield wallet.authorize({\n chain: this._chain,\n identity: this._appIdentity,\n sign_in_payload: signInPayload,\n });\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n Promise.all([\n this._authorizationResultCache.set(authorizationResult),\n this.handleAuthorizationResult(authorizationResult),\n ]);\n return authorizationResult;\n }));\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n });\n }\n handleAuthorizationResult(authorizationResult) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const didPublicKeysChange = \n // Case 1: We started from having no authorization.\n this._authorizationResult == null ||\n // Case 2: The number of authorized accounts changed.\n ((_a = this._authorizationResult) === null || _a === void 0 ? void 0 : _a.accounts.length) !== authorizationResult.accounts.length ||\n // Case 3: The new list of addresses isn't exactly the same as the old list, in the same order.\n this._authorizationResult.accounts.some((account, ii) => account.address !== authorizationResult.accounts[ii].address);\n this._authorizationResult = authorizationResult;\n this.declareWalletAsInstalled();\n if (didPublicKeysChange) {\n const nextSelectedAddress = yield this._addressSelector.select(authorizationResult.accounts.map(({ address }) => address));\n if (nextSelectedAddress !== this._selectedAddress) {\n this._selectedAddress = nextSelectedAddress;\n delete this._publicKey;\n this.emit('connect', \n // Having just set `this._selectedAddress`, `this.publicKey` is definitely non-null\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.publicKey);\n }\n }\n });\n }\n performReauthorization(wallet, authToken) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const authorizationResult = yield wallet.authorize({\n auth_token: authToken,\n identity: this._appIdentity,\n });\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n Promise.all([\n this._authorizationResultCache.set(authorizationResult),\n this.handleAuthorizationResult(authorizationResult),\n ]);\n }\n catch (e) {\n this.disconnect();\n throw new WalletDisconnectedError((e instanceof Error && (e === null || e === void 0 ? void 0 : e.message)) || 'Unknown error', e);\n }\n });\n }\n disconnect() {\n return __awaiter(this, void 0, void 0, function* () {\n this._authorizationResultCache.clear(); // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this._connecting = false;\n this._connectionGeneration++;\n delete this._authorizationResult;\n delete this._publicKey;\n delete this._selectedAddress;\n this.emit('disconnect');\n });\n }\n transact(callback) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const walletUriBase = (_a = this._authorizationResult) === null || _a === void 0 ? void 0 : _a.wallet_uri_base;\n const config = walletUriBase ? { baseUri: walletUriBase } : undefined;\n const currentConnectionGeneration = this._connectionGeneration;\n try {\n return yield transact(callback, config);\n }\n catch (e) {\n if (this._connectionGeneration !== currentConnectionGeneration) {\n yield new Promise(() => { }); // Never resolve.\n }\n if (e instanceof Error &&\n e.name === 'SolanaMobileWalletAdapterError' &&\n e.code === 'ERROR_WALLET_NOT_FOUND') {\n yield this._onWalletNotFound(this);\n }\n throw e;\n }\n });\n }\n assertIsAuthorized() {\n if (!this._authorizationResult || !this._selectedAddress)\n throw new WalletNotConnectedError();\n return {\n authToken: this._authorizationResult.auth_token,\n selectedAddress: this._selectedAddress,\n };\n }\n performSignTransactions(transactions) {\n return __awaiter(this, void 0, void 0, function* () {\n const { authToken } = this.assertIsAuthorized();\n try {\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n yield this.performReauthorization(wallet, authToken);\n const signedTransactions = yield wallet.signTransactions({\n transactions,\n });\n return signedTransactions;\n }));\n }\n catch (error) {\n throw new WalletSignTransactionError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n });\n }\n sendTransaction(transaction, connection, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const { authToken } = this.assertIsAuthorized();\n const minContextSlot = options === null || options === void 0 ? void 0 : options.minContextSlot;\n try {\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n function getTargetCommitment() {\n let targetCommitment;\n switch (connection.commitment) {\n case 'confirmed':\n case 'finalized':\n case 'processed':\n targetCommitment = connection.commitment;\n break;\n default:\n targetCommitment = 'finalized';\n }\n let targetPreflightCommitment;\n switch (options === null || options === void 0 ? void 0 : options.preflightCommitment) {\n case 'confirmed':\n case 'finalized':\n case 'processed':\n targetPreflightCommitment = options.preflightCommitment;\n break;\n case undefined:\n targetPreflightCommitment = targetCommitment;\n break;\n default:\n targetPreflightCommitment = 'finalized';\n }\n const preflightCommitmentScore = targetPreflightCommitment === 'finalized'\n ? 2\n : targetPreflightCommitment === 'confirmed'\n ? 1\n : 0;\n const targetCommitmentScore = targetCommitment === 'finalized' ? 2 : targetCommitment === 'confirmed' ? 1 : 0;\n return preflightCommitmentScore < targetCommitmentScore\n ? targetPreflightCommitment\n : targetCommitment;\n }\n const [capabilities, _1, _2] = yield Promise.all([\n wallet.getCapabilities(),\n this.performReauthorization(wallet, authToken),\n isVersionedTransaction(transaction)\n ? null\n : /**\n * Unlike versioned transactions, legacy `Transaction` objects\n * may not have an associated `feePayer` or `recentBlockhash`.\n * This code exists to patch them up in case they are missing.\n */\n (() => __awaiter(this, void 0, void 0, function* () {\n var _a;\n transaction.feePayer || (transaction.feePayer = (_a = this.publicKey) !== null && _a !== void 0 ? _a : undefined);\n if (transaction.recentBlockhash == null) {\n const { blockhash } = yield connection.getLatestBlockhash({\n commitment: getTargetCommitment(),\n });\n transaction.recentBlockhash = blockhash;\n }\n }))(),\n ]);\n if (capabilities.supports_sign_and_send_transactions) {\n const signatures = yield wallet.signAndSendTransactions({\n minContextSlot,\n transactions: [transaction],\n });\n return signatures[0];\n }\n else {\n const [signedTransaction] = yield wallet.signTransactions({\n transactions: [transaction],\n });\n if (isVersionedTransaction(signedTransaction)) {\n return yield connection.sendTransaction(signedTransaction);\n }\n else {\n const serializedTransaction = signedTransaction.serialize();\n return yield connection.sendRawTransaction(serializedTransaction, Object.assign(Object.assign({}, options), { preflightCommitment: getTargetCommitment() }));\n }\n }\n }));\n }\n catch (error) {\n throw new WalletSendTransactionError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n }));\n });\n }\n signTransaction(transaction) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const [signedTransaction] = yield this.performSignTransactions([transaction]);\n return signedTransaction;\n }));\n });\n }\n signAllTransactions(transactions) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const signedTransactions = yield this.performSignTransactions(transactions);\n return signedTransactions;\n }));\n });\n }\n signMessage(message) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const { authToken, selectedAddress } = this.assertIsAuthorized();\n try {\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n yield this.performReauthorization(wallet, authToken);\n const [signedMessage] = yield wallet.signMessages({\n addresses: [selectedAddress],\n payloads: [message],\n });\n const signature = signedMessage.slice(-SIGNATURE_LENGTH_IN_BYTES);\n return signature;\n }));\n }\n catch (error) {\n throw new WalletSignMessageError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n }));\n });\n }\n signIn(input) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n const authorizationResult = yield this.performAuthorization(Object.assign(Object.assign({}, input), { domain: (_a = input === null || input === void 0 ? void 0 : input.domain) !== null && _a !== void 0 ? _a : window.location.host }));\n if (!authorizationResult.sign_in_result) {\n throw new Error(\"Sign in failed, no sign in result returned by wallet\");\n }\n const signedInAddress = authorizationResult.sign_in_result.address;\n const signedInAccount = Object.assign(Object.assign({}, (_b = authorizationResult.accounts.find(acc => acc.address == signedInAddress)) !== null && _b !== void 0 ? _b : {\n address: signedInAddress\n }), { publicKey: toUint8Array(signedInAddress) });\n return {\n account: signedInAccount,\n signedMessage: toUint8Array(authorizationResult.sign_in_result.signed_message),\n signature: toUint8Array(authorizationResult.sign_in_result.signature)\n };\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n}\n\nfunction createDefaultAddressSelector() {\n return {\n select(addresses) {\n return __awaiter(this, void 0, void 0, function* () {\n return addresses[0];\n });\n },\n };\n}\n\nconst CACHE_KEY = 'SolanaMobileWalletAdapterDefaultAuthorizationCache';\nfunction createDefaultAuthorizationResultCache() {\n let storage;\n try {\n storage = window.localStorage;\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n return {\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n storage.removeItem(CACHE_KEY);\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n get() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n return JSON.parse(storage.getItem(CACHE_KEY)) || undefined;\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n set(authorizationResult) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n storage.setItem(CACHE_KEY, JSON.stringify(authorizationResult));\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n };\n}\n\nfunction defaultWalletNotFoundHandler(mobileWalletAdapter) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof window !== 'undefined') {\n window.location.assign(mobileWalletAdapter.url);\n }\n });\n}\nfunction createDefaultWalletNotFoundHandler() {\n return defaultWalletNotFoundHandler;\n}\n\nexport { SolanaMobileWalletAdapter, SolanaMobileWalletAdapterWalletName, createDefaultAddressSelector, createDefaultAuthorizationResultCache, createDefaultWalletNotFoundHandler };\n","/** Name of the feature. */\nexport const StandardConnect = 'standard:connect';\n/**\n * @deprecated Use {@link StandardConnect} instead.\n *\n * @group Deprecated\n */\nexport const Connect = StandardConnect;\n//# sourceMappingURL=connect.js.map","/** Name of the feature. */\nexport const StandardEvents = 'standard:events';\n/**\n * @deprecated Use {@link StandardEvents} instead.\n *\n * @group Deprecated\n */\nexport const Events = StandardEvents;\n//# sourceMappingURL=events.js.map","import { SolanaSignAndSendTransaction, SolanaSignTransaction, } from '@solana/wallet-standard-features';\nimport { StandardConnect, StandardEvents, } from '@wallet-standard/features';\nexport function isWalletAdapterCompatibleStandardWallet(wallet) {\n return (StandardConnect in wallet.features &&\n StandardEvents in wallet.features &&\n (SolanaSignAndSendTransaction in wallet.features || SolanaSignTransaction in wallet.features));\n}\n//# sourceMappingURL=standard.js.map","import { isWalletAdapterCompatibleStandardWallet, } from '@solana/wallet-adapter-base';\n/**\n * @deprecated Use `isWalletAdapterCompatibleStandardWallet` from `@solana/wallet-adapter-base` instead.\n *\n * @group Deprecated\n */\nexport const isWalletAdapterCompatibleWallet = isWalletAdapterCompatibleStandardWallet;\n//# sourceMappingURL=types.js.map","/** Name of the feature. */\nexport const SolanaSignIn = 'solana:signIn';\n//# sourceMappingURL=signIn.js.map","/** Solana Mainnet (beta) cluster, e.g. https://api.mainnet-beta.solana.com */\nexport const SOLANA_MAINNET_CHAIN = 'solana:mainnet';\n/** Solana Devnet cluster, e.g. https://api.devnet.solana.com */\nexport const SOLANA_DEVNET_CHAIN = 'solana:devnet';\n/** Solana Testnet cluster, e.g. https://api.testnet.solana.com */\nexport const SOLANA_TESTNET_CHAIN = 'solana:testnet';\n/** Solana Localnet cluster, e.g. http://localhost:8899 */\nexport const SOLANA_LOCALNET_CHAIN = 'solana:localnet';\n/** Array of all Solana clusters */\nexport const SOLANA_CHAINS = [\n SOLANA_MAINNET_CHAIN,\n SOLANA_DEVNET_CHAIN,\n SOLANA_TESTNET_CHAIN,\n SOLANA_LOCALNET_CHAIN,\n];\n/**\n * Check if a chain corresponds with one of the Solana clusters.\n */\nexport function isSolanaChain(chain) {\n return SOLANA_CHAINS.includes(chain);\n}\n//# sourceMappingURL=index.js.map","import { SOLANA_DEVNET_CHAIN, SOLANA_LOCALNET_CHAIN, SOLANA_MAINNET_CHAIN, SOLANA_TESTNET_CHAIN, } from '@solana/wallet-standard-chains';\n/** TODO: docs */\nexport const MAINNET_ENDPOINT = 'https://api.mainnet-beta.solana.com';\n/** TODO: docs */\nexport const DEVNET_ENDPOINT = 'https://api.devnet.solana.com';\n/** TODO: docs */\nexport const TESTNET_ENDPOINT = 'https://api.testnet.solana.com';\n/** TODO: docs */\nexport const LOCALNET_ENDPOINT = 'http://localhost:8899';\n/**\n * TODO: docs\n */\nexport function getChainForEndpoint(endpoint) {\n if (endpoint.includes(MAINNET_ENDPOINT))\n return SOLANA_MAINNET_CHAIN;\n if (/\\bdevnet\\b/i.test(endpoint))\n return SOLANA_DEVNET_CHAIN;\n if (/\\btestnet\\b/i.test(endpoint))\n return SOLANA_TESTNET_CHAIN;\n if (/\\blocalhost\\b/i.test(endpoint) || /\\b127\\.0\\.0\\.1\\b/.test(endpoint))\n return SOLANA_LOCALNET_CHAIN;\n return SOLANA_MAINNET_CHAIN;\n}\n/**\n * TODO: docs\n */\nexport function getEndpointForChain(chain, endpoint) {\n if (endpoint)\n return endpoint;\n if (chain === SOLANA_MAINNET_CHAIN)\n return MAINNET_ENDPOINT;\n if (chain === SOLANA_DEVNET_CHAIN)\n return DEVNET_ENDPOINT;\n if (chain === SOLANA_TESTNET_CHAIN)\n return TESTNET_ENDPOINT;\n if (chain === SOLANA_LOCALNET_CHAIN)\n return LOCALNET_ENDPOINT;\n return MAINNET_ENDPOINT;\n}\n//# sourceMappingURL=endpoint.js.map","/**\n * TODO: docs\n */\nexport function getCommitment(commitment) {\n switch (commitment) {\n case 'processed':\n case 'confirmed':\n case 'finalized':\n case undefined:\n return commitment;\n case 'recent':\n return 'processed';\n case 'single':\n case 'singleGossip':\n return 'confirmed';\n case 'max':\n case 'root':\n return 'finalized';\n default:\n return undefined;\n }\n}\n//# sourceMappingURL=commitment.js.map","/** Name of the feature. */\nexport const StandardDisconnect = 'standard:disconnect';\n/**\n * @deprecated Use {@link StandardDisconnect} instead.\n *\n * @group Deprecated\n */\nexport const Disconnect = StandardDisconnect;\n//# sourceMappingURL=disconnect.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _ReadonlyWalletAccount_address, _ReadonlyWalletAccount_publicKey, _ReadonlyWalletAccount_chains, _ReadonlyWalletAccount_features, _ReadonlyWalletAccount_label, _ReadonlyWalletAccount_icon;\n/**\n * Base implementation of a {@link \"@wallet-standard/base\".WalletAccount} to be used or extended by a\n * {@link \"@wallet-standard/base\".Wallet}.\n *\n * `WalletAccount` properties must be read-only. This class enforces this by making all properties\n * [truly private](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields) and\n * read-only, using getters for access, returning copies instead of references, and calling\n * [Object.freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze)\n * on the instance.\n *\n * @group Account\n */\nexport class ReadonlyWalletAccount {\n /**\n * Create and freeze a read-only account.\n *\n * @param account Account to copy properties from.\n */\n constructor(account) {\n _ReadonlyWalletAccount_address.set(this, void 0);\n _ReadonlyWalletAccount_publicKey.set(this, void 0);\n _ReadonlyWalletAccount_chains.set(this, void 0);\n _ReadonlyWalletAccount_features.set(this, void 0);\n _ReadonlyWalletAccount_label.set(this, void 0);\n _ReadonlyWalletAccount_icon.set(this, void 0);\n if (new.target === ReadonlyWalletAccount) {\n Object.freeze(this);\n }\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_address, account.address, \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_publicKey, account.publicKey.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_chains, account.chains.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_features, account.features.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_label, account.label, \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_icon, account.icon, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.address | WalletAccount::address} */\n get address() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_address, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.publicKey | WalletAccount::publicKey} */\n get publicKey() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_publicKey, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.chains | WalletAccount::chains} */\n get chains() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_chains, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.features | WalletAccount::features} */\n get features() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_features, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.label | WalletAccount::label} */\n get label() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_label, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.icon | WalletAccount::icon} */\n get icon() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_icon, \"f\");\n }\n}\n_ReadonlyWalletAccount_address = new WeakMap(), _ReadonlyWalletAccount_publicKey = new WeakMap(), _ReadonlyWalletAccount_chains = new WeakMap(), _ReadonlyWalletAccount_features = new WeakMap(), _ReadonlyWalletAccount_label = new WeakMap(), _ReadonlyWalletAccount_icon = new WeakMap();\n/**\n * Efficiently compare {@link Indexed} arrays (e.g. `Array` and `Uint8Array`).\n *\n * @param a An array.\n * @param b Another array.\n *\n * @return `true` if the arrays have the same length and elements, `false` otherwise.\n *\n * @group Util\n */\nexport function arraysEqual(a, b) {\n if (a === b)\n return true;\n const length = a.length;\n if (length !== b.length)\n return false;\n for (let i = 0; i < length; i++) {\n if (a[i] !== b[i])\n return false;\n }\n return true;\n}\n/**\n * Efficiently compare byte arrays, using {@link arraysEqual}.\n *\n * @param a A byte array.\n * @param b Another byte array.\n *\n * @return `true` if the byte arrays have the same length and bytes, `false` otherwise.\n *\n * @group Util\n */\nexport function bytesEqual(a, b) {\n return arraysEqual(a, b);\n}\n/**\n * Efficiently concatenate byte arrays without modifying them.\n *\n * @param first A byte array.\n * @param others Additional byte arrays.\n *\n * @return New byte array containing the concatenation of all the byte arrays.\n *\n * @group Util\n */\nexport function concatBytes(first, ...others) {\n const length = others.reduce((length, bytes) => length + bytes.length, first.length);\n const bytes = new Uint8Array(length);\n bytes.set(first, 0);\n for (const other of others) {\n bytes.set(other, bytes.length);\n }\n return bytes;\n}\n/**\n * Create a new object with a subset of fields from a source object.\n *\n * @param source Object to pick fields from.\n * @param keys Names of fields to pick.\n *\n * @return New object with only the picked fields.\n *\n * @group Util\n */\nexport function pick(source, ...keys) {\n const picked = {};\n for (const key of keys) {\n picked[key] = source[key];\n }\n return picked;\n}\n/**\n * Call a callback function, catch an error if it throws, and log the error without rethrowing.\n *\n * @param callback Function to call.\n *\n * @group Util\n */\nexport function guard(callback) {\n try {\n callback();\n }\n catch (error) {\n console.error(error);\n }\n}\n//# sourceMappingURL=util.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _StandardWalletAdapter_instances, _StandardWalletAdapter_account, _StandardWalletAdapter_publicKey, _StandardWalletAdapter_connecting, _StandardWalletAdapter_disconnecting, _StandardWalletAdapter_off, _StandardWalletAdapter_supportedTransactionVersions, _StandardWalletAdapter_wallet, _StandardWalletAdapter_readyState, _StandardWalletAdapter_connect, _StandardWalletAdapter_connected, _StandardWalletAdapter_disconnected, _StandardWalletAdapter_reset, _StandardWalletAdapter_changed, _StandardWalletAdapter_signTransaction, _StandardWalletAdapter_signAllTransactions, _StandardWalletAdapter_signMessage, _StandardWalletAdapter_signIn;\nimport { BaseWalletAdapter, isVersionedTransaction, WalletAccountError, WalletConfigError, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignInError, WalletSignMessageError, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { SolanaSignAndSendTransaction, SolanaSignIn, SolanaSignMessage, SolanaSignTransaction, } from '@solana/wallet-standard-features';\nimport { getChainForEndpoint, getCommitment } from '@solana/wallet-standard-util';\nimport { PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';\nimport { StandardConnect, StandardDisconnect, StandardEvents, } from '@wallet-standard/features';\nimport { arraysEqual } from '@wallet-standard/wallet';\nimport bs58 from 'bs58';\n/** TODO: docs */\nexport class StandardWalletAdapter extends BaseWalletAdapter {\n constructor({ wallet }) {\n super();\n _StandardWalletAdapter_instances.add(this);\n _StandardWalletAdapter_account.set(this, void 0);\n _StandardWalletAdapter_publicKey.set(this, void 0);\n _StandardWalletAdapter_connecting.set(this, void 0);\n _StandardWalletAdapter_disconnecting.set(this, void 0);\n _StandardWalletAdapter_off.set(this, void 0);\n _StandardWalletAdapter_supportedTransactionVersions.set(this, void 0);\n _StandardWalletAdapter_wallet.set(this, void 0);\n _StandardWalletAdapter_readyState.set(this, typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.Installed);\n _StandardWalletAdapter_changed.set(this, (properties) => {\n // If accounts have changed on the wallet, reflect this on the adapter.\n if ('accounts' in properties) {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts[0];\n // If the adapter isn't connected, or is disconnecting, or the first account hasn't changed, do nothing.\n if (__classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\") && !__classPrivateFieldGet(this, _StandardWalletAdapter_disconnecting, \"f\") && account !== __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")) {\n // If there's a connected account, connect the adapter. Otherwise, disconnect it.\n if (account) {\n // Connect the adapter.\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, account);\n }\n else {\n // Emit an error because the wallet spontaneously disconnected.\n this.emit('error', new WalletDisconnectedError());\n // Disconnect the adapter.\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_disconnected).call(this);\n }\n }\n }\n // After reflecting account changes, if features have changed on the wallet, reflect this on the adapter.\n if ('features' in properties) {\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n }\n });\n __classPrivateFieldSet(this, _StandardWalletAdapter_wallet, wallet, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_off, __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardEvents].on('change', __classPrivateFieldGet(this, _StandardWalletAdapter_changed, \"f\")), \"f\");\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n }\n get name() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").name;\n }\n get url() {\n return 'https://github.com/solana-labs/wallet-standard';\n }\n get icon() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").icon;\n }\n get readyState() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_readyState, \"f\");\n }\n get publicKey() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_publicKey, \"f\");\n }\n get connecting() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_connecting, \"f\");\n }\n get supportedTransactionVersions() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_supportedTransactionVersions, \"f\");\n }\n get wallet() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\");\n }\n get standard() {\n return true;\n }\n destroy() {\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n const off = __classPrivateFieldGet(this, _StandardWalletAdapter_off, \"f\");\n if (off) {\n __classPrivateFieldSet(this, _StandardWalletAdapter_off, null, \"f\");\n off();\n }\n }\n async autoConnect() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connect).call(this, { silent: true });\n }\n async connect() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connect).call(this);\n }\n async disconnect() {\n if (StandardDisconnect in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n try {\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, true, \"f\");\n await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardDisconnect].disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n finally {\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n }\n }\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_disconnected).call(this);\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n let feature;\n if (SolanaSignAndSendTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n if (account.features.includes(SolanaSignAndSendTransaction)) {\n feature = SolanaSignAndSendTransaction;\n }\n else if (SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features &&\n account.features.includes(SolanaSignTransaction)) {\n feature = SolanaSignTransaction;\n }\n else {\n throw new WalletAccountError();\n }\n }\n else if (SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n if (!account.features.includes(SolanaSignTransaction))\n throw new WalletAccountError();\n feature = SolanaSignTransaction;\n }\n else {\n throw new WalletConfigError();\n }\n const chain = getChainForEndpoint(connection.rpcEndpoint);\n if (!account.chains.includes(chain))\n throw new WalletSendTransactionError();\n try {\n const { signers, ...sendOptions } = options;\n let serializedTransaction;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n serializedTransaction = transaction.serialize();\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n serializedTransaction = new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n }));\n }\n if (feature === SolanaSignAndSendTransaction) {\n const [output] = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignAndSendTransaction].signAndSendTransaction({\n account,\n chain,\n transaction: serializedTransaction,\n options: {\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n skipPreflight: sendOptions.skipPreflight,\n maxRetries: sendOptions.maxRetries,\n minContextSlot: sendOptions.minContextSlot,\n },\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return bs58.encode(output.signature);\n }\n else {\n const [output] = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].signTransaction({\n account,\n chain,\n transaction: serializedTransaction,\n options: {\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n minContextSlot: sendOptions.minContextSlot,\n },\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return await connection.sendRawTransaction(output.signedTransaction, {\n ...sendOptions,\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n });\n }\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n_StandardWalletAdapter_account = new WeakMap(), _StandardWalletAdapter_publicKey = new WeakMap(), _StandardWalletAdapter_connecting = new WeakMap(), _StandardWalletAdapter_disconnecting = new WeakMap(), _StandardWalletAdapter_off = new WeakMap(), _StandardWalletAdapter_supportedTransactionVersions = new WeakMap(), _StandardWalletAdapter_wallet = new WeakMap(), _StandardWalletAdapter_readyState = new WeakMap(), _StandardWalletAdapter_changed = new WeakMap(), _StandardWalletAdapter_instances = new WeakSet(), _StandardWalletAdapter_connect = async function _StandardWalletAdapter_connect(input) {\n try {\n if (this.connected || this.connecting)\n return;\n if (__classPrivateFieldGet(this, _StandardWalletAdapter_readyState, \"f\") !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, true, \"f\");\n if (!__classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts.length) {\n try {\n await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardConnect].connect(input);\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts[0];\n if (!account)\n throw new WalletAccountError();\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, account);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n }\n}, _StandardWalletAdapter_connected = function _StandardWalletAdapter_connected(account) {\n let publicKey;\n try {\n // Use account.address instead of account.publicKey since address could be a PDA\n publicKey = new PublicKey(account.address);\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, account, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, publicKey, \"f\");\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n this.emit('connect', publicKey);\n}, _StandardWalletAdapter_disconnected = function _StandardWalletAdapter_disconnected() {\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n this.emit('disconnect');\n}, _StandardWalletAdapter_reset = function _StandardWalletAdapter_reset() {\n const supportedTransactionVersions = SolanaSignAndSendTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features\n ? __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignAndSendTransaction].supportedTransactionVersions\n : __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].supportedTransactionVersions;\n __classPrivateFieldSet(this, _StandardWalletAdapter_supportedTransactionVersions, arraysEqual(supportedTransactionVersions, ['legacy'])\n ? null\n : new Set(supportedTransactionVersions), \"f\");\n if (SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features && __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")?.features.includes(SolanaSignTransaction)) {\n this.signTransaction = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signTransaction);\n this.signAllTransactions = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signAllTransactions);\n }\n else {\n delete this.signTransaction;\n delete this.signAllTransactions;\n }\n if (SolanaSignMessage in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features && __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")?.features.includes(SolanaSignMessage)) {\n this.signMessage = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signMessage);\n }\n else {\n delete this.signMessage;\n }\n if (SolanaSignIn in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n this.signIn = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signIn);\n }\n else {\n delete this.signIn;\n }\n}, _StandardWalletAdapter_signTransaction = async function _StandardWalletAdapter_signTransaction(transaction) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(SolanaSignTransaction))\n throw new WalletAccountError();\n try {\n const signedTransactions = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].signTransaction({\n account,\n transaction: isVersionedTransaction(transaction)\n ? transaction.serialize()\n : new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n })),\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const serializedTransaction = signedTransactions[0].signedTransaction;\n return (isVersionedTransaction(transaction)\n ? VersionedTransaction.deserialize(serializedTransaction)\n : Transaction.from(serializedTransaction));\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signAllTransactions = async function _StandardWalletAdapter_signAllTransactions(transactions) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(SolanaSignTransaction))\n throw new WalletAccountError();\n try {\n const signedTransactions = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].signTransaction(...transactions.map((transaction) => ({\n account,\n transaction: isVersionedTransaction(transaction)\n ? transaction.serialize()\n : new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n })),\n })));\n return transactions.map((transaction, index) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const signedTransaction = signedTransactions[index].signedTransaction;\n return (isVersionedTransaction(transaction)\n ? VersionedTransaction.deserialize(signedTransaction)\n : Transaction.from(signedTransaction));\n });\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signMessage = async function _StandardWalletAdapter_signMessage(message) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(SolanaSignMessage in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(SolanaSignMessage))\n throw new WalletAccountError();\n try {\n const signedMessages = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignMessage].signMessage({\n account,\n message,\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return signedMessages[0].signature;\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signIn = async function _StandardWalletAdapter_signIn(input = {}) {\n try {\n if (!(SolanaSignIn in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n let output;\n try {\n [output] = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignIn].signIn(input);\n }\n catch (error) {\n throw new WalletSignInError(error?.message, error);\n }\n if (!output)\n throw new WalletSignInError();\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, output.account);\n return output;\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n};\n//# sourceMappingURL=adapter.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _AppReadyEvent_detail;\nlet wallets = undefined;\nconst registered = new Set();\nconst listeners = {};\n/**\n * Get an API for {@link Wallets.get | getting}, {@link Wallets.on | listening for}, and\n * {@link Wallets.register | registering} {@link \"@wallet-standard/base\".Wallet | Wallets}.\n *\n * When called for the first time --\n *\n * This dispatches a {@link \"@wallet-standard/base\".WindowAppReadyEvent} to notify each Wallet that the app is ready\n * to register it.\n *\n * This also adds a listener for {@link \"@wallet-standard/base\".WindowRegisterWalletEvent} to listen for a notification\n * from each Wallet that the Wallet is ready to be registered by the app.\n *\n * This combination of event dispatch and listener guarantees that each Wallet will be registered synchronously as soon\n * as the app is ready whether the app loads before or after each Wallet.\n *\n * @return API for getting, listening for, and registering Wallets.\n *\n * @group App\n */\nexport function getWallets() {\n if (wallets)\n return wallets;\n wallets = Object.freeze({ register, get, on });\n if (typeof window === 'undefined')\n return wallets;\n const api = Object.freeze({ register });\n try {\n window.addEventListener('wallet-standard:register-wallet', ({ detail: callback }) => callback(api));\n }\n catch (error) {\n console.error('wallet-standard:register-wallet event listener could not be added\\n', error);\n }\n try {\n window.dispatchEvent(new AppReadyEvent(api));\n }\n catch (error) {\n console.error('wallet-standard:app-ready event could not be dispatched\\n', error);\n }\n return wallets;\n}\nfunction register(...wallets) {\n // Filter out wallets that have already been registered.\n // This prevents the same wallet from being registered twice, but it also prevents wallets from being\n // unregistered by reusing a reference to the wallet to obtain the unregister function for it.\n wallets = wallets.filter((wallet) => !registered.has(wallet));\n // If there are no new wallets to register, just return a no-op unregister function.\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n if (!wallets.length)\n return () => { };\n wallets.forEach((wallet) => registered.add(wallet));\n listeners['register']?.forEach((listener) => guard(() => listener(...wallets)));\n // Return a function that unregisters the registered wallets.\n return function unregister() {\n wallets.forEach((wallet) => registered.delete(wallet));\n listeners['unregister']?.forEach((listener) => guard(() => listener(...wallets)));\n };\n}\nfunction get() {\n return [...registered];\n}\nfunction on(event, listener) {\n listeners[event]?.push(listener) || (listeners[event] = [listener]);\n // Return a function that removes the event listener.\n return function off() {\n listeners[event] = listeners[event]?.filter((existingListener) => listener !== existingListener);\n };\n}\nfunction guard(callback) {\n try {\n callback();\n }\n catch (error) {\n console.error(error);\n }\n}\nclass AppReadyEvent extends Event {\n constructor(api) {\n super('wallet-standard:app-ready', {\n bubbles: false,\n cancelable: false,\n composed: false,\n });\n _AppReadyEvent_detail.set(this, void 0);\n __classPrivateFieldSet(this, _AppReadyEvent_detail, api, \"f\");\n }\n get detail() {\n return __classPrivateFieldGet(this, _AppReadyEvent_detail, \"f\");\n }\n get type() {\n return 'wallet-standard:app-ready';\n }\n /** @deprecated */\n preventDefault() {\n throw new Error('preventDefault cannot be called');\n }\n /** @deprecated */\n stopImmediatePropagation() {\n throw new Error('stopImmediatePropagation cannot be called');\n }\n /** @deprecated */\n stopPropagation() {\n throw new Error('stopPropagation cannot be called');\n }\n}\n_AppReadyEvent_detail = new WeakMap();\n/**\n * @deprecated Use {@link getWallets} instead.\n *\n * @group Deprecated\n */\nexport function DEPRECATED_getWallets() {\n if (wallets)\n return wallets;\n wallets = getWallets();\n if (typeof window === 'undefined')\n return wallets;\n const callbacks = window.navigator.wallets || [];\n if (!Array.isArray(callbacks)) {\n console.error('window.navigator.wallets is not an array');\n return wallets;\n }\n const { register } = wallets;\n const push = (...callbacks) => callbacks.forEach((callback) => guard(() => callback({ register })));\n try {\n Object.defineProperty(window.navigator, 'wallets', {\n value: Object.freeze({ push }),\n });\n }\n catch (error) {\n console.error('window.navigator.wallets could not be set');\n return wallets;\n }\n push(...callbacks);\n return wallets;\n}\n//# sourceMappingURL=wallets.js.map","import { isWalletAdapterCompatibleWallet, StandardWalletAdapter } from '@solana/wallet-standard-wallet-adapter-base';\nimport { DEPRECATED_getWallets } from '@wallet-standard/app';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nexport function useStandardWalletAdapters(adapters) {\n const warnings = useConstant(() => new Set());\n const { get, on } = useConstant(() => DEPRECATED_getWallets());\n const [standardAdapters, setStandardAdapters] = useState(() => wrapWalletsWithAdapters(get()));\n useEffect(() => {\n const listeners = [\n on('register', (...wallets) => setStandardAdapters((standardAdapters) => [...standardAdapters, ...wrapWalletsWithAdapters(wallets)])),\n on('unregister', (...wallets) => setStandardAdapters((standardAdapters) => standardAdapters.filter((standardAdapter) => wallets.some((wallet) => wallet === standardAdapter.wallet)))),\n ];\n return () => listeners.forEach((off) => off());\n }, [on]);\n const prevStandardAdapters = usePrevious(standardAdapters);\n useEffect(() => {\n if (!prevStandardAdapters)\n return;\n const currentAdapters = new Set(standardAdapters);\n const removedAdapters = new Set(prevStandardAdapters.filter((previousAdapter) => !currentAdapters.has(previousAdapter)));\n removedAdapters.forEach((adapter) => adapter.destroy());\n }, [prevStandardAdapters, standardAdapters]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => () => standardAdapters.forEach((adapter) => adapter.destroy()), []);\n return useMemo(() => [\n ...standardAdapters,\n ...adapters.filter(({ name }) => {\n if (standardAdapters.some((standardAdapter) => standardAdapter.name === name)) {\n if (!warnings.has(name)) {\n warnings.add(name);\n console.warn(`${name} was registered as a Standard Wallet. The Wallet Adapter for ${name} can be removed from your app.`);\n }\n return false;\n }\n return true;\n }),\n ], [standardAdapters, adapters, warnings]);\n}\nfunction useConstant(fn) {\n const ref = useRef();\n if (!ref.current) {\n ref.current = { value: fn() };\n }\n return ref.current.value;\n}\nfunction usePrevious(state) {\n const ref = useRef();\n useEffect(() => {\n ref.current = state;\n });\n return ref.current;\n}\nfunction wrapWalletsWithAdapters(wallets) {\n return wallets.filter(isWalletAdapterCompatibleWallet).map((wallet) => new StandardWalletAdapter({ wallet }));\n}\n//# sourceMappingURL=useStandardWalletAdapters.js.map","import { SolanaMobileWalletAdapterWalletName } from '@solana-mobile/wallet-adapter-mobile';\nimport { WalletReadyState } from '@solana/wallet-adapter-base';\nexport var Environment;\n(function (Environment) {\n Environment[Environment[\"DESKTOP_WEB\"] = 0] = \"DESKTOP_WEB\";\n Environment[Environment[\"MOBILE_WEB\"] = 1] = \"MOBILE_WEB\";\n})(Environment || (Environment = {}));\nfunction isWebView(userAgentString) {\n return /(WebView|Version\\/.+(Chrome)\\/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)|; wv\\).+(Chrome)\\/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+))/i.test(userAgentString);\n}\nexport default function getEnvironment({ adapters, userAgentString }) {\n if (adapters.some((adapter) => adapter.name !== SolanaMobileWalletAdapterWalletName &&\n adapter.readyState === WalletReadyState.Installed)) {\n /**\n * There are only two ways a browser extension adapter should be able to reach `Installed` status:\n *\n * 1. Its browser extension is installed.\n * 2. The app is running on a mobile wallet's in-app browser.\n *\n * In either case, we consider the environment to be desktop-like.\n */\n return Environment.DESKTOP_WEB;\n }\n if (userAgentString &&\n // Step 1: Check whether we're on a platform that supports MWA at all.\n /android/i.test(userAgentString) &&\n // Step 2: Determine that we are *not* running in a WebView.\n !isWebView(userAgentString)) {\n return Environment.MOBILE_WEB;\n }\n else {\n return Environment.DESKTOP_WEB;\n }\n}\n//# sourceMappingURL=getEnvironment.js.map","export default function getInferredClusterFromEndpoint(endpoint) {\n if (!endpoint) {\n return 'mainnet-beta';\n }\n if (/devnet/i.test(endpoint)) {\n return 'devnet';\n }\n else if (/testnet/i.test(endpoint)) {\n return 'testnet';\n }\n else {\n return 'mainnet-beta';\n }\n}\n//# sourceMappingURL=getInferredClusterFromEndpoint.js.map","import { useEffect, useRef, useState } from 'react';\nexport function useLocalStorage(key, defaultState) {\n const state = useState(() => {\n try {\n const value = localStorage.getItem(key);\n if (value)\n return JSON.parse(value);\n }\n catch (error) {\n if (typeof window !== 'undefined') {\n console.error(error);\n }\n }\n return defaultState;\n });\n const value = state[0];\n const isFirstRenderRef = useRef(true);\n useEffect(() => {\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false;\n return;\n }\n try {\n if (value === null) {\n localStorage.removeItem(key);\n }\n else {\n localStorage.setItem(key, JSON.stringify(value));\n }\n }\n catch (error) {\n if (typeof window !== 'undefined') {\n console.error(error);\n }\n }\n }, [value, key]);\n return state;\n}\n//# sourceMappingURL=useLocalStorage.js.map","import { WalletError } from '@solana/wallet-adapter-base';\nexport class WalletNotSelectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotSelectedError';\n }\n}\n//# sourceMappingURL=errors.js.map","import { WalletNotConnectedError, WalletNotReadyError, WalletReadyState, } from '@solana/wallet-adapter-base';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { WalletNotSelectedError } from './errors.js';\nimport { WalletContext } from './useWallet.js';\nexport function WalletProviderBase({ children, wallets: adapters, adapter, isUnloadingRef, onAutoConnectRequest, onConnectError, onError, onSelectWallet, }) {\n const isConnectingRef = useRef(false);\n const [connecting, setConnecting] = useState(false);\n const isDisconnectingRef = useRef(false);\n const [disconnecting, setDisconnecting] = useState(false);\n const [publicKey, setPublicKey] = useState(() => adapter?.publicKey ?? null);\n const [connected, setConnected] = useState(() => adapter?.connected ?? false);\n /**\n * Store the error handlers as refs so that a change in the\n * custom error handler does not recompute other dependencies.\n */\n const onErrorRef = useRef(onError);\n useEffect(() => {\n onErrorRef.current = onError;\n return () => {\n onErrorRef.current = undefined;\n };\n }, [onError]);\n const handleErrorRef = useRef((error, adapter) => {\n if (!isUnloadingRef.current) {\n if (onErrorRef.current) {\n onErrorRef.current(error, adapter);\n }\n else {\n console.error(error, adapter);\n if (error instanceof WalletNotReadyError && typeof window !== 'undefined' && adapter) {\n window.open(adapter.url, '_blank');\n }\n }\n }\n return error;\n });\n // Wrap adapters to conform to the `Wallet` interface\n const [wallets, setWallets] = useState(() => adapters\n .map((adapter) => ({\n adapter,\n readyState: adapter.readyState,\n }))\n .filter(({ readyState }) => readyState !== WalletReadyState.Unsupported));\n // When the adapters change, start to listen for changes to their `readyState`\n useEffect(() => {\n // When the adapters change, wrap them to conform to the `Wallet` interface\n setWallets((wallets) => adapters\n .map((adapter, index) => {\n const wallet = wallets[index];\n // If the wallet hasn't changed, return the same instance\n return wallet && wallet.adapter === adapter && wallet.readyState === adapter.readyState\n ? wallet\n : {\n adapter: adapter,\n readyState: adapter.readyState,\n };\n })\n .filter(({ readyState }) => readyState !== WalletReadyState.Unsupported));\n function handleReadyStateChange(readyState) {\n setWallets((prevWallets) => {\n const index = prevWallets.findIndex(({ adapter }) => adapter === this);\n if (index === -1)\n return prevWallets;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const { adapter } = prevWallets[index];\n return [\n ...prevWallets.slice(0, index),\n { adapter, readyState },\n ...prevWallets.slice(index + 1),\n ].filter(({ readyState }) => readyState !== WalletReadyState.Unsupported);\n });\n }\n adapters.forEach((adapter) => adapter.on('readyStateChange', handleReadyStateChange, adapter));\n return () => {\n adapters.forEach((adapter) => adapter.off('readyStateChange', handleReadyStateChange, adapter));\n };\n }, [adapter, adapters]);\n const wallet = useMemo(() => wallets.find((wallet) => wallet.adapter === adapter) ?? null, [adapter, wallets]);\n // Setup and teardown event listeners when the adapter changes\n useEffect(() => {\n if (!adapter)\n return;\n const handleConnect = (publicKey) => {\n setPublicKey(publicKey);\n isConnectingRef.current = false;\n setConnecting(false);\n setConnected(true);\n isDisconnectingRef.current = false;\n setDisconnecting(false);\n };\n const handleDisconnect = () => {\n if (isUnloadingRef.current)\n return;\n setPublicKey(null);\n isConnectingRef.current = false;\n setConnecting(false);\n setConnected(false);\n isDisconnectingRef.current = false;\n setDisconnecting(false);\n };\n const handleError = (error) => {\n handleErrorRef.current(error, adapter);\n };\n adapter.on('connect', handleConnect);\n adapter.on('disconnect', handleDisconnect);\n adapter.on('error', handleError);\n return () => {\n adapter.off('connect', handleConnect);\n adapter.off('disconnect', handleDisconnect);\n adapter.off('error', handleError);\n handleDisconnect();\n };\n }, [adapter, isUnloadingRef]);\n // When the adapter changes, clear the `autoConnect` tracking flag\n const didAttemptAutoConnectRef = useRef(false);\n useEffect(() => {\n return () => {\n didAttemptAutoConnectRef.current = false;\n };\n }, [adapter]);\n // If auto-connect is enabled, request to connect when the adapter changes and is ready\n useEffect(() => {\n if (didAttemptAutoConnectRef.current ||\n isConnectingRef.current ||\n connected ||\n !onAutoConnectRequest ||\n !(wallet?.readyState === WalletReadyState.Installed || wallet?.readyState === WalletReadyState.Loadable))\n return;\n isConnectingRef.current = true;\n setConnecting(true);\n didAttemptAutoConnectRef.current = true;\n (async function () {\n try {\n await onAutoConnectRequest();\n }\n catch {\n onConnectError();\n // Drop the error. It will be caught by `handleError` anyway.\n }\n finally {\n setConnecting(false);\n isConnectingRef.current = false;\n }\n })();\n }, [connected, onAutoConnectRequest, onConnectError, wallet]);\n // Send a transaction using the provided connection\n const sendTransaction = useCallback(async (transaction, connection, options) => {\n if (!adapter)\n throw handleErrorRef.current(new WalletNotSelectedError());\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.sendTransaction(transaction, connection, options);\n }, [adapter, connected]);\n // Sign a transaction if the wallet supports it\n const signTransaction = useMemo(() => adapter && 'signTransaction' in adapter\n ? async (transaction) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signTransaction(transaction);\n }\n : undefined, [adapter, connected]);\n // Sign multiple transactions if the wallet supports it\n const signAllTransactions = useMemo(() => adapter && 'signAllTransactions' in adapter\n ? async (transactions) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signAllTransactions(transactions);\n }\n : undefined, [adapter, connected]);\n // Sign an arbitrary message if the wallet supports it\n const signMessage = useMemo(() => adapter && 'signMessage' in adapter\n ? async (message) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signMessage(message);\n }\n : undefined, [adapter, connected]);\n // Sign in if the wallet supports it\n const signIn = useMemo(() => adapter && 'signIn' in adapter\n ? async (input) => {\n return await adapter.signIn(input);\n }\n : undefined, [adapter]);\n const handleConnect = useCallback(async () => {\n if (isConnectingRef.current || isDisconnectingRef.current || wallet?.adapter.connected)\n return;\n if (!wallet)\n throw handleErrorRef.current(new WalletNotSelectedError());\n const { adapter, readyState } = wallet;\n if (!(readyState === WalletReadyState.Installed || readyState === WalletReadyState.Loadable))\n throw handleErrorRef.current(new WalletNotReadyError(), adapter);\n isConnectingRef.current = true;\n setConnecting(true);\n try {\n await adapter.connect();\n }\n catch (e) {\n onConnectError();\n throw e;\n }\n finally {\n setConnecting(false);\n isConnectingRef.current = false;\n }\n }, [onConnectError, wallet]);\n const handleDisconnect = useCallback(async () => {\n if (isDisconnectingRef.current)\n return;\n if (!adapter)\n return;\n isDisconnectingRef.current = true;\n setDisconnecting(true);\n try {\n await adapter.disconnect();\n }\n finally {\n setDisconnecting(false);\n isDisconnectingRef.current = false;\n }\n }, [adapter]);\n return (React.createElement(WalletContext.Provider, { value: {\n autoConnect: !!onAutoConnectRequest,\n wallets,\n wallet,\n publicKey,\n connected,\n connecting,\n disconnecting,\n select: onSelectWallet,\n connect: handleConnect,\n disconnect: handleDisconnect,\n sendTransaction,\n signTransaction,\n signAllTransactions,\n signMessage,\n signIn,\n } }, children));\n}\n//# sourceMappingURL=WalletProviderBase.js.map","import { createDefaultAddressSelector, createDefaultAuthorizationResultCache, createDefaultWalletNotFoundHandler, SolanaMobileWalletAdapter, SolanaMobileWalletAdapterWalletName, } from '@solana-mobile/wallet-adapter-mobile';\nimport { useStandardWalletAdapters } from '@solana/wallet-standard-wallet-adapter-react';\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport getEnvironment, { Environment } from './getEnvironment.js';\nimport getInferredClusterFromEndpoint from './getInferredClusterFromEndpoint.js';\nimport { useConnection } from './useConnection.js';\nimport { useLocalStorage } from './useLocalStorage.js';\nimport { WalletProviderBase } from './WalletProviderBase.js';\nlet _userAgent;\nfunction getUserAgent() {\n if (_userAgent === undefined) {\n _userAgent = globalThis.navigator?.userAgent ?? null;\n }\n return _userAgent;\n}\nfunction getIsMobile(adapters) {\n const userAgentString = getUserAgent();\n return getEnvironment({ adapters, userAgentString }) === Environment.MOBILE_WEB;\n}\nfunction getUriForAppIdentity() {\n const location = globalThis.location;\n if (!location)\n return;\n return `${location.protocol}//${location.host}`;\n}\nexport function WalletProvider({ children, wallets: adapters, autoConnect, localStorageKey = 'walletName', onError, }) {\n const { connection } = useConnection();\n const adaptersWithStandardAdapters = useStandardWalletAdapters(adapters);\n const mobileWalletAdapter = useMemo(() => {\n if (!getIsMobile(adaptersWithStandardAdapters)) {\n return null;\n }\n const existingMobileWalletAdapter = adaptersWithStandardAdapters.find((adapter) => adapter.name === SolanaMobileWalletAdapterWalletName);\n if (existingMobileWalletAdapter) {\n return existingMobileWalletAdapter;\n }\n return new SolanaMobileWalletAdapter({\n addressSelector: createDefaultAddressSelector(),\n appIdentity: {\n uri: getUriForAppIdentity(),\n },\n authorizationResultCache: createDefaultAuthorizationResultCache(),\n cluster: getInferredClusterFromEndpoint(connection?.rpcEndpoint),\n onWalletNotFound: createDefaultWalletNotFoundHandler(),\n });\n }, [adaptersWithStandardAdapters, connection?.rpcEndpoint]);\n const adaptersWithMobileWalletAdapter = useMemo(() => {\n if (mobileWalletAdapter == null || adaptersWithStandardAdapters.indexOf(mobileWalletAdapter) !== -1) {\n return adaptersWithStandardAdapters;\n }\n return [mobileWalletAdapter, ...adaptersWithStandardAdapters];\n }, [adaptersWithStandardAdapters, mobileWalletAdapter]);\n const [walletName, setWalletName] = useLocalStorage(localStorageKey, getIsMobile(adaptersWithStandardAdapters) ? SolanaMobileWalletAdapterWalletName : null);\n const adapter = useMemo(() => adaptersWithMobileWalletAdapter.find((a) => a.name === walletName) ?? null, [adaptersWithMobileWalletAdapter, walletName]);\n const changeWallet = useCallback((nextWalletName) => {\n if (walletName === nextWalletName)\n return;\n if (adapter &&\n // Selecting a wallet other than the mobile wallet adapter is not\n // sufficient reason to call `disconnect` on the mobile wallet adapter.\n // Calling `disconnect` on the mobile wallet adapter causes the entire\n // authorization store to be wiped.\n adapter.name !== SolanaMobileWalletAdapterWalletName) {\n adapter.disconnect();\n }\n setWalletName(nextWalletName);\n }, [adapter, setWalletName, walletName]);\n useEffect(() => {\n if (!adapter)\n return;\n function handleDisconnect() {\n if (isUnloadingRef.current)\n return;\n // Leave the adapter selected in the event of a disconnection.\n if (walletName === SolanaMobileWalletAdapterWalletName && getIsMobile(adaptersWithStandardAdapters))\n return;\n setWalletName(null);\n }\n adapter.on('disconnect', handleDisconnect);\n return () => {\n adapter.off('disconnect', handleDisconnect);\n };\n }, [adapter, adaptersWithStandardAdapters, setWalletName, walletName]);\n const hasUserSelectedAWallet = useRef(false);\n const handleAutoConnectRequest = useMemo(() => {\n if (!autoConnect || !adapter)\n return;\n return async () => {\n // If autoConnect is true or returns true, use the default autoConnect behavior.\n if (autoConnect === true || (await autoConnect(adapter))) {\n if (hasUserSelectedAWallet.current) {\n await adapter.connect();\n }\n else {\n await adapter.autoConnect();\n }\n }\n };\n }, [autoConnect, adapter]);\n const isUnloadingRef = useRef(false);\n useEffect(() => {\n if (walletName === SolanaMobileWalletAdapterWalletName && getIsMobile(adaptersWithStandardAdapters)) {\n isUnloadingRef.current = false;\n return;\n }\n function handleBeforeUnload() {\n isUnloadingRef.current = true;\n }\n /**\n * Some wallets fire disconnection events when the window unloads. Since there's no way to\n * distinguish between a disconnection event received because a user initiated it, and one\n * that was received because they've closed the window, we have to track window unload\n * events themselves. Downstream components use this information to decide whether to act\n * upon or drop wallet events and errors.\n */\n window.addEventListener('beforeunload', handleBeforeUnload);\n return () => {\n window.removeEventListener('beforeunload', handleBeforeUnload);\n };\n }, [adaptersWithStandardAdapters, walletName]);\n const handleConnectError = useCallback(() => {\n if (adapter && adapter.name !== SolanaMobileWalletAdapterWalletName) {\n // If any error happens while connecting, unset the adapter.\n changeWallet(null);\n }\n }, [adapter, changeWallet]);\n const selectWallet = useCallback((walletName) => {\n hasUserSelectedAWallet.current = true;\n changeWallet(walletName);\n }, [changeWallet]);\n return (React.createElement(WalletProviderBase, { wallets: adaptersWithMobileWalletAdapter, adapter: adapter, isUnloadingRef: isUnloadingRef, onAutoConnectRequest: handleAutoConnectRequest, onConnectError: handleConnectError, onError: onError, onSelectWallet: selectWallet }, children));\n}\n//# sourceMappingURL=WalletProvider.js.map","import React, { useLayoutEffect, useRef } from 'react';\nexport const Collapse = ({ id, children, expanded = false }) => {\n const ref = useRef(null);\n const instant = useRef(true);\n const transition = 'height 250ms ease-out';\n const openCollapse = () => {\n const node = ref.current;\n if (!node)\n return;\n requestAnimationFrame(() => {\n node.style.height = node.scrollHeight + 'px';\n });\n };\n const closeCollapse = () => {\n const node = ref.current;\n if (!node)\n return;\n requestAnimationFrame(() => {\n node.style.height = node.offsetHeight + 'px';\n node.style.overflow = 'hidden';\n requestAnimationFrame(() => {\n node.style.height = '0';\n });\n });\n };\n useLayoutEffect(() => {\n if (expanded) {\n openCollapse();\n }\n else {\n closeCollapse();\n }\n }, [expanded]);\n useLayoutEffect(() => {\n const node = ref.current;\n if (!node)\n return;\n function handleComplete() {\n if (!node)\n return;\n node.style.overflow = expanded ? 'initial' : 'hidden';\n if (expanded) {\n node.style.height = 'auto';\n }\n }\n function handleTransitionEnd(event) {\n if (node && event.target === node && event.propertyName === 'height') {\n handleComplete();\n }\n }\n if (instant.current) {\n handleComplete();\n instant.current = false;\n }\n node.addEventListener('transitionend', handleTransitionEnd);\n return () => node.removeEventListener('transitionend', handleTransitionEnd);\n }, [expanded]);\n return (React.createElement(\"div\", { className: \"wallet-adapter-collapse\", id: id, ref: ref, role: \"region\", style: { height: 0, transition: instant.current ? undefined : transition } }, children));\n};\n//# sourceMappingURL=Collapse.js.map","import React from 'react';\nexport const Button = (props) => {\n return (React.createElement(\"button\", { className: `wallet-adapter-button ${props.className || ''}`, disabled: props.disabled, style: props.style, onClick: props.onClick, tabIndex: props.tabIndex || 0, type: \"button\" },\n props.startIcon && React.createElement(\"i\", { className: \"wallet-adapter-button-start-icon\" }, props.startIcon),\n props.children,\n props.endIcon && React.createElement(\"i\", { className: \"wallet-adapter-button-end-icon\" }, props.endIcon)));\n};\n//# sourceMappingURL=Button.js.map","import React from 'react';\nexport const WalletIcon = ({ wallet, ...props }) => {\n return wallet && React.createElement(\"img\", { src: wallet.adapter.icon, alt: `${wallet.adapter.name} icon`, ...props });\n};\n//# sourceMappingURL=WalletIcon.js.map","import { WalletReadyState } from '@solana/wallet-adapter-base';\nimport React from 'react';\nimport { Button } from './Button.js';\nimport { WalletIcon } from './WalletIcon.js';\nexport const WalletListItem = ({ handleClick, tabIndex, wallet }) => {\n return (React.createElement(\"li\", null,\n React.createElement(Button, { onClick: handleClick, startIcon: React.createElement(WalletIcon, { wallet: wallet }), tabIndex: tabIndex },\n wallet.adapter.name,\n wallet.readyState === WalletReadyState.Installed && React.createElement(\"span\", null, \"Detected\"))));\n};\n//# sourceMappingURL=WalletListItem.js.map","import React from 'react';\nexport const WalletSVG = () => {\n return (React.createElement(\"svg\", { width: \"97\", height: \"96\", viewBox: \"0 0 97 96\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"circle\", { cx: \"48.5\", cy: \"48\", r: \"48\", fill: \"url(#paint0_linear_880_5115)\", fillOpacity: \"0.1\" }),\n React.createElement(\"circle\", { cx: \"48.5\", cy: \"48\", r: \"47\", stroke: \"url(#paint1_linear_880_5115)\", strokeOpacity: \"0.4\", strokeWidth: \"2\" }),\n React.createElement(\"g\", { clipPath: \"url(#clip0_880_5115)\" },\n React.createElement(\"path\", { d: \"M65.5769 28.1523H31.4231C27.6057 28.1523 24.5 31.258 24.5 35.0754V60.9215C24.5 64.7389 27.6057 67.8446 31.4231 67.8446H65.5769C69.3943 67.8446 72.5 64.7389 72.5 60.9215V35.0754C72.5 31.258 69.3943 28.1523 65.5769 28.1523ZM69.7308 52.1523H59.5769C57.2865 52.1523 55.4231 50.289 55.4231 47.9985C55.4231 45.708 57.2864 43.8446 59.5769 43.8446H69.7308V52.1523ZM69.7308 41.0754H59.5769C55.7595 41.0754 52.6539 44.1811 52.6539 47.9985C52.6539 51.8159 55.7595 54.9215 59.5769 54.9215H69.7308V60.9215C69.7308 63.2119 67.8674 65.0754 65.5769 65.0754H31.4231C29.1327 65.0754 27.2692 63.212 27.2692 60.9215V35.0754C27.2692 32.785 29.1326 30.9215 31.4231 30.9215H65.5769C67.8673 30.9215 69.7308 32.7849 69.7308 35.0754V41.0754Z\", fill: \"url(#paint2_linear_880_5115)\" }),\n React.createElement(\"path\", { d: \"M61.4231 46.6172H59.577C58.8123 46.6172 58.1924 47.2371 58.1924 48.0018C58.1924 48.7665 58.8123 49.3863 59.577 49.3863H61.4231C62.1878 49.3863 62.8077 48.7664 62.8077 48.0018C62.8077 47.2371 62.1878 46.6172 61.4231 46.6172Z\", fill: \"url(#paint3_linear_880_5115)\" })),\n React.createElement(\"defs\", null,\n React.createElement(\"linearGradient\", { id: \"paint0_linear_880_5115\", x1: \"3.41664\", y1: \"98.0933\", x2: \"103.05\", y2: \"8.42498\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"linearGradient\", { id: \"paint1_linear_880_5115\", x1: \"3.41664\", y1: \"98.0933\", x2: \"103.05\", y2: \"8.42498\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"linearGradient\", { id: \"paint2_linear_880_5115\", x1: \"25.9583\", y1: \"68.7101\", x2: \"67.2337\", y2: \"23.7879\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"linearGradient\", { id: \"paint3_linear_880_5115\", x1: \"58.3326\", y1: \"49.4467\", x2: \"61.0002\", y2: \"45.4453\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"clipPath\", { id: \"clip0_880_5115\" },\n React.createElement(\"rect\", { width: \"48\", height: \"48\", fill: \"white\", transform: \"translate(24.5 24)\" })))));\n};\n//# sourceMappingURL=WalletSVG.js.map","import { WalletReadyState } from '@solana/wallet-adapter-base';\nimport { useWallet } from '@solana/wallet-adapter-react';\nimport React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { Collapse } from './Collapse.js';\nimport { WalletListItem } from './WalletListItem.js';\nimport { WalletSVG } from './WalletSVG.js';\nimport { useWalletModal } from './useWalletModal.js';\nexport const WalletModal = ({ className = '', container = 'body' }) => {\n const ref = useRef(null);\n const { wallets, select } = useWallet();\n const { setVisible } = useWalletModal();\n const [expanded, setExpanded] = useState(false);\n const [fadeIn, setFadeIn] = useState(false);\n const [portal, setPortal] = useState(null);\n const [listedWallets, collapsedWallets] = useMemo(() => {\n const installed = [];\n const notInstalled = [];\n for (const wallet of wallets) {\n if (wallet.readyState === WalletReadyState.Installed) {\n installed.push(wallet);\n }\n else {\n notInstalled.push(wallet);\n }\n }\n return installed.length ? [installed, notInstalled] : [notInstalled, []];\n }, [wallets]);\n const hideModal = useCallback(() => {\n setFadeIn(false);\n setTimeout(() => setVisible(false), 150);\n }, [setVisible]);\n const handleClose = useCallback((event) => {\n event.preventDefault();\n hideModal();\n }, [hideModal]);\n const handleWalletClick = useCallback((event, walletName) => {\n select(walletName);\n handleClose(event);\n }, [select, handleClose]);\n const handleCollapseClick = useCallback(() => setExpanded(!expanded), [expanded]);\n const handleTabKey = useCallback((event) => {\n const node = ref.current;\n if (!node)\n return;\n // here we query all focusable elements\n const focusableElements = node.querySelectorAll('button');\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const firstElement = focusableElements[0];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const lastElement = focusableElements[focusableElements.length - 1];\n if (event.shiftKey) {\n // if going backward by pressing tab and firstElement is active, shift focus to last focusable element\n if (document.activeElement === firstElement) {\n lastElement.focus();\n event.preventDefault();\n }\n }\n else {\n // if going forward by pressing tab and lastElement is active, shift focus to first focusable element\n if (document.activeElement === lastElement) {\n firstElement.focus();\n event.preventDefault();\n }\n }\n }, [ref]);\n useLayoutEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === 'Escape') {\n hideModal();\n }\n else if (event.key === 'Tab') {\n handleTabKey(event);\n }\n };\n // Get original overflow\n const { overflow } = window.getComputedStyle(document.body);\n // Hack to enable fade in animation after mount\n setTimeout(() => setFadeIn(true), 0);\n // Prevent scrolling on mount\n document.body.style.overflow = 'hidden';\n // Listen for keydown events\n window.addEventListener('keydown', handleKeyDown, false);\n return () => {\n // Re-enable scrolling when component unmounts\n document.body.style.overflow = overflow;\n window.removeEventListener('keydown', handleKeyDown, false);\n };\n }, [hideModal, handleTabKey]);\n useLayoutEffect(() => setPortal(document.querySelector(container)), [container]);\n return (portal &&\n createPortal(React.createElement(\"div\", { \"aria-labelledby\": \"wallet-adapter-modal-title\", \"aria-modal\": \"true\", className: `wallet-adapter-modal ${fadeIn && 'wallet-adapter-modal-fade-in'} ${className}`, ref: ref, role: \"dialog\" },\n React.createElement(\"div\", { className: \"wallet-adapter-modal-container\" },\n React.createElement(\"div\", { className: \"wallet-adapter-modal-wrapper\" },\n React.createElement(\"button\", { onClick: handleClose, className: \"wallet-adapter-modal-button-close\" },\n React.createElement(\"svg\", { width: \"14\", height: \"14\" },\n React.createElement(\"path\", { d: \"M14 12.461 8.3 6.772l5.234-5.233L12.006 0 6.772 5.234 1.54 0 0 1.539l5.234 5.233L0 12.006l1.539 1.528L6.772 8.3l5.69 5.7L14 12.461z\" }))),\n listedWallets.length ? (React.createElement(React.Fragment, null,\n React.createElement(\"h1\", { className: \"wallet-adapter-modal-title\" }, \"Connect a wallet on Solana to continue\"),\n React.createElement(\"ul\", { className: \"wallet-adapter-modal-list\" },\n listedWallets.map((wallet) => (React.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), wallet: wallet }))),\n collapsedWallets.length ? (React.createElement(Collapse, { expanded: expanded, id: \"wallet-adapter-modal-collapse\" }, collapsedWallets.map((wallet) => (React.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), tabIndex: expanded ? 0 : -1, wallet: wallet }))))) : null),\n collapsedWallets.length ? (React.createElement(\"button\", { className: \"wallet-adapter-modal-list-more\", onClick: handleCollapseClick, tabIndex: 0 },\n React.createElement(\"span\", null,\n expanded ? 'Less ' : 'More ',\n \"options\"),\n React.createElement(\"svg\", { width: \"13\", height: \"7\", viewBox: \"0 0 13 7\", xmlns: \"http://www.w3.org/2000/svg\", className: `${expanded ? 'wallet-adapter-modal-list-more-icon-rotate' : ''}` },\n React.createElement(\"path\", { d: \"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z\" })))) : null)) : (React.createElement(React.Fragment, null,\n React.createElement(\"h1\", { className: \"wallet-adapter-modal-title\" }, \"You'll need a wallet on Solana to continue\"),\n React.createElement(\"div\", { className: \"wallet-adapter-modal-middle\" },\n React.createElement(WalletSVG, null)),\n collapsedWallets.length ? (React.createElement(React.Fragment, null,\n React.createElement(\"button\", { className: \"wallet-adapter-modal-list-more\", onClick: handleCollapseClick, tabIndex: 0 },\n React.createElement(\"span\", null,\n expanded ? 'Hide ' : 'Already have a wallet? View ',\n \"options\"),\n React.createElement(\"svg\", { width: \"13\", height: \"7\", viewBox: \"0 0 13 7\", xmlns: \"http://www.w3.org/2000/svg\", className: `${expanded ? 'wallet-adapter-modal-list-more-icon-rotate' : ''}` },\n React.createElement(\"path\", { d: \"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z\" }))),\n React.createElement(Collapse, { expanded: expanded, id: \"wallet-adapter-modal-collapse\" },\n React.createElement(\"ul\", { className: \"wallet-adapter-modal-list\" }, collapsedWallets.map((wallet) => (React.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), tabIndex: expanded ? 0 : -1, wallet: wallet }))))))) : null)))),\n React.createElement(\"div\", { className: \"wallet-adapter-modal-overlay\", onMouseDown: handleClose })), portal));\n};\n//# sourceMappingURL=WalletModal.js.map","import React, { useState } from 'react';\nimport { WalletModalContext } from './useWalletModal.js';\nimport { WalletModal } from './WalletModal.js';\nexport const WalletModalProvider = ({ children, ...props }) => {\n const [visible, setVisible] = useState(false);\n return (React.createElement(WalletModalContext.Provider, { value: {\n visible,\n setVisible,\n } },\n children,\n visible && React.createElement(WalletModal, { ...props })));\n};\n//# sourceMappingURL=WalletModalProvider.js.map","import { BaseMessageSignerWalletAdapter, isIosAndRedirectable, isVersionedTransaction, scopePollingDetectionStrategy, WalletAccountError, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignMessageError, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nexport const PhantomWalletName = 'Phantom';\nexport class PhantomWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = PhantomWalletName;\n this.url = 'https://phantom.app';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiB2aWV3Qm94PSIwIDAgMTA4IDEwOCIgZmlsbD0ibm9uZSI+CjxyZWN0IHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiByeD0iMjYiIGZpbGw9IiNBQjlGRjIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00Ni41MjY3IDY5LjkyMjlDNDIuMDA1NCA3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cuMTkzMSA2NS43MjE2IDM3LjE5MzFDNjguMDkxNiAzNy4xOTMxIDcwLjIxMDMgMzguOTg4NSA3MC4yMTAzIDQyLjU3OTVaIiBmaWxsPSIjRkZGREY4Ii8+Cjwvc3ZnPg==';\n this.supportedTransactionVersions = new Set(['legacy', 0]);\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.NotDetected;\n this._disconnected = () => {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._accountChanged = (newPublicKey) => {\n const publicKey = this._publicKey;\n if (!publicKey)\n return;\n try {\n newPublicKey = new PublicKey(newPublicKey.toBytes());\n }\n catch (error) {\n this.emit('error', new WalletPublicKeyError(error?.message, error));\n return;\n }\n if (publicKey.equals(newPublicKey))\n return;\n this._publicKey = newPublicKey;\n this.emit('connect', newPublicKey);\n };\n this._connecting = false;\n this._wallet = null;\n this._publicKey = null;\n if (this._readyState !== WalletReadyState.Unsupported) {\n if (isIosAndRedirectable()) {\n // when in iOS (not webview), set Phantom as loadable instead of checking for install\n this._readyState = WalletReadyState.Loadable;\n this.emit('readyStateChange', this._readyState);\n }\n else {\n scopePollingDetectionStrategy(() => {\n if (window.phantom?.solana?.isPhantom || window.solana?.isPhantom) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n }\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get readyState() {\n return this._readyState;\n }\n async autoConnect() {\n // Skip autoconnect in the Loadable state\n // We can't redirect to a universal link without user input\n if (this.readyState === WalletReadyState.Installed) {\n await this.connect();\n }\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this.readyState === WalletReadyState.Loadable) {\n // redirect to the Phantom /browse universal link\n // this will open the current URL in the Phantom in-wallet browser\n const url = encodeURIComponent(window.location.href);\n const ref = encodeURIComponent(window.location.origin);\n window.location.href = `https://phantom.app/ul/browse/${url}?ref=${ref}`;\n return;\n }\n if (this.readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n this._connecting = true;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const wallet = window.phantom?.solana || window.solana;\n if (!wallet.isConnected) {\n try {\n await wallet.connect();\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n if (!wallet.publicKey)\n throw new WalletAccountError();\n let publicKey;\n try {\n publicKey = new PublicKey(wallet.publicKey.toBytes());\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n wallet.on('disconnect', this._disconnected);\n wallet.on('accountChanged', this._accountChanged);\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n try {\n await wallet.disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n }\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n const { signature } = await wallet.signAndSendTransaction(transaction, sendOptions);\n return signature;\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signature } = await wallet.signMessage(message);\n return signature;\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _RegisterWalletEvent_detail;\n/**\n * Register a {@link \"@wallet-standard/base\".Wallet} as a Standard Wallet with the app.\n *\n * This dispatches a {@link \"@wallet-standard/base\".WindowRegisterWalletEvent} to notify the app that the Wallet is\n * ready to be registered.\n *\n * This also adds a listener for {@link \"@wallet-standard/base\".WindowAppReadyEvent} to listen for a notification from\n * the app that the app is ready to register the Wallet.\n *\n * This combination of event dispatch and listener guarantees that the Wallet will be registered synchronously as soon\n * as the app is ready whether the Wallet loads before or after the app.\n *\n * @param wallet Wallet to register.\n *\n * @group Wallet\n */\nexport function registerWallet(wallet) {\n const callback = ({ register }) => register(wallet);\n try {\n window.dispatchEvent(new RegisterWalletEvent(callback));\n }\n catch (error) {\n console.error('wallet-standard:register-wallet event could not be dispatched\\n', error);\n }\n try {\n window.addEventListener('wallet-standard:app-ready', ({ detail: api }) => callback(api));\n }\n catch (error) {\n console.error('wallet-standard:app-ready event listener could not be added\\n', error);\n }\n}\nclass RegisterWalletEvent extends Event {\n constructor(callback) {\n super('wallet-standard:register-wallet', {\n bubbles: false,\n cancelable: false,\n composed: false,\n });\n _RegisterWalletEvent_detail.set(this, void 0);\n __classPrivateFieldSet(this, _RegisterWalletEvent_detail, callback, \"f\");\n }\n get detail() {\n return __classPrivateFieldGet(this, _RegisterWalletEvent_detail, \"f\");\n }\n get type() {\n return 'wallet-standard:register-wallet';\n }\n /** @deprecated */\n preventDefault() {\n throw new Error('preventDefault cannot be called');\n }\n /** @deprecated */\n stopImmediatePropagation() {\n throw new Error('stopImmediatePropagation cannot be called');\n }\n /** @deprecated */\n stopPropagation() {\n throw new Error('stopPropagation cannot be called');\n }\n}\n_RegisterWalletEvent_detail = new WeakMap();\n/**\n * @deprecated Use {@link registerWallet} instead.\n *\n * @group Deprecated\n */\nexport function DEPRECATED_registerWallet(wallet) {\n var _a;\n registerWallet(wallet);\n try {\n ((_a = window.navigator).wallets || (_a.wallets = [])).push(({ register }) => register(wallet));\n }\n catch (error) {\n console.error('window.navigator.wallets could not be pushed\\n', error);\n }\n}\n//# sourceMappingURL=register.js.map","/** @internal */\nexport const icon = 'data:image/svg+xml;base64,PHN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"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _SolflareMetaMaskWallet_instances, _SolflareMetaMaskWallet_listeners, _SolflareMetaMaskWallet_version, _SolflareMetaMaskWallet_name, _SolflareMetaMaskWallet_icon, _SolflareMetaMaskWallet_solflareMetaMask, _SolflareMetaMaskWallet_on, _SolflareMetaMaskWallet_emit, _SolflareMetaMaskWallet_off, _SolflareMetaMaskWallet_connect, _SolflareMetaMaskWallet_disconnect, _SolflareMetaMaskWallet_signAndSendTransaction, _SolflareMetaMaskWallet_signTransaction, _SolflareMetaMaskWallet_signMessage;\nimport { WalletNotConnectedError } from '@solana/wallet-adapter-base';\nimport { SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, SOLANA_TESTNET_CHAIN } from '@solana/wallet-standard-chains';\nimport { SolanaSignAndSendTransaction, SolanaSignMessage, SolanaSignTransaction, } from '@solana/wallet-standard-features';\nimport { StandardConnect, StandardDisconnect, StandardEvents, } from '@wallet-standard/features';\nimport { icon } from './icon.js';\nexport class SolflareMetaMaskWallet {\n constructor() {\n _SolflareMetaMaskWallet_instances.add(this);\n _SolflareMetaMaskWallet_listeners.set(this, {});\n _SolflareMetaMaskWallet_version.set(this, '1.0.0');\n _SolflareMetaMaskWallet_name.set(this, 'MetaMask');\n _SolflareMetaMaskWallet_icon.set(this, icon);\n _SolflareMetaMaskWallet_solflareMetaMask.set(this, null);\n _SolflareMetaMaskWallet_on.set(this, (event, listener) => {\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.push(listener) || (__classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event] = [listener]);\n return () => __classPrivateFieldGet(this, _SolflareMetaMaskWallet_instances, \"m\", _SolflareMetaMaskWallet_off).call(this, event, listener);\n });\n _SolflareMetaMaskWallet_connect.set(this, async () => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\")) {\n let SolflareMetaMaskClass;\n try {\n SolflareMetaMaskClass = (await import('@solflare-wallet/metamask-sdk')).default;\n }\n catch (error) {\n throw new Error('Unable to load Solflare MetaMask SDK');\n }\n __classPrivateFieldSet(this, _SolflareMetaMaskWallet_solflareMetaMask, new SolflareMetaMaskClass(), \"f\");\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").on('standard_change', (properties) => __classPrivateFieldGet(this, _SolflareMetaMaskWallet_instances, \"m\", _SolflareMetaMaskWallet_emit).call(this, 'change', properties));\n }\n if (!this.accounts.length) {\n await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").connect();\n }\n return { accounts: this.accounts };\n });\n _SolflareMetaMaskWallet_disconnect.set(this, async () => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n return;\n await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").disconnect();\n });\n _SolflareMetaMaskWallet_signAndSendTransaction.set(this, async (...inputs) => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignAndSendTransaction(...inputs);\n });\n _SolflareMetaMaskWallet_signTransaction.set(this, async (...inputs) => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignTransaction(...inputs);\n });\n _SolflareMetaMaskWallet_signMessage.set(this, async (...inputs) => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignMessage(...inputs);\n });\n }\n get version() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_version, \"f\");\n }\n get name() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_name, \"f\");\n }\n get icon() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_icon, \"f\");\n }\n get chains() {\n return [SOLANA_MAINNET_CHAIN, SOLANA_DEVNET_CHAIN, SOLANA_TESTNET_CHAIN];\n }\n get features() {\n return {\n [StandardConnect]: {\n version: '1.0.0',\n connect: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_connect, \"f\"),\n },\n [StandardDisconnect]: {\n version: '1.0.0',\n disconnect: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_disconnect, \"f\"),\n },\n [StandardEvents]: {\n version: '1.0.0',\n on: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_on, \"f\"),\n },\n [SolanaSignAndSendTransaction]: {\n version: '1.0.0',\n supportedTransactionVersions: ['legacy', 0],\n signAndSendTransaction: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_signAndSendTransaction, \"f\"),\n },\n [SolanaSignTransaction]: {\n version: '1.0.0',\n supportedTransactionVersions: ['legacy', 0],\n signTransaction: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_signTransaction, \"f\"),\n },\n [SolanaSignMessage]: {\n version: '1.0.0',\n signMessage: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_signMessage, \"f\"),\n },\n };\n }\n get accounts() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\") ? __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardAccounts : [];\n }\n}\n_SolflareMetaMaskWallet_listeners = new WeakMap(), _SolflareMetaMaskWallet_version = new WeakMap(), _SolflareMetaMaskWallet_name = new WeakMap(), _SolflareMetaMaskWallet_icon = new WeakMap(), _SolflareMetaMaskWallet_solflareMetaMask = new WeakMap(), _SolflareMetaMaskWallet_on = new WeakMap(), _SolflareMetaMaskWallet_connect = new WeakMap(), _SolflareMetaMaskWallet_disconnect = new WeakMap(), _SolflareMetaMaskWallet_signAndSendTransaction = new WeakMap(), _SolflareMetaMaskWallet_signTransaction = new WeakMap(), _SolflareMetaMaskWallet_signMessage = new WeakMap(), _SolflareMetaMaskWallet_instances = new WeakSet(), _SolflareMetaMaskWallet_emit = function _SolflareMetaMaskWallet_emit(event, ...args) {\n // eslint-disable-next-line prefer-spread\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.forEach((listener) => listener.apply(null, args));\n}, _SolflareMetaMaskWallet_off = function _SolflareMetaMaskWallet_off(event, listener) {\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event] = __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.filter((existingListener) => listener !== existingListener);\n};\n//# sourceMappingURL=wallet.js.map","import { registerWallet } from '@wallet-standard/wallet';\nimport { SolflareMetaMaskWallet } from './wallet.js';\nlet registered = false;\nfunction register() {\n if (registered)\n return;\n registerWallet(new SolflareMetaMaskWallet());\n registered = true;\n}\n/** @internal */\nexport async function detectAndRegisterSolflareMetaMaskWallet() {\n const id = 'solflare-detect-metamask';\n function postMessage() {\n window.postMessage({\n target: 'metamask-contentscript',\n data: {\n name: 'metamask-provider',\n data: {\n id,\n jsonrpc: '2.0',\n method: 'wallet_getSnaps',\n },\n },\n }, window.location.origin);\n }\n function onMessage(event) {\n const message = event.data;\n if (message?.target === 'metamask-inpage' && message.data?.name === 'metamask-provider') {\n if (message.data.data?.id === id) {\n window.removeEventListener('message', onMessage);\n if (!message.data.data.error) {\n register();\n }\n }\n else {\n postMessage();\n }\n }\n }\n window.addEventListener('message', onMessage);\n window.setTimeout(() => window.removeEventListener('message', onMessage), 5000);\n postMessage();\n}\n//# sourceMappingURL=detect.js.map","import { BaseMessageSignerWalletAdapter, WalletConfigError, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletError, WalletLoadError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignMessageError, WalletSignTransactionError, isIosAndRedirectable, isVersionedTransaction, scopePollingDetectionStrategy, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nimport { detectAndRegisterSolflareMetaMaskWallet } from './metamask/detect.js';\nexport const SolflareWalletName = 'Solflare';\nexport class SolflareWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = SolflareWalletName;\n this.url = 'https://solflare.com';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjUwIiB2aWV3Qm94PSIwIDAgNTAgNTAiIHdpZHRoPSI1MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmMxMGIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmYjNmMmUiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSI2LjQ3ODM1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Ljk1MDY3LS40MjEtLjk1MDY3LS45NDAzcy40MjU2MjktLjk0MDMuOTUwNjctLjk0MDN6bTQ3LjY3OTczLS45NTQ3Yy41MjUgMCAuOTUwNy40MjEuOTUwNy45NDAzcy0uNDI1Ny45NDAyLS45NTA3Ljk0MDItLjk1MDctLjQyMDktLjk1MDctLjk0MDIuNDI1Ny0uOTQwMy45NTA3LS45NDAzem0tMjQuNjI5Ni0yMi40Nzk3Yy41MjUgMCAuOTUwNi40MjA5NzMuOTUwNi45NDAyNyAwIC41MTkzLS40MjU2Ljk0MDI3LS45NTA2Ljk0MDI3LS41MjUxIDAtLjk1MDctLjQyMDk3LS45NTA3LS45NDAyNyAwLS41MTkyOTcuNDI1Ni0uOTQwMjcuOTUwNy0uOTQwMjd6IiBmaWxsPSJ1cmwoI2IpIi8+PHBhdGggZD0ibTI0LjU3MSAzMi43NzkyYzQuOTU5NiAwIDguOTgwMi0zLjk3NjUgOC45ODAyLTguODgxOSAwLTQuOTA1My00LjAyMDYtOC44ODE5LTguOTgwMi04Ljg4MTlzLTguOTgwMiAzLjk3NjYtOC45ODAyIDguODgxOWMwIDQuOTA1NCA0LjAyMDYgOC44ODE5IDguOTgwMiA4Ljg4MTl6IiBmaWxsPSJ1cmwoI2MpIi8+PC9zdmc+';\n this.supportedTransactionVersions = new Set(['legacy', 0]);\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.Loadable;\n this._disconnected = () => {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n this._wallet = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._accountChanged = (newPublicKey) => {\n if (!newPublicKey)\n return;\n const publicKey = this._publicKey;\n if (!publicKey)\n return;\n try {\n newPublicKey = new PublicKey(newPublicKey.toBytes());\n }\n catch (error) {\n this.emit('error', new WalletPublicKeyError(error?.message, error));\n return;\n }\n if (publicKey.equals(newPublicKey))\n return;\n this._publicKey = newPublicKey;\n this.emit('connect', newPublicKey);\n };\n this._connecting = false;\n this._publicKey = null;\n this._wallet = null;\n this._config = config;\n if (this._readyState !== WalletReadyState.Unsupported) {\n scopePollingDetectionStrategy(() => {\n if (window.solflare?.isSolflare || window.SolflareApp) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n detectAndRegisterSolflareMetaMaskWallet();\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get connected() {\n return !!this._wallet?.connected;\n }\n get readyState() {\n return this._readyState;\n }\n async autoConnect() {\n // Skip autoconnect in the Loadable state on iOS\n // We can't redirect to a universal link without user input\n if (!(this.readyState === WalletReadyState.Loadable && isIosAndRedirectable())) {\n await this.connect();\n }\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this._readyState !== WalletReadyState.Loadable && this._readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n // redirect to the Solflare /browse universal link\n // this will open the current URL in the Solflare in-wallet browser\n if (this.readyState === WalletReadyState.Loadable && isIosAndRedirectable()) {\n const url = encodeURIComponent(window.location.href);\n const ref = encodeURIComponent(window.location.origin);\n window.location.href = `https://solflare.com/ul/v1/browse/${url}?ref=${ref}`;\n return;\n }\n let SolflareClass;\n try {\n SolflareClass = (await import('@solflare-wallet/sdk')).default;\n }\n catch (error) {\n throw new WalletLoadError(error?.message, error);\n }\n let wallet;\n try {\n wallet = new SolflareClass({ network: this._config.network });\n }\n catch (error) {\n throw new WalletConfigError(error?.message, error);\n }\n this._connecting = true;\n if (!wallet.connected) {\n try {\n await wallet.connect();\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n if (!wallet.publicKey)\n throw new WalletConnectionError();\n let publicKey;\n try {\n publicKey = new PublicKey(wallet.publicKey.toBytes());\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n wallet.on('disconnect', this._disconnected);\n wallet.on('accountChanged', this._accountChanged);\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n try {\n await wallet.disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n }\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n return await wallet.signAndSendTransaction(transaction, sendOptions);\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return await wallet.signMessage(message, 'utf8');\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","import '@solana/wallet-adapter-react-ui/styles.css';\n\n// Default styles that can be overridden by your app\nimport React, { useMemo } from 'react';\n\nimport { WalletAdapterNetwork } from '@solana/wallet-adapter-base';\nimport {\n ConnectionProvider,\n WalletProvider,\n} from '@solana/wallet-adapter-react';\nimport { WalletModalProvider } from '@solana/wallet-adapter-react-ui';\nimport {\n PhantomWalletAdapter,\n SolflareWalletAdapter,\n} from '@solana/wallet-adapter-wallets';\nimport { clusterApiUrl } from '@solana/web3.js';\n\nconst Provider = ({ children }: HocProps) => {\n const network = WalletAdapterNetwork.Devnet;\n\n // You can also provide a custom RPC endpoint.\n const endpoint = useMemo(() => clusterApiUrl(network), [network]);\n\n const wallets = useMemo(\n () => [\n new PhantomWalletAdapter(),\n new SolflareWalletAdapter()\n ],\n [network]\n);\n\n return (\n \n \n \n {children}\n \n \n \n )\n}\n\nexport default Provider\n","import createCache from '@emotion/cache'\n\nconst isBrowser = typeof document !== 'undefined'\n\n// On the client side, Create a meta tag at the top of the and set it as insertionPoint.\n// This assures that MUI styles are loaded first.\n// It allows developers to easily override MUI styles with other styling solutions, like CSS modules.\nconst createEmotionCache = () => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let insertionPoint: any\n\n if (isBrowser) {\n const emotionInsertionPoint = document.querySelector(\n 'meta[name=\"emotion-insertion-point\"]',\n )\n insertionPoint = emotionInsertionPoint ?? undefined\n }\n\n return createCache({ key: 'mui-style', prepend: true, insertionPoint })\n}\n\nexport { createEmotionCache }\n","import '@fontsource-variable/inter';\nimport '@fontsource/rubik-mono-one';\nimport '@/root/src/styles/global.scss';\n\nimport { useMemo } from 'react';\n\nimport { AnimatePresence } from 'framer-motion';\nimport { AppProps } from 'next/app';\nimport Head from 'next/head';\nimport PropTypes from 'prop-types';\nimport {\n Hydrate,\n QueryClient,\n QueryClientProvider,\n} from 'react-query';\nimport { ReactQueryDevtools } from 'react-query/devtools';\n\nimport { SolanaProvider } from '@/providers/solana';\nimport ThemeProvider from '@/providers/theme';\nimport WalletProvider from '@/providers/wallet';\nimport { createEmotionCache } from '@/utils/create-emotion-cache';\nimport {\n CacheProvider,\n EmotionCache,\n} from '@emotion/react';\n\n// Client-side cache, shared for the whole session of the user in the browser.\nconst clientSideEmotionCache = createEmotionCache();\n\ninterface MyAppProps extends AppProps {\n emotionCache: EmotionCache;\n}\n\nexport default function MyApp(props: MyAppProps) {\n const { Component, emotionCache = clientSideEmotionCache, pageProps } = props;\n const queryClient = useMemo(() => new QueryClient(), []);\n\n return (\n \n \n \n Airdrop\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nMyApp.propTypes = {\n Component: PropTypes.elementType.isRequired,\n emotionCache: PropTypes.object,\n pageProps: PropTypes.object.isRequired,\n};\n","export type MerkleDistributor = {\n version: '0.0.1';\n name: 'merkle_distributor';\n instructions: [\n {\n name: 'newDistributor';\n docs: [\n 'READ THE FOLLOWING:',\n '',\n 'This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.',\n '',\n 'An attack could look like:',\n '- A legitimate user opens a new distributor.',\n '- Someone observes the call to this instruction.',\n '- They replace the clawback_receiver, admin, or time parameters with their own.',\n '',\n 'One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own.',\n 'Then the attacker can steal all funds from the distributor to their own clawback_receiver account.',\n '',\n 'HOW TO AVOID:',\n '- When you call into this instruction, ensure your transaction succeeds.',\n '- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and',\n 'assert the parameters are what you expect, most importantly the clawback_receiver and admin.',\n '- If your transaction fails, double check the value on-chain matches what you expect.',\n ];\n accounts: [\n {\n name: 'distributor';\n isMut: true;\n isSigner: false;\n docs: ['[MerkleDistributor].'];\n pda: {\n seeds: [\n {\n kind: 'const';\n type: 'string';\n value: 'MerkleDistributor';\n },\n {\n kind: 'account';\n type: 'publicKey';\n account: 'Mint';\n path: 'mint';\n },\n {\n kind: 'arg';\n type: 'u64';\n path: 'version';\n },\n ];\n };\n },\n {\n name: 'clawbackReceiver';\n isMut: false;\n isSigner: false;\n docs: ['Clawback receiver token account'];\n },\n {\n name: 'mint';\n isMut: false;\n isSigner: false;\n docs: ['The mint to distribute.'];\n },\n {\n name: 'tokenVault';\n isMut: true;\n isSigner: false;\n docs: ['Token vault'];\n },\n {\n name: 'admin';\n isMut: true;\n isSigner: true;\n docs: [\n 'Admin wallet, responsible for creating the distributor and paying for the transaction.',\n 'Also has the authority to set the clawback receiver and change itself.',\n ];\n },\n {\n name: 'systemProgram';\n isMut: false;\n isSigner: false;\n docs: ['The [System] program.'];\n },\n {\n name: 'associatedTokenProgram';\n isMut: false;\n isSigner: false;\n docs: ['The [Associated Token] program.'];\n },\n {\n name: 'tokenProgram';\n isMut: false;\n isSigner: false;\n docs: ['The [Token] program.'];\n },\n ];\n args: [\n {\n name: 'version';\n type: 'u64';\n },\n {\n name: 'root';\n type: {\n array: ['u8', 32];\n };\n },\n {\n name: 'maxTotalClaim';\n type: 'u64';\n },\n {\n name: 'maxNumNodes';\n type: 'u64';\n },\n {\n name: 'startTs';\n type: 'i64';\n },\n {\n name: 'endTs';\n type: 'i64';\n },\n ];\n },\n {\n name: 'newClaim';\n accounts: [\n {\n name: 'distributor';\n isMut: true;\n isSigner: false;\n docs: ['The [MerkleDistributor].'];\n },\n {\n name: 'claimStatus';\n isMut: true;\n isSigner: false;\n docs: ['Claim status PDA'];\n pda: {\n seeds: [\n {\n kind: 'const';\n type: 'string';\n value: 'ClaimStatus';\n },\n {\n kind: 'account';\n type: 'publicKey';\n path: 'claimant';\n },\n {\n kind: 'account';\n type: 'publicKey';\n account: 'MerkleDistributor';\n path: 'distributor';\n },\n ];\n };\n },\n {\n name: 'from';\n isMut: true;\n isSigner: false;\n docs: ['Distributor ATA containing the tokens to distribute.'];\n },\n {\n name: 'to';\n isMut: true;\n isSigner: false;\n docs: ['Account to send the claimed tokens to.'];\n },\n {\n name: 'claimant';\n isMut: true;\n isSigner: true;\n docs: ['Who is claiming the tokens.'];\n },\n {\n name: 'tokenProgram';\n isMut: false;\n isSigner: false;\n docs: ['SPL [Token] program.'];\n },\n {\n name: 'systemProgram';\n isMut: false;\n isSigner: false;\n docs: ['The [System] program.'];\n },\n ];\n args: [\n {\n name: 'index';\n type: 'u64';\n },\n {\n name: 'amount';\n type: 'u64';\n },\n {\n name: 'proof';\n type: {\n vec: {\n array: ['u8', 32];\n };\n };\n },\n ];\n },\n {\n name: 'clawback';\n accounts: [\n {\n name: 'distributor';\n isMut: true;\n isSigner: false;\n docs: ['The [MerkleDistributor].'];\n },\n {\n name: 'from';\n isMut: true;\n isSigner: false;\n docs: ['Distributor ATA containing the tokens to distribute.'];\n },\n {\n name: 'to';\n isMut: true;\n isSigner: false;\n docs: ['The Clawback token account.'];\n },\n {\n name: 'claimant';\n isMut: false;\n isSigner: true;\n docs: ['Claimant account', 'Anyone can claw back the funds'];\n },\n {\n name: 'systemProgram';\n isMut: false;\n isSigner: false;\n docs: ['The [System] program.'];\n },\n {\n name: 'tokenProgram';\n isMut: false;\n isSigner: false;\n docs: ['SPL [Token] program.'];\n },\n ];\n args: [\n {\n name: 'amount';\n type: 'u64';\n },\n ];\n },\n {\n name: 'setClawbackReceiver';\n accounts: [\n {\n name: 'distributor';\n isMut: true;\n isSigner: false;\n docs: ['The [MerkleDistributor].'];\n },\n {\n name: 'newClawbackAccount';\n isMut: false;\n isSigner: false;\n docs: ['New clawback account'];\n },\n {\n name: 'admin';\n isMut: true;\n isSigner: true;\n docs: ['Admin signer'];\n },\n ];\n args: [];\n },\n {\n name: 'setAdmin';\n accounts: [\n {\n name: 'distributor';\n isMut: true;\n isSigner: false;\n docs: ['The [MerkleDistributor].'];\n },\n {\n name: 'admin';\n isMut: true;\n isSigner: true;\n docs: ['Admin signer'];\n },\n {\n name: 'newAdmin';\n isMut: true;\n isSigner: false;\n docs: ['New admin account'];\n },\n ];\n args: [];\n },\n {\n name: 'setTimestamp';\n accounts: [\n {\n name: 'distributor';\n isMut: true;\n isSigner: false;\n docs: ['The [MerkleDistributor].'];\n },\n {\n name: 'admin';\n isMut: true;\n isSigner: true;\n docs: ['Admin signer'];\n },\n ];\n args: [\n {\n name: 'startTs';\n type: 'i64';\n },\n {\n name: 'endTs';\n type: 'i64';\n },\n ];\n },\n {\n name: 'setMerkleRoot';\n accounts: [\n {\n name: 'distributor';\n isMut: true;\n isSigner: false;\n docs: ['The [MerkleDistributor].'];\n },\n {\n name: 'admin';\n isMut: true;\n isSigner: true;\n docs: ['Admin signer'];\n },\n ];\n args: [\n {\n name: 'root';\n type: {\n array: ['u8', 32];\n };\n },\n ];\n },\n ];\n accounts: [\n {\n name: 'claimStatus';\n docs: ['Holds whether or not a claimant has claimed tokens.'];\n type: {\n kind: 'struct';\n fields: [\n {\n name: 'isClaimed';\n docs: ['If true, the tokens have been claimed.'];\n type: 'bool';\n },\n {\n name: 'claimant';\n docs: ['Authority that claimed the tokens.'];\n type: 'publicKey';\n },\n {\n name: 'claimedAt';\n docs: ['When the tokens were claimed.'];\n type: 'i64';\n },\n {\n name: 'amount';\n docs: ['Amount of tokens claimed.'];\n type: 'u64';\n },\n ];\n };\n },\n {\n name: 'merkleDistributor';\n docs: ['State for the account which distributes tokens.'];\n type: {\n kind: 'struct';\n fields: [\n {\n name: 'bump';\n docs: ['Bump seed.'];\n type: 'u8';\n },\n {\n name: 'version';\n docs: ['Version of the airdrop'];\n type: 'u64';\n },\n {\n name: 'root';\n docs: ['The 256-bit merkle root.'];\n type: {\n array: ['u8', 32];\n };\n },\n {\n name: 'mint';\n docs: ['[Mint] of the token to be distributed.'];\n type: 'publicKey';\n },\n {\n name: 'tokenVault';\n docs: ['Token Address of the vault'];\n type: 'publicKey';\n },\n {\n name: 'maxTotalClaim';\n docs: [\n 'Maximum number of tokens that can ever be claimed from this [MerkleDistributor].',\n ];\n type: 'u64';\n },\n {\n name: 'maxNumNodes';\n docs: ['Maximum number of nodes in [MerkleDistributor].'];\n type: 'u64';\n },\n {\n name: 'totalAmountClaimed';\n docs: ['Total amount of tokens that have been claimed.'];\n type: 'u64';\n },\n {\n name: 'numNodesClaimed';\n docs: ['Number of nodes that have been claimed.'];\n type: 'u64';\n },\n {\n name: 'startTs';\n docs: ['Claim time start (Unix Timestamp)'];\n type: 'i64';\n },\n {\n name: 'endTs';\n docs: ['Claim time end (Unix Timestamp)'];\n type: 'i64';\n },\n {\n name: 'clawbackReceiver';\n docs: ['Clawback receiver'];\n type: 'publicKey';\n },\n {\n name: 'admin';\n docs: ['Admin wallet'];\n type: 'publicKey';\n },\n ];\n };\n },\n ];\n events: [\n {\n name: 'NewClaimEvent';\n fields: [\n {\n name: 'claimant';\n type: 'publicKey';\n index: false;\n },\n {\n name: 'timestamp';\n type: 'i64';\n index: false;\n },\n ];\n },\n {\n name: 'ClaimedEvent';\n fields: [\n {\n name: 'claimant';\n type: 'publicKey';\n index: false;\n },\n {\n name: 'amount';\n type: 'u64';\n index: false;\n },\n ];\n },\n ];\n errors: [\n {\n code: 6000;\n name: 'InvalidProof';\n msg: 'Invalid Merkle proof';\n },\n {\n code: 6001;\n name: 'ExceededMaxClaim';\n msg: 'Exceeded maximum claim amount';\n },\n {\n code: 6002;\n name: 'MaxNodesExceeded';\n msg: 'Exceeded maximum node count';\n },\n {\n code: 6003;\n name: 'Unauthorized';\n msg: 'Account is not authorized to execute this instruction';\n },\n {\n code: 6004;\n name: 'OwnerMismatch';\n msg: 'Token account owner did not match intended owner';\n },\n {\n code: 6005;\n name: 'SameClawbackReceiver';\n msg: 'New and old Clawback receivers are identical';\n },\n {\n code: 6006;\n name: 'SameAdmin';\n msg: 'New and old admin are identical';\n },\n {\n code: 6007;\n name: 'ClaimExpired';\n msg: 'Claim window expired';\n },\n {\n code: 6008;\n name: 'ArithmeticError';\n msg: 'Arithmetic Error (overflow/underflow)';\n },\n {\n code: 6009;\n name: 'StartTimestampAfterEnd';\n msg: 'Start Timestamp cannot be after end Timestamp';\n },\n {\n code: 6010;\n name: 'TimestampsNotInFuture';\n msg: 'Timestamps cannot be in the past';\n },\n {\n code: 6011;\n name: 'DistributionAlreadyStarted';\n msg: 'Distribution already started';\n },\n {\n code: 6012;\n name: 'InsufficientClawbackAmount';\n msg: 'Insufficient clawback amount';\n },\n ];\n};\n\nexport const IDL: MerkleDistributor = {\n version: '0.0.1',\n name: 'merkle_distributor',\n instructions: [\n {\n name: 'newDistributor',\n docs: [\n 'READ THE FOLLOWING:',\n '',\n 'This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.',\n '',\n 'An attack could look like:',\n '- A legitimate user opens a new distributor.',\n '- Someone observes the call to this instruction.',\n '- They replace the clawback_receiver, admin, or time parameters with their own.',\n '',\n 'One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own.',\n 'Then the attacker can steal all funds from the distributor to their own clawback_receiver account.',\n '',\n 'HOW TO AVOID:',\n '- When you call into this instruction, ensure your transaction succeeds.',\n '- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and',\n 'assert the parameters are what you expect, most importantly the clawback_receiver and admin.',\n '- If your transaction fails, double check the value on-chain matches what you expect.',\n ],\n accounts: [\n {\n name: 'distributor',\n isMut: true,\n isSigner: false,\n docs: ['[MerkleDistributor].'],\n pda: {\n seeds: [\n {\n kind: 'const',\n type: 'string',\n value: 'MerkleDistributor',\n },\n {\n kind: 'account',\n type: 'publicKey',\n account: 'Mint',\n path: 'mint',\n },\n {\n kind: 'arg',\n type: 'u64',\n path: 'version',\n },\n ],\n },\n },\n {\n name: 'clawbackReceiver',\n isMut: false,\n isSigner: false,\n docs: ['Clawback receiver token account'],\n },\n {\n name: 'mint',\n isMut: false,\n isSigner: false,\n docs: ['The mint to distribute.'],\n },\n {\n name: 'tokenVault',\n isMut: true,\n isSigner: false,\n docs: ['Token vault'],\n },\n {\n name: 'admin',\n isMut: true,\n isSigner: true,\n docs: [\n 'Admin wallet, responsible for creating the distributor and paying for the transaction.',\n 'Also has the authority to set the clawback receiver and change itself.',\n ],\n },\n {\n name: 'systemProgram',\n isMut: false,\n isSigner: false,\n docs: ['The [System] program.'],\n },\n {\n name: 'associatedTokenProgram',\n isMut: false,\n isSigner: false,\n docs: ['The [Associated Token] program.'],\n },\n {\n name: 'tokenProgram',\n isMut: false,\n isSigner: false,\n docs: ['The [Token] program.'],\n },\n ],\n args: [\n {\n name: 'version',\n type: 'u64',\n },\n {\n name: 'root',\n type: {\n array: ['u8', 32],\n },\n },\n {\n name: 'maxTotalClaim',\n type: 'u64',\n },\n {\n name: 'maxNumNodes',\n type: 'u64',\n },\n {\n name: 'startTs',\n type: 'i64',\n },\n {\n name: 'endTs',\n type: 'i64',\n },\n ],\n },\n {\n name: 'newClaim',\n accounts: [\n {\n name: 'distributor',\n isMut: true,\n isSigner: false,\n docs: ['The [MerkleDistributor].'],\n },\n {\n name: 'claimStatus',\n isMut: true,\n isSigner: false,\n docs: ['Claim status PDA'],\n pda: {\n seeds: [\n {\n kind: 'const',\n type: 'string',\n value: 'ClaimStatus',\n },\n {\n kind: 'account',\n type: 'publicKey',\n path: 'claimant',\n },\n {\n kind: 'account',\n type: 'publicKey',\n account: 'MerkleDistributor',\n path: 'distributor',\n },\n ],\n },\n },\n {\n name: 'from',\n isMut: true,\n isSigner: false,\n docs: ['Distributor ATA containing the tokens to distribute.'],\n },\n {\n name: 'to',\n isMut: true,\n isSigner: false,\n docs: ['Account to send the claimed tokens to.'],\n },\n {\n name: 'claimant',\n isMut: true,\n isSigner: true,\n docs: ['Who is claiming the tokens.'],\n },\n {\n name: 'tokenProgram',\n isMut: false,\n isSigner: false,\n docs: ['SPL [Token] program.'],\n },\n {\n name: 'systemProgram',\n isMut: false,\n isSigner: false,\n docs: ['The [System] program.'],\n },\n ],\n args: [\n {\n name: 'index',\n type: 'u64',\n },\n {\n name: 'amount',\n type: 'u64',\n },\n {\n name: 'proof',\n type: {\n vec: {\n array: ['u8', 32],\n },\n },\n },\n ],\n },\n {\n name: 'clawback',\n accounts: [\n {\n name: 'distributor',\n isMut: true,\n isSigner: false,\n docs: ['The [MerkleDistributor].'],\n },\n {\n name: 'from',\n isMut: true,\n isSigner: false,\n docs: ['Distributor ATA containing the tokens to distribute.'],\n },\n {\n name: 'to',\n isMut: true,\n isSigner: false,\n docs: ['The Clawback token account.'],\n },\n {\n name: 'claimant',\n isMut: false,\n isSigner: true,\n docs: ['Claimant account', 'Anyone can claw back the funds'],\n },\n {\n name: 'systemProgram',\n isMut: false,\n isSigner: false,\n docs: ['The [System] program.'],\n },\n {\n name: 'tokenProgram',\n isMut: false,\n isSigner: false,\n docs: ['SPL [Token] program.'],\n },\n ],\n args: [\n {\n name: 'amount',\n type: 'u64',\n },\n ],\n },\n {\n name: 'setClawbackReceiver',\n accounts: [\n {\n name: 'distributor',\n isMut: true,\n isSigner: false,\n docs: ['The [MerkleDistributor].'],\n },\n {\n name: 'newClawbackAccount',\n isMut: false,\n isSigner: false,\n docs: ['New clawback account'],\n },\n {\n name: 'admin',\n isMut: true,\n isSigner: true,\n docs: ['Admin signer'],\n },\n ],\n args: [],\n },\n {\n name: 'setAdmin',\n accounts: [\n {\n name: 'distributor',\n isMut: true,\n isSigner: false,\n docs: ['The [MerkleDistributor].'],\n },\n {\n name: 'admin',\n isMut: true,\n isSigner: true,\n docs: ['Admin signer'],\n },\n {\n name: 'newAdmin',\n isMut: true,\n isSigner: false,\n docs: ['New admin account'],\n },\n ],\n args: [],\n },\n {\n name: 'setTimestamp',\n accounts: [\n {\n name: 'distributor',\n isMut: true,\n isSigner: false,\n docs: ['The [MerkleDistributor].'],\n },\n {\n name: 'admin',\n isMut: true,\n isSigner: true,\n docs: ['Admin signer'],\n },\n ],\n args: [\n {\n name: 'startTs',\n type: 'i64',\n },\n {\n name: 'endTs',\n type: 'i64',\n },\n ],\n },\n {\n name: 'setMerkleRoot',\n accounts: [\n {\n name: 'distributor',\n isMut: true,\n isSigner: false,\n docs: ['The [MerkleDistributor].'],\n },\n {\n name: 'admin',\n isMut: true,\n isSigner: true,\n docs: ['Admin signer'],\n },\n ],\n args: [\n {\n name: 'root',\n type: {\n array: ['u8', 32],\n },\n },\n ],\n },\n ],\n accounts: [\n {\n name: 'claimStatus',\n docs: ['Holds whether or not a claimant has claimed tokens.'],\n type: {\n kind: 'struct',\n fields: [\n {\n name: 'isClaimed',\n docs: ['If true, the tokens have been claimed.'],\n type: 'bool',\n },\n {\n name: 'claimant',\n docs: ['Authority that claimed the tokens.'],\n type: 'publicKey',\n },\n {\n name: 'claimedAt',\n docs: ['When the tokens were claimed.'],\n type: 'i64',\n },\n {\n name: 'amount',\n docs: ['Amount of tokens claimed.'],\n type: 'u64',\n },\n ],\n },\n },\n {\n name: 'merkleDistributor',\n docs: ['State for the account which distributes tokens.'],\n type: {\n kind: 'struct',\n fields: [\n {\n name: 'bump',\n docs: ['Bump seed.'],\n type: 'u8',\n },\n {\n name: 'version',\n docs: ['Version of the airdrop'],\n type: 'u64',\n },\n {\n name: 'root',\n docs: ['The 256-bit merkle root.'],\n type: {\n array: ['u8', 32],\n },\n },\n {\n name: 'mint',\n docs: ['[Mint] of the token to be distributed.'],\n type: 'publicKey',\n },\n {\n name: 'tokenVault',\n docs: ['Token Address of the vault'],\n type: 'publicKey',\n },\n {\n name: 'maxTotalClaim',\n docs: [\n 'Maximum number of tokens that can ever be claimed from this [MerkleDistributor].',\n ],\n type: 'u64',\n },\n {\n name: 'maxNumNodes',\n docs: ['Maximum number of nodes in [MerkleDistributor].'],\n type: 'u64',\n },\n {\n name: 'totalAmountClaimed',\n docs: ['Total amount of tokens that have been claimed.'],\n type: 'u64',\n },\n {\n name: 'numNodesClaimed',\n docs: ['Number of nodes that have been claimed.'],\n type: 'u64',\n },\n {\n name: 'startTs',\n docs: ['Claim time start (Unix Timestamp)'],\n type: 'i64',\n },\n {\n name: 'endTs',\n docs: ['Claim time end (Unix Timestamp)'],\n type: 'i64',\n },\n {\n name: 'clawbackReceiver',\n docs: ['Clawback receiver'],\n type: 'publicKey',\n },\n {\n name: 'admin',\n docs: ['Admin wallet'],\n type: 'publicKey',\n },\n ],\n },\n },\n ],\n events: [\n {\n name: 'NewClaimEvent',\n fields: [\n {\n name: 'claimant',\n type: 'publicKey',\n index: false,\n },\n {\n name: 'timestamp',\n type: 'i64',\n index: false,\n },\n ],\n },\n {\n name: 'ClaimedEvent',\n fields: [\n {\n name: 'claimant',\n type: 'publicKey',\n index: false,\n },\n {\n name: 'amount',\n type: 'u64',\n index: false,\n },\n ],\n },\n ],\n errors: [\n {\n code: 6000,\n name: 'InvalidProof',\n msg: 'Invalid Merkle proof',\n },\n {\n code: 6001,\n name: 'ExceededMaxClaim',\n msg: 'Exceeded maximum claim amount',\n },\n {\n code: 6002,\n name: 'MaxNodesExceeded',\n msg: 'Exceeded maximum node count',\n },\n {\n code: 6003,\n name: 'Unauthorized',\n msg: 'Account is not authorized to execute this instruction',\n },\n {\n code: 6004,\n name: 'OwnerMismatch',\n msg: 'Token account owner did not match intended owner',\n },\n {\n code: 6005,\n name: 'SameClawbackReceiver',\n msg: 'New and old Clawback receivers are identical',\n },\n {\n code: 6006,\n name: 'SameAdmin',\n msg: 'New and old admin are identical',\n },\n {\n code: 6007,\n name: 'ClaimExpired',\n msg: 'Claim window expired',\n },\n {\n code: 6008,\n name: 'ArithmeticError',\n msg: 'Arithmetic Error (overflow/underflow)',\n },\n {\n code: 6009,\n name: 'StartTimestampAfterEnd',\n msg: 'Start Timestamp cannot be after end Timestamp',\n },\n {\n code: 6010,\n name: 'TimestampsNotInFuture',\n msg: 'Timestamps cannot be in the past',\n },\n {\n code: 6011,\n name: 'DistributionAlreadyStarted',\n msg: 'Distribution already started',\n },\n {\n code: 6012,\n name: 'InsufficientClawbackAmount',\n msg: 'Insufficient clawback amount',\n },\n ],\n};\n","import React, {\n ReactNode,\n useContext,\n useEffect,\n useState,\n} from 'react';\n\nimport {\n IDL,\n MerkleDistributor,\n} from '@/types/merkle_distributor';\nimport { BN } from '@coral-xyz/anchor';\nimport NodeWallet from '@coral-xyz/anchor/dist/cjs/nodewallet';\nimport {\n AnchorProvider,\n Program,\n} from '@project-serum/anchor';\nimport {\n Context,\n DistributorClient,\n PDA,\n PDAInfo,\n} from '@renec-foundation/distributor-sdk';\nimport { useWallet } from '@solana/wallet-adapter-react';\nimport {\n Connection,\n Keypair,\n PublicKey,\n} from '@solana/web3.js';\n\nconst defaultSolanaContext = {\n connection: null as Connection | null,\n provider: null as AnchorProvider | null,\n program: null as Program | null,\n ctx: null as Context | null,\n distributorClient: null as DistributorClient | null,\n mintPublicKey: new PublicKey('11111111111111111111111111111111'),\n merkleTreeVersion: 1,\n distributor: null as PDAInfo | null,\n publicKey: null as PublicKey | null,\n connected: false,\n connect: async () => {},\n disconnect: async () => {},\n};\n\nconst SolanaContext = React.createContext(defaultSolanaContext);\n\ninterface SolanaProviderProps {\n children: ReactNode;\n}\nexport const SolanaProvider: React.FC = ({ children }) => {\n const {\n connect,\n disconnect,\n connected,\n publicKey: userPublicKey,\n signTransaction,\n signAllTransactions,\n } = useWallet();\n const defaultKeypair = Keypair.generate();\n const defaultWallet = new NodeWallet(defaultKeypair);\n const [publicKey, setPublicKey] = useState(\n defaultKeypair.publicKey,\n );\n const connectionUrl = process.env.NEXT_PUBLIC_SOLANA_CONNECTION_URL;\n if (!connectionUrl) {\n throw new Error('NEXT_PUBLIC_SOLANA_CONNECTION_URL is not defined');\n }\n const connection = new Connection(connectionUrl, 'confirmed');\n const [provider, setProvider] = useState(\n new AnchorProvider(connection, defaultWallet, {}),\n );\n\n const programAddress = process.env.NEXT_PUBLIC_PROGRAM_ADDRESS;\n if (!programAddress) {\n throw new Error('NEXT_PUBLIC_PROGRAM_ADDRESS is not defined');\n }\n const programId = new PublicKey(programAddress);\n const program = new Program(IDL, programId, provider);\n\n const ctx = Context.withProvider(provider, new PublicKey(program.programId));\n\n const distributorClient = new DistributorClient(\n ctx,\n new PDA(program.programId),\n );\n\n const mintAddress = process.env.NEXT_PUBLIC_MINT_ADDRESS; // TODO move to useEffect if get mintAddress from database\n if (!mintAddress) {\n throw new Error('NEXT_PUBLIC_MINT_ADDRESS is not defined');\n }\n const mintPublicKey = new PublicKey(mintAddress);\n\n const merkleTreeVersion = parseInt(\n process.env.NEXT_PUBLIC_MERKLE_TREE_VERSION ?? '1',\n 10,\n );\n\n const distributor = distributorClient.pda.distributor(\n mintPublicKey,\n new BN(merkleTreeVersion),\n );\n\n useEffect(() => {\n if (connected && userPublicKey) {\n setPublicKey(userPublicKey);\n setProvider(\n new AnchorProvider(\n connection,\n {\n publicKey: userPublicKey,\n signTransaction: signTransaction!,\n signAllTransactions: signAllTransactions!,\n },\n {},\n ),\n );\n } else {\n setPublicKey(defaultKeypair.publicKey);\n setProvider(new AnchorProvider(connection, defaultWallet, {}));\n }\n }, [connected, userPublicKey]);\n\n const handleConnect = async () => {\n await connect();\n };\n\n const handleDisconnect = async () => {\n await disconnect();\n };\n\n const value = {\n connection,\n provider,\n program,\n ctx,\n distributorClient,\n mintPublicKey,\n merkleTreeVersion,\n distributor,\n publicKey,\n connected,\n connect: handleConnect,\n disconnect: handleDisconnect,\n };\n\n return (\n {children}\n );\n};\n\nexport const useSolana = () => useContext(SolanaContext);\n","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","module.exports = require('./dist/shared/lib/head')\n","'use strict';\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n","'use strict';\n\nvar getPolyfill = require('./polyfill');\nvar define = require('define-properties');\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = [\n\t'Float32Array',\n\t'Float64Array',\n\t'Int8Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'BigInt64Array',\n\t'BigUint64Array'\n];\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict';\n\nvar errcode = require('err-code');\nvar retry = require('retry');\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction isRetryError(err) {\n return err && err.code === 'EPROMISERETRY' && hasOwn.call(err, 'retried');\n}\n\nfunction promiseRetry(fn, options) {\n var temp;\n var operation;\n\n if (typeof fn === 'object' && typeof options === 'function') {\n // Swap options and fn when using alternate signature (options, fn)\n temp = options;\n options = fn;\n fn = temp;\n }\n\n operation = retry.operation(options);\n\n return new Promise(function (resolve, reject) {\n operation.attempt(function (number) {\n Promise.resolve()\n .then(function () {\n return fn(function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n }\n\n throw errcode(new Error('Retrying'), 'EPROMISERETRY', { retried: err });\n }, number);\n })\n .then(resolve, function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n\n if (operation.retry(err || new Error())) {\n return;\n }\n }\n\n reject(err);\n });\n });\n });\n}\n\nmodule.exports = promiseRetry;\n","module.exports = require('./lib/retry');","var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && options.forever,\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n","function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts;\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(this._errors.length - 1, this._errors.length);\n this._timeouts = this._cachedTimeouts.slice(0);\n timeout = this._timeouts.shift();\n } else {\n return false;\n }\n }\n\n var self = this;\n var timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","if (process.env.NODE_ENV !== 'development') {\n module.exports = {\n ReactQueryDevtools: function () {\n return null\n },\n ReactQueryDevtoolsPanel: function () {\n return null\n },\n }\n} else {\n module.exports = require('./development')\n}\n","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\nexport var FocusManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(FocusManager, _Subscribable);\n\n function FocusManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onFocus) {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onFocus();\n }; // Listen to visibillitychange and focus\n\n\n window.addEventListener('visibilitychange', listener, false);\n window.addEventListener('focus', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('visibilitychange', listener);\n window.removeEventListener('focus', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = FocusManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (focused) {\n if (typeof focused === 'boolean') {\n _this2.setFocused(focused);\n } else {\n _this2.onFocus();\n }\n });\n };\n\n _proto.setFocused = function setFocused(focused) {\n this.focused = focused;\n\n if (focused) {\n this.onFocus();\n }\n };\n\n _proto.onFocus = function onFocus() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isFocused = function isFocused() {\n if (typeof this.focused === 'boolean') {\n return this.focused;\n } // document global can be unavailable in react native\n\n\n if (typeof document === 'undefined') {\n return true;\n }\n\n return [undefined, 'visible', 'prerender'].includes(document.visibilityState);\n };\n\n return FocusManager;\n}(Subscribable);\nexport var focusManager = new FocusManager();","export { CancelledError } from './retryer';\nexport { QueryCache } from './queryCache';\nexport { QueryClient } from './queryClient';\nexport { QueryObserver } from './queryObserver';\nexport { QueriesObserver } from './queriesObserver';\nexport { InfiniteQueryObserver } from './infiniteQueryObserver';\nexport { MutationCache } from './mutationCache';\nexport { MutationObserver } from './mutationObserver';\nexport { setLogger } from './logger';\nexport { notifyManager } from './notifyManager';\nexport { focusManager } from './focusManager';\nexport { onlineManager } from './onlineManager';\nexport { hashQueryKey, isError } from './utils';\nexport { isCancelledError } from './retryer';\nexport { dehydrate, hydrate } from './hydration'; // Types\n\nexport * from './types';","// TYPES\n// FUNCTIONS\nvar logger = console;\nexport function getLogger() {\n return logger;\n}\nexport function setLogger(newLogger) {\n logger = newLogger;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getLogger } from './logger';\nimport { notifyManager } from './notifyManager';\nimport { Retryer } from './retryer';\nimport { noop } from './utils'; // TYPES\n\n// CLASS\nexport var Mutation = /*#__PURE__*/function () {\n function Mutation(config) {\n this.options = _extends({}, config.defaultOptions, config.options);\n this.mutationId = config.mutationId;\n this.mutationCache = config.mutationCache;\n this.observers = [];\n this.state = config.state || getDefaultState();\n this.meta = config.meta;\n }\n\n var _proto = Mutation.prototype;\n\n _proto.setState = function setState(state) {\n this.dispatch({\n type: 'setState',\n state: state\n });\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n };\n\n _proto.cancel = function cancel() {\n if (this.retryer) {\n this.retryer.cancel();\n return this.retryer.promise.then(noop).catch(noop);\n }\n\n return Promise.resolve();\n };\n\n _proto.continue = function _continue() {\n if (this.retryer) {\n this.retryer.continue();\n return this.retryer.promise;\n }\n\n return this.execute();\n };\n\n _proto.execute = function execute() {\n var _this = this;\n\n var data;\n var restored = this.state.status === 'loading';\n var promise = Promise.resolve();\n\n if (!restored) {\n this.dispatch({\n type: 'loading',\n variables: this.options.variables\n });\n promise = promise.then(function () {\n // Notify cache callback\n _this.mutationCache.config.onMutate == null ? void 0 : _this.mutationCache.config.onMutate(_this.state.variables, _this);\n }).then(function () {\n return _this.options.onMutate == null ? void 0 : _this.options.onMutate(_this.state.variables);\n }).then(function (context) {\n if (context !== _this.state.context) {\n _this.dispatch({\n type: 'loading',\n context: context,\n variables: _this.state.variables\n });\n }\n });\n }\n\n return promise.then(function () {\n return _this.executeMutation();\n }).then(function (result) {\n data = result; // Notify cache callback\n\n _this.mutationCache.config.onSuccess == null ? void 0 : _this.mutationCache.config.onSuccess(data, _this.state.variables, _this.state.context, _this);\n }).then(function () {\n return _this.options.onSuccess == null ? void 0 : _this.options.onSuccess(data, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(data, null, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'success',\n data: data\n });\n\n return data;\n }).catch(function (error) {\n // Notify cache callback\n _this.mutationCache.config.onError == null ? void 0 : _this.mutationCache.config.onError(error, _this.state.variables, _this.state.context, _this); // Log error\n\n getLogger().error(error);\n return Promise.resolve().then(function () {\n return _this.options.onError == null ? void 0 : _this.options.onError(error, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(undefined, error, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'error',\n error: error\n });\n\n throw error;\n });\n });\n };\n\n _proto.executeMutation = function executeMutation() {\n var _this2 = this,\n _this$options$retry;\n\n this.retryer = new Retryer({\n fn: function fn() {\n if (!_this2.options.mutationFn) {\n return Promise.reject('No mutationFn found');\n }\n\n return _this2.options.mutationFn(_this2.state.variables);\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: (_this$options$retry = this.options.retry) != null ? _this$options$retry : 0,\n retryDelay: this.options.retryDelay\n });\n return this.retryer.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onMutationUpdate(action);\n });\n\n _this3.mutationCache.notify(_this3);\n });\n };\n\n return Mutation;\n}();\nexport function getDefaultState() {\n return {\n context: undefined,\n data: undefined,\n error: null,\n failureCount: 0,\n isPaused: false,\n status: 'idle',\n variables: undefined\n };\n}\n\nfunction reducer(state, action) {\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n failureCount: state.failureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'loading':\n return _extends({}, state, {\n context: action.context,\n data: undefined,\n error: null,\n isPaused: false,\n status: 'loading',\n variables: action.variables\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n error: null,\n status: 'success',\n isPaused: false\n });\n\n case 'error':\n return _extends({}, state, {\n data: undefined,\n error: action.error,\n failureCount: state.failureCount + 1,\n isPaused: false,\n status: 'error'\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n}","import { scheduleMicrotask } from './utils'; // TYPES\n\n// CLASS\nexport var NotifyManager = /*#__PURE__*/function () {\n function NotifyManager() {\n this.queue = [];\n this.transactions = 0;\n\n this.notifyFn = function (callback) {\n callback();\n };\n\n this.batchNotifyFn = function (callback) {\n callback();\n };\n }\n\n var _proto = NotifyManager.prototype;\n\n _proto.batch = function batch(callback) {\n var result;\n this.transactions++;\n\n try {\n result = callback();\n } finally {\n this.transactions--;\n\n if (!this.transactions) {\n this.flush();\n }\n }\n\n return result;\n };\n\n _proto.schedule = function schedule(callback) {\n var _this = this;\n\n if (this.transactions) {\n this.queue.push(callback);\n } else {\n scheduleMicrotask(function () {\n _this.notifyFn(callback);\n });\n }\n }\n /**\n * All calls to the wrapped function will be batched.\n */\n ;\n\n _proto.batchCalls = function batchCalls(callback) {\n var _this2 = this;\n\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this2.schedule(function () {\n callback.apply(void 0, args);\n });\n };\n };\n\n _proto.flush = function flush() {\n var _this3 = this;\n\n var queue = this.queue;\n this.queue = [];\n\n if (queue.length) {\n scheduleMicrotask(function () {\n _this3.batchNotifyFn(function () {\n queue.forEach(function (callback) {\n _this3.notifyFn(callback);\n });\n });\n });\n }\n }\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n ;\n\n _proto.setNotifyFunction = function setNotifyFunction(fn) {\n this.notifyFn = fn;\n }\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n ;\n\n _proto.setBatchNotifyFunction = function setBatchNotifyFunction(fn) {\n this.batchNotifyFn = fn;\n };\n\n return NotifyManager;\n}(); // SINGLETON\n\nexport var notifyManager = new NotifyManager();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\nexport var OnlineManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(OnlineManager, _Subscribable);\n\n function OnlineManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onOnline) {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onOnline();\n }; // Listen to online\n\n\n window.addEventListener('online', listener, false);\n window.addEventListener('offline', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', listener);\n window.removeEventListener('offline', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = OnlineManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (online) {\n if (typeof online === 'boolean') {\n _this2.setOnline(online);\n } else {\n _this2.onOnline();\n }\n });\n };\n\n _proto.setOnline = function setOnline(online) {\n this.online = online;\n\n if (online) {\n this.onOnline();\n }\n };\n\n _proto.onOnline = function onOnline() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isOnline = function isOnline() {\n if (typeof this.online === 'boolean') {\n return this.online;\n }\n\n if (typeof navigator === 'undefined' || typeof navigator.onLine === 'undefined') {\n return true;\n }\n\n return navigator.onLine;\n };\n\n return OnlineManager;\n}(Subscribable);\nexport var onlineManager = new OnlineManager();","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getAbortController, functionalUpdate, isValidTimeout, noop, replaceEqualDeep, timeUntilStale, ensureQueryKeyArray } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { getLogger } from './logger';\nimport { Retryer, isCancelledError } from './retryer'; // TYPES\n\n// CLASS\nexport var Query = /*#__PURE__*/function () {\n function Query(config) {\n this.abortSignalConsumed = false;\n this.hadObservers = false;\n this.defaultOptions = config.defaultOptions;\n this.setOptions(config.options);\n this.observers = [];\n this.cache = config.cache;\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n this.initialState = config.state || this.getDefaultState(this.options);\n this.state = this.initialState;\n this.meta = config.meta;\n this.scheduleGc();\n }\n\n var _proto = Query.prototype;\n\n _proto.setOptions = function setOptions(options) {\n var _this$options$cacheTi;\n\n this.options = _extends({}, this.defaultOptions, options);\n this.meta = options == null ? void 0 : options.meta; // Default to 5 minutes if not cache time is set\n\n this.cacheTime = Math.max(this.cacheTime || 0, (_this$options$cacheTi = this.options.cacheTime) != null ? _this$options$cacheTi : 5 * 60 * 1000);\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.scheduleGc = function scheduleGc() {\n var _this = this;\n\n this.clearGcTimeout();\n\n if (isValidTimeout(this.cacheTime)) {\n this.gcTimeout = setTimeout(function () {\n _this.optionalRemove();\n }, this.cacheTime);\n }\n };\n\n _proto.clearGcTimeout = function clearGcTimeout() {\n if (this.gcTimeout) {\n clearTimeout(this.gcTimeout);\n this.gcTimeout = undefined;\n }\n };\n\n _proto.optionalRemove = function optionalRemove() {\n if (!this.observers.length) {\n if (this.state.isFetching) {\n if (this.hadObservers) {\n this.scheduleGc();\n }\n } else {\n this.cache.remove(this);\n }\n }\n };\n\n _proto.setData = function setData(updater, options) {\n var _this$options$isDataE, _this$options;\n\n var prevData = this.state.data; // Get the new data\n\n var data = functionalUpdate(updater, prevData); // Use prev data if an isDataEqual function is defined and returns `true`\n\n if ((_this$options$isDataE = (_this$options = this.options).isDataEqual) == null ? void 0 : _this$options$isDataE.call(_this$options, prevData, data)) {\n data = prevData;\n } else if (this.options.structuralSharing !== false) {\n // Structurally share data between prev and new data if needed\n data = replaceEqualDeep(prevData, data);\n } // Set data and mark it as cached\n\n\n this.dispatch({\n data: data,\n type: 'success',\n dataUpdatedAt: options == null ? void 0 : options.updatedAt\n });\n return data;\n };\n\n _proto.setState = function setState(state, setStateOptions) {\n this.dispatch({\n type: 'setState',\n state: state,\n setStateOptions: setStateOptions\n });\n };\n\n _proto.cancel = function cancel(options) {\n var _this$retryer;\n\n var promise = this.promise;\n (_this$retryer = this.retryer) == null ? void 0 : _this$retryer.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n };\n\n _proto.destroy = function destroy() {\n this.clearGcTimeout();\n this.cancel({\n silent: true\n });\n };\n\n _proto.reset = function reset() {\n this.destroy();\n this.setState(this.initialState);\n };\n\n _proto.isActive = function isActive() {\n return this.observers.some(function (observer) {\n return observer.options.enabled !== false;\n });\n };\n\n _proto.isFetching = function isFetching() {\n return this.state.isFetching;\n };\n\n _proto.isStale = function isStale() {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some(function (observer) {\n return observer.getCurrentResult().isStale;\n });\n };\n\n _proto.isStaleByTime = function isStaleByTime(staleTime) {\n if (staleTime === void 0) {\n staleTime = 0;\n }\n\n return this.state.isInvalidated || !this.state.dataUpdatedAt || !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n };\n\n _proto.onFocus = function onFocus() {\n var _this$retryer2;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnWindowFocus();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer2 = this.retryer) == null ? void 0 : _this$retryer2.continue();\n };\n\n _proto.onOnline = function onOnline() {\n var _this$retryer3;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnReconnect();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer3 = this.retryer) == null ? void 0 : _this$retryer3.continue();\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n this.hadObservers = true; // Stop the query from being garbage collected\n\n this.clearGcTimeout();\n this.cache.notify({\n type: 'observerAdded',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n if (this.observers.indexOf(observer) !== -1) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n\n if (!this.observers.length) {\n // If the transport layer does not support cancellation\n // we'll let the query continue so the result can be cached\n if (this.retryer) {\n if (this.retryer.isTransportCancelable || this.abortSignalConsumed) {\n this.retryer.cancel({\n revert: true\n });\n } else {\n this.retryer.cancelRetry();\n }\n }\n\n if (this.cacheTime) {\n this.scheduleGc();\n } else {\n this.cache.remove(this);\n }\n }\n\n this.cache.notify({\n type: 'observerRemoved',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.getObserversCount = function getObserversCount() {\n return this.observers.length;\n };\n\n _proto.invalidate = function invalidate() {\n if (!this.state.isInvalidated) {\n this.dispatch({\n type: 'invalidate'\n });\n }\n };\n\n _proto.fetch = function fetch(options, fetchOptions) {\n var _this2 = this,\n _this$options$behavio,\n _context$fetchOptions,\n _abortController$abor;\n\n if (this.state.isFetching) {\n if (this.state.dataUpdatedAt && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) {\n // Silently cancel current fetch if the user wants to cancel refetches\n this.cancel({\n silent: true\n });\n } else if (this.promise) {\n var _this$retryer4;\n\n // make sure that retries that were potentially cancelled due to unmounts can continue\n (_this$retryer4 = this.retryer) == null ? void 0 : _this$retryer4.continueRetry(); // Return current promise if we are already fetching\n\n return this.promise;\n }\n } // Update config if passed, otherwise the config from the last execution is used\n\n\n if (options) {\n this.setOptions(options);\n } // Use the options from the first observer with a query function if no function is found.\n // This can happen when the query is hydrated or created with setQueryData.\n\n\n if (!this.options.queryFn) {\n var observer = this.observers.find(function (x) {\n return x.options.queryFn;\n });\n\n if (observer) {\n this.setOptions(observer.options);\n }\n }\n\n var queryKey = ensureQueryKeyArray(this.queryKey);\n var abortController = getAbortController(); // Create query function context\n\n var queryFnContext = {\n queryKey: queryKey,\n pageParam: undefined,\n meta: this.meta\n };\n Object.defineProperty(queryFnContext, 'signal', {\n enumerable: true,\n get: function get() {\n if (abortController) {\n _this2.abortSignalConsumed = true;\n return abortController.signal;\n }\n\n return undefined;\n }\n }); // Create fetch function\n\n var fetchFn = function fetchFn() {\n if (!_this2.options.queryFn) {\n return Promise.reject('Missing queryFn');\n }\n\n _this2.abortSignalConsumed = false;\n return _this2.options.queryFn(queryFnContext);\n }; // Trigger behavior hook\n\n\n var context = {\n fetchOptions: fetchOptions,\n options: this.options,\n queryKey: queryKey,\n state: this.state,\n fetchFn: fetchFn,\n meta: this.meta\n };\n\n if ((_this$options$behavio = this.options.behavior) == null ? void 0 : _this$options$behavio.onFetch) {\n var _this$options$behavio2;\n\n (_this$options$behavio2 = this.options.behavior) == null ? void 0 : _this$options$behavio2.onFetch(context);\n } // Store state in case the current fetch needs to be reverted\n\n\n this.revertState = this.state; // Set to fetching state if not already in it\n\n if (!this.state.isFetching || this.state.fetchMeta !== ((_context$fetchOptions = context.fetchOptions) == null ? void 0 : _context$fetchOptions.meta)) {\n var _context$fetchOptions2;\n\n this.dispatch({\n type: 'fetch',\n meta: (_context$fetchOptions2 = context.fetchOptions) == null ? void 0 : _context$fetchOptions2.meta\n });\n } // Try to fetch the data\n\n\n this.retryer = new Retryer({\n fn: context.fetchFn,\n abort: abortController == null ? void 0 : (_abortController$abor = abortController.abort) == null ? void 0 : _abortController$abor.bind(abortController),\n onSuccess: function onSuccess(data) {\n _this2.setData(data); // Notify cache callback\n\n\n _this2.cache.config.onSuccess == null ? void 0 : _this2.cache.config.onSuccess(data, _this2); // Remove query after fetching if cache time is 0\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onError: function onError(error) {\n // Optimistically update state if needed\n if (!(isCancelledError(error) && error.silent)) {\n _this2.dispatch({\n type: 'error',\n error: error\n });\n }\n\n if (!isCancelledError(error)) {\n // Notify cache callback\n _this2.cache.config.onError == null ? void 0 : _this2.cache.config.onError(error, _this2); // Log error\n\n getLogger().error(error);\n } // Remove query after fetching if cache time is 0\n\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay\n });\n this.promise = this.retryer.promise;\n return this.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = this.reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onQueryUpdate(action);\n });\n\n _this3.cache.notify({\n query: _this3,\n type: 'queryUpdated',\n action: action\n });\n });\n };\n\n _proto.getDefaultState = function getDefaultState(options) {\n var data = typeof options.initialData === 'function' ? options.initialData() : options.initialData;\n var hasInitialData = typeof options.initialData !== 'undefined';\n var initialDataUpdatedAt = hasInitialData ? typeof options.initialDataUpdatedAt === 'function' ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n var hasData = typeof data !== 'undefined';\n return {\n data: data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt != null ? initialDataUpdatedAt : Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchMeta: null,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: hasData ? 'success' : 'idle'\n };\n };\n\n _proto.reducer = function reducer(state, action) {\n var _action$meta, _action$dataUpdatedAt;\n\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n fetchFailureCount: state.fetchFailureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'fetch':\n return _extends({}, state, {\n fetchFailureCount: 0,\n fetchMeta: (_action$meta = action.meta) != null ? _action$meta : null,\n isFetching: true,\n isPaused: false\n }, !state.dataUpdatedAt && {\n error: null,\n status: 'loading'\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: (_action$dataUpdatedAt = action.dataUpdatedAt) != null ? _action$dataUpdatedAt : Date.now(),\n error: null,\n fetchFailureCount: 0,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: 'success'\n });\n\n case 'error':\n var error = action.error;\n\n if (isCancelledError(error) && error.revert && this.revertState) {\n return _extends({}, this.revertState);\n }\n\n return _extends({}, state, {\n error: error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n isFetching: false,\n isPaused: false,\n status: 'error'\n });\n\n case 'invalidate':\n return _extends({}, state, {\n isInvalidated: true\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n };\n\n return Query;\n}();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { hashQueryKeyByOptions, matchQuery, parseFilterArgs } from './utils';\nimport { Query } from './query';\nimport { notifyManager } from './notifyManager';\nimport { Subscribable } from './subscribable';\n// CLASS\nexport var QueryCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryCache, _Subscribable);\n\n function QueryCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.queries = [];\n _this.queriesMap = {};\n return _this;\n }\n\n var _proto = QueryCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var _options$queryHash;\n\n var queryKey = options.queryKey;\n var queryHash = (_options$queryHash = options.queryHash) != null ? _options$queryHash : hashQueryKeyByOptions(queryKey, options);\n var query = this.get(queryHash);\n\n if (!query) {\n query = new Query({\n cache: this,\n queryKey: queryKey,\n queryHash: queryHash,\n options: client.defaultQueryOptions(options),\n state: state,\n defaultOptions: client.getQueryDefaults(queryKey),\n meta: options.meta\n });\n this.add(query);\n }\n\n return query;\n };\n\n _proto.add = function add(query) {\n if (!this.queriesMap[query.queryHash]) {\n this.queriesMap[query.queryHash] = query;\n this.queries.push(query);\n this.notify({\n type: 'queryAdded',\n query: query\n });\n }\n };\n\n _proto.remove = function remove(query) {\n var queryInMap = this.queriesMap[query.queryHash];\n\n if (queryInMap) {\n query.destroy();\n this.queries = this.queries.filter(function (x) {\n return x !== query;\n });\n\n if (queryInMap === query) {\n delete this.queriesMap[query.queryHash];\n }\n\n this.notify({\n type: 'queryRemoved',\n query: query\n });\n }\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.queries.forEach(function (query) {\n _this2.remove(query);\n });\n });\n };\n\n _proto.get = function get(queryHash) {\n return this.queriesMap[queryHash];\n };\n\n _proto.getAll = function getAll() {\n return this.queries;\n };\n\n _proto.find = function find(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.queries.find(function (query) {\n return matchQuery(filters, query);\n });\n };\n\n _proto.findAll = function findAll(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n return Object.keys(filters).length > 0 ? this.queries.filter(function (query) {\n return matchQuery(filters, query);\n }) : this.queries;\n };\n\n _proto.notify = function notify(event) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(event);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n var _this4 = this;\n\n notifyManager.batch(function () {\n _this4.queries.forEach(function (query) {\n query.onFocus();\n });\n });\n };\n\n _proto.onOnline = function onOnline() {\n var _this5 = this;\n\n notifyManager.batch(function () {\n _this5.queries.forEach(function (query) {\n query.onOnline();\n });\n });\n };\n\n return QueryCache;\n}(Subscribable);","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { notifyManager } from './notifyManager';\nimport { Mutation } from './mutation';\nimport { matchMutation, noop } from './utils';\nimport { Subscribable } from './subscribable'; // TYPES\n\n// CLASS\nexport var MutationCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(MutationCache, _Subscribable);\n\n function MutationCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.mutations = [];\n _this.mutationId = 0;\n return _this;\n }\n\n var _proto = MutationCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var mutation = new Mutation({\n mutationCache: this,\n mutationId: ++this.mutationId,\n options: client.defaultMutationOptions(options),\n state: state,\n defaultOptions: options.mutationKey ? client.getMutationDefaults(options.mutationKey) : undefined,\n meta: options.meta\n });\n this.add(mutation);\n return mutation;\n };\n\n _proto.add = function add(mutation) {\n this.mutations.push(mutation);\n this.notify(mutation);\n };\n\n _proto.remove = function remove(mutation) {\n this.mutations = this.mutations.filter(function (x) {\n return x !== mutation;\n });\n mutation.cancel();\n this.notify(mutation);\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.mutations.forEach(function (mutation) {\n _this2.remove(mutation);\n });\n });\n };\n\n _proto.getAll = function getAll() {\n return this.mutations;\n };\n\n _proto.find = function find(filters) {\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.mutations.find(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.findAll = function findAll(filters) {\n return this.mutations.filter(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.notify = function notify(mutation) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(mutation);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n this.resumePausedMutations();\n };\n\n _proto.onOnline = function onOnline() {\n this.resumePausedMutations();\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n var pausedMutations = this.mutations.filter(function (x) {\n return x.state.isPaused;\n });\n return notifyManager.batch(function () {\n return pausedMutations.reduce(function (promise, mutation) {\n return promise.then(function () {\n return mutation.continue().catch(noop);\n });\n }, Promise.resolve());\n });\n };\n\n return MutationCache;\n}(Subscribable);","import { isCancelable } from './retryer';\nimport { getAbortController } from './utils';\nexport function infiniteQueryBehavior() {\n return {\n onFetch: function onFetch(context) {\n context.fetchFn = function () {\n var _context$fetchOptions, _context$fetchOptions2, _context$fetchOptions3, _context$fetchOptions4, _context$state$data, _context$state$data2;\n\n var refetchPage = (_context$fetchOptions = context.fetchOptions) == null ? void 0 : (_context$fetchOptions2 = _context$fetchOptions.meta) == null ? void 0 : _context$fetchOptions2.refetchPage;\n var fetchMore = (_context$fetchOptions3 = context.fetchOptions) == null ? void 0 : (_context$fetchOptions4 = _context$fetchOptions3.meta) == null ? void 0 : _context$fetchOptions4.fetchMore;\n var pageParam = fetchMore == null ? void 0 : fetchMore.pageParam;\n var isFetchingNextPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'forward';\n var isFetchingPreviousPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'backward';\n var oldPages = ((_context$state$data = context.state.data) == null ? void 0 : _context$state$data.pages) || [];\n var oldPageParams = ((_context$state$data2 = context.state.data) == null ? void 0 : _context$state$data2.pageParams) || [];\n var abortController = getAbortController();\n var abortSignal = abortController == null ? void 0 : abortController.signal;\n var newPageParams = oldPageParams;\n var cancelled = false; // Get query function\n\n var queryFn = context.options.queryFn || function () {\n return Promise.reject('Missing queryFn');\n };\n\n var buildNewPages = function buildNewPages(pages, param, page, previous) {\n newPageParams = previous ? [param].concat(newPageParams) : [].concat(newPageParams, [param]);\n return previous ? [page].concat(pages) : [].concat(pages, [page]);\n }; // Create function to fetch a page\n\n\n var fetchPage = function fetchPage(pages, manual, param, previous) {\n if (cancelled) {\n return Promise.reject('Cancelled');\n }\n\n if (typeof param === 'undefined' && !manual && pages.length) {\n return Promise.resolve(pages);\n }\n\n var queryFnContext = {\n queryKey: context.queryKey,\n signal: abortSignal,\n pageParam: param,\n meta: context.meta\n };\n var queryFnResult = queryFn(queryFnContext);\n var promise = Promise.resolve(queryFnResult).then(function (page) {\n return buildNewPages(pages, param, page, previous);\n });\n\n if (isCancelable(queryFnResult)) {\n var promiseAsAny = promise;\n promiseAsAny.cancel = queryFnResult.cancel;\n }\n\n return promise;\n };\n\n var promise; // Fetch first page?\n\n if (!oldPages.length) {\n promise = fetchPage([]);\n } // Fetch next page?\n else if (isFetchingNextPage) {\n var manual = typeof pageParam !== 'undefined';\n var param = manual ? pageParam : getNextPageParam(context.options, oldPages);\n promise = fetchPage(oldPages, manual, param);\n } // Fetch previous page?\n else if (isFetchingPreviousPage) {\n var _manual = typeof pageParam !== 'undefined';\n\n var _param = _manual ? pageParam : getPreviousPageParam(context.options, oldPages);\n\n promise = fetchPage(oldPages, _manual, _param, true);\n } // Refetch pages\n else {\n (function () {\n newPageParams = [];\n var manual = typeof context.options.getNextPageParam === 'undefined';\n var shouldFetchFirstPage = refetchPage && oldPages[0] ? refetchPage(oldPages[0], 0, oldPages) : true; // Fetch first page\n\n promise = shouldFetchFirstPage ? fetchPage([], manual, oldPageParams[0]) : Promise.resolve(buildNewPages([], oldPageParams[0], oldPages[0])); // Fetch remaining pages\n\n var _loop = function _loop(i) {\n promise = promise.then(function (pages) {\n var shouldFetchNextPage = refetchPage && oldPages[i] ? refetchPage(oldPages[i], i, oldPages) : true;\n\n if (shouldFetchNextPage) {\n var _param2 = manual ? oldPageParams[i] : getNextPageParam(context.options, pages);\n\n return fetchPage(pages, manual, _param2);\n }\n\n return Promise.resolve(buildNewPages(pages, oldPageParams[i], oldPages[i]));\n });\n };\n\n for (var i = 1; i < oldPages.length; i++) {\n _loop(i);\n }\n })();\n }\n\n var finalPromise = promise.then(function (pages) {\n return {\n pages: pages,\n pageParams: newPageParams\n };\n });\n var finalPromiseAsAny = finalPromise;\n\n finalPromiseAsAny.cancel = function () {\n cancelled = true;\n abortController == null ? void 0 : abortController.abort();\n\n if (isCancelable(promise)) {\n promise.cancel();\n }\n };\n\n return finalPromise;\n };\n }\n };\n}\nexport function getNextPageParam(options, pages) {\n return options.getNextPageParam == null ? void 0 : options.getNextPageParam(pages[pages.length - 1], pages);\n}\nexport function getPreviousPageParam(options, pages) {\n return options.getPreviousPageParam == null ? void 0 : options.getPreviousPageParam(pages[0], pages);\n}\n/**\n * Checks if there is a next page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasNextPage(options, pages) {\n if (options.getNextPageParam && Array.isArray(pages)) {\n var nextPageParam = getNextPageParam(options, pages);\n return typeof nextPageParam !== 'undefined' && nextPageParam !== null && nextPageParam !== false;\n }\n}\n/**\n * Checks if there is a previous page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasPreviousPage(options, pages) {\n if (options.getPreviousPageParam && Array.isArray(pages)) {\n var previousPageParam = getPreviousPageParam(options, pages);\n return typeof previousPageParam !== 'undefined' && previousPageParam !== null && previousPageParam !== false;\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { hashQueryKey, noop, parseFilterArgs, parseQueryArgs, partialMatchKey, hashQueryKeyByOptions } from './utils';\nimport { QueryCache } from './queryCache';\nimport { MutationCache } from './mutationCache';\nimport { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { notifyManager } from './notifyManager';\nimport { infiniteQueryBehavior } from './infiniteQueryBehavior';\n// CLASS\nexport var QueryClient = /*#__PURE__*/function () {\n function QueryClient(config) {\n if (config === void 0) {\n config = {};\n }\n\n this.queryCache = config.queryCache || new QueryCache();\n this.mutationCache = config.mutationCache || new MutationCache();\n this.defaultOptions = config.defaultOptions || {};\n this.queryDefaults = [];\n this.mutationDefaults = [];\n }\n\n var _proto = QueryClient.prototype;\n\n _proto.mount = function mount() {\n var _this = this;\n\n this.unsubscribeFocus = focusManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onFocus();\n\n _this.queryCache.onFocus();\n }\n });\n this.unsubscribeOnline = onlineManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onOnline();\n\n _this.queryCache.onOnline();\n }\n });\n };\n\n _proto.unmount = function unmount() {\n var _this$unsubscribeFocu, _this$unsubscribeOnli;\n\n (_this$unsubscribeFocu = this.unsubscribeFocus) == null ? void 0 : _this$unsubscribeFocu.call(this);\n (_this$unsubscribeOnli = this.unsubscribeOnline) == null ? void 0 : _this$unsubscribeOnli.call(this);\n };\n\n _proto.isFetching = function isFetching(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n filters.fetching = true;\n return this.queryCache.findAll(filters).length;\n };\n\n _proto.isMutating = function isMutating(filters) {\n return this.mutationCache.findAll(_extends({}, filters, {\n fetching: true\n })).length;\n };\n\n _proto.getQueryData = function getQueryData(queryKey, filters) {\n var _this$queryCache$find;\n\n return (_this$queryCache$find = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find.state.data;\n };\n\n _proto.getQueriesData = function getQueriesData(queryKeyOrFilters) {\n return this.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref) {\n var queryKey = _ref.queryKey,\n state = _ref.state;\n var data = state.data;\n return [queryKey, data];\n });\n };\n\n _proto.setQueryData = function setQueryData(queryKey, updater, options) {\n var parsedOptions = parseQueryArgs(queryKey);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions);\n return this.queryCache.build(this, defaultedOptions).setData(updater, options);\n };\n\n _proto.setQueriesData = function setQueriesData(queryKeyOrFilters, updater, options) {\n var _this2 = this;\n\n return notifyManager.batch(function () {\n return _this2.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref2) {\n var queryKey = _ref2.queryKey;\n return [queryKey, _this2.setQueryData(queryKey, updater, options)];\n });\n });\n };\n\n _proto.getQueryState = function getQueryState(queryKey, filters) {\n var _this$queryCache$find2;\n\n return (_this$queryCache$find2 = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find2.state;\n };\n\n _proto.removeQueries = function removeQueries(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n var queryCache = this.queryCache;\n notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n queryCache.remove(query);\n });\n });\n };\n\n _proto.resetQueries = function resetQueries(arg1, arg2, arg3) {\n var _this3 = this;\n\n var _parseFilterArgs3 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs3[0],\n options = _parseFilterArgs3[1];\n\n var queryCache = this.queryCache;\n\n var refetchFilters = _extends({}, filters, {\n active: true\n });\n\n return notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n query.reset();\n });\n return _this3.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.cancelQueries = function cancelQueries(arg1, arg2, arg3) {\n var _this4 = this;\n\n var _parseFilterArgs4 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs4[0],\n _parseFilterArgs4$ = _parseFilterArgs4[1],\n cancelOptions = _parseFilterArgs4$ === void 0 ? {} : _parseFilterArgs4$;\n\n if (typeof cancelOptions.revert === 'undefined') {\n cancelOptions.revert = true;\n }\n\n var promises = notifyManager.batch(function () {\n return _this4.queryCache.findAll(filters).map(function (query) {\n return query.cancel(cancelOptions);\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.invalidateQueries = function invalidateQueries(arg1, arg2, arg3) {\n var _ref3,\n _filters$refetchActiv,\n _filters$refetchInact,\n _this5 = this;\n\n var _parseFilterArgs5 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs5[0],\n options = _parseFilterArgs5[1];\n\n var refetchFilters = _extends({}, filters, {\n // if filters.refetchActive is not provided and filters.active is explicitly false,\n // e.g. invalidateQueries({ active: false }), we don't want to refetch active queries\n active: (_ref3 = (_filters$refetchActiv = filters.refetchActive) != null ? _filters$refetchActiv : filters.active) != null ? _ref3 : true,\n inactive: (_filters$refetchInact = filters.refetchInactive) != null ? _filters$refetchInact : false\n });\n\n return notifyManager.batch(function () {\n _this5.queryCache.findAll(filters).forEach(function (query) {\n query.invalidate();\n });\n\n return _this5.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.refetchQueries = function refetchQueries(arg1, arg2, arg3) {\n var _this6 = this;\n\n var _parseFilterArgs6 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs6[0],\n options = _parseFilterArgs6[1];\n\n var promises = notifyManager.batch(function () {\n return _this6.queryCache.findAll(filters).map(function (query) {\n return query.fetch(undefined, _extends({}, options, {\n meta: {\n refetchPage: filters == null ? void 0 : filters.refetchPage\n }\n }));\n });\n });\n var promise = Promise.all(promises).then(noop);\n\n if (!(options == null ? void 0 : options.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.fetchQuery = function fetchQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions); // https://github.com/tannerlinsley/react-query/issues/652\n\n if (typeof defaultedOptions.retry === 'undefined') {\n defaultedOptions.retry = false;\n }\n\n var query = this.queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n };\n\n _proto.prefetchQuery = function prefetchQuery(arg1, arg2, arg3) {\n return this.fetchQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.fetchInfiniteQuery = function fetchInfiniteQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n parsedOptions.behavior = infiniteQueryBehavior();\n return this.fetchQuery(parsedOptions);\n };\n\n _proto.prefetchInfiniteQuery = function prefetchInfiniteQuery(arg1, arg2, arg3) {\n return this.fetchInfiniteQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.cancelMutations = function cancelMutations() {\n var _this7 = this;\n\n var promises = notifyManager.batch(function () {\n return _this7.mutationCache.getAll().map(function (mutation) {\n return mutation.cancel();\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n return this.getMutationCache().resumePausedMutations();\n };\n\n _proto.executeMutation = function executeMutation(options) {\n return this.mutationCache.build(this, options).execute();\n };\n\n _proto.getQueryCache = function getQueryCache() {\n return this.queryCache;\n };\n\n _proto.getMutationCache = function getMutationCache() {\n return this.mutationCache;\n };\n\n _proto.getDefaultOptions = function getDefaultOptions() {\n return this.defaultOptions;\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.setQueryDefaults = function setQueryDefaults(queryKey, options) {\n var result = this.queryDefaults.find(function (x) {\n return hashQueryKey(queryKey) === hashQueryKey(x.queryKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.queryDefaults.push({\n queryKey: queryKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getQueryDefaults = function getQueryDefaults(queryKey) {\n var _this$queryDefaults$f;\n\n return queryKey ? (_this$queryDefaults$f = this.queryDefaults.find(function (x) {\n return partialMatchKey(queryKey, x.queryKey);\n })) == null ? void 0 : _this$queryDefaults$f.defaultOptions : undefined;\n };\n\n _proto.setMutationDefaults = function setMutationDefaults(mutationKey, options) {\n var result = this.mutationDefaults.find(function (x) {\n return hashQueryKey(mutationKey) === hashQueryKey(x.mutationKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.mutationDefaults.push({\n mutationKey: mutationKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getMutationDefaults = function getMutationDefaults(mutationKey) {\n var _this$mutationDefault;\n\n return mutationKey ? (_this$mutationDefault = this.mutationDefaults.find(function (x) {\n return partialMatchKey(mutationKey, x.mutationKey);\n })) == null ? void 0 : _this$mutationDefault.defaultOptions : undefined;\n };\n\n _proto.defaultQueryOptions = function defaultQueryOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n var defaultedOptions = _extends({}, this.defaultOptions.queries, this.getQueryDefaults(options == null ? void 0 : options.queryKey), options, {\n _defaulted: true\n });\n\n if (!defaultedOptions.queryHash && defaultedOptions.queryKey) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);\n }\n\n return defaultedOptions;\n };\n\n _proto.defaultQueryObserverOptions = function defaultQueryObserverOptions(options) {\n return this.defaultQueryOptions(options);\n };\n\n _proto.defaultMutationOptions = function defaultMutationOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n return _extends({}, this.defaultOptions.mutations, this.getMutationDefaults(options == null ? void 0 : options.mutationKey), options, {\n _defaulted: true\n });\n };\n\n _proto.clear = function clear() {\n this.queryCache.clear();\n this.mutationCache.clear();\n };\n\n return QueryClient;\n}();","import { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { sleep } from './utils';\n\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1000 * Math.pow(2, failureCount), 30000);\n}\n\nexport function isCancelable(value) {\n return typeof (value == null ? void 0 : value.cancel) === 'function';\n}\nexport var CancelledError = function CancelledError(options) {\n this.revert = options == null ? void 0 : options.revert;\n this.silent = options == null ? void 0 : options.silent;\n};\nexport function isCancelledError(value) {\n return value instanceof CancelledError;\n} // CLASS\n\nexport var Retryer = function Retryer(config) {\n var _this = this;\n\n var cancelRetry = false;\n var cancelFn;\n var continueFn;\n var promiseResolve;\n var promiseReject;\n this.abort = config.abort;\n\n this.cancel = function (cancelOptions) {\n return cancelFn == null ? void 0 : cancelFn(cancelOptions);\n };\n\n this.cancelRetry = function () {\n cancelRetry = true;\n };\n\n this.continueRetry = function () {\n cancelRetry = false;\n };\n\n this.continue = function () {\n return continueFn == null ? void 0 : continueFn();\n };\n\n this.failureCount = 0;\n this.isPaused = false;\n this.isResolved = false;\n this.isTransportCancelable = false;\n this.promise = new Promise(function (outerResolve, outerReject) {\n promiseResolve = outerResolve;\n promiseReject = outerReject;\n });\n\n var resolve = function resolve(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onSuccess == null ? void 0 : config.onSuccess(value);\n continueFn == null ? void 0 : continueFn();\n promiseResolve(value);\n }\n };\n\n var reject = function reject(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onError == null ? void 0 : config.onError(value);\n continueFn == null ? void 0 : continueFn();\n promiseReject(value);\n }\n };\n\n var pause = function pause() {\n return new Promise(function (continueResolve) {\n continueFn = continueResolve;\n _this.isPaused = true;\n config.onPause == null ? void 0 : config.onPause();\n }).then(function () {\n continueFn = undefined;\n _this.isPaused = false;\n config.onContinue == null ? void 0 : config.onContinue();\n });\n }; // Create loop function\n\n\n var run = function run() {\n // Do nothing if already resolved\n if (_this.isResolved) {\n return;\n }\n\n var promiseOrValue; // Execute query\n\n try {\n promiseOrValue = config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n } // Create callback to cancel this fetch\n\n\n cancelFn = function cancelFn(cancelOptions) {\n if (!_this.isResolved) {\n reject(new CancelledError(cancelOptions));\n _this.abort == null ? void 0 : _this.abort(); // Cancel transport if supported\n\n if (isCancelable(promiseOrValue)) {\n try {\n promiseOrValue.cancel();\n } catch (_unused) {}\n }\n }\n }; // Check if the transport layer support cancellation\n\n\n _this.isTransportCancelable = isCancelable(promiseOrValue);\n Promise.resolve(promiseOrValue).then(resolve).catch(function (error) {\n var _config$retry, _config$retryDelay;\n\n // Stop if the fetch is already resolved\n if (_this.isResolved) {\n return;\n } // Do we need to retry the request?\n\n\n var retry = (_config$retry = config.retry) != null ? _config$retry : 3;\n var retryDelay = (_config$retryDelay = config.retryDelay) != null ? _config$retryDelay : defaultRetryDelay;\n var delay = typeof retryDelay === 'function' ? retryDelay(_this.failureCount, error) : retryDelay;\n var shouldRetry = retry === true || typeof retry === 'number' && _this.failureCount < retry || typeof retry === 'function' && retry(_this.failureCount, error);\n\n if (cancelRetry || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error);\n return;\n }\n\n _this.failureCount++; // Notify on fail\n\n config.onFail == null ? void 0 : config.onFail(_this.failureCount, error); // Delay\n\n sleep(delay) // Pause if the document is not visible or when the device is offline\n .then(function () {\n if (!focusManager.isFocused() || !onlineManager.isOnline()) {\n return pause();\n }\n }).then(function () {\n if (cancelRetry) {\n reject(error);\n } else {\n run();\n }\n });\n });\n }; // Start loop\n\n\n run();\n};","export var Subscribable = /*#__PURE__*/function () {\n function Subscribable() {\n this.listeners = [];\n }\n\n var _proto = Subscribable.prototype;\n\n _proto.subscribe = function subscribe(listener) {\n var _this = this;\n\n var callback = listener || function () {\n return undefined;\n };\n\n this.listeners.push(callback);\n this.onSubscribe();\n return function () {\n _this.listeners = _this.listeners.filter(function (x) {\n return x !== callback;\n });\n\n _this.onUnsubscribe();\n };\n };\n\n _proto.hasListeners = function hasListeners() {\n return this.listeners.length > 0;\n };\n\n _proto.onSubscribe = function onSubscribe() {// Do nothing\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {// Do nothing\n };\n\n return Subscribable;\n}();",null,"import _extends from \"@babel/runtime/helpers/esm/extends\";\n// TYPES\n// UTILS\nexport var isServer = typeof window === 'undefined';\nexport function noop() {\n return undefined;\n}\nexport function functionalUpdate(updater, input) {\n return typeof updater === 'function' ? updater(input) : updater;\n}\nexport function isValidTimeout(value) {\n return typeof value === 'number' && value >= 0 && value !== Infinity;\n}\nexport function ensureQueryKeyArray(value) {\n return Array.isArray(value) ? value : [value];\n}\nexport function difference(array1, array2) {\n return array1.filter(function (x) {\n return array2.indexOf(x) === -1;\n });\n}\nexport function replaceAt(array, index, value) {\n var copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nexport function timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nexport function parseQueryArgs(arg1, arg2, arg3) {\n if (!isQueryKey(arg1)) {\n return arg1;\n }\n\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n queryKey: arg1,\n queryFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n queryKey: arg1\n });\n}\nexport function parseMutationArgs(arg1, arg2, arg3) {\n if (isQueryKey(arg1)) {\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n mutationKey: arg1,\n mutationFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n mutationKey: arg1\n });\n }\n\n if (typeof arg1 === 'function') {\n return _extends({}, arg2, {\n mutationFn: arg1\n });\n }\n\n return _extends({}, arg1);\n}\nexport function parseFilterArgs(arg1, arg2, arg3) {\n return isQueryKey(arg1) ? [_extends({}, arg2, {\n queryKey: arg1\n }), arg3] : [arg1 || {}, arg2];\n}\nexport function parseMutationFilterArgs(arg1, arg2) {\n return isQueryKey(arg1) ? _extends({}, arg2, {\n mutationKey: arg1\n }) : arg1;\n}\nexport function mapQueryStatusFilter(active, inactive) {\n if (active === true && inactive === true || active == null && inactive == null) {\n return 'all';\n } else if (active === false && inactive === false) {\n return 'none';\n } else {\n // At this point, active|inactive can only be true|false or false|true\n // so, when only one value is provided, the missing one has to be the negated value\n var isActive = active != null ? active : !inactive;\n return isActive ? 'active' : 'inactive';\n }\n}\nexport function matchQuery(filters, query) {\n var active = filters.active,\n exact = filters.exact,\n fetching = filters.fetching,\n inactive = filters.inactive,\n predicate = filters.predicate,\n queryKey = filters.queryKey,\n stale = filters.stale;\n\n if (isQueryKey(queryKey)) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n\n var queryStatusFilter = mapQueryStatusFilter(active, inactive);\n\n if (queryStatusFilter === 'none') {\n return false;\n } else if (queryStatusFilter !== 'all') {\n var isActive = query.isActive();\n\n if (queryStatusFilter === 'active' && !isActive) {\n return false;\n }\n\n if (queryStatusFilter === 'inactive' && isActive) {\n return false;\n }\n }\n\n if (typeof stale === 'boolean' && query.isStale() !== stale) {\n return false;\n }\n\n if (typeof fetching === 'boolean' && query.isFetching() !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(query)) {\n return false;\n }\n\n return true;\n}\nexport function matchMutation(filters, mutation) {\n var exact = filters.exact,\n fetching = filters.fetching,\n predicate = filters.predicate,\n mutationKey = filters.mutationKey;\n\n if (isQueryKey(mutationKey)) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n\n if (exact) {\n if (hashQueryKey(mutation.options.mutationKey) !== hashQueryKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n\n if (typeof fetching === 'boolean' && mutation.state.status === 'loading' !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(mutation)) {\n return false;\n }\n\n return true;\n}\nexport function hashQueryKeyByOptions(queryKey, options) {\n var hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashQueryKey;\n return hashFn(queryKey);\n}\n/**\n * Default query keys hash function.\n */\n\nexport function hashQueryKey(queryKey) {\n var asArray = ensureQueryKeyArray(queryKey);\n return stableValueHash(asArray);\n}\n/**\n * Hashes the value into a stable hash.\n */\n\nexport function stableValueHash(value) {\n return JSON.stringify(value, function (_, val) {\n return isPlainObject(val) ? Object.keys(val).sort().reduce(function (result, key) {\n result[key] = val[key];\n return result;\n }, {}) : val;\n });\n}\n/**\n * Checks if key `b` partially matches with key `a`.\n */\n\nexport function partialMatchKey(a, b) {\n return partialDeepEqual(ensureQueryKeyArray(a), ensureQueryKeyArray(b));\n}\n/**\n * Checks if `b` partially matches with `a`.\n */\n\nexport function partialDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== typeof b) {\n return false;\n }\n\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n return !Object.keys(b).some(function (key) {\n return !partialDeepEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n/**\n * This function returns `a` if `b` is deeply equal.\n * If not, it will replace any deeply equal children of `b` with those of `a`.\n * This can be used for structural sharing between JSON values for example.\n */\n\nexport function replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n\n var array = Array.isArray(a) && Array.isArray(b);\n\n if (array || isPlainObject(a) && isPlainObject(b)) {\n var aSize = array ? a.length : Object.keys(a).length;\n var bItems = array ? b : Object.keys(b);\n var bSize = bItems.length;\n var copy = array ? [] : {};\n var equalItems = 0;\n\n for (var i = 0; i < bSize; i++) {\n var key = array ? i : bItems[i];\n copy[key] = replaceEqualDeep(a[key], b[key]);\n\n if (copy[key] === a[key]) {\n equalItems++;\n }\n }\n\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n\n return b;\n}\n/**\n * Shallow compare objects. Only works with objects that always have the same properties.\n */\n\nexport function shallowEqualObjects(a, b) {\n if (a && !b || b && !a) {\n return false;\n }\n\n for (var key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n\n return true;\n} // Copied from: https://github.com/jonschlinkert/is-plain-object\n\nexport function isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n } // If has modified constructor\n\n\n var ctor = o.constructor;\n\n if (typeof ctor === 'undefined') {\n return true;\n } // If has modified prototype\n\n\n var prot = ctor.prototype;\n\n if (!hasObjectPrototype(prot)) {\n return false;\n } // If constructor does not have an Object-specific method\n\n\n if (!prot.hasOwnProperty('isPrototypeOf')) {\n return false;\n } // Most likely a plain Object\n\n\n return true;\n}\n\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nexport function isQueryKey(value) {\n return typeof value === 'string' || Array.isArray(value);\n}\nexport function isError(value) {\n return value instanceof Error;\n}\nexport function sleep(timeout) {\n return new Promise(function (resolve) {\n setTimeout(resolve, timeout);\n });\n}\n/**\n * Schedules a microtask.\n * This can be useful to schedule state updates after rendering.\n */\n\nexport function scheduleMicrotask(callback) {\n Promise.resolve().then(callback).catch(function (error) {\n return setTimeout(function () {\n throw error;\n });\n });\n}\nexport function getAbortController() {\n if (typeof AbortController === 'function') {\n return new AbortController();\n }\n}","export * from './core';\nexport * from './react';","import ReactDOM from 'react-dom';\nexport var unstable_batchedUpdates = ReactDOM.unstable_batchedUpdates;","import { notifyManager } from '../core';\nimport { unstable_batchedUpdates } from './reactBatchedUpdates';\nnotifyManager.setBatchNotifyFunction(unstable_batchedUpdates);","export var logger = console;","import { setLogger } from '../core';\nimport { logger } from './logger';\nsetLogger(logger);","import React from 'react';\nvar defaultContext = /*#__PURE__*/React.createContext(undefined);\nvar QueryClientSharingContext = /*#__PURE__*/React.createContext(false); // if contextSharing is on, we share the first and at least one\n// instance of the context across the window\n// to ensure that if React Query is used across\n// different bundles or microfrontends they will\n// all use the same **instance** of context, regardless\n// of module scoping.\n\nfunction getQueryClientContext(contextSharing) {\n if (contextSharing && typeof window !== 'undefined') {\n if (!window.ReactQueryClientContext) {\n window.ReactQueryClientContext = defaultContext;\n }\n\n return window.ReactQueryClientContext;\n }\n\n return defaultContext;\n}\n\nexport var useQueryClient = function useQueryClient() {\n var queryClient = React.useContext(getQueryClientContext(React.useContext(QueryClientSharingContext)));\n\n if (!queryClient) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one');\n }\n\n return queryClient;\n};\nexport var QueryClientProvider = function QueryClientProvider(_ref) {\n var client = _ref.client,\n _ref$contextSharing = _ref.contextSharing,\n contextSharing = _ref$contextSharing === void 0 ? false : _ref$contextSharing,\n children = _ref.children;\n React.useEffect(function () {\n client.mount();\n return function () {\n client.unmount();\n };\n }, [client]);\n var Context = getQueryClientContext(contextSharing);\n return /*#__PURE__*/React.createElement(QueryClientSharingContext.Provider, {\n value: contextSharing\n }, /*#__PURE__*/React.createElement(Context.Provider, {\n value: client\n }, children));\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { getDefaultState } from './mutation';\nimport { notifyManager } from './notifyManager';\nimport { Subscribable } from './subscribable';\n// CLASS\nexport var MutationObserver = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(MutationObserver, _Subscribable);\n\n function MutationObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n\n _this.setOptions(options);\n\n _this.bindMethods();\n\n _this.updateResult();\n\n return _this;\n }\n\n var _proto = MutationObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n };\n\n _proto.setOptions = function setOptions(options) {\n this.options = this.client.defaultMutationOptions(options);\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n var _this$currentMutation;\n\n (_this$currentMutation = this.currentMutation) == null ? void 0 : _this$currentMutation.removeObserver(this);\n }\n };\n\n _proto.onMutationUpdate = function onMutationUpdate(action) {\n this.updateResult(); // Determine which callbacks to trigger\n\n var notifyOptions = {\n listeners: true\n };\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error') {\n notifyOptions.onError = true;\n }\n\n this.notify(notifyOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.reset = function reset() {\n this.currentMutation = undefined;\n this.updateResult();\n this.notify({\n listeners: true\n });\n };\n\n _proto.mutate = function mutate(variables, options) {\n this.mutateOptions = options;\n\n if (this.currentMutation) {\n this.currentMutation.removeObserver(this);\n }\n\n this.currentMutation = this.client.getMutationCache().build(this.client, _extends({}, this.options, {\n variables: typeof variables !== 'undefined' ? variables : this.options.variables\n }));\n this.currentMutation.addObserver(this);\n return this.currentMutation.execute();\n };\n\n _proto.updateResult = function updateResult() {\n var state = this.currentMutation ? this.currentMutation.state : getDefaultState();\n\n var result = _extends({}, state, {\n isLoading: state.status === 'loading',\n isSuccess: state.status === 'success',\n isError: state.status === 'error',\n isIdle: state.status === 'idle',\n mutate: this.mutate,\n reset: this.reset\n });\n\n this.currentResult = result;\n };\n\n _proto.notify = function notify(options) {\n var _this2 = this;\n\n notifyManager.batch(function () {\n // First trigger the mutate callbacks\n if (_this2.mutateOptions) {\n if (options.onSuccess) {\n _this2.mutateOptions.onSuccess == null ? void 0 : _this2.mutateOptions.onSuccess(_this2.currentResult.data, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(_this2.currentResult.data, null, _this2.currentResult.variables, _this2.currentResult.context);\n } else if (options.onError) {\n _this2.mutateOptions.onError == null ? void 0 : _this2.mutateOptions.onError(_this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(undefined, _this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n }\n } // Then trigger the listeners\n\n\n if (options.listeners) {\n _this2.listeners.forEach(function (listener) {\n listener(_this2.currentResult);\n });\n }\n });\n };\n\n return MutationObserver;\n}(Subscribable);","export function shouldThrowError(suspense, _useErrorBoundary, params) {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary.apply(void 0, params);\n } // Allow useErrorBoundary to override suspense's throwing behavior\n\n\n if (typeof _useErrorBoundary === 'boolean') return _useErrorBoundary; // If suspense is enabled default to throwing errors\n\n return !!suspense;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { notifyManager } from '../core/notifyManager';\nimport { noop, parseMutationArgs } from '../core/utils';\nimport { MutationObserver } from '../core/mutationObserver';\nimport { useQueryClient } from './QueryClientProvider';\nimport { shouldThrowError } from './utils'; // HOOK\n\nexport function useMutation(arg1, arg2, arg3) {\n var mountedRef = React.useRef(false);\n\n var _React$useState = React.useState(0),\n forceUpdate = _React$useState[1];\n\n var options = parseMutationArgs(arg1, arg2, arg3);\n var queryClient = useQueryClient();\n var obsRef = React.useRef();\n\n if (!obsRef.current) {\n obsRef.current = new MutationObserver(queryClient, options);\n } else {\n obsRef.current.setOptions(options);\n }\n\n var currentResult = obsRef.current.getCurrentResult();\n React.useEffect(function () {\n mountedRef.current = true;\n var unsubscribe = obsRef.current.subscribe(notifyManager.batchCalls(function () {\n if (mountedRef.current) {\n forceUpdate(function (x) {\n return x + 1;\n });\n }\n }));\n return function () {\n mountedRef.current = false;\n unsubscribe();\n };\n }, []);\n var mutate = React.useCallback(function (variables, mutateOptions) {\n obsRef.current.mutate(variables, mutateOptions).catch(noop);\n }, []);\n\n if (currentResult.error && shouldThrowError(undefined, obsRef.current.options.useErrorBoundary, [currentResult.error])) {\n throw currentResult.error;\n }\n\n return _extends({}, currentResult, {\n mutate: mutate,\n mutateAsync: currentResult.mutate\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { isServer, isValidTimeout, noop, replaceEqualDeep, shallowEqualObjects, timeUntilStale } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { focusManager } from './focusManager';\nimport { Subscribable } from './subscribable';\nimport { getLogger } from './logger';\nimport { isCancelledError } from './retryer';\nexport var QueryObserver = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryObserver, _Subscribable);\n\n function QueryObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n _this.options = options;\n _this.trackedProps = [];\n _this.selectError = null;\n\n _this.bindMethods();\n\n _this.setOptions(options);\n\n return _this;\n }\n\n var _proto = QueryObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.remove = this.remove.bind(this);\n this.refetch = this.refetch.bind(this);\n };\n\n _proto.onSubscribe = function onSubscribe() {\n if (this.listeners.length === 1) {\n this.currentQuery.addObserver(this);\n\n if (shouldFetchOnMount(this.currentQuery, this.options)) {\n this.executeFetch();\n }\n\n this.updateTimers();\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n this.destroy();\n }\n };\n\n _proto.shouldFetchOnReconnect = function shouldFetchOnReconnect() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnReconnect);\n };\n\n _proto.shouldFetchOnWindowFocus = function shouldFetchOnWindowFocus() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnWindowFocus);\n };\n\n _proto.destroy = function destroy() {\n this.listeners = [];\n this.clearTimers();\n this.currentQuery.removeObserver(this);\n };\n\n _proto.setOptions = function setOptions(options, notifyOptions) {\n var prevOptions = this.options;\n var prevQuery = this.currentQuery;\n this.options = this.client.defaultQueryObserverOptions(options);\n\n if (typeof this.options.enabled !== 'undefined' && typeof this.options.enabled !== 'boolean') {\n throw new Error('Expected enabled to be a boolean');\n } // Keep previous query key if the user does not supply one\n\n\n if (!this.options.queryKey) {\n this.options.queryKey = prevOptions.queryKey;\n }\n\n this.updateQuery();\n var mounted = this.hasListeners(); // Fetch if there are subscribers\n\n if (mounted && shouldFetchOptionally(this.currentQuery, prevQuery, this.options, prevOptions)) {\n this.executeFetch();\n } // Update result\n\n\n this.updateResult(notifyOptions); // Update stale interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {\n this.updateStaleTimeout();\n }\n\n var nextRefetchInterval = this.computeRefetchInterval(); // Update refetch interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.currentRefetchInterval)) {\n this.updateRefetchInterval(nextRefetchInterval);\n }\n };\n\n _proto.getOptimisticResult = function getOptimisticResult(options) {\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return this.createResult(query, defaultedOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.trackResult = function trackResult(result, defaultedOptions) {\n var _this2 = this;\n\n var trackedResult = {};\n\n var trackProp = function trackProp(key) {\n if (!_this2.trackedProps.includes(key)) {\n _this2.trackedProps.push(key);\n }\n };\n\n Object.keys(result).forEach(function (key) {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: function get() {\n trackProp(key);\n return result[key];\n }\n });\n });\n\n if (defaultedOptions.useErrorBoundary || defaultedOptions.suspense) {\n trackProp('error');\n }\n\n return trackedResult;\n };\n\n _proto.getNextResult = function getNextResult(options) {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n var unsubscribe = _this3.subscribe(function (result) {\n if (!result.isFetching) {\n unsubscribe();\n\n if (result.isError && (options == null ? void 0 : options.throwOnError)) {\n reject(result.error);\n } else {\n resolve(result);\n }\n }\n });\n });\n };\n\n _proto.getCurrentQuery = function getCurrentQuery() {\n return this.currentQuery;\n };\n\n _proto.remove = function remove() {\n this.client.getQueryCache().remove(this.currentQuery);\n };\n\n _proto.refetch = function refetch(options) {\n return this.fetch(_extends({}, options, {\n meta: {\n refetchPage: options == null ? void 0 : options.refetchPage\n }\n }));\n };\n\n _proto.fetchOptimistic = function fetchOptimistic(options) {\n var _this4 = this;\n\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return query.fetch().then(function () {\n return _this4.createResult(query, defaultedOptions);\n });\n };\n\n _proto.fetch = function fetch(fetchOptions) {\n var _this5 = this;\n\n return this.executeFetch(fetchOptions).then(function () {\n _this5.updateResult();\n\n return _this5.currentResult;\n });\n };\n\n _proto.executeFetch = function executeFetch(fetchOptions) {\n // Make sure we reference the latest query as the current one might have been removed\n this.updateQuery(); // Fetch\n\n var promise = this.currentQuery.fetch(this.options, fetchOptions);\n\n if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.updateStaleTimeout = function updateStaleTimeout() {\n var _this6 = this;\n\n this.clearStaleTimeout();\n\n if (isServer || this.currentResult.isStale || !isValidTimeout(this.options.staleTime)) {\n return;\n }\n\n var time = timeUntilStale(this.currentResult.dataUpdatedAt, this.options.staleTime); // The timeout is sometimes triggered 1 ms before the stale time expiration.\n // To mitigate this issue we always add 1 ms to the timeout.\n\n var timeout = time + 1;\n this.staleTimeoutId = setTimeout(function () {\n if (!_this6.currentResult.isStale) {\n _this6.updateResult();\n }\n }, timeout);\n };\n\n _proto.computeRefetchInterval = function computeRefetchInterval() {\n var _this$options$refetch;\n\n return typeof this.options.refetchInterval === 'function' ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (_this$options$refetch = this.options.refetchInterval) != null ? _this$options$refetch : false;\n };\n\n _proto.updateRefetchInterval = function updateRefetchInterval(nextInterval) {\n var _this7 = this;\n\n this.clearRefetchInterval();\n this.currentRefetchInterval = nextInterval;\n\n if (isServer || this.options.enabled === false || !isValidTimeout(this.currentRefetchInterval) || this.currentRefetchInterval === 0) {\n return;\n }\n\n this.refetchIntervalId = setInterval(function () {\n if (_this7.options.refetchIntervalInBackground || focusManager.isFocused()) {\n _this7.executeFetch();\n }\n }, this.currentRefetchInterval);\n };\n\n _proto.updateTimers = function updateTimers() {\n this.updateStaleTimeout();\n this.updateRefetchInterval(this.computeRefetchInterval());\n };\n\n _proto.clearTimers = function clearTimers() {\n this.clearStaleTimeout();\n this.clearRefetchInterval();\n };\n\n _proto.clearStaleTimeout = function clearStaleTimeout() {\n if (this.staleTimeoutId) {\n clearTimeout(this.staleTimeoutId);\n this.staleTimeoutId = undefined;\n }\n };\n\n _proto.clearRefetchInterval = function clearRefetchInterval() {\n if (this.refetchIntervalId) {\n clearInterval(this.refetchIntervalId);\n this.refetchIntervalId = undefined;\n }\n };\n\n _proto.createResult = function createResult(query, options) {\n var prevQuery = this.currentQuery;\n var prevOptions = this.options;\n var prevResult = this.currentResult;\n var prevResultState = this.currentResultState;\n var prevResultOptions = this.currentResultOptions;\n var queryChange = query !== prevQuery;\n var queryInitialState = queryChange ? query.state : this.currentQueryInitialState;\n var prevQueryResult = queryChange ? this.currentResult : this.previousQueryResult;\n var state = query.state;\n var dataUpdatedAt = state.dataUpdatedAt,\n error = state.error,\n errorUpdatedAt = state.errorUpdatedAt,\n isFetching = state.isFetching,\n status = state.status;\n var isPreviousData = false;\n var isPlaceholderData = false;\n var data; // Optimistically set result in fetching state if needed\n\n if (options.optimisticResults) {\n var mounted = this.hasListeners();\n var fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n var fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\n if (fetchOnMount || fetchOptionally) {\n isFetching = true;\n\n if (!dataUpdatedAt) {\n status = 'loading';\n }\n }\n } // Keep previous data if needed\n\n\n if (options.keepPreviousData && !state.dataUpdateCount && (prevQueryResult == null ? void 0 : prevQueryResult.isSuccess) && status !== 'error') {\n data = prevQueryResult.data;\n dataUpdatedAt = prevQueryResult.dataUpdatedAt;\n status = prevQueryResult.status;\n isPreviousData = true;\n } // Select data if needed\n else if (options.select && typeof state.data !== 'undefined') {\n // Memoize select result\n if (prevResult && state.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === this.selectFn) {\n data = this.selectResult;\n } else {\n try {\n this.selectFn = options.select;\n data = options.select(state.data);\n\n if (options.structuralSharing !== false) {\n data = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, data);\n }\n\n this.selectResult = data;\n this.selectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n this.selectError = selectError;\n }\n }\n } // Use query data\n else {\n data = state.data;\n } // Show placeholder data if needed\n\n\n if (typeof options.placeholderData !== 'undefined' && typeof data === 'undefined' && (status === 'loading' || status === 'idle')) {\n var placeholderData; // Memoize placeholder data\n\n if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === 'function' ? options.placeholderData() : options.placeholderData;\n\n if (options.select && typeof placeholderData !== 'undefined') {\n try {\n placeholderData = options.select(placeholderData);\n\n if (options.structuralSharing !== false) {\n placeholderData = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, placeholderData);\n }\n\n this.selectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n this.selectError = selectError;\n }\n }\n }\n\n if (typeof placeholderData !== 'undefined') {\n status = 'success';\n data = placeholderData;\n isPlaceholderData = true;\n }\n }\n\n if (this.selectError) {\n error = this.selectError;\n data = this.selectResult;\n errorUpdatedAt = Date.now();\n status = 'error';\n }\n\n var result = {\n status: status,\n isLoading: status === 'loading',\n isSuccess: status === 'success',\n isError: status === 'error',\n isIdle: status === 'idle',\n data: data,\n dataUpdatedAt: dataUpdatedAt,\n error: error,\n errorUpdatedAt: errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n errorUpdateCount: state.errorUpdateCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching: isFetching,\n isRefetching: isFetching && status !== 'loading',\n isLoadingError: status === 'error' && state.dataUpdatedAt === 0,\n isPlaceholderData: isPlaceholderData,\n isPreviousData: isPreviousData,\n isRefetchError: status === 'error' && state.dataUpdatedAt !== 0,\n isStale: isStale(query, options),\n refetch: this.refetch,\n remove: this.remove\n };\n return result;\n };\n\n _proto.shouldNotifyListeners = function shouldNotifyListeners(result, prevResult) {\n if (!prevResult) {\n return true;\n }\n\n var _this$options = this.options,\n notifyOnChangeProps = _this$options.notifyOnChangeProps,\n notifyOnChangePropsExclusions = _this$options.notifyOnChangePropsExclusions;\n\n if (!notifyOnChangeProps && !notifyOnChangePropsExclusions) {\n return true;\n }\n\n if (notifyOnChangeProps === 'tracked' && !this.trackedProps.length) {\n return true;\n }\n\n var includedProps = notifyOnChangeProps === 'tracked' ? this.trackedProps : notifyOnChangeProps;\n return Object.keys(result).some(function (key) {\n var typedKey = key;\n var changed = result[typedKey] !== prevResult[typedKey];\n var isIncluded = includedProps == null ? void 0 : includedProps.some(function (x) {\n return x === key;\n });\n var isExcluded = notifyOnChangePropsExclusions == null ? void 0 : notifyOnChangePropsExclusions.some(function (x) {\n return x === key;\n });\n return changed && !isExcluded && (!includedProps || isIncluded);\n });\n };\n\n _proto.updateResult = function updateResult(notifyOptions) {\n var prevResult = this.currentResult;\n this.currentResult = this.createResult(this.currentQuery, this.options);\n this.currentResultState = this.currentQuery.state;\n this.currentResultOptions = this.options; // Only notify if something has changed\n\n if (shallowEqualObjects(this.currentResult, prevResult)) {\n return;\n } // Determine which callbacks to trigger\n\n\n var defaultNotifyOptions = {\n cache: true\n };\n\n if ((notifyOptions == null ? void 0 : notifyOptions.listeners) !== false && this.shouldNotifyListeners(this.currentResult, prevResult)) {\n defaultNotifyOptions.listeners = true;\n }\n\n this.notify(_extends({}, defaultNotifyOptions, notifyOptions));\n };\n\n _proto.updateQuery = function updateQuery() {\n var query = this.client.getQueryCache().build(this.client, this.options);\n\n if (query === this.currentQuery) {\n return;\n }\n\n var prevQuery = this.currentQuery;\n this.currentQuery = query;\n this.currentQueryInitialState = query.state;\n this.previousQueryResult = this.currentResult;\n\n if (this.hasListeners()) {\n prevQuery == null ? void 0 : prevQuery.removeObserver(this);\n query.addObserver(this);\n }\n };\n\n _proto.onQueryUpdate = function onQueryUpdate(action) {\n var notifyOptions = {};\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error' && !isCancelledError(action.error)) {\n notifyOptions.onError = true;\n }\n\n this.updateResult(notifyOptions);\n\n if (this.hasListeners()) {\n this.updateTimers();\n }\n };\n\n _proto.notify = function notify(notifyOptions) {\n var _this8 = this;\n\n notifyManager.batch(function () {\n // First trigger the configuration callbacks\n if (notifyOptions.onSuccess) {\n _this8.options.onSuccess == null ? void 0 : _this8.options.onSuccess(_this8.currentResult.data);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(_this8.currentResult.data, null);\n } else if (notifyOptions.onError) {\n _this8.options.onError == null ? void 0 : _this8.options.onError(_this8.currentResult.error);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(undefined, _this8.currentResult.error);\n } // Then trigger the listeners\n\n\n if (notifyOptions.listeners) {\n _this8.listeners.forEach(function (listener) {\n listener(_this8.currentResult);\n });\n } // Then the cache listeners\n\n\n if (notifyOptions.cache) {\n _this8.client.getQueryCache().notify({\n query: _this8.currentQuery,\n type: 'observerResultsUpdated'\n });\n }\n });\n };\n\n return QueryObserver;\n}(Subscribable);\n\nfunction shouldLoadOnMount(query, options) {\n return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === 'error' && options.retryOnMount === false);\n}\n\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\n\nfunction shouldFetchOn(query, options, field) {\n if (options.enabled !== false) {\n var value = typeof field === 'function' ? field(query) : field;\n return value === 'always' || value !== false && isStale(query, options);\n }\n\n return false;\n}\n\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== 'error') && isStale(query, options);\n}\n\nfunction isStale(query, options) {\n return query.isStaleByTime(options.staleTime);\n}","import React from 'react'; // CONTEXT\n\nfunction createValue() {\n var _isReset = false;\n return {\n clearReset: function clearReset() {\n _isReset = false;\n },\n reset: function reset() {\n _isReset = true;\n },\n isReset: function isReset() {\n return _isReset;\n }\n };\n}\n\nvar QueryErrorResetBoundaryContext = /*#__PURE__*/React.createContext(createValue()); // HOOK\n\nexport var useQueryErrorResetBoundary = function useQueryErrorResetBoundary() {\n return React.useContext(QueryErrorResetBoundaryContext);\n}; // COMPONENT\n\nexport var QueryErrorResetBoundary = function QueryErrorResetBoundary(_ref) {\n var children = _ref.children;\n var value = React.useMemo(function () {\n return createValue();\n }, []);\n return /*#__PURE__*/React.createElement(QueryErrorResetBoundaryContext.Provider, {\n value: value\n }, typeof children === 'function' ? children(value) : children);\n};","import React from 'react';\nimport { notifyManager } from '../core/notifyManager';\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary';\nimport { useQueryClient } from './QueryClientProvider';\nimport { shouldThrowError } from './utils';\nexport function useBaseQuery(options, Observer) {\n var mountedRef = React.useRef(false);\n\n var _React$useState = React.useState(0),\n forceUpdate = _React$useState[1];\n\n var queryClient = useQueryClient();\n var errorResetBoundary = useQueryErrorResetBoundary();\n var defaultedOptions = queryClient.defaultQueryObserverOptions(options); // Make sure results are optimistically set in fetching state before subscribing or updating options\n\n defaultedOptions.optimisticResults = true; // Include callbacks in batch renders\n\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(defaultedOptions.onError);\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(defaultedOptions.onSuccess);\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(defaultedOptions.onSettled);\n }\n\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000;\n } // Set cache time to 1 if the option has been set to 0\n // when using suspense to prevent infinite loop of fetches\n\n\n if (defaultedOptions.cacheTime === 0) {\n defaultedOptions.cacheTime = 1;\n }\n }\n\n if (defaultedOptions.suspense || defaultedOptions.useErrorBoundary) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n defaultedOptions.retryOnMount = false;\n }\n }\n\n var _React$useState2 = React.useState(function () {\n return new Observer(queryClient, defaultedOptions);\n }),\n observer = _React$useState2[0];\n\n var result = observer.getOptimisticResult(defaultedOptions);\n React.useEffect(function () {\n mountedRef.current = true;\n errorResetBoundary.clearReset();\n var unsubscribe = observer.subscribe(notifyManager.batchCalls(function () {\n if (mountedRef.current) {\n forceUpdate(function (x) {\n return x + 1;\n });\n }\n })); // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n\n observer.updateResult();\n return function () {\n mountedRef.current = false;\n unsubscribe();\n };\n }, [errorResetBoundary, observer]);\n React.useEffect(function () {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, {\n listeners: false\n });\n }, [defaultedOptions, observer]); // Handle suspense\n\n if (defaultedOptions.suspense && result.isLoading) {\n throw observer.fetchOptimistic(defaultedOptions).then(function (_ref) {\n var data = _ref.data;\n defaultedOptions.onSuccess == null ? void 0 : defaultedOptions.onSuccess(data);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(data, null);\n }).catch(function (error) {\n errorResetBoundary.clearReset();\n defaultedOptions.onError == null ? void 0 : defaultedOptions.onError(error);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(undefined, error);\n });\n } // Handle error boundary\n\n\n if (result.isError && !errorResetBoundary.isReset() && !result.isFetching && shouldThrowError(defaultedOptions.suspense, defaultedOptions.useErrorBoundary, [result.error, observer.getCurrentQuery()])) {\n throw result.error;\n } // Handle result property usage tracking\n\n\n if (defaultedOptions.notifyOnChangeProps === 'tracked') {\n result = observer.trackResult(result, defaultedOptions);\n }\n\n return result;\n}","import { QueryObserver } from '../core';\nimport { parseQueryArgs } from '../core/utils';\nimport { useBaseQuery } from './useBaseQuery'; // HOOK\n\nexport function useQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n return useBaseQuery(parsedOptions, QueryObserver);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n\n// TYPES\n// FUNCTIONS\nfunction dehydrateMutation(mutation) {\n return {\n mutationKey: mutation.options.mutationKey,\n state: mutation.state\n };\n} // Most config is not dehydrated but instead meant to configure again when\n// consuming the de/rehydrated data, typically with useQuery on the client.\n// Sometimes it might make sense to prefetch data on the server and include\n// in the html-payload, but not consume it on the initial render.\n\n\nfunction dehydrateQuery(query) {\n return {\n state: query.state,\n queryKey: query.queryKey,\n queryHash: query.queryHash\n };\n}\n\nfunction defaultShouldDehydrateMutation(mutation) {\n return mutation.state.isPaused;\n}\n\nfunction defaultShouldDehydrateQuery(query) {\n return query.state.status === 'success';\n}\n\nexport function dehydrate(client, options) {\n var _options, _options2;\n\n options = options || {};\n var mutations = [];\n var queries = [];\n\n if (((_options = options) == null ? void 0 : _options.dehydrateMutations) !== false) {\n var shouldDehydrateMutation = options.shouldDehydrateMutation || defaultShouldDehydrateMutation;\n client.getMutationCache().getAll().forEach(function (mutation) {\n if (shouldDehydrateMutation(mutation)) {\n mutations.push(dehydrateMutation(mutation));\n }\n });\n }\n\n if (((_options2 = options) == null ? void 0 : _options2.dehydrateQueries) !== false) {\n var shouldDehydrateQuery = options.shouldDehydrateQuery || defaultShouldDehydrateQuery;\n client.getQueryCache().getAll().forEach(function (query) {\n if (shouldDehydrateQuery(query)) {\n queries.push(dehydrateQuery(query));\n }\n });\n }\n\n return {\n mutations: mutations,\n queries: queries\n };\n}\nexport function hydrate(client, dehydratedState, options) {\n if (typeof dehydratedState !== 'object' || dehydratedState === null) {\n return;\n }\n\n var mutationCache = client.getMutationCache();\n var queryCache = client.getQueryCache();\n var mutations = dehydratedState.mutations || [];\n var queries = dehydratedState.queries || [];\n mutations.forEach(function (dehydratedMutation) {\n var _options$defaultOptio;\n\n mutationCache.build(client, _extends({}, options == null ? void 0 : (_options$defaultOptio = options.defaultOptions) == null ? void 0 : _options$defaultOptio.mutations, {\n mutationKey: dehydratedMutation.mutationKey\n }), dehydratedMutation.state);\n });\n queries.forEach(function (dehydratedQuery) {\n var _options$defaultOptio2;\n\n var query = queryCache.get(dehydratedQuery.queryHash); // Do not hydrate if an existing query exists with newer data\n\n if (query) {\n if (query.state.dataUpdatedAt < dehydratedQuery.state.dataUpdatedAt) {\n query.setState(dehydratedQuery.state);\n }\n\n return;\n } // Restore query\n\n\n queryCache.build(client, _extends({}, options == null ? void 0 : (_options$defaultOptio2 = options.defaultOptions) == null ? void 0 : _options$defaultOptio2.queries, {\n queryKey: dehydratedQuery.queryKey,\n queryHash: dehydratedQuery.queryHash\n }), dehydratedQuery.state);\n });\n}","import React from 'react';\nimport { hydrate } from '../core';\nimport { useQueryClient } from './QueryClientProvider';\nexport function useHydrate(state, options) {\n var queryClient = useQueryClient();\n var optionsRef = React.useRef(options);\n optionsRef.current = options; // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n\n React.useMemo(function () {\n if (state) {\n hydrate(queryClient, state, optionsRef.current);\n }\n }, [queryClient, state]);\n}\nexport var Hydrate = function Hydrate(_ref) {\n var children = _ref.children,\n options = _ref.options,\n state = _ref.state;\n useHydrate(state, options);\n return children;\n};","// Side effects\nimport './setBatchUpdatesFn';\nimport './setLogger';\nexport { QueryClientProvider, useQueryClient } from './QueryClientProvider';\nexport { QueryErrorResetBoundary, useQueryErrorResetBoundary } from './QueryErrorResetBoundary';\nexport { useIsFetching } from './useIsFetching';\nexport { useIsMutating } from './useIsMutating';\nexport { useMutation } from './useMutation';\nexport { useQuery } from './useQuery';\nexport { useQueries } from './useQueries';\nexport { useInfiniteQuery } from './useInfiniteQuery';\nexport { useHydrate, Hydrate } from './Hydrate'; // Types\n\nexport * from './types';","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar gOPD = require('gopd');\n\nvar $TypeError = require('es-errors/type');\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @type {import('.')} */\nmodule.exports = function setFunctionLength(fn, length) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tif (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n\t\tthrow new $TypeError('`length` must be a positive 32-bit integer');\n\t}\n\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\n\tvar functionLengthIsConfigurable = true;\n\tvar functionLengthIsWritable = true;\n\tif ('length' in fn && gOPD) {\n\t\tvar desc = gOPD(fn, 'length');\n\t\tif (desc && !desc.configurable) {\n\t\t\tfunctionLengthIsConfigurable = false;\n\t\t}\n\t\tif (desc && !desc.writable) {\n\t\t\tfunctionLengthIsWritable = false;\n\t\t}\n\t}\n\n\tif (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length, true, true);\n\t\t} else {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length);\n\t\t}\n\t}\n\treturn fn;\n};\n","'use strict';\n\nvar isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\n\nmodule.exports = invariant;\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nvar isArgumentsObject = require('is-arguments');\nvar isGeneratorFunction = require('is-generator-function');\nvar whichTypedArray = require('which-typed-array');\nvar isTypedArray = require('is-typed-array');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\n// Store a copy of SharedArrayBuffer in case it's deleted elsewhere\nvar SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === 'undefined') {\n return false;\n }\n\n if (typeof isSharedArrayBufferToString.working === 'undefined') {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBufferCopy;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').slice(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, -1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = require('./support/types');\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBind = require('call-bind');\nvar callBound = require('call-bind/callBound');\nvar gOPD = require('gopd');\n\n/** @type {(O: object) => string} */\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\n\n/** @type {(array: readonly T[], value: unknown) => number} */\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n/** @typedef {(receiver: import('.').TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call} Getter */\n/** @type {{ [k in `\\$${import('.').TypedArrayName}`]?: Getter } & { __proto__: null }} */\nvar cache = { __proto__: null };\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr) {\n\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor) {\n\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(descriptor.get);\n\t\t}\n\t});\n} else {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tvar fn = arr.slice || arr.set;\n\t\tif (fn) {\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(fn);\n\t\t}\n\t});\n}\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\t/** @type {ReturnType} */ var found = false;\n\tforEach(\n\t\t// eslint-disable-next-line no-extra-parens\n\t\t/** @type {Record<`\\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache),\n\t\t/** @type {(getter: Getter, name: `\\$${import('.').TypedArrayName}`) => void} */\n\t\tfunction (getter, typedArray) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t// @ts-expect-error TODO: fix\n\t\t\t\t\tif ('$' + getter(value) === typedArray) {\n\t\t\t\t\t\tfound = $slice(typedArray, 1);\n\t\t\t\t\t}\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar trySlices = function tryAllSlices(value) {\n\t/** @type {ReturnType} */ var found = false;\n\tforEach(\n\t\t// eslint-disable-next-line no-extra-parens\n\t\t/** @type {Record<`\\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache),\n\t\t/** @type {(getter: typeof cache, name: `\\$${import('.').TypedArrayName}`) => void} */ function (getter, name) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t\t// @ts-expect-error TODO: fix\n\t\t\t\t\tgetter(value);\n\t\t\t\t\tfound = $slice(name, 1);\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {import('.')} */\nmodule.exports = function whichTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\t/** @type {string} */\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\tif ($indexOf(typedArrays, tag) > -1) {\n\t\t\treturn tag;\n\t\t}\n\t\tif (tag !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\t// node < 0.6 hits here on real Typed Arrays\n\t\treturn trySlices(value);\n\t}\n\tif (!gOPD) { return null; } // unknown engine\n\treturn tryTypedArrays(value);\n};\n","/* (ignored) */","/* (ignored) */","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.encodeDecode = void 0;\nconst encodeDecode = (layout) => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return { decode, encode };\n};\nexports.encodeDecode = encodeDecode;\n//# sourceMappingURL=base.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.u256be = exports.u256 = exports.u192be = exports.u192 = exports.u128be = exports.u128 = exports.u64be = exports.u64 = exports.bigIntBE = exports.bigInt = void 0;\nconst buffer_layout_1 = require(\"@solana/buffer-layout\");\nconst bigint_buffer_1 = require(\"bigint-buffer\");\nconst base_1 = require(\"./base\");\nconst bigInt = (length) => (property) => {\n const layout = (0, buffer_layout_1.blob)(length, property);\n const { encode, decode } = (0, base_1.encodeDecode)(layout);\n const bigIntLayout = layout;\n bigIntLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset);\n return (0, bigint_buffer_1.toBigIntLE)(Buffer.from(src));\n };\n bigIntLayout.encode = (bigInt, buffer, offset) => {\n const src = (0, bigint_buffer_1.toBufferLE)(bigInt, length);\n return encode(src, buffer, offset);\n };\n return bigIntLayout;\n};\nexports.bigInt = bigInt;\nconst bigIntBE = (length) => (property) => {\n const layout = (0, buffer_layout_1.blob)(length, property);\n const { encode, decode } = (0, base_1.encodeDecode)(layout);\n const bigIntLayout = layout;\n bigIntLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset);\n return (0, bigint_buffer_1.toBigIntBE)(Buffer.from(src));\n };\n bigIntLayout.encode = (bigInt, buffer, offset) => {\n const src = (0, bigint_buffer_1.toBufferBE)(bigInt, length);\n return encode(src, buffer, offset);\n };\n return bigIntLayout;\n};\nexports.bigIntBE = bigIntBE;\nexports.u64 = (0, exports.bigInt)(8);\nexports.u64be = (0, exports.bigIntBE)(8);\nexports.u128 = (0, exports.bigInt)(16);\nexports.u128be = (0, exports.bigIntBE)(16);\nexports.u192 = (0, exports.bigInt)(24);\nexports.u192be = (0, exports.bigIntBE)(24);\nexports.u256 = (0, exports.bigInt)(32);\nexports.u256be = (0, exports.bigIntBE)(32);\n//# sourceMappingURL=bigint.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decimal = exports.WAD = void 0;\nconst bignumber_js_1 = __importDefault(require(\"bignumber.js\"));\nconst base_1 = require(\"./base\");\nconst bigint_1 = require(\"./bigint\");\nexports.WAD = new bignumber_js_1.default('1e+18');\nconst decimal = (property) => {\n const layout = (0, bigint_1.u128)(property);\n const { encode, decode } = (0, base_1.encodeDecode)(layout);\n const decimalLayout = layout;\n decimalLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset).toString();\n return new bignumber_js_1.default(src).div(exports.WAD);\n };\n decimalLayout.encode = (decimal, buffer, offset) => {\n const src = BigInt(decimal.times(exports.WAD).integerValue().toString());\n return encode(src, buffer, offset);\n };\n return decimalLayout;\n};\nexports.decimal = decimal;\n//# sourceMappingURL=decimal.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./base\"), exports);\n__exportStar(require(\"./bigint\"), exports);\n__exportStar(require(\"./decimal\"), exports);\n__exportStar(require(\"./native\"), exports);\n__exportStar(require(\"./web3\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bool = void 0;\nconst buffer_layout_1 = require(\"@solana/buffer-layout\");\nconst base_1 = require(\"./base\");\nconst bool = (property) => {\n const layout = (0, buffer_layout_1.u8)(property);\n const { encode, decode } = (0, base_1.encodeDecode)(layout);\n const boolLayout = layout;\n boolLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset);\n return !!src;\n };\n boolLayout.encode = (bool, buffer, offset) => {\n const src = Number(bool);\n return encode(src, buffer, offset);\n };\n return boolLayout;\n};\nexports.bool = bool;\n//# sourceMappingURL=native.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.publicKey = void 0;\nconst buffer_layout_1 = require(\"@solana/buffer-layout\");\nconst web3_js_1 = require(\"@solana/web3.js\");\nconst base_1 = require(\"./base\");\nconst publicKey = (property) => {\n const layout = (0, buffer_layout_1.blob)(32, property);\n const { encode, decode } = (0, base_1.encodeDecode)(layout);\n const publicKeyLayout = layout;\n publicKeyLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset);\n return new web3_js_1.PublicKey(src);\n };\n publicKeyLayout.encode = (publicKey, buffer, offset) => {\n const src = publicKey.toBuffer();\n return encode(src, buffer, offset);\n };\n return publicKeyLayout;\n};\nexports.publicKey = publicKey;\n//# sourceMappingURL=web3.js.map","'use strict';\n\nvar possibleNames = require('possible-typed-array-names');\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\n\n/** @type {import('.')} */\nmodule.exports = function availableTypedArrays() {\n\tvar /** @type {ReturnType} */ out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\t// @ts-expect-error\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.indexOf(n) >= 0) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`positive integer expected, not ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`boolean expected, not ${b}`);\n}\n// copied from utils\nexport function isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nfunction bytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(h) {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(h.outputLen);\n number(h.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map","import { exists, output } from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Choice: a ? b : c\nexport const Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nexport const Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n */\nexport class HashMD extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n exists(this);\n output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in\n // current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_md.js.map","import { HashMD, Chi, Maj } from './_md.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// SHA2-256 need to try 2^128 hashes to execute birthday attack.\n// BTC network is doing 2^67 hashes/sec as per early 2023.\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state:\n// first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19\n// prettier-ignore\nconst SHA256_IV = /* @__PURE__ */ new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nclass SHA256 extends HashMD {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256());\nexport const sha224 = /* @__PURE__ */ wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nimport { bytes as abytes } from './_assert.js';\n// export { isBytes } from './_assert.js';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nexport function isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// The rotate left (circular left shift) operation for uint32\nexport const rotl = (word, shift) => (word << shift) | ((word >>> (32 - shift)) >>> 0);\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\n// The byte swap operation for uint32\nexport const byteSwap = (word) => ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff);\n// Conditionally byte swap if on a big-endian platform\nexport const byteSwapIfBE = isLE ? (n) => n : (n) => byteSwap(n);\n// In place byte swap for Uint32Array\nexport function byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n abytes(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import { createContext, useContext } from 'react';\nconst DEFAULT_CONTEXT = {\n setVisible(_open) {\n console.error(constructMissingProviderErrorMessage('call', 'setVisible'));\n },\n visible: false,\n};\nObject.defineProperty(DEFAULT_CONTEXT, 'visible', {\n get() {\n console.error(constructMissingProviderErrorMessage('read', 'visible'));\n return false;\n },\n});\nfunction constructMissingProviderErrorMessage(action, valueName) {\n return ('You have tried to ' +\n ` ${action} \"${valueName}\"` +\n ' on a WalletModalContext without providing one.' +\n ' Make sure to render a WalletModalProvider' +\n ' as an ancestor of the component that uses ' +\n 'WalletModalContext');\n}\nexport const WalletModalContext = createContext(DEFAULT_CONTEXT);\nexport function useWalletModal() {\n return useContext(WalletModalContext);\n}\n//# sourceMappingURL=useWalletModal.js.map","import { createContext, useContext } from 'react';\nconst EMPTY_ARRAY = [];\nconst DEFAULT_CONTEXT = {\n autoConnect: false,\n connecting: false,\n connected: false,\n disconnecting: false,\n select() {\n logMissingProviderError('call', 'select');\n },\n connect() {\n return Promise.reject(logMissingProviderError('call', 'connect'));\n },\n disconnect() {\n return Promise.reject(logMissingProviderError('call', 'disconnect'));\n },\n sendTransaction() {\n return Promise.reject(logMissingProviderError('call', 'sendTransaction'));\n },\n signTransaction() {\n return Promise.reject(logMissingProviderError('call', 'signTransaction'));\n },\n signAllTransactions() {\n return Promise.reject(logMissingProviderError('call', 'signAllTransactions'));\n },\n signMessage() {\n return Promise.reject(logMissingProviderError('call', 'signMessage'));\n },\n signIn() {\n return Promise.reject(logMissingProviderError('call', 'signIn'));\n },\n};\nObject.defineProperty(DEFAULT_CONTEXT, 'wallets', {\n get() {\n logMissingProviderError('read', 'wallets');\n return EMPTY_ARRAY;\n },\n});\nObject.defineProperty(DEFAULT_CONTEXT, 'wallet', {\n get() {\n logMissingProviderError('read', 'wallet');\n return null;\n },\n});\nObject.defineProperty(DEFAULT_CONTEXT, 'publicKey', {\n get() {\n logMissingProviderError('read', 'publicKey');\n return null;\n },\n});\nfunction logMissingProviderError(action, property) {\n const error = new Error(`You have tried to ${action} \"${property}\" on a WalletContext without providing one. ` +\n 'Make sure to render a WalletProvider as an ancestor of the component that uses WalletContext.');\n console.error(error);\n return error;\n}\nexport const WalletContext = createContext(DEFAULT_CONTEXT);\nexport function useWallet() {\n return useContext(WalletContext);\n}\n//# sourceMappingURL=useWallet.js.map","/** Name of the feature. */\nexport const SolanaSignAndSendTransaction = 'solana:signAndSendTransaction';\n//# sourceMappingURL=signAndSendTransaction.js.map","/** Name of the feature. */\nexport const SolanaSignMessage = 'solana:signMessage';\n//# sourceMappingURL=signMessage.js.map","/** Name of the feature. */\nexport const SolanaSignTransaction = 'solana:signTransaction';\n//# sourceMappingURL=signTransaction.js.map","\n/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//const Z_FILTERED = 1;\n//const Z_HUFFMAN_ONLY = 2;\n//const Z_RLE = 3;\nconst Z_FIXED$1 = 4;\n//const Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nconst Z_BINARY = 0;\nconst Z_TEXT = 1;\n//const Z_ASCII = 1; // = Z_TEXT\nconst Z_UNKNOWN$1 = 2;\n\n/*============================================================================*/\n\n\nfunction zero$1(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n/* The three kinds of block type */\n\nconst MIN_MATCH$1 = 3;\nconst MAX_MATCH$1 = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nconst LENGTH_CODES$1 = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nconst LITERALS$1 = 256;\n/* number of literal bytes 0..255 */\n\nconst L_CODES$1 = LITERALS$1 + 1 + LENGTH_CODES$1;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nconst D_CODES$1 = 30;\n/* number of distance codes */\n\nconst BL_CODES$1 = 19;\n/* number of codes used to transfer the bit lengths */\n\nconst HEAP_SIZE$1 = 2 * L_CODES$1 + 1;\n/* maximum heap size */\n\nconst MAX_BITS$1 = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nconst MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nconst END_BLOCK = 256;\n/* end of block literal code */\n\nconst REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nconst REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nconst REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nconst extra_lbits = /* extra bits for each length code */\n new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]);\n\nconst extra_dbits = /* extra bits for each distance code */\n new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);\n\nconst extra_blbits = /* extra bits for each bit length code */\n new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);\n\nconst bl_order =\n new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nconst DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nconst static_ltree = new Array((L_CODES$1 + 2) * 2);\nzero$1(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nconst static_dtree = new Array(D_CODES$1 * 2);\nzero$1(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nconst _dist_code = new Array(DIST_CODE_LEN);\nzero$1(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nconst _length_code = new Array(MAX_MATCH$1 - MIN_MATCH$1 + 1);\nzero$1(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nconst base_length = new Array(LENGTH_CODES$1);\nzero$1(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nconst base_dist = new Array(D_CODES$1);\nzero$1(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nlet static_l_desc;\nlet static_d_desc;\nlet static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nconst d_code = (dist) => {\n\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n};\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nconst put_short = (s, w) => {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n};\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nconst send_bits = (s, value, length) => {\n\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n};\n\n\nconst send_code = (s, c, tree) => {\n\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n};\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nconst bi_reverse = (code, len) => {\n\n let res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nconst bi_flush = (s) => {\n\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n};\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nconst gen_bitlen = (s, desc) => {\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n\n const tree = desc.dyn_tree;\n const max_code = desc.max_code;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const extra = desc.stat_desc.extra_bits;\n const base = desc.stat_desc.extra_base;\n const max_length = desc.stat_desc.max_length;\n let h; /* heap index */\n let n, m; /* iterate over the tree elements */\n let bits; /* bit length */\n let xbits; /* extra bits */\n let f; /* frequency */\n let overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS$1; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE$1; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Tracev((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Tracev((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n};\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nconst gen_codes = (tree, max_code, bl_count) => {\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n\n const next_code = new Array(MAX_BITS$1 + 1); /* next code value for each bit length */\n let code = 0; /* running code value */\n let bits; /* bit index */\n let n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS$1; bits++) {\n code = (code + bl_count[bits - 1]) << 1;\n next_code[bits] = code;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< {\n\n let n; /* iterates over tree elements */\n let bits; /* bit counter */\n let length; /* length value */\n let code; /* code value */\n let dist; /* distance index */\n const bl_count = new Array(MAX_BITS$1 + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES$1 - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES$1; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS$1; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES$1 + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES$1; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS$1 + 1, L_CODES$1, MAX_BITS$1);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES$1, MAX_BITS$1);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES$1, MAX_BL_BITS);\n\n //static_init_done = true;\n};\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nconst init_block = (s) => {\n\n let n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES$1; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES$1; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES$1; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.sym_next = s.matches = 0;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nconst bi_windup = (s) =>\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n};\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nconst smaller = (tree, n, m, depth) => {\n\n const _n2 = n * 2;\n const _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n};\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nconst pqdownheap = (s, tree, k) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n\n const v = s.heap[k];\n let j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n};\n\n\n// inlined manually\n// const SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nconst compress_block = (s, ltree, dtree) => {\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n\n let dist; /* distance of matched string */\n let lc; /* match length or unmatched char (if dist == 0) */\n let sx = 0; /* running index in sym_buf */\n let code; /* the code to send */\n let extra; /* number of extra bits to send */\n\n if (s.sym_next !== 0) {\n do {\n dist = s.pending_buf[s.sym_buf + sx++] & 0xff;\n dist += (s.pending_buf[s.sym_buf + sx++] & 0xff) << 8;\n lc = s.pending_buf[s.sym_buf + sx++];\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS$1 + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and sym_buf is ok: */\n //Assert(s->pending < s->lit_bufsize + sx, \"pendingBuf overflow\");\n\n } while (sx < s.sym_next);\n }\n\n send_code(s, END_BLOCK, ltree);\n};\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nconst build_tree = (s, desc) => {\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n\n const tree = desc.dyn_tree;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const elems = desc.stat_desc.elems;\n let n, m; /* iterate over heap elements */\n let max_code = -1; /* largest code with non zero frequency */\n let node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE$1;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n};\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nconst scan_tree = (s, tree, max_code) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nconst send_tree = (s, tree, max_code) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nconst build_bl_tree = (s) => {\n\n let max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES$1 - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n};\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nconst send_all_trees = (s, lcodes, dcodes, blcodes) => {\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n\n let rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n};\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"block list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"allow list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nconst detect_data_type = (s) => {\n /* block_mask is the bit mask of block-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n let block_mask = 0xf3ffc07f;\n let n;\n\n /* Check for non-textual (\"block-listed\") bytes. */\n for (n = 0; n <= 31; n++, block_mask >>>= 1) {\n if ((block_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"allow-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS$1; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"block-listed\" or \"allow-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n};\n\n\nlet static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nconst _tr_init$1 = (s) =>\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n};\n\n\n/* ===========================================================================\n * Send a stored block\n */\nconst _tr_stored_block$1 = (s, buf, stored_len, last) => {\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n bi_windup(s); /* align on byte boundary */\n put_short(s, stored_len);\n put_short(s, ~stored_len);\n if (stored_len) {\n s.pending_buf.set(s.window.subarray(buf, buf + stored_len), s.pending);\n }\n s.pending += stored_len;\n};\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nconst _tr_align$1 = (s) => {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n};\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and write out the encoded block.\n */\nconst _tr_flush_block$1 = (s, buf, stored_len, last) => {\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n\n let opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n let max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN$1) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->sym_next / 3));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block$1(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED$1 || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n};\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nconst _tr_tally$1 = (s, dist, lc) => {\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n\n s.pending_buf[s.sym_buf + s.sym_next++] = dist;\n s.pending_buf[s.sym_buf + s.sym_next++] = dist >> 8;\n s.pending_buf[s.sym_buf + s.sym_next++] = lc;\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS$1 + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n return (s.sym_next === s.sym_end);\n};\n\nvar _tr_init_1 = _tr_init$1;\nvar _tr_stored_block_1 = _tr_stored_block$1;\nvar _tr_flush_block_1 = _tr_flush_block$1;\nvar _tr_tally_1 = _tr_tally$1;\nvar _tr_align_1 = _tr_align$1;\n\nvar trees = {\n\t_tr_init: _tr_init_1,\n\t_tr_stored_block: _tr_stored_block_1,\n\t_tr_flush_block: _tr_flush_block_1,\n\t_tr_tally: _tr_tally_1,\n\t_tr_align: _tr_align_1\n};\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n};\n\n\nvar adler32_1 = adler32;\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nconst makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n};\n\n// Create table on load. Just 255 signed longs. Not a problem.\nconst crcTable = new Uint32Array(makeTable());\n\n\nconst crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n};\n\n\nvar crc32_1 = crc32;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar messages = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar constants$2 = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst { _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align } = trees;\n\n\n\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$2, Z_PARTIAL_FLUSH, Z_FULL_FLUSH: Z_FULL_FLUSH$1, Z_FINISH: Z_FINISH$3, Z_BLOCK: Z_BLOCK$1,\n Z_OK: Z_OK$3, Z_STREAM_END: Z_STREAM_END$3, Z_STREAM_ERROR: Z_STREAM_ERROR$2, Z_DATA_ERROR: Z_DATA_ERROR$2, Z_BUF_ERROR: Z_BUF_ERROR$1,\n Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1,\n Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED, Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1,\n Z_UNKNOWN,\n Z_DEFLATED: Z_DEFLATED$2\n} = constants$2;\n\n/*============================================================================*/\n\n\nconst MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nconst MAX_WBITS$1 = 15;\n/* 32K LZ77 window */\nconst DEF_MEM_LEVEL = 8;\n\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nconst D_CODES = 30;\n/* number of distance codes */\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42; /* zlib header -> BUSY_STATE */\n//#ifdef GZIP\nconst GZIP_STATE = 57; /* gzip header -> BUSY_STATE | EXTRA_STATE */\n//#endif\nconst EXTRA_STATE = 69; /* gzip extra block -> NAME_STATE */\nconst NAME_STATE = 73; /* gzip file name -> COMMENT_STATE */\nconst COMMENT_STATE = 91; /* gzip comment -> HCRC_STATE */\nconst HCRC_STATE = 103; /* gzip header CRC -> BUSY_STATE */\nconst BUSY_STATE = 113; /* deflate -> FINISH_STATE */\nconst FINISH_STATE = 666; /* stream complete */\n\nconst BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nconst BS_BLOCK_DONE = 2; /* block flush performed */\nconst BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nconst BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nconst OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nconst err = (strm, errorCode) => {\n strm.msg = messages[errorCode];\n return errorCode;\n};\n\nconst rank = (f) => {\n return ((f) * 2) - ((f) > 4 ? 9 : 0);\n};\n\nconst zero = (buf) => {\n let len = buf.length; while (--len >= 0) { buf[len] = 0; }\n};\n\n/* ===========================================================================\n * Slide the hash table when sliding the window down (could be avoided with 32\n * bit values at the expense of memory usage). We slide even when level == 0 to\n * keep the hash table consistent if we switch back to level > 0 later.\n */\nconst slide_hash = (s) => {\n let n, m;\n let p;\n let wsize = s.w_size;\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= wsize ? m - wsize : 0);\n } while (--n);\n n = wsize;\n//#ifndef FASTEST\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= wsize ? m - wsize : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n//#endif\n};\n\n/* eslint-disable new-cap */\nlet HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;\n// This hash causes less collisions, https://github.com/nodeca/pako/issues/135\n// But breaks binary compatibility\n//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;\nlet HASH = HASH_ZLIB;\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output, except for\n * some deflate_stored() output, goes through this function so some\n * applications may wish to modify it to avoid allocating a large\n * strm->next_out buffer and copying into it. (See also read_buf()).\n */\nconst flush_pending = (strm) => {\n const s = strm.state;\n\n //_tr_flush_bits(s);\n let len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n};\n\n\nconst flush_block_only = (s, last) => {\n _tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n};\n\n\nconst put_byte = (s, b) => {\n s.pending_buf[s.pending++] = b;\n};\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nconst putShortMSB = (s, b) => {\n\n // put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n};\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nconst read_buf = (strm, buf, start, size) => {\n\n let len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32_1(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32_1(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n};\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nconst longest_match = (s, cur_match) => {\n\n let chain_length = s.max_chain_length; /* max hash chain length */\n let scan = s.strstart; /* current string */\n let match; /* matched string */\n let len; /* length of current match */\n let best_len = s.prev_length; /* best match length so far */\n let nice_match = s.nice_match; /* stop if match long enough */\n const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n const _win = s.window; // shortcut\n\n const wmask = s.w_mask;\n const prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n const strend = s.strstart + MAX_MATCH;\n let scan_end1 = _win[scan + best_len - 1];\n let scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n};\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nconst fill_window = (s) => {\n\n const _w_size = s.w_size;\n let n, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n s.window.set(s.window.subarray(_w_size, _w_size + _w_size - more), 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n slide_hash(s);\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// const curr = s.strstart + s.lookahead;\n// let init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n};\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n *\n * In case deflateParams() is used to later switch to a non-zero compression\n * level, s->matches (otherwise unused when storing) keeps track of the number\n * of hash table slides to perform. If s->matches is 1, then one hash table\n * slide will be done when switching. If s->matches is 2, the maximum value\n * allowed here, then the hash table will be cleared, since two or more slides\n * is the same as a clear.\n *\n * deflate_stored() is written to minimize the number of times an input byte is\n * copied. It is most efficient with large input and output buffers, which\n * maximizes the opportunites to have a single copy from next_in to next_out.\n */\nconst deflate_stored = (s, flush) => {\n\n /* Smallest worthy block size when not flushing or finishing. By default\n * this is 32K. This can be as small as 507 bytes for memLevel == 1. For\n * large input and output buffers, the stored block size will be larger.\n */\n let min_block = s.pending_buf_size - 5 > s.w_size ? s.w_size : s.pending_buf_size - 5;\n\n /* Copy as many min_block or larger stored blocks directly to next_out as\n * possible. If flushing, copy the remaining available input to next_out as\n * stored blocks, if there is enough space.\n */\n let len, left, have, last = 0;\n let used = s.strm.avail_in;\n do {\n /* Set len to the maximum size block that we can copy directly with the\n * available input data and output space. Set left to how much of that\n * would be copied from what's left in the window.\n */\n len = 65535/* MAX_STORED */; /* maximum deflate stored block length */\n have = (s.bi_valid + 42) >> 3; /* number of header bytes */\n if (s.strm.avail_out < have) { /* need room for header */\n break;\n }\n /* maximum stored block length that will fit in avail_out: */\n have = s.strm.avail_out - have;\n left = s.strstart - s.block_start; /* bytes left in window */\n if (len > left + s.strm.avail_in) {\n len = left + s.strm.avail_in; /* limit len to the input */\n }\n if (len > have) {\n len = have; /* limit len to the output */\n }\n\n /* If the stored block would be less than min_block in length, or if\n * unable to copy all of the available input when flushing, then try\n * copying to the window and the pending buffer instead. Also don't\n * write an empty block when flushing -- deflate() does that.\n */\n if (len < min_block && ((len === 0 && flush !== Z_FINISH$3) ||\n flush === Z_NO_FLUSH$2 ||\n len !== left + s.strm.avail_in)) {\n break;\n }\n\n /* Make a dummy stored block in pending to get the header bytes,\n * including any pending bits. This also updates the debugging counts.\n */\n last = flush === Z_FINISH$3 && len === left + s.strm.avail_in ? 1 : 0;\n _tr_stored_block(s, 0, 0, last);\n\n /* Replace the lengths in the dummy stored block with len. */\n s.pending_buf[s.pending - 4] = len;\n s.pending_buf[s.pending - 3] = len >> 8;\n s.pending_buf[s.pending - 2] = ~len;\n s.pending_buf[s.pending - 1] = ~len >> 8;\n\n /* Write the stored block header bytes. */\n flush_pending(s.strm);\n\n//#ifdef ZLIB_DEBUG\n// /* Update debugging counts for the data about to be copied. */\n// s->compressed_len += len << 3;\n// s->bits_sent += len << 3;\n//#endif\n\n /* Copy uncompressed bytes from the window to next_out. */\n if (left) {\n if (left > len) {\n left = len;\n }\n //zmemcpy(s->strm->next_out, s->window + s->block_start, left);\n s.strm.output.set(s.window.subarray(s.block_start, s.block_start + left), s.strm.next_out);\n s.strm.next_out += left;\n s.strm.avail_out -= left;\n s.strm.total_out += left;\n s.block_start += left;\n len -= left;\n }\n\n /* Copy uncompressed bytes directly from next_in to next_out, updating\n * the check value.\n */\n if (len) {\n read_buf(s.strm, s.strm.output, s.strm.next_out, len);\n s.strm.next_out += len;\n s.strm.avail_out -= len;\n s.strm.total_out += len;\n }\n } while (last === 0);\n\n /* Update the sliding window with the last s->w_size bytes of the copied\n * data, or append all of the copied data to the existing window if less\n * than s->w_size bytes were copied. Also update the number of bytes to\n * insert in the hash tables, in the event that deflateParams() switches to\n * a non-zero compression level.\n */\n used -= s.strm.avail_in; /* number of input bytes directly copied */\n if (used) {\n /* If any input was used, then no unused input remains in the window,\n * therefore s->block_start == s->strstart.\n */\n if (used >= s.w_size) { /* supplant the previous history */\n s.matches = 2; /* clear hash */\n //zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size);\n s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0);\n s.strstart = s.w_size;\n s.insert = s.strstart;\n }\n else {\n if (s.window_size - s.strstart <= used) {\n /* Slide the window down. */\n s.strstart -= s.w_size;\n //zmemcpy(s->window, s->window + s->w_size, s->strstart);\n s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);\n if (s.matches < 2) {\n s.matches++; /* add a pending slide_hash() */\n }\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n }\n //zmemcpy(s->window + s->strstart, s->strm->next_in - used, used);\n s.window.set(s.strm.input.subarray(s.strm.next_in - used, s.strm.next_in), s.strstart);\n s.strstart += used;\n s.insert += used > s.w_size - s.insert ? s.w_size - s.insert : used;\n }\n s.block_start = s.strstart;\n }\n if (s.high_water < s.strstart) {\n s.high_water = s.strstart;\n }\n\n /* If the last block was written to next_out, then done. */\n if (last) {\n return BS_FINISH_DONE;\n }\n\n /* If flushing and all input has been consumed, then done. */\n if (flush !== Z_NO_FLUSH$2 && flush !== Z_FINISH$3 &&\n s.strm.avail_in === 0 && s.strstart === s.block_start) {\n return BS_BLOCK_DONE;\n }\n\n /* Fill the window with any remaining input. */\n have = s.window_size - s.strstart;\n if (s.strm.avail_in > have && s.block_start >= s.w_size) {\n /* Slide the window down. */\n s.block_start -= s.w_size;\n s.strstart -= s.w_size;\n //zmemcpy(s->window, s->window + s->w_size, s->strstart);\n s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);\n if (s.matches < 2) {\n s.matches++; /* add a pending slide_hash() */\n }\n have += s.w_size; /* more space now */\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n }\n if (have > s.strm.avail_in) {\n have = s.strm.avail_in;\n }\n if (have) {\n read_buf(s.strm, s.window, s.strstart, have);\n s.strstart += have;\n s.insert += have > s.w_size - s.insert ? s.w_size - s.insert : have;\n }\n if (s.high_water < s.strstart) {\n s.high_water = s.strstart;\n }\n\n /* There was not enough avail_out to write a complete worthy or flushed\n * stored block to next_out. Write a stored block to pending instead, if we\n * have enough input for a worthy block, or if flushing and there is enough\n * room for the remaining input as a stored block in the pending buffer.\n */\n have = (s.bi_valid + 42) >> 3; /* number of header bytes */\n /* maximum stored block length that will fit in pending: */\n have = s.pending_buf_size - have > 65535/* MAX_STORED */ ? 65535/* MAX_STORED */ : s.pending_buf_size - have;\n min_block = have > s.w_size ? s.w_size : have;\n left = s.strstart - s.block_start;\n if (left >= min_block ||\n ((left || flush === Z_FINISH$3) && flush !== Z_NO_FLUSH$2 &&\n s.strm.avail_in === 0 && left <= have)) {\n len = left > have ? have : left;\n last = flush === Z_FINISH$3 && s.strm.avail_in === 0 &&\n len === left ? 1 : 0;\n _tr_stored_block(s, s.block_start, len, last);\n s.block_start += len;\n flush_pending(s.strm);\n }\n\n /* We've done all we can with the available input and output. */\n return last ? BS_FINISH_STARTED : BS_NEED_MORE;\n};\n\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nconst deflate_fast = (s, flush) => {\n\n let hash_head; /* head of the hash chain */\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nconst deflate_slow = (s, flush) => {\n\n let hash_head; /* head of hash chain */\n let bflush; /* set if current block must be flushed */\n\n let max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n};\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nconst deflate_rle = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n let prev; /* byte at distance one to match */\n let scan, strend; /* scan goes up to strend for length of run */\n\n const _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nconst deflate_huff = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nconst configuration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nconst lm_init = (s) => {\n\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n};\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED$2; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Uint16Array(HEAP_SIZE * 2);\n this.dyn_dtree = new Uint16Array((2 * D_CODES + 1) * 2);\n this.bl_tree = new Uint16Array((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Uint16Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Uint16Array(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new Uint16Array(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.sym_buf = 0; /* buffer for distances and literals/lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.sym_next = 0; /* running index in sym_buf */\n this.sym_end = 0; /* symbol table full when sym_next reaches this */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\n/* =========================================================================\n * Check for a valid deflate stream state. Return 0 if ok, 1 if not.\n */\nconst deflateStateCheck = (strm) => {\n\n if (!strm) {\n return 1;\n }\n const s = strm.state;\n if (!s || s.strm !== strm || (s.status !== INIT_STATE &&\n//#ifdef GZIP\n s.status !== GZIP_STATE &&\n//#endif\n s.status !== EXTRA_STATE &&\n s.status !== NAME_STATE &&\n s.status !== COMMENT_STATE &&\n s.status !== HCRC_STATE &&\n s.status !== BUSY_STATE &&\n s.status !== FINISH_STATE)) {\n return 1;\n }\n return 0;\n};\n\n\nconst deflateResetKeep = (strm) => {\n\n if (deflateStateCheck(strm)) {\n return err(strm, Z_STREAM_ERROR$2);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n const s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status =\n//#ifdef GZIP\n s.wrap === 2 ? GZIP_STATE :\n//#endif\n s.wrap ? INIT_STATE : BUSY_STATE;\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = -2;\n _tr_init(s);\n return Z_OK$3;\n};\n\n\nconst deflateReset = (strm) => {\n\n const ret = deflateResetKeep(strm);\n if (ret === Z_OK$3) {\n lm_init(strm.state);\n }\n return ret;\n};\n\n\nconst deflateSetHeader = (strm, head) => {\n\n if (deflateStateCheck(strm) || strm.state.wrap !== 2) {\n return Z_STREAM_ERROR$2;\n }\n strm.state.gzhead = head;\n return Z_OK$3;\n};\n\n\nconst deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {\n\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR$2;\n }\n let wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION$1) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED$2 ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED || (windowBits === 8 && wrap !== 1)) {\n return err(strm, Z_STREAM_ERROR$2);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n const s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n s.status = INIT_STATE; /* to pass state test in deflateReset() */\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new Uint8Array(s.w_size * 2);\n s.head = new Uint16Array(s.hash_size);\n s.prev = new Uint16Array(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n /* We overlay pending_buf and sym_buf. This works since the average size\n * for length/distance pairs over any compressed block is assured to be 31\n * bits or less.\n *\n * Analysis: The longest fixed codes are a length code of 8 bits plus 5\n * extra bits, for lengths 131 to 257. The longest fixed distance codes are\n * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest\n * possible fixed-codes length/distance pair is then 31 bits total.\n *\n * sym_buf starts one-fourth of the way into pending_buf. So there are\n * three bytes in sym_buf for every four bytes in pending_buf. Each symbol\n * in sym_buf is three bytes -- two for the distance and one for the\n * literal/length. As each symbol is consumed, the pointer to the next\n * sym_buf value to read moves forward three bytes. From that symbol, up to\n * 31 bits are written to pending_buf. The closest the written pending_buf\n * bits gets to the next sym_buf symbol to read is just before the last\n * code is written. At that time, 31*(n-2) bits have been written, just\n * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at\n * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1\n * symbols are written.) The closest the writing gets to what is unread is\n * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and\n * can range from 128 to 32768.\n *\n * Therefore, at a minimum, there are 142 bits of space between what is\n * written and what is read in the overlain buffers, so the symbols cannot\n * be overwritten by the compressed data. That space is actually 139 bits,\n * due to the three-bit fixed-code block header.\n *\n * That covers the case where either Z_FIXED is specified, forcing fixed\n * codes, or when the use of fixed codes is chosen, because that choice\n * results in a smaller compressed block than dynamic codes. That latter\n * condition then assures that the above analysis also covers all dynamic\n * blocks. A dynamic-code block will only be chosen to be emitted if it has\n * fewer bits than a fixed-code block would for the same set of symbols.\n * Therefore its average symbol length is assured to be less than 31. So\n * the compressed data for a dynamic block also cannot overwrite the\n * symbols from which it is being constructed.\n */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n s.pending_buf = new Uint8Array(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->sym_buf = s->pending_buf + s->lit_bufsize;\n s.sym_buf = s.lit_bufsize;\n\n //s->sym_end = (s->lit_bufsize - 1) * 3;\n s.sym_end = (s.lit_bufsize - 1) * 3;\n /* We avoid equality with lit_bufsize*3 because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n};\n\nconst deflateInit = (strm, level) => {\n\n return deflateInit2(strm, level, Z_DEFLATED$2, MAX_WBITS$1, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY$1);\n};\n\n\n/* ========================================================================= */\nconst deflate$2 = (strm, flush) => {\n\n if (deflateStateCheck(strm) || flush > Z_BLOCK$1 || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR$2) : Z_STREAM_ERROR$2;\n }\n\n const s = strm.state;\n\n if (!strm.output ||\n (strm.avail_in !== 0 && !strm.input) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH$3)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR$1 : Z_STREAM_ERROR$2);\n }\n\n const old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK$3;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH$3) {\n return err(strm, Z_BUF_ERROR$1);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR$1);\n }\n\n /* Write the header */\n if (s.status === INIT_STATE && s.wrap === 0) {\n s.status = BUSY_STATE;\n }\n if (s.status === INIT_STATE) {\n /* zlib header */\n let header = (Z_DEFLATED$2 + ((s.w_bits - 8) << 4)) << 8;\n let level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n }\n//#ifdef GZIP\n if (s.status === GZIP_STATE) {\n /* gzip header */\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let left = (s.gzhead.extra.length & 0xffff) - s.gzindex;\n while (s.pending + left > s.pending_buf_size) {\n let copy = s.pending_buf_size - s.pending;\n // zmemcpy(s.pending_buf + s.pending,\n // s.gzhead.extra + s.gzindex, copy);\n s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex, s.gzindex + copy), s.pending);\n s.pending = s.pending_buf_size;\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex += copy;\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n beg = 0;\n left -= copy;\n }\n // JS specific: s.gzhead.extra may be TypedArray or Array for backward compatibility\n // TypedArray.slice and TypedArray.from don't exist in IE10-IE11\n let gzhead_extra = new Uint8Array(s.gzhead.extra);\n // zmemcpy(s->pending_buf + s->pending,\n // s->gzhead->extra + s->gzindex, left);\n s.pending_buf.set(gzhead_extra.subarray(s.gzindex, s.gzindex + left), s.pending);\n s.pending += left;\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex = 0;\n }\n s.status = NAME_STATE;\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let val;\n do {\n if (s.pending === s.pending_buf_size) {\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n beg = 0;\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex = 0;\n }\n s.status = COMMENT_STATE;\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let val;\n do {\n if (s.pending === s.pending_buf_size) {\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n beg = 0;\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n }\n s.status = HCRC_STATE;\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n }\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n }\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n }\n//#endif\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH$2 && s.status !== FINISH_STATE)) {\n let bstate = s.level === 0 ? deflate_stored(s, flush) :\n s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :\n s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush);\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK$3;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align(s);\n }\n else if (flush !== Z_BLOCK$1) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH$1) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK$3;\n }\n }\n }\n\n if (flush !== Z_FINISH$3) { return Z_OK$3; }\n if (s.wrap <= 0) { return Z_STREAM_END$3; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK$3 : Z_STREAM_END$3;\n};\n\n\nconst deflateEnd = (strm) => {\n\n if (deflateStateCheck(strm)) {\n return Z_STREAM_ERROR$2;\n }\n\n const status = strm.state.status;\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR$2) : Z_OK$3;\n};\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nconst deflateSetDictionary = (strm, dictionary) => {\n\n let dictLength = dictionary.length;\n\n if (deflateStateCheck(strm)) {\n return Z_STREAM_ERROR$2;\n }\n\n const s = strm.state;\n const wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR$2;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32_1(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n let tmpDict = new Uint8Array(s.w_size);\n tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n const avail = strm.avail_in;\n const next = strm.next_in;\n const input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n let str = s.strstart;\n let n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK$3;\n};\n\n\nvar deflateInit_1 = deflateInit;\nvar deflateInit2_1 = deflateInit2;\nvar deflateReset_1 = deflateReset;\nvar deflateResetKeep_1 = deflateResetKeep;\nvar deflateSetHeader_1 = deflateSetHeader;\nvar deflate_2$1 = deflate$2;\nvar deflateEnd_1 = deflateEnd;\nvar deflateSetDictionary_1 = deflateSetDictionary;\nvar deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.deflateBound = deflateBound;\nmodule.exports.deflateCopy = deflateCopy;\nmodule.exports.deflateGetDictionary = deflateGetDictionary;\nmodule.exports.deflateParams = deflateParams;\nmodule.exports.deflatePending = deflatePending;\nmodule.exports.deflatePrime = deflatePrime;\nmodule.exports.deflateTune = deflateTune;\n*/\n\nvar deflate_1$2 = {\n\tdeflateInit: deflateInit_1,\n\tdeflateInit2: deflateInit2_1,\n\tdeflateReset: deflateReset_1,\n\tdeflateResetKeep: deflateResetKeep_1,\n\tdeflateSetHeader: deflateSetHeader_1,\n\tdeflate: deflate_2$1,\n\tdeflateEnd: deflateEnd_1,\n\tdeflateSetDictionary: deflateSetDictionary_1,\n\tdeflateInfo: deflateInfo\n};\n\nconst _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nvar assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// Join array of chunks to single array.\nvar flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n};\n\nvar common = {\n\tassign: assign,\n\tflattenChunks: flattenChunks\n};\n\n// String encode/decode helpers\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nlet STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nconst _utf8len = new Uint8Array(256);\nfor (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nvar string2buf = (str) => {\n if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {\n return new TextEncoder().encode(str);\n }\n\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper\nconst buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n};\n\n\n// convert array to string\nvar buf2string = (buf, max) => {\n const len = max || buf.length;\n\n if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {\n return new TextDecoder().decode(buf.subarray(0, max));\n }\n\n let i, out;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nvar utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\nvar strings = {\n\tstring2buf: string2buf,\n\tbuf2string: buf2string,\n\tutf8border: utf8border\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nvar zstream = ZStream;\n\nconst toString$1 = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$1, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH: Z_FINISH$2,\n Z_OK: Z_OK$2, Z_STREAM_END: Z_STREAM_END$2,\n Z_DEFAULT_COMPRESSION,\n Z_DEFAULT_STRATEGY,\n Z_DEFLATED: Z_DEFLATED$1\n} = constants$2;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate$1(options) {\n this.options = common.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED$1,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY\n }, options || {});\n\n let opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = deflate_1$2.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK$2) {\n throw new Error(messages[status]);\n }\n\n if (opt.header) {\n deflate_1$2.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n let dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString$1.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = deflate_1$2.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK$2) {\n throw new Error(messages[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must\n * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending\n * buffers and call [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate$1.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n let status, _flush_mode;\n\n if (this.ended) { return false; }\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH$2 : Z_NO_FLUSH$1;\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString$1.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n // Make sure avail_out > 6 to avoid repeating markers\n if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH) && strm.avail_out <= 6) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n status = deflate_1$2.deflate(strm, _flush_mode);\n\n // Ended => flush and finish\n if (status === Z_STREAM_END$2) {\n if (strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n }\n status = deflate_1$2.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK$2;\n }\n\n // Flush if out buffer full\n if (strm.avail_out === 0) {\n this.onData(strm.output);\n continue;\n }\n\n // Flush if requested and has data\n if (_flush_mode > 0 && strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array): output data.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate$1.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate$1.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK$2) {\n this.result = common.flattenChunks(this.chunks);\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate$1(input, options) {\n const deflator = new Deflate$1(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || messages[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw$1(input, options) {\n options = options || {};\n options.raw = true;\n return deflate$1(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip$1(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate$1(input, options);\n}\n\n\nvar Deflate_1$1 = Deflate$1;\nvar deflate_2 = deflate$1;\nvar deflateRaw_1$1 = deflateRaw$1;\nvar gzip_1$1 = gzip$1;\nvar constants$1 = constants$2;\n\nvar deflate_1$1 = {\n\tDeflate: Deflate_1$1,\n\tdeflate: deflate_2,\n\tdeflateRaw: deflateRaw_1$1,\n\tgzip: gzip_1$1,\n\tconstants: constants$1\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nconst BAD$1 = 16209; /* got a data error -- remain here until reset */\nconst TYPE$1 = 16191; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nvar inffast = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n//#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE$1;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst MAXBITS = 15;\nconst ENOUGH_LENS$1 = 852;\nconst ENOUGH_DISTS$1 = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst CODES$1 = 0;\nconst LENS$1 = 1;\nconst DISTS$1 = 2;\n\nconst lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n]);\n\nconst lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n]);\n\nconst dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n]);\n\nconst dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n]);\n\nconst inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n{\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n// let shoextra; /* extra bits table to use */\n let match; /* use base and extra for symbol >= match */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES$1 || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES$1) {\n base = extra = work; /* dummy value--not used */\n match = 20;\n\n } else if (type === LENS$1) {\n base = lbase;\n extra = lext;\n match = 257;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n match = 0;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] + 1 < match) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] >= match) {\n here_op = extra[work[sym] - match];\n here_val = base[work[sym] - match];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\nvar inftrees = inflate_table;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_FINISH: Z_FINISH$1, Z_BLOCK, Z_TREES,\n Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR: Z_MEM_ERROR$1, Z_BUF_ERROR,\n Z_DEFLATED\n} = constants$2;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nconst HEAD = 16180; /* i: waiting for magic header */\nconst FLAGS = 16181; /* i: waiting for method and flags (gzip) */\nconst TIME = 16182; /* i: waiting for modification time (gzip) */\nconst OS = 16183; /* i: waiting for extra flags and operating system (gzip) */\nconst EXLEN = 16184; /* i: waiting for extra length (gzip) */\nconst EXTRA = 16185; /* i: waiting for extra bytes (gzip) */\nconst NAME = 16186; /* i: waiting for end of file name (gzip) */\nconst COMMENT = 16187; /* i: waiting for end of comment (gzip) */\nconst HCRC = 16188; /* i: waiting for header crc (gzip) */\nconst DICTID = 16189; /* i: waiting for dictionary check value */\nconst DICT = 16190; /* waiting for inflateSetDictionary() call */\nconst TYPE = 16191; /* i: waiting for type bits, including last-flag bit */\nconst TYPEDO = 16192; /* i: same, but skip check to exit inflate on new block */\nconst STORED = 16193; /* i: waiting for stored size (length and complement) */\nconst COPY_ = 16194; /* i/o: same as COPY below, but only first time in */\nconst COPY = 16195; /* i/o: waiting for input or output to copy stored block */\nconst TABLE = 16196; /* i: waiting for dynamic block table lengths */\nconst LENLENS = 16197; /* i: waiting for code length code lengths */\nconst CODELENS = 16198; /* i: waiting for length/lit and distance code lengths */\nconst LEN_ = 16199; /* i: same as LEN below, but only first time in */\nconst LEN = 16200; /* i: waiting for length/lit/eob code */\nconst LENEXT = 16201; /* i: waiting for length extra bits */\nconst DIST = 16202; /* i: waiting for distance code */\nconst DISTEXT = 16203; /* i: waiting for distance extra bits */\nconst MATCH = 16204; /* o: waiting for output space to copy string */\nconst LIT = 16205; /* o: waiting for output space to write literal */\nconst CHECK = 16206; /* i: waiting for 32-bit check value */\nconst LENGTH = 16207; /* i: waiting for 32-bit length (gzip) */\nconst DONE = 16208; /* finished check, done -- remain here until reset */\nconst BAD = 16209; /* got a data error -- remain here until reset */\nconst MEM = 16210; /* got an inflate() memory error -- remain here until reset */\nconst SYNC = 16211; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_WBITS = MAX_WBITS;\n\n\nconst zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n};\n\n\nfunction InflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip,\n bit 2 true to validate check value */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib), or\n -1 if raw or no header yet */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\n\nconst inflateStateCheck = (strm) => {\n\n if (!strm) {\n return 1;\n }\n const state = strm.state;\n if (!state || state.strm !== strm ||\n state.mode < HEAD || state.mode > SYNC) {\n return 1;\n }\n return 0;\n};\n\n\nconst inflateResetKeep = (strm) => {\n\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.flags = -1;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK$1;\n};\n\n\nconst inflateReset = (strm) => {\n\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n};\n\n\nconst inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 5;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR$1;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n};\n\n\nconst inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR$1; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.strm = strm;\n state.window = null/*Z_NULL*/;\n state.mode = HEAD; /* to pass state test in inflateReset2() */\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK$1) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n};\n\n\nconst inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n};\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nlet virgin = true;\n\nlet lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\nconst fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inftrees(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inftrees(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n};\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nconst updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n};\n\n\nconst inflate$2 = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (inflateStateCheck(strm) || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR$1;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK$1;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n if (state.wbits === 0) {\n state.wbits = 15;\n }\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n if (len > 15 || len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n state.flags = 0; /* indicate zlib header */\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32_1(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 4) && hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT$1;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inftrees(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inftrees(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inftrees(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inffast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if ((state.wrap & 4) && _out) {\n strm.adler = state.check =\n /*UPDATE_CHECK(state.check, put - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.wrap & 4) && (state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 4) && hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END$1;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR$1;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR$1;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR$1;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH$1))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if ((state.wrap & 4) && _out) {\n strm.adler = state.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH$1) && ret === Z_OK$1) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n};\n\n\nconst inflateEnd = (strm) => {\n\n if (inflateStateCheck(strm)) {\n return Z_STREAM_ERROR$1;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK$1;\n};\n\n\nconst inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK$1;\n};\n\n\nconst inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR$1;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32_1(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR$1;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR$1;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK$1;\n};\n\n\nvar inflateReset_1 = inflateReset;\nvar inflateReset2_1 = inflateReset2;\nvar inflateResetKeep_1 = inflateResetKeep;\nvar inflateInit_1 = inflateInit;\nvar inflateInit2_1 = inflateInit2;\nvar inflate_2$1 = inflate$2;\nvar inflateEnd_1 = inflateEnd;\nvar inflateGetHeader_1 = inflateGetHeader;\nvar inflateSetDictionary_1 = inflateSetDictionary;\nvar inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.inflateCodesUsed = inflateCodesUsed;\nmodule.exports.inflateCopy = inflateCopy;\nmodule.exports.inflateGetDictionary = inflateGetDictionary;\nmodule.exports.inflateMark = inflateMark;\nmodule.exports.inflatePrime = inflatePrime;\nmodule.exports.inflateSync = inflateSync;\nmodule.exports.inflateSyncPoint = inflateSyncPoint;\nmodule.exports.inflateUndermine = inflateUndermine;\nmodule.exports.inflateValidate = inflateValidate;\n*/\n\nvar inflate_1$2 = {\n\tinflateReset: inflateReset_1,\n\tinflateReset2: inflateReset2_1,\n\tinflateResetKeep: inflateResetKeep_1,\n\tinflateInit: inflateInit_1,\n\tinflateInit2: inflateInit2_1,\n\tinflate: inflate_2$1,\n\tinflateEnd: inflateEnd_1,\n\tinflateGetHeader: inflateGetHeader_1,\n\tinflateSetDictionary: inflateSetDictionary_1,\n\tinflateInfo: inflateInfo\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nvar gzheader = GZheader;\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR\n} = constants$2;\n\n/* ===========================================================================*/\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate$1(options) {\n this.options = common.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = inflate_1$2.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n\n this.header = new gzheader();\n\n inflate_1$2.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = inflate_1$2.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate$1.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = inflate_1$2.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT && dictionary) {\n status = inflate_1$2.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK) {\n status = inflate_1$2.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR) {\n // Replace code with more verbose\n status = Z_NEED_DICT;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n inflate_1$2.inflateReset(strm);\n status = inflate_1$2.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR:\n case Z_DATA_ERROR:\n case Z_NEED_DICT:\n case Z_MEM_ERROR:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END) {\n status = inflate_1$2.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate$1.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate$1.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = common.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err) {\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate$1(input, options) {\n const inflator = new Inflate$1(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || messages[inflator.err];\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw$1(input, options) {\n options = options || {};\n options.raw = true;\n return inflate$1(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nvar Inflate_1$1 = Inflate$1;\nvar inflate_2 = inflate$1;\nvar inflateRaw_1$1 = inflateRaw$1;\nvar ungzip$1 = inflate$1;\nvar constants = constants$2;\n\nvar inflate_1$1 = {\n\tInflate: Inflate_1$1,\n\tinflate: inflate_2,\n\tinflateRaw: inflateRaw_1$1,\n\tungzip: ungzip$1,\n\tconstants: constants\n};\n\nconst { Deflate, deflate, deflateRaw, gzip } = deflate_1$1;\n\nconst { Inflate, inflate, inflateRaw, ungzip } = inflate_1$1;\n\n\n\nvar Deflate_1 = Deflate;\nvar deflate_1 = deflate;\nvar deflateRaw_1 = deflateRaw;\nvar gzip_1 = gzip;\nvar Inflate_1 = Inflate;\nvar inflate_1 = inflate;\nvar inflateRaw_1 = inflateRaw;\nvar ungzip_1 = ungzip;\nvar constants_1 = constants$2;\n\nvar pako = {\n\tDeflate: Deflate_1,\n\tdeflate: deflate_1,\n\tdeflateRaw: deflateRaw_1,\n\tgzip: gzip_1,\n\tInflate: Inflate_1,\n\tinflate: inflate_1,\n\tinflateRaw: inflateRaw_1,\n\tungzip: ungzip_1,\n\tconstants: constants_1\n};\n\nexport { Deflate_1 as Deflate, Inflate_1 as Inflate, constants_1 as constants, pako as default, deflate_1 as deflate, deflateRaw_1 as deflateRaw, gzip_1 as gzip, inflate_1 as inflate, inflateRaw_1 as inflateRaw, ungzip_1 as ungzip };\n","'use strict';\n\n// This is free and unencumbered software released into the public domain.\n// See LICENSE.md for more information.\n\n//\n// Utilities\n//\n\n/**\n * @param {number} a The number to test.\n * @param {number} min The minimum value in the range, inclusive.\n * @param {number} max The maximum value in the range, inclusive.\n * @return {boolean} True if a >= min and a <= max.\n */\nfunction inRange(a, min, max) {\n return min <= a && a <= max;\n}\n\n/**\n * @param {*} o\n * @return {Object}\n */\nfunction ToDictionary(o) {\n if (o === undefined) return {};\n if (o === Object(o)) return o;\n throw TypeError('Could not convert argument to dictionary');\n}\n\n/**\n * @param {string} string Input string of UTF-16 code units.\n * @return {!Array.} Code points.\n */\nfunction stringToCodePoints(string) {\n // https://heycam.github.io/webidl/#dfn-obtain-unicode\n\n // 1. Let S be the DOMString value.\n var s = String(string);\n\n // 2. Let n be the length of S.\n var n = s.length;\n\n // 3. Initialize i to 0.\n var i = 0;\n\n // 4. Initialize U to be an empty sequence of Unicode characters.\n var u = [];\n\n // 5. While i < n:\n while (i < n) {\n\n // 1. Let c be the code unit in S at index i.\n var c = s.charCodeAt(i);\n\n // 2. Depending on the value of c:\n\n // c < 0xD800 or c > 0xDFFF\n if (c < 0xD800 || c > 0xDFFF) {\n // Append to U the Unicode character with code point c.\n u.push(c);\n }\n\n // 0xDC00 ≤ c ≤ 0xDFFF\n else if (0xDC00 <= c && c <= 0xDFFF) {\n // Append to U a U+FFFD REPLACEMENT CHARACTER.\n u.push(0xFFFD);\n }\n\n // 0xD800 ≤ c ≤ 0xDBFF\n else if (0xD800 <= c && c <= 0xDBFF) {\n // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT\n // CHARACTER.\n if (i === n - 1) {\n u.push(0xFFFD);\n }\n // 2. Otherwise, i < n−1:\n else {\n // 1. Let d be the code unit in S at index i+1.\n var d = string.charCodeAt(i + 1);\n\n // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:\n if (0xDC00 <= d && d <= 0xDFFF) {\n // 1. Let a be c & 0x3FF.\n var a = c & 0x3FF;\n\n // 2. Let b be d & 0x3FF.\n var b = d & 0x3FF;\n\n // 3. Append to U the Unicode character with code point\n // 2^16+2^10*a+b.\n u.push(0x10000 + (a << 10) + b);\n\n // 4. Set i to i+1.\n i += 1;\n }\n\n // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a\n // U+FFFD REPLACEMENT CHARACTER.\n else {\n u.push(0xFFFD);\n }\n }\n }\n\n // 3. Set i to i+1.\n i += 1;\n }\n\n // 6. Return U.\n return u;\n}\n\n/**\n * @param {!Array.} code_points Array of code points.\n * @return {string} string String of UTF-16 code units.\n */\nfunction codePointsToString(code_points) {\n var s = '';\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 0xFFFF) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 0x10000;\n s += String.fromCharCode((cp >> 10) + 0xD800,\n (cp & 0x3FF) + 0xDC00);\n }\n }\n return s;\n}\n\n\n//\n// Implementation of Encoding specification\n// https://encoding.spec.whatwg.org/\n//\n\n//\n// 3. Terminology\n//\n\n/**\n * End-of-stream is a special token that signifies no more tokens\n * are in the stream.\n * @const\n */ var end_of_stream = -1;\n\n/**\n * A stream represents an ordered sequence of tokens.\n *\n * @constructor\n * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide the\n * stream.\n */\nfunction Stream(tokens) {\n /** @type {!Array.} */\n this.tokens = [].slice.call(tokens);\n}\n\nStream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n};\n\n//\n// 4. Encodings\n//\n\n// 4.1 Encoders and decoders\n\n/** @const */\nvar finished = -1;\n\n/**\n * @param {boolean} fatal If true, decoding errors raise an exception.\n * @param {number=} opt_code_point Override the standard fallback code point.\n * @return {number} The code point to insert on a decoding error.\n */\nfunction decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError('Decoder error');\n return opt_code_point || 0xFFFD;\n}\n\n/** @interface */\nfunction Decoder() {}\nDecoder.prototype = {\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point, or |finished|.\n */\n handler: function(stream, bite) {}\n};\n\n/** @interface */\nfunction Encoder() {}\nEncoder.prototype = {\n /**\n * @param {Stream} stream The stream of code points being encoded.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit, or |finished|.\n */\n handler: function(stream, code_point) {}\n};\n\n//\n// 7. API\n//\n\n/** @const */ var DEFAULT_ENCODING = 'utf-8';\n\n// 7.1 Interface TextDecoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextDecoder(encoding, options) {\n if (!(this instanceof TextDecoder)) {\n return new TextDecoder(encoding, options);\n }\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {boolean} */\n this._BOMseen = false;\n /** @private @type {?Decoder} */\n this._decoder = null;\n /** @private @type {boolean} */\n this._fatal = Boolean(options['fatal']);\n /** @private @type {boolean} */\n this._ignoreBOM = Boolean(options['ignoreBOM']);\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n Object.defineProperty(this, 'fatal', {value: this._fatal});\n Object.defineProperty(this, 'ignoreBOM', {value: this._ignoreBOM});\n}\n\nTextDecoder.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === 'object' && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === 'object' && 'buffer' in input &&\n input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(input.buffer,\n input.byteOffset,\n input.byteLength);\n } else {\n bytes = new Uint8Array(0);\n }\n\n options = ToDictionary(options);\n\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({fatal: this._fatal});\n this._BOMseen = false;\n }\n this._streaming = Boolean(options['stream']);\n\n var input_stream = new Stream(bytes);\n\n var code_points = [];\n\n /** @type {?(number|!Array.)} */\n var result;\n\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n\n if (code_points.length) {\n // If encoding is one of utf-8, utf-16be, and utf-16le, and\n // ignore BOM flag and BOM seen flag are unset, run these\n // subsubsteps:\n if (['utf-8'].indexOf(this.encoding) !== -1 &&\n !this._ignoreBOM && !this._BOMseen) {\n // If token is U+FEFF, set BOM seen flag.\n if (code_points[0] === 0xFEFF) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n // Otherwise, if token is not end-of-stream, set BOM seen\n // flag and append token to output.\n this._BOMseen = true;\n }\n }\n }\n\n return codePointsToString(code_points);\n }\n};\n\n// 7.2 Interface TextEncoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextEncoder(encoding, options) {\n if (!(this instanceof TextEncoder))\n return new TextEncoder(encoding, options);\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {?Encoder} */\n this._encoder = null;\n /** @private @type {{fatal: boolean}} */\n this._options = {fatal: Boolean(options['fatal'])};\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n}\n\nTextEncoder.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : '';\n options = ToDictionary(options);\n\n // NOTE: This option is nonstandard. None of the encodings\n // permitted for encoding (i.e. UTF-8, UTF-16) are stateful,\n // so streaming is not necessary.\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options['stream']);\n\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n /** @type {?(number|!Array.)} */\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n};\n\n//\n// 8. The encoding\n//\n\n// 8.1 utf-8\n\n/**\n * @constructor\n * @implements {Decoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Decoder(options) {\n var fatal = options.fatal;\n\n // utf-8's decoder's has an associated utf-8 code point, utf-8\n // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8\n // lower boundary (initially 0x80), and a utf-8 upper boundary\n // (initially 0xBF).\n var /** @type {number} */ utf8_code_point = 0,\n /** @type {number} */ utf8_bytes_seen = 0,\n /** @type {number} */ utf8_bytes_needed = 0,\n /** @type {number} */ utf8_lower_boundary = 0x80,\n /** @type {number} */ utf8_upper_boundary = 0xBF;\n\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point.\n */\n this.handler = function(stream, bite) {\n // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,\n // set utf-8 bytes needed to 0 and return error.\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n\n // 2. If byte is end-of-stream, return finished.\n if (bite === end_of_stream)\n return finished;\n\n // 3. If utf-8 bytes needed is 0, based on byte:\n if (utf8_bytes_needed === 0) {\n\n // 0x00 to 0x7F\n if (inRange(bite, 0x00, 0x7F)) {\n // Return a code point whose value is byte.\n return bite;\n }\n\n // 0xC2 to 0xDF\n if (inRange(bite, 0xC2, 0xDF)) {\n // Set utf-8 bytes needed to 1 and utf-8 code point to byte\n // − 0xC0.\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 0xC0;\n }\n\n // 0xE0 to 0xEF\n else if (inRange(bite, 0xE0, 0xEF)) {\n // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.\n if (bite === 0xE0)\n utf8_lower_boundary = 0xA0;\n // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.\n if (bite === 0xED)\n utf8_upper_boundary = 0x9F;\n // 3. Set utf-8 bytes needed to 2 and utf-8 code point to\n // byte − 0xE0.\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 0xE0;\n }\n\n // 0xF0 to 0xF4\n else if (inRange(bite, 0xF0, 0xF4)) {\n // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.\n if (bite === 0xF0)\n utf8_lower_boundary = 0x90;\n // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.\n if (bite === 0xF4)\n utf8_upper_boundary = 0x8F;\n // 3. Set utf-8 bytes needed to 3 and utf-8 code point to\n // byte − 0xF0.\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 0xF0;\n }\n\n // Otherwise\n else {\n // Return error.\n return decoderError(fatal);\n }\n\n // Then (byte is in the range 0xC2 to 0xF4) set utf-8 code\n // point to utf-8 code point << (6 × utf-8 bytes needed) and\n // return continue.\n utf8_code_point = utf8_code_point << (6 * utf8_bytes_needed);\n return null;\n }\n\n // 4. If byte is not in the range utf-8 lower boundary to utf-8\n // upper boundary, run these substeps:\n if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n\n // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8\n // bytes seen to 0, set utf-8 lower boundary to 0x80, and set\n // utf-8 upper boundary to 0xBF.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 2. Prepend byte to stream.\n stream.prepend(bite);\n\n // 3. Return error.\n return decoderError(fatal);\n }\n\n // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary\n // to 0xBF.\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 6. Increase utf-8 bytes seen by one and set utf-8 code point\n // to utf-8 code point + (byte − 0x80) << (6 × (utf-8 bytes\n // needed − utf-8 bytes seen)).\n utf8_bytes_seen += 1;\n utf8_code_point += (bite - 0x80) << (6 * (utf8_bytes_needed - utf8_bytes_seen));\n\n // 7. If utf-8 bytes seen is not equal to utf-8 bytes needed,\n // continue.\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n\n // 8. Let code point be utf-8 code point.\n var code_point = utf8_code_point;\n\n // 9. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes\n // seen to 0.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n\n // 10. Return a code point whose value is code point.\n return code_point;\n };\n}\n\n/**\n * @constructor\n * @implements {Encoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Encoder(options) {\n var fatal = options.fatal;\n /**\n * @param {Stream} stream Input stream.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit.\n */\n this.handler = function(stream, code_point) {\n // 1. If code point is end-of-stream, return finished.\n if (code_point === end_of_stream)\n return finished;\n\n // 2. If code point is in the range U+0000 to U+007F, return a\n // byte whose value is code point.\n if (inRange(code_point, 0x0000, 0x007f))\n return code_point;\n\n // 3. Set count and offset based on the range code point is in:\n var count, offset;\n // U+0080 to U+07FF: 1 and 0xC0\n if (inRange(code_point, 0x0080, 0x07FF)) {\n count = 1;\n offset = 0xC0;\n }\n // U+0800 to U+FFFF: 2 and 0xE0\n else if (inRange(code_point, 0x0800, 0xFFFF)) {\n count = 2;\n offset = 0xE0;\n }\n // U+10000 to U+10FFFF: 3 and 0xF0\n else if (inRange(code_point, 0x10000, 0x10FFFF)) {\n count = 3;\n offset = 0xF0;\n }\n\n // 4.Let bytes be a byte sequence whose first byte is (code\n // point >> (6 × count)) + offset.\n var bytes = [(code_point >> (6 * count)) + offset];\n\n // 5. Run these substeps while count is greater than 0:\n while (count > 0) {\n\n // 1. Set temp to code point >> (6 × (count − 1)).\n var temp = code_point >> (6 * (count - 1));\n\n // 2. Append to bytes 0x80 | (temp & 0x3F).\n bytes.push(0x80 | (temp & 0x3F));\n\n // 3. Decrease count by one.\n count -= 1;\n }\n\n // 6. Return bytes bytes, in order.\n return bytes;\n };\n}\n\nexport {TextEncoder, TextDecoder};\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","(self[\"webpackChunk_N_E\"] = self[\"webpackChunk_N_E\"] || []).push([[888],{\n\n/***/ 9828:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BN\": function() { return /* reexport default from dynamic */ bn_js__WEBPACK_IMPORTED_MODULE_2___default.a; }\n/* harmony export */ });\n/* unused harmony exports AccountClient, AnchorError, AnchorProvider, BorshAccountsCoder, BorshCoder, BorshEventCoder, BorshInstructionCoder, DISCRIMINATOR_SIZE, EventManager, EventParser, IdlError, LangErrorCode, LangErrorMessage, MethodsBuilderFactory, Native, Program, ProgramError, ProgramErrorStack, SystemCoder, getProvider, parseIdlErrors, setProvider, splitArgsAndCtx, toInstruction, translateAddress, translateError, utils, validateAccounts */\n/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8764);\n/* harmony import */ var _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6737);\n/* harmony import */ var bn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3550);\n/* harmony import */ var bn_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(bn_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var bs58__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8633);\n/* harmony import */ var bs58__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(bs58__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var camelcase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4037);\n/* harmony import */ var camelcase__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(camelcase__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5970);\n/* harmony import */ var _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7748);\n/* harmony import */ var pako__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7885);\n/* harmony import */ var eventemitter3__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6729);\n/* harmony import */ var eventemitter3__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(eventemitter3__WEBPACK_IMPORTED_MODULE_7__);\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Splits an array into chunks\n *\n * @param array Array of objects to chunk.\n * @param size The max size of a chunk.\n * @returns A two dimensional array where each T[] length is < the provided size.\n */\nfunction chunks(array, size) {\n return Array.apply(0, new Array(Math.ceil(array.length / size))).map((_, index) => array.slice(index * size, (index + 1) * size));\n}\n/**\n * Check if a transaction object is a VersionedTransaction or not\n *\n * @param tx\n * @returns bool\n */\nconst isVersionedTransaction = (tx) => {\n return \"version\" in tx;\n};\n\nfunction encode$3(data) {\n return data.reduce((str, byte) => str + byte.toString(16).padStart(2, \"0\"), \"0x\");\n}\nfunction decode$3(data) {\n if (data.indexOf(\"0x\") === 0) {\n data = data.substr(2);\n }\n if (data.length % 2 === 1) {\n data = \"0\" + data;\n }\n let key = data.match(/.{2}/g);\n if (key === null) {\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from([]);\n }\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(key.map((byte) => parseInt(byte, 16)));\n}\n\nvar hex = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode$3,\n decode: decode$3\n});\n\nfunction decode$2(array) {\n const decoder = new TextDecoder(\"utf-8\") // Browser https://caniuse.com/textencoder.\n ; // Node.\n return decoder.decode(array);\n}\nfunction encode$2(input) {\n const encoder = new TextEncoder() // Browser.\n ; // Node.\n return encoder.encode(input);\n}\n\nvar utf8 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n decode: decode$2,\n encode: encode$2\n});\n\nfunction encode$1(data) {\n return bs58__WEBPACK_IMPORTED_MODULE_3___default().encode(data);\n}\nfunction decode$1(data) {\n return bs58__WEBPACK_IMPORTED_MODULE_3___default().decode(data);\n}\n\nvar bs58 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode$1,\n decode: decode$1\n});\n\nfunction encode(data) {\n return data.toString(\"base64\");\n}\nfunction decode(data) {\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(data, \"base64\");\n}\n\nvar base64 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode,\n decode: decode\n});\n\nvar index$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hex: hex,\n utf8: utf8,\n bs58: bs58,\n base64: base64\n});\n\nfunction isCompositeAccounts(accountItem) {\n return \"accounts\" in accountItem;\n}\n// Deterministic IDL address as a function of the program id.\nasync function idlAddress(programId) {\n const base = (await PublicKey.findProgramAddress([], programId))[0];\n return await PublicKey.createWithSeed(base, seed(), programId);\n}\n// Seed for generating the idlAddress.\nfunction seed() {\n return \"anchor:idl\";\n}\nconst IDL_ACCOUNT_LAYOUT = _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct([\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.publicKey(\"authority\"),\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.vecU8(\"data\"),\n]);\nfunction decodeIdlAccount(data) {\n return IDL_ACCOUNT_LAYOUT.decode(data);\n}\n/**\n * Convert the given IDL to camelCase.\n *\n * The IDL is generated from Rust which has different conventions compared to\n * JS/TS, e.g. instruction names in Rust are snake_case.\n *\n * The conversion happens automatically for programs, however, if you are using\n * internals such as `BorshInstructionCoder` and you only have the original\n * (not camelCase) IDL, you might need to use this function.\n *\n * @param idl IDL to convert to camelCase\n * @returns camelCase version of the IDL\n */\nfunction convertIdlToCamelCase(idl) {\n const KEYS_TO_CONVERT = [\"name\", \"path\", \"account\", \"relations\", \"generic\"];\n // `my_account.field` is getting converted to `myAccountField` but we\n // need `myAccount.field`.\n const toCamelCase = (s) => s.split(\".\").map(camelCase).join(\".\");\n const recursivelyConvertNamesToCamelCase = (obj) => {\n for (const key in obj) {\n const val = obj[key];\n if (KEYS_TO_CONVERT.includes(key)) {\n obj[key] = Array.isArray(val) ? val.map(toCamelCase) : toCamelCase(val);\n }\n else if (typeof val === \"object\") {\n recursivelyConvertNamesToCamelCase(val);\n }\n }\n };\n const camelCasedIdl = structuredClone(idl);\n recursivelyConvertNamesToCamelCase(camelCasedIdl);\n return camelCasedIdl;\n}\n/** Conveniently handle all defined field kinds with proper type support. */\nfunction handleDefinedFields(fields, unitCb, namedCb, tupleCb) {\n // Unit\n if (!(fields === null || fields === void 0 ? void 0 : fields.length))\n return unitCb();\n // Named\n if (fields[0].name) {\n return namedCb(fields);\n }\n // Tuple\n return tupleCb(fields);\n}\n\nfunction parseIdlErrors(idl) {\n const errors = new Map();\n if (idl.errors) {\n idl.errors.forEach((e) => {\n var _a;\n let msg = (_a = e.msg) !== null && _a !== void 0 ? _a : e.name;\n errors.set(e.code, msg);\n });\n }\n return errors;\n}\nfunction toInstruction(idlIx, ...args) {\n if (idlIx.args.length != args.length) {\n throw new Error(\"Invalid argument length\");\n }\n const ix = {};\n let idx = 0;\n idlIx.args.forEach((ixArg) => {\n ix[ixArg.name] = args[idx];\n idx += 1;\n });\n return ix;\n}\n// Throws error if any account required for the `ix` is not given.\nfunction validateAccounts(ixAccounts, accounts = {}) {\n ixAccounts.forEach((acc) => {\n if (isCompositeAccounts(acc)) {\n validateAccounts(acc.accounts, accounts[acc.name]);\n }\n else {\n if (!accounts[acc.name]) {\n throw new Error(`Account \\`${acc.name}\\` not provided.`);\n }\n }\n });\n}\n// Translates an address to a Pubkey.\nfunction translateAddress(address) {\n return address instanceof _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey ? address : new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(address);\n}\n\n/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n this.value = void 0;\n this.key = void 0;\n this.type = void 0;\n this.refinement = void 0;\n this.path = void 0;\n this.branch = void 0;\n this.failures = void 0;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options) {\n if (options === void 0) {\n options = {};\n }\n\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n this.TYPE = void 0;\n this.type = void 0;\n this.schema = void 0;\n this.coercer = void 0;\n this.validator = void 0;\n this.refiner = void 0;\n this.entries = void 0;\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options) {\n if (options === void 0) {\n options = {};\n }\n\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options) {\n if (options === void 0) {\n options = {};\n }\n\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value matches one of a set of types.\n */\n\nfunction union$1(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n coercer(value, ctx) {\n const firstMatch = Structs.find(s => {\n const [e] = s.validate(value, {\n coerce: true\n });\n return !e;\n }) || unknown();\n return firstMatch.coercer(value, ctx);\n },\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n\n/**\n * Sends a transaction to a program with the given accounts and instruction\n * data.\n */\nasync function invoke(programId, accounts, data, provider) {\n programId = translateAddress(programId);\n if (!provider) {\n provider = getProvider();\n }\n const tx = new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.Transaction();\n tx.add(new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.TransactionInstruction({\n programId,\n keys: accounts !== null && accounts !== void 0 ? accounts : [],\n data,\n }));\n if (provider.sendAndConfirm === undefined) {\n throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");\n }\n return await provider.sendAndConfirm(tx, []);\n}\nconst GET_MULTIPLE_ACCOUNTS_LIMIT = 99;\nasync function getMultipleAccounts(connection, publicKeys, commitment) {\n const results = await getMultipleAccountsAndContext(connection, publicKeys, commitment);\n return results.map((result) => {\n return result\n ? { publicKey: result.publicKey, account: result.account }\n : null;\n });\n}\nasync function getMultipleAccountsAndContext(connection, publicKeys, commitment) {\n if (publicKeys.length <= GET_MULTIPLE_ACCOUNTS_LIMIT) {\n return await getMultipleAccountsAndContextCore(connection, publicKeys, commitment);\n }\n else {\n const batches = chunks(publicKeys, GET_MULTIPLE_ACCOUNTS_LIMIT);\n const results = await Promise.all(batches.map((batch) => getMultipleAccountsAndContextCore(connection, batch, commitment)));\n return results.flat();\n }\n}\nasync function getMultipleAccountsAndContextCore(connection, publicKeys, commitmentOverride) {\n const commitment = commitmentOverride !== null && commitmentOverride !== void 0 ? commitmentOverride : connection.commitment;\n const { value: accountInfos, context } = await connection.getMultipleAccountsInfoAndContext(publicKeys, commitment);\n const accounts = accountInfos.map((account, idx) => {\n if (account === null) {\n return null;\n }\n return {\n publicKey: publicKeys[idx],\n account,\n context,\n };\n });\n return accounts;\n}\n// copy from @solana/web3.js that has a commitment param\nasync function simulateTransaction(connection, transaction, signers, commitment, includeAccounts) {\n var _a;\n if (signers && signers.length > 0) {\n transaction.sign(...signers);\n }\n // @ts-expect-error\n const message = transaction._compile();\n const signData = message.serialize();\n // @ts-expect-error\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString(\"base64\");\n const config = {\n encoding: \"base64\",\n commitment: commitment !== null && commitment !== void 0 ? commitment : connection.commitment,\n };\n if (includeAccounts) {\n const addresses = (Array.isArray(includeAccounts) ? includeAccounts : message.nonProgramIds()).map((key) => key.toBase58());\n config[\"accounts\"] = {\n encoding: \"base64\",\n addresses,\n };\n }\n if (signers && signers.length > 0) {\n config.sigVerify = true;\n }\n const args = [encodedTransaction, config];\n // @ts-expect-error\n const unsafeRes = await connection._rpcRequest(\"simulateTransaction\", args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if (\"error\" in res) {\n let logs;\n if (\"data\" in res.error) {\n logs = (_a = res.error.data) === null || _a === void 0 ? void 0 : _a.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = \"\\n \";\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SendTransactionError(\"failed to simulate transaction: \" + res.error.message, logs);\n }\n return res.result;\n}\n// copy from @solana/web3.js\nfunction jsonRpcResult(schema) {\n return coerce(createRpcResult(schema), UnknownRpcResult, (value) => {\n if (\"error\" in value) {\n return value;\n }\n else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n// copy from @solana/web3.js\nconst UnknownRpcResult = createRpcResult(unknown());\n// copy from @solana/web3.js\nfunction createRpcResult(result) {\n return union$1([\n type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n result,\n }),\n type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n error: type({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n// copy from @solana/web3.js\nfunction jsonRpcResultAndContext(value) {\n return jsonRpcResult(type({\n context: type({\n slot: number(),\n }),\n value,\n }));\n}\n// copy from @solana/web3.js\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({\n err: nullable(union$1([type({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(nullable(array(nullable(type({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }))))),\n unitsConsumed: optional(number()),\n}));\n\nvar rpc = /*#__PURE__*/Object.freeze({\n __proto__: null,\n invoke: invoke,\n getMultipleAccounts: getMultipleAccounts,\n getMultipleAccountsAndContext: getMultipleAccountsAndContext,\n simulateTransaction: simulateTransaction\n});\n\n/**\n * The network and wallet context used to send transactions paid for and signed\n * by the provider.\n */\nclass AnchorProvider {\n /**\n * @param connection The cluster connection where the program is deployed.\n * @param wallet The wallet used to pay for and sign all transactions.\n * @param opts Transaction confirmation options to use by default.\n */\n constructor(connection, wallet, opts = AnchorProvider.defaultOptions()) {\n this.connection = connection;\n this.wallet = wallet;\n this.opts = opts;\n this.publicKey = wallet === null || wallet === void 0 ? void 0 : wallet.publicKey;\n }\n static defaultOptions() {\n return {\n preflightCommitment: \"processed\",\n commitment: \"processed\",\n };\n }\n /**\n * Returns a `Provider` with a wallet read from the local filesystem.\n *\n * @param url The network cluster url.\n * @param opts The default transaction confirmation options.\n *\n * (This api is for Node only.)\n */\n static local(url, opts = AnchorProvider.defaultOptions()) {\n {\n throw new Error(`Provider local is not available on browser.`);\n }\n }\n /**\n * Returns a `Provider` read from the `ANCHOR_PROVIDER_URL` environment\n * variable\n *\n * (This api is for Node only.)\n */\n static env() {\n {\n throw new Error(`Provider env is not available on browser.`);\n }\n }\n /**\n * Sends the given transaction, paid for and signed by the provider's wallet.\n *\n * @param tx The transaction to send.\n * @param signers The signers of the transaction.\n * @param opts Transaction confirmation options.\n */\n async sendAndConfirm(tx, signers, opts) {\n var _a, _b, _c, _d;\n if (opts === undefined) {\n opts = this.opts;\n }\n if (isVersionedTransaction(tx)) {\n if (signers) {\n tx.sign(signers);\n }\n }\n else {\n tx.feePayer = (_a = tx.feePayer) !== null && _a !== void 0 ? _a : this.wallet.publicKey;\n tx.recentBlockhash = (await this.connection.getLatestBlockhash(opts.preflightCommitment)).blockhash;\n if (signers) {\n for (const signer of signers) {\n tx.partialSign(signer);\n }\n }\n }\n tx = await this.wallet.signTransaction(tx);\n const rawTx = tx.serialize();\n try {\n return await sendAndConfirmRawTransaction(this.connection, rawTx, opts);\n }\n catch (err) {\n // thrown if the underlying 'confirmTransaction' encounters a failed tx\n // the 'confirmTransaction' error does not return logs so we make another rpc call to get them\n if (err instanceof ConfirmError) {\n // choose the shortest available commitment for 'getTransaction'\n // (the json RPC does not support any shorter than \"confirmed\" for 'getTransaction')\n // because that will see the tx sent with `sendAndConfirmRawTransaction` no matter which\n // commitment `sendAndConfirmRawTransaction` used\n const txSig = encode$1(isVersionedTransaction(tx)\n ? ((_b = tx.signatures) === null || _b === void 0 ? void 0 : _b[0]) || new Uint8Array()\n : (_c = tx.signature) !== null && _c !== void 0 ? _c : new Uint8Array());\n const maxVer = isVersionedTransaction(tx) ? 0 : undefined;\n const failedTx = await this.connection.getTransaction(txSig, {\n commitment: \"confirmed\",\n maxSupportedTransactionVersion: maxVer,\n });\n if (!failedTx) {\n throw err;\n }\n else {\n const logs = (_d = failedTx.meta) === null || _d === void 0 ? void 0 : _d.logMessages;\n throw !logs ? err : new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SendTransactionError(err.message, logs);\n }\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Similar to `send`, but for an array of transactions and signers.\n * All transactions need to be of the same type, it doesn't support a mix of `VersionedTransaction`s and `Transaction`s.\n *\n * @param txWithSigners Array of transactions and signers.\n * @param opts Transaction confirmation options.\n */\n async sendAll(txWithSigners, opts) {\n var _a, _b, _c;\n if (opts === undefined) {\n opts = this.opts;\n }\n const recentBlockhash = (await this.connection.getLatestBlockhash(opts.preflightCommitment)).blockhash;\n let txs = txWithSigners.map((r) => {\n var _a, _b;\n if (isVersionedTransaction(r.tx)) {\n let tx = r.tx;\n if (r.signers) {\n tx.sign(r.signers);\n }\n return tx;\n }\n else {\n let tx = r.tx;\n let signers = (_a = r.signers) !== null && _a !== void 0 ? _a : [];\n tx.feePayer = (_b = tx.feePayer) !== null && _b !== void 0 ? _b : this.wallet.publicKey;\n tx.recentBlockhash = recentBlockhash;\n signers.forEach((kp) => {\n tx.partialSign(kp);\n });\n return tx;\n }\n });\n const signedTxs = await this.wallet.signAllTransactions(txs);\n const sigs = [];\n for (let k = 0; k < txs.length; k += 1) {\n const tx = signedTxs[k];\n const rawTx = tx.serialize();\n try {\n sigs.push(await sendAndConfirmRawTransaction(this.connection, rawTx, opts));\n }\n catch (err) {\n // thrown if the underlying 'confirmTransaction' encounters a failed tx\n // the 'confirmTransaction' error does not return logs so we make another rpc call to get them\n if (err instanceof ConfirmError) {\n // choose the shortest available commitment for 'getTransaction'\n // (the json RPC does not support any shorter than \"confirmed\" for 'getTransaction')\n // because that will see the tx sent with `sendAndConfirmRawTransaction` no matter which\n // commitment `sendAndConfirmRawTransaction` used\n const txSig = encode$1(isVersionedTransaction(tx)\n ? ((_a = tx.signatures) === null || _a === void 0 ? void 0 : _a[0]) || new Uint8Array()\n : (_b = tx.signature) !== null && _b !== void 0 ? _b : new Uint8Array());\n const maxVer = isVersionedTransaction(tx) ? 0 : undefined;\n const failedTx = await this.connection.getTransaction(txSig, {\n commitment: \"confirmed\",\n maxSupportedTransactionVersion: maxVer,\n });\n if (!failedTx) {\n throw err;\n }\n else {\n const logs = (_c = failedTx.meta) === null || _c === void 0 ? void 0 : _c.logMessages;\n throw !logs ? err : new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SendTransactionError(err.message, logs);\n }\n }\n else {\n throw err;\n }\n }\n }\n return sigs;\n }\n /**\n * Simulates the given transaction, returning emitted logs from execution.\n *\n * @param tx The transaction to send.\n * @param signers The signers of the transaction. If unset, the transaction\n * will be simulated with the \"sigVerify: false\" option. This\n * allows for simulation of transactions without asking the\n * wallet for a signature.\n * @param opts Transaction confirmation options.\n */\n async simulate(tx, signers, commitment, includeAccounts) {\n let recentBlockhash = (await this.connection.getLatestBlockhash(commitment !== null && commitment !== void 0 ? commitment : this.connection.commitment)).blockhash;\n let result;\n if (isVersionedTransaction(tx)) {\n if (signers && signers.length > 0) {\n tx.sign(signers);\n tx = await this.wallet.signTransaction(tx);\n }\n // Doesn't support includeAccounts which has been changed to something\n // else in later versions of this function.\n result = await this.connection.simulateTransaction(tx, { commitment });\n }\n else {\n tx.feePayer = tx.feePayer || this.wallet.publicKey;\n tx.recentBlockhash = recentBlockhash;\n if (signers && signers.length > 0) {\n tx = await this.wallet.signTransaction(tx);\n }\n result = await simulateTransaction(this.connection, tx, signers, commitment, includeAccounts);\n }\n if (result.value.err) {\n throw new SimulateError(result.value);\n }\n return result.value;\n }\n}\nclass SimulateError extends Error {\n constructor(simulationResponse, message) {\n super(message);\n this.simulationResponse = simulationResponse;\n }\n}\n// Copy of Connection.sendAndConfirmRawTransaction that throws\n// a better error if 'confirmTransaction` returns an error status\nasync function sendAndConfirmRawTransaction(connection, rawTransaction, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n };\n const signature = await connection.sendRawTransaction(rawTransaction, sendOptions);\n const status = (await connection.confirmTransaction(signature, options && options.commitment)).value;\n if (status.err) {\n throw new ConfirmError(`Raw transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n}\nclass ConfirmError extends Error {\n constructor(message) {\n super(message);\n }\n}\n/**\n * Sets the default provider on the client.\n */\nfunction setProvider(provider) {\n _provider = provider;\n}\n/**\n * Returns the default provider being used by the client.\n */\nfunction getProvider() {\n if (_provider === null) {\n return AnchorProvider.local();\n }\n return _provider;\n}\n// Global provider used as the default when a provider is not given.\nlet _provider = null;\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar dist = {};\n\n// Instruction errors.\nObject.defineProperty(dist, \"__esModule\", { value: true });\nvar ANCHOR_ERROR__REQUIRE_EQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_EQ_VIOLATED = ANCHOR_ERROR__REQUIRE_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_VIOLATED = ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID = ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION = ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE = dist.ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE = ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION = ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION = ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS = ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION = ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM = ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM = ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM = ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE = dist.ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE = ANCHOR_ERROR__CONSTRAINT_SPACE = dist.ANCHOR_ERROR__CONSTRAINT_SPACE = ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS = ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY = ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER = ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT = ANCHOR_ERROR__CONSTRAINT_ZERO = dist.ANCHOR_ERROR__CONSTRAINT_ZERO = ANCHOR_ERROR__CONSTRAINT_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_ADDRESS = ANCHOR_ERROR__CONSTRAINT_CLOSE = dist.ANCHOR_ERROR__CONSTRAINT_CLOSE = ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT = ANCHOR_ERROR__CONSTRAINT_ASSOCIATED = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED = ANCHOR_ERROR__CONSTRAINT_STATE = dist.ANCHOR_ERROR__CONSTRAINT_STATE = ANCHOR_ERROR__CONSTRAINT_EXECUTABLE = dist.ANCHOR_ERROR__CONSTRAINT_EXECUTABLE = ANCHOR_ERROR__CONSTRAINT_SEEDS = dist.ANCHOR_ERROR__CONSTRAINT_SEEDS = ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT = dist.ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT = ANCHOR_ERROR__CONSTRAINT_OWNER = dist.ANCHOR_ERROR__CONSTRAINT_OWNER = ANCHOR_ERROR__CONSTRAINT_RAW = dist.ANCHOR_ERROR__CONSTRAINT_RAW = ANCHOR_ERROR__CONSTRAINT_SIGNER = dist.ANCHOR_ERROR__CONSTRAINT_SIGNER = ANCHOR_ERROR__CONSTRAINT_HAS_ONE = dist.ANCHOR_ERROR__CONSTRAINT_HAS_ONE = ANCHOR_ERROR__CONSTRAINT_MUT = dist.ANCHOR_ERROR__CONSTRAINT_MUT = ANCHOR_ERROR__EVENT_INSTRUCTION_STUB = dist.ANCHOR_ERROR__EVENT_INSTRUCTION_STUB = ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY = dist.ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY = ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM = dist.ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM = ANCHOR_ERROR__IDL_INSTRUCTION_STUB = dist.ANCHOR_ERROR__IDL_INSTRUCTION_STUB = ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE = dist.ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE = ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE = dist.ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE = ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND = dist.ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND = ANCHOR_ERROR__INSTRUCTION_MISSING = dist.ANCHOR_ERROR__INSTRUCTION_MISSING = void 0;\nvar ANCHOR_ERROR__DEPRECATED = dist.ANCHOR_ERROR__DEPRECATED = ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION = dist.ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION = ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT = dist.ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT = ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH = dist.ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH = ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS = dist.ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS = ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT = dist.ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT = ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH = dist.ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH = ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT = dist.ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT = ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA = dist.ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA = ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED = dist.ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED = ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED = dist.ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED = ANCHOR_ERROR__ACCOUNT_NOT_SIGNER = dist.ANCHOR_ERROR__ACCOUNT_NOT_SIGNER = ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE = dist.ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE = ANCHOR_ERROR__INVALID_PROGRAM_ID = dist.ANCHOR_ERROR__INVALID_PROGRAM_ID = ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM = dist.ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM = ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE = dist.ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE = ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS = dist.ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS = ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE = dist.ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE = ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE = dist.ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE = ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH = ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND = ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET = ANCHOR_ERROR__REQUIRE_GTE_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_GTE_VIOLATED = ANCHOR_ERROR__REQUIRE_GT_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_GT_VIOLATED = ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED = ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED = ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED = void 0;\n/** 8 byte instruction identifier not provided. */\nvar ANCHOR_ERROR__INSTRUCTION_MISSING = dist.ANCHOR_ERROR__INSTRUCTION_MISSING = 100;\n/** Fallback functions are not supported. */\nvar ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND = dist.ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND = 101;\n/** The program could not deserialize the given instruction. */\nvar ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE = dist.ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE = 102;\n/** The program could not serialize the given instruction. */\nvar ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE = dist.ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE = 103;\n// IDL instruction errors.\n/** The program was compiled without idl instructions. */\nvar ANCHOR_ERROR__IDL_INSTRUCTION_STUB = dist.ANCHOR_ERROR__IDL_INSTRUCTION_STUB = 1000;\n/** The transaction was given an invalid program for the IDL instruction. */\nvar ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM = dist.ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM = 1001;\n/** IDL account must be empty in order to resize, try closing first. */\nvar ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY = dist.ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY = 1002;\n// Event instructions.\n/** The program was compiled without `event-cpi` feature. */\nvar ANCHOR_ERROR__EVENT_INSTRUCTION_STUB = dist.ANCHOR_ERROR__EVENT_INSTRUCTION_STUB = 1500;\n// Constraint errors.\n/** A mut constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MUT = dist.ANCHOR_ERROR__CONSTRAINT_MUT = 2000;\n/** A has one constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_HAS_ONE = dist.ANCHOR_ERROR__CONSTRAINT_HAS_ONE = 2001;\n/** A signer constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_SIGNER = dist.ANCHOR_ERROR__CONSTRAINT_SIGNER = 2002;\n/** A raw constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_RAW = dist.ANCHOR_ERROR__CONSTRAINT_RAW = 2003;\n/** An owner constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_OWNER = dist.ANCHOR_ERROR__CONSTRAINT_OWNER = 2004;\n/** A rent exemption constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT = dist.ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT = 2005;\n/** A seeds constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_SEEDS = dist.ANCHOR_ERROR__CONSTRAINT_SEEDS = 2006;\n/** An executable constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_EXECUTABLE = dist.ANCHOR_ERROR__CONSTRAINT_EXECUTABLE = 2007;\n/** Deprecated Error, feel free to replace with something else. */\nvar ANCHOR_ERROR__CONSTRAINT_STATE = dist.ANCHOR_ERROR__CONSTRAINT_STATE = 2008;\n/** An associated constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_ASSOCIATED = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED = 2009;\n/** An associated init constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT = 2010;\n/** A close constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_CLOSE = dist.ANCHOR_ERROR__CONSTRAINT_CLOSE = 2011;\n/** An address constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_ADDRESS = 2012;\n/** Expected zero account discriminant. */\nvar ANCHOR_ERROR__CONSTRAINT_ZERO = dist.ANCHOR_ERROR__CONSTRAINT_ZERO = 2013;\n/** A token mint constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT = 2014;\n/** A token owner constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER = 2015;\n/** A mint mint authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY = 2016;\n/** A mint freeze authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY = 2017;\n/** A mint decimals constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS = 2018;\n/** A space constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_SPACE = dist.ANCHOR_ERROR__CONSTRAINT_SPACE = 2019;\n/** A required account for the constraint is None. */\nvar ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE = dist.ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE = 2020;\n/** A token account token program constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM = 2021;\n/** A mint token program constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM = 2022;\n/** An associated token account token program constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM = dist.ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM = 2023;\n/** A group pointer extension constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION = 2024;\n/** A group pointer extension authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY = 2025;\n/** A group pointer extension group address constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS = 2026;\n/** A group member pointer extension constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION = 2027;\n/** A group member pointer extension authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY = 2028;\n/** A group member pointer extension group address constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS = 2029;\n/** A metadata pointer extension constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION = 2030;\n/** A metadata pointer extension authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY = 2031;\n/** A metadata pointer extension metadata address constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS = dist.ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS = 2032;\n/** A close authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION = 2033;\n/** A close authority extension authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY = 2034;\n/** A permanent delegate extension constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION = 2035;\n/** A permanent delegate extension delegate constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE = dist.ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE = 2036;\n/** A transfer hook extension constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION = 2037;\n/** A transfer hook extension authority constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY = 2038;\n/** A transfer hook extension transfer hook program id constraint was violated. */\nvar ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID = dist.ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID = 2039;\n// Require errors.\n/** A require expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_VIOLATED = 2500;\n/** A require_eq expression was violated. */\nANCHOR_ERROR__REQUIRE_EQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_EQ_VIOLATED = 2501;\n/** A require_keys_eq expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED = 2502;\n/** A require_neq expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED = 2503;\n/** A require_keys_neq expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED = 2504;\n/** A require_gt expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_GT_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_GT_VIOLATED = 2505;\n/** A require_gte expression was violated. */\nvar ANCHOR_ERROR__REQUIRE_GTE_VIOLATED = dist.ANCHOR_ERROR__REQUIRE_GTE_VIOLATED = 2506;\n// Account errors.\n/** The account discriminator was already set on this account. */\nvar ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET = 3000;\n/** No 8 byte discriminator was found on the account. */\nvar ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND = 3001;\n/** 8 byte discriminator did not match what was expected. */\nvar ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH = dist.ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH = 3002;\n/** Failed to deserialize the account. */\nvar ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE = dist.ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE = 3003;\n/** Failed to serialize the account. */\nvar ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE = dist.ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE = 3004;\n/** Not enough account keys given to the instruction. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS = dist.ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS = 3005;\n/** The given account is not mutable. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE = dist.ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE = 3006;\n/** The given account is owned by a different program than expected. */\nvar ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM = dist.ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM = 3007;\n/** Program ID was not as expected. */\nvar ANCHOR_ERROR__INVALID_PROGRAM_ID = dist.ANCHOR_ERROR__INVALID_PROGRAM_ID = 3008;\n/** Program account is not executable. */\nvar ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE = dist.ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE = 3009;\n/** The given account did not sign. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_SIGNER = dist.ANCHOR_ERROR__ACCOUNT_NOT_SIGNER = 3010;\n/** The given account is not owned by the system program. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED = dist.ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED = 3011;\n/** The program expected this account to be already initialized. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED = dist.ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED = 3012;\n/** The given account is not a program data account. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA = dist.ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA = 3013;\n/** The given account is not the associated token account. */\nvar ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT = dist.ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT = 3014;\n/** The given public key does not match the required sysvar. */\nvar ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH = dist.ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH = 3015;\n/** The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit. */\nvar ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT = dist.ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT = 3016;\n/** The account was duplicated for more than one reallocation. */\nvar ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS = dist.ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS = 3017;\n// Miscellaneous errors.\n/** The declared program id does not match the actual program id. */\nvar ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH = dist.ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH = 4100;\n/** You cannot/should not initialize the payer account as a program account. */\nvar ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT = dist.ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT = 4101;\n/** The program could not perform the numeric conversion, out of range integral type conversion attempted. */\nvar ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION = dist.ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION = 4102;\n// Deprecated errors.\n/** The API being used is deprecated and should no longer be used. */\nANCHOR_ERROR__DEPRECATED = dist.ANCHOR_ERROR__DEPRECATED = 5000;\n\nconst _AVAILABLE_FEATURES = new Set([\"debug-logs\"]);\nconst _FEATURES = new Map();\nfunction set(key) {\n if (!_AVAILABLE_FEATURES.has(key)) {\n throw new Error(\"Invalid feature\");\n }\n _FEATURES.set(key, true);\n}\nfunction isSet(key) {\n return _FEATURES.get(key) !== undefined;\n}\n\nvar features = /*#__PURE__*/Object.freeze({\n __proto__: null,\n set: set,\n isSet: isSet\n});\n\nclass IdlError extends Error {\n constructor(message) {\n super(message);\n this.name = \"IdlError\";\n }\n}\nclass ProgramErrorStack {\n constructor(stack) {\n this.stack = stack;\n }\n static parse(logs) {\n var _a;\n const programKeyRegex = /^Program (\\w*) invoke/;\n const successRegex = /^Program \\w* success/;\n const programStack = [];\n for (let i = 0; i < logs.length; i++) {\n if (successRegex.exec(logs[i])) {\n programStack.pop();\n continue;\n }\n const programKey = (_a = programKeyRegex.exec(logs[i])) === null || _a === void 0 ? void 0 : _a[1];\n if (!programKey) {\n continue;\n }\n programStack.push(new PublicKey(programKey));\n }\n return new ProgramErrorStack(programStack);\n }\n}\nclass AnchorError extends Error {\n constructor(errorCode, errorMessage, errorLogs, logs, origin, comparedValues) {\n super(errorLogs.join(\"\\n\").replace(\"Program log: \", \"\"));\n this.errorLogs = errorLogs;\n this.logs = logs;\n this.error = { errorCode, errorMessage, comparedValues, origin };\n this._programErrorStack = ProgramErrorStack.parse(logs);\n }\n static parse(logs) {\n if (!logs) {\n return null;\n }\n const anchorErrorLogIndex = logs.findIndex((log) => log.startsWith(\"Program log: AnchorError\"));\n if (anchorErrorLogIndex === -1) {\n return null;\n }\n const anchorErrorLog = logs[anchorErrorLogIndex];\n const errorLogs = [anchorErrorLog];\n let comparedValues;\n if (anchorErrorLogIndex + 1 < logs.length) {\n // This catches the comparedValues where the following is logged\n // \n // Left:\n // \n // Right:\n // \n if (logs[anchorErrorLogIndex + 1] === \"Program log: Left:\") {\n const pubkeyRegex = /^Program log: (.*)$/;\n const leftPubkey = pubkeyRegex.exec(logs[anchorErrorLogIndex + 2])[1];\n const rightPubkey = pubkeyRegex.exec(logs[anchorErrorLogIndex + 4])[1];\n comparedValues = [\n new PublicKey(leftPubkey),\n new PublicKey(rightPubkey),\n ];\n errorLogs.push(...logs.slice(anchorErrorLogIndex + 1, anchorErrorLogIndex + 5));\n }\n // This catches the comparedValues where the following is logged\n // \n // Left: \n // Right: \n else if (logs[anchorErrorLogIndex + 1].startsWith(\"Program log: Left:\")) {\n const valueRegex = /^Program log: (Left|Right): (.*)$/;\n const leftValue = valueRegex.exec(logs[anchorErrorLogIndex + 1])[2];\n const rightValue = valueRegex.exec(logs[anchorErrorLogIndex + 2])[2];\n errorLogs.push(...logs.slice(anchorErrorLogIndex + 1, anchorErrorLogIndex + 3));\n comparedValues = [leftValue, rightValue];\n }\n }\n const regexNoInfo = /^Program log: AnchorError occurred\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const noInfoAnchorErrorLog = regexNoInfo.exec(anchorErrorLog);\n const regexFileLine = /^Program log: AnchorError thrown in (.*):(\\d*)\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const fileLineAnchorErrorLog = regexFileLine.exec(anchorErrorLog);\n const regexAccountName = /^Program log: AnchorError caused by account: (.*)\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const accountNameAnchorErrorLog = regexAccountName.exec(anchorErrorLog);\n if (noInfoAnchorErrorLog) {\n const [errorCodeString, errorNumber, errorMessage] = noInfoAnchorErrorLog.slice(1, 4);\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, undefined, comparedValues);\n }\n else if (fileLineAnchorErrorLog) {\n const [file, line, errorCodeString, errorNumber, errorMessage] = fileLineAnchorErrorLog.slice(1, 6);\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n const fileLine = { file, line: parseInt(line) };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, fileLine, comparedValues);\n }\n else if (accountNameAnchorErrorLog) {\n const [accountName, errorCodeString, errorNumber, errorMessage] = accountNameAnchorErrorLog.slice(1, 5);\n const origin = accountName;\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, origin, comparedValues);\n }\n else {\n return null;\n }\n }\n get program() {\n return this._programErrorStack.stack[this._programErrorStack.stack.length - 1];\n }\n get programErrorStack() {\n return this._programErrorStack.stack;\n }\n toString() {\n return this.message;\n }\n}\n// An error from a user defined program.\nclass ProgramError extends Error {\n constructor(code, msg, logs) {\n super();\n this.code = code;\n this.msg = msg;\n this.logs = logs;\n if (logs) {\n this._programErrorStack = ProgramErrorStack.parse(logs);\n }\n }\n static parse(err, idlErrors) {\n const errString = err.toString();\n // TODO: don't rely on the error string. web3.js should preserve the error\n // code information instead of giving us an untyped string.\n let unparsedErrorCode;\n if (errString.includes(\"custom program error:\")) {\n let components = errString.split(\"custom program error: \");\n if (components.length !== 2) {\n return null;\n }\n else {\n unparsedErrorCode = components[1];\n }\n }\n else {\n const matches = errString.match(/\"Custom\":([0-9]+)}/g);\n if (!matches || matches.length > 1) {\n return null;\n }\n unparsedErrorCode = matches[0].match(/([0-9]+)/g)[0];\n }\n let errorCode;\n try {\n errorCode = parseInt(unparsedErrorCode);\n }\n catch (parseErr) {\n return null;\n }\n // Parse user error.\n let errorMsg = idlErrors.get(errorCode);\n if (errorMsg !== undefined) {\n return new ProgramError(errorCode, errorMsg, err.logs);\n }\n // Parse framework internal error.\n errorMsg = LangErrorMessage.get(errorCode);\n if (errorMsg !== undefined) {\n return new ProgramError(errorCode, errorMsg, err.logs);\n }\n // Unable to parse the error. Just return the untranslated error.\n return null;\n }\n get program() {\n var _a;\n return (_a = this._programErrorStack) === null || _a === void 0 ? void 0 : _a.stack[this._programErrorStack.stack.length - 1];\n }\n get programErrorStack() {\n var _a;\n return (_a = this._programErrorStack) === null || _a === void 0 ? void 0 : _a.stack;\n }\n toString() {\n return this.msg;\n }\n}\nfunction translateError(err, idlErrors) {\n if (isSet(\"debug-logs\")) {\n console.log(\"Translating error:\", err);\n }\n const anchorError = AnchorError.parse(err.logs);\n if (anchorError) {\n return anchorError;\n }\n const programError = ProgramError.parse(err, idlErrors);\n if (programError) {\n return programError;\n }\n if (err.logs) {\n const handler = {\n get: function (target, prop) {\n if (prop === \"programErrorStack\") {\n return target.programErrorStack.stack;\n }\n else if (prop === \"program\") {\n return target.programErrorStack.stack[err.programErrorStack.stack.length - 1];\n }\n else {\n // this is the normal way to return all other props\n // without modifying them.\n // @ts-expect-error\n return Reflect.get(...arguments);\n }\n },\n };\n err.programErrorStack = ProgramErrorStack.parse(err.logs);\n return new Proxy(err, handler);\n }\n return err;\n}\nconst LangErrorCode = {\n // Instructions.\n InstructionMissing: ANCHOR_ERROR__INSTRUCTION_MISSING,\n InstructionFallbackNotFound: ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND,\n InstructionDidNotDeserialize: ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE,\n InstructionDidNotSerialize: ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE,\n // IDL instructions.\n IdlInstructionStub: ANCHOR_ERROR__IDL_INSTRUCTION_STUB,\n IdlInstructionInvalidProgram: ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM,\n IdlAccountNotEmpty: ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY,\n // Event instructions.\n EventInstructionStub: ANCHOR_ERROR__EVENT_INSTRUCTION_STUB,\n // Constraints.\n ConstraintMut: ANCHOR_ERROR__CONSTRAINT_MUT,\n ConstraintHasOne: ANCHOR_ERROR__CONSTRAINT_HAS_ONE,\n ConstraintSigner: ANCHOR_ERROR__CONSTRAINT_SIGNER,\n ConstraintRaw: ANCHOR_ERROR__CONSTRAINT_RAW,\n ConstraintOwner: ANCHOR_ERROR__CONSTRAINT_OWNER,\n ConstraintRentExempt: ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT,\n ConstraintSeeds: ANCHOR_ERROR__CONSTRAINT_SEEDS,\n ConstraintExecutable: ANCHOR_ERROR__CONSTRAINT_EXECUTABLE,\n ConstraintState: ANCHOR_ERROR__CONSTRAINT_STATE,\n ConstraintAssociated: ANCHOR_ERROR__CONSTRAINT_ASSOCIATED,\n ConstraintAssociatedInit: ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT,\n ConstraintClose: ANCHOR_ERROR__CONSTRAINT_CLOSE,\n ConstraintAddress: ANCHOR_ERROR__CONSTRAINT_ADDRESS,\n ConstraintZero: ANCHOR_ERROR__CONSTRAINT_ZERO,\n ConstraintTokenMint: ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT,\n ConstraintTokenOwner: ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER,\n ConstraintMintMintAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY,\n ConstraintMintFreezeAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY,\n ConstraintMintDecimals: ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS,\n ConstraintSpace: ANCHOR_ERROR__CONSTRAINT_SPACE,\n ConstraintAccountIsNone: ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE,\n ConstraintTokenTokenProgram: ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM,\n ConstraintMintTokenProgram: ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM,\n ConstraintAssociatedTokenTokenProgram: ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM,\n ConstraintMintGroupPointerExtension: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION,\n ConstraintMintGroupPointerExtensionAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY,\n ConstraintMintGroupPointerExtensionGroupAddress: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS,\n ConstraintMintGroupMemberPointerExtension: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION,\n ConstraintMintGroupMemberPointerExtensionAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY,\n ConstraintMintGroupMemberPointerExtensionMemberAddress: ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS,\n ConstraintMintMetadataPointerExtension: ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION,\n ConstraintMintMetadataPointerExtensionAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY,\n ConstraintMintMetadataPointerExtensionMetadataAddress: ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS,\n ConstraintMintCloseAuthorityExtension: ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION,\n ConstraintMintCloseAuthorityExtensionAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY,\n ConstraintMintPermanentDelegateExtension: ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION,\n ConstraintMintPermanentDelegateExtensionDelegate: ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE,\n ConstraintMintTransferHookExtension: ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION,\n ConstraintMintTransferHookExtensionAuthority: ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY,\n ConstraintMintTransferHookExtensionProgramId: ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID,\n // Require.\n RequireViolated: ANCHOR_ERROR__REQUIRE_VIOLATED,\n RequireEqViolated: ANCHOR_ERROR__REQUIRE_EQ_VIOLATED,\n RequireKeysEqViolated: ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED,\n RequireNeqViolated: ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED,\n RequireKeysNeqViolated: ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED,\n RequireGtViolated: ANCHOR_ERROR__REQUIRE_GT_VIOLATED,\n RequireGteViolated: ANCHOR_ERROR__REQUIRE_GTE_VIOLATED,\n // Accounts.\n AccountDiscriminatorAlreadySet: ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET,\n AccountDiscriminatorNotFound: ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND,\n AccountDiscriminatorMismatch: ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH,\n AccountDidNotDeserialize: ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE,\n AccountDidNotSerialize: ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE,\n AccountNotEnoughKeys: ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS,\n AccountNotMutable: ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE,\n AccountOwnedByWrongProgram: ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM,\n InvalidProgramId: ANCHOR_ERROR__INVALID_PROGRAM_ID,\n InvalidProgramExecutable: ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE,\n AccountNotSigner: ANCHOR_ERROR__ACCOUNT_NOT_SIGNER,\n AccountNotSystemOwned: ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED,\n AccountNotInitialized: ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED,\n AccountNotProgramData: ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA,\n AccountNotAssociatedTokenAccount: ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT,\n AccountSysvarMismatch: ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH,\n AccountReallocExceedsLimit: ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT,\n AccountDuplicateReallocs: ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS,\n // Miscellaneous\n DeclaredProgramIdMismatch: ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH,\n TryingToInitPayerAsProgramAccount: ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT,\n InvalidNumericConversion: ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION,\n // Used for APIs that shouldn't be used anymore.\n Deprecated: ANCHOR_ERROR__DEPRECATED,\n};\nconst LangErrorMessage = new Map([\n // Instructions.\n [\n LangErrorCode.InstructionMissing,\n \"8 byte instruction identifier not provided\",\n ],\n [\n LangErrorCode.InstructionFallbackNotFound,\n \"Fallback functions are not supported\",\n ],\n [\n LangErrorCode.InstructionDidNotDeserialize,\n \"The program could not deserialize the given instruction\",\n ],\n [\n LangErrorCode.InstructionDidNotSerialize,\n \"The program could not serialize the given instruction\",\n ],\n // Idl instructions.\n [\n LangErrorCode.IdlInstructionStub,\n \"The program was compiled without idl instructions\",\n ],\n [\n LangErrorCode.IdlInstructionInvalidProgram,\n \"The transaction was given an invalid program for the IDL instruction\",\n ],\n [\n LangErrorCode.IdlAccountNotEmpty,\n \"IDL account must be empty in order to resize, try closing first\",\n ],\n // Event instructions.\n [\n LangErrorCode.EventInstructionStub,\n \"The program was compiled without `event-cpi` feature\",\n ],\n // Constraints.\n [LangErrorCode.ConstraintMut, \"A mut constraint was violated\"],\n [LangErrorCode.ConstraintHasOne, \"A has one constraint was violated\"],\n [LangErrorCode.ConstraintSigner, \"A signer constraint was violated\"],\n [LangErrorCode.ConstraintRaw, \"A raw constraint was violated\"],\n [LangErrorCode.ConstraintOwner, \"An owner constraint was violated\"],\n [\n LangErrorCode.ConstraintRentExempt,\n \"A rent exemption constraint was violated\",\n ],\n [LangErrorCode.ConstraintSeeds, \"A seeds constraint was violated\"],\n [LangErrorCode.ConstraintExecutable, \"An executable constraint was violated\"],\n [\n LangErrorCode.ConstraintState,\n \"Deprecated Error, feel free to replace with something else\",\n ],\n [LangErrorCode.ConstraintAssociated, \"An associated constraint was violated\"],\n [\n LangErrorCode.ConstraintAssociatedInit,\n \"An associated init constraint was violated\",\n ],\n [LangErrorCode.ConstraintClose, \"A close constraint was violated\"],\n [LangErrorCode.ConstraintAddress, \"An address constraint was violated\"],\n [LangErrorCode.ConstraintZero, \"Expected zero account discriminant\"],\n [LangErrorCode.ConstraintTokenMint, \"A token mint constraint was violated\"],\n [LangErrorCode.ConstraintTokenOwner, \"A token owner constraint was violated\"],\n [\n LangErrorCode.ConstraintMintMintAuthority,\n \"A mint mint authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintFreezeAuthority,\n \"A mint freeze authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintDecimals,\n \"A mint decimals constraint was violated\",\n ],\n [LangErrorCode.ConstraintSpace, \"A space constraint was violated\"],\n [\n LangErrorCode.ConstraintAccountIsNone,\n \"A required account for the constraint is None\",\n ],\n [\n LangErrorCode.ConstraintTokenTokenProgram,\n \"A token account token program constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintTokenProgram,\n \"A mint token program constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintAssociatedTokenTokenProgram,\n \"An associated token account token program constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupPointerExtension,\n \"A group pointer extension constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupPointerExtensionAuthority,\n \"A group pointer extension authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupPointerExtensionGroupAddress,\n \"A group pointer extension group address constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupMemberPointerExtension,\n \"A group member pointer extension constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupMemberPointerExtensionAuthority,\n \"A group member pointer extension authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintGroupMemberPointerExtensionMemberAddress,\n \"A group member pointer extension group address constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintMetadataPointerExtension,\n \"A metadata pointer extension constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintMetadataPointerExtensionAuthority,\n \"A metadata pointer extension authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintMetadataPointerExtensionMetadataAddress,\n \"A metadata pointer extension metadata address constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintCloseAuthorityExtension,\n \"A close authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintCloseAuthorityExtensionAuthority,\n \"A close authority extension authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintPermanentDelegateExtension,\n \"A permanent delegate extension constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintPermanentDelegateExtensionDelegate,\n \"A permanent delegate extension delegate constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintTransferHookExtension,\n \"A transfer hook extension constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintTransferHookExtensionAuthority,\n \"A transfer hook extension authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintTransferHookExtensionProgramId,\n \"A transfer hook extension transfer hook program id constraint was violated\",\n ],\n // Require.\n [LangErrorCode.RequireViolated, \"A require expression was violated\"],\n [LangErrorCode.RequireEqViolated, \"A require_eq expression was violated\"],\n [\n LangErrorCode.RequireKeysEqViolated,\n \"A require_keys_eq expression was violated\",\n ],\n [LangErrorCode.RequireNeqViolated, \"A require_neq expression was violated\"],\n [\n LangErrorCode.RequireKeysNeqViolated,\n \"A require_keys_neq expression was violated\",\n ],\n [LangErrorCode.RequireGtViolated, \"A require_gt expression was violated\"],\n [LangErrorCode.RequireGteViolated, \"A require_gte expression was violated\"],\n // Accounts.\n [\n LangErrorCode.AccountDiscriminatorAlreadySet,\n \"The account discriminator was already set on this account\",\n ],\n [\n LangErrorCode.AccountDiscriminatorNotFound,\n \"No 8 byte discriminator was found on the account\",\n ],\n [\n LangErrorCode.AccountDiscriminatorMismatch,\n \"8 byte discriminator did not match what was expected\",\n ],\n [LangErrorCode.AccountDidNotDeserialize, \"Failed to deserialize the account\"],\n [LangErrorCode.AccountDidNotSerialize, \"Failed to serialize the account\"],\n [\n LangErrorCode.AccountNotEnoughKeys,\n \"Not enough account keys given to the instruction\",\n ],\n [LangErrorCode.AccountNotMutable, \"The given account is not mutable\"],\n [\n LangErrorCode.AccountOwnedByWrongProgram,\n \"The given account is owned by a different program than expected\",\n ],\n [LangErrorCode.InvalidProgramId, \"Program ID was not as expected\"],\n [LangErrorCode.InvalidProgramExecutable, \"Program account is not executable\"],\n [LangErrorCode.AccountNotSigner, \"The given account did not sign\"],\n [\n LangErrorCode.AccountNotSystemOwned,\n \"The given account is not owned by the system program\",\n ],\n [\n LangErrorCode.AccountNotInitialized,\n \"The program expected this account to be already initialized\",\n ],\n [\n LangErrorCode.AccountNotProgramData,\n \"The given account is not a program data account\",\n ],\n [\n LangErrorCode.AccountNotAssociatedTokenAccount,\n \"The given account is not the associated token account\",\n ],\n [\n LangErrorCode.AccountSysvarMismatch,\n \"The given public key does not match the required sysvar\",\n ],\n [\n LangErrorCode.AccountReallocExceedsLimit,\n \"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit\",\n ],\n [\n LangErrorCode.AccountDuplicateReallocs,\n \"The account was duplicated for more than one reallocation\",\n ],\n // Miscellaneous\n [\n LangErrorCode.DeclaredProgramIdMismatch,\n \"The declared program id does not match the actual program id\",\n ],\n [\n LangErrorCode.TryingToInitPayerAsProgramAccount,\n \"You cannot/should not initialize the payer account as a program account\",\n ],\n [\n LangErrorCode.InvalidNumericConversion,\n \"The program could not perform the numeric conversion, out of range integral type conversion attempted\",\n ],\n // Deprecated\n [\n LangErrorCode.Deprecated,\n \"The API being used is deprecated and should no longer be used\",\n ],\n]);\n\nclass IdlCoder {\n static fieldLayout(field, types = [], genericArgs) {\n const fieldName = field.name;\n switch (field.type) {\n case \"bool\": {\n return borsh.bool(fieldName);\n }\n case \"u8\": {\n return borsh.u8(fieldName);\n }\n case \"i8\": {\n return borsh.i8(fieldName);\n }\n case \"u16\": {\n return borsh.u16(fieldName);\n }\n case \"i16\": {\n return borsh.i16(fieldName);\n }\n case \"u32\": {\n return borsh.u32(fieldName);\n }\n case \"i32\": {\n return borsh.i32(fieldName);\n }\n case \"f32\": {\n return borsh.f32(fieldName);\n }\n case \"u64\": {\n return borsh.u64(fieldName);\n }\n case \"i64\": {\n return borsh.i64(fieldName);\n }\n case \"f64\": {\n return borsh.f64(fieldName);\n }\n case \"u128\": {\n return borsh.u128(fieldName);\n }\n case \"i128\": {\n return borsh.i128(fieldName);\n }\n case \"u256\": {\n return borsh.u256(fieldName);\n }\n case \"i256\": {\n return borsh.i256(fieldName);\n }\n case \"bytes\": {\n return borsh.vecU8(fieldName);\n }\n case \"string\": {\n return borsh.str(fieldName);\n }\n case \"pubkey\": {\n return borsh.publicKey(fieldName);\n }\n default: {\n if (\"option\" in field.type) {\n return borsh.option(IdlCoder.fieldLayout({ type: field.type.option }, types, genericArgs), fieldName);\n }\n if (\"vec\" in field.type) {\n return borsh.vec(IdlCoder.fieldLayout({ type: field.type.vec }, types, genericArgs), fieldName);\n }\n if (\"array\" in field.type) {\n let [type, len] = field.type.array;\n len = IdlCoder.resolveArrayLen(len, genericArgs);\n return borsh.array(IdlCoder.fieldLayout({ type }, types, genericArgs), len, fieldName);\n }\n if (\"defined\" in field.type) {\n if (!types) {\n throw new IdlError(\"User defined types not provided\");\n }\n const definedName = field.type.defined.name;\n const typeDef = types.find((t) => t.name === definedName);\n if (!typeDef) {\n throw new IdlError(`Type not found: ${field.name}`);\n }\n return IdlCoder.typeDefLayout({\n typeDef,\n types,\n genericArgs: genericArgs !== null && genericArgs !== void 0 ? genericArgs : field.type.defined.generics,\n name: fieldName,\n });\n }\n if (\"generic\" in field.type) {\n const genericArg = genericArgs === null || genericArgs === void 0 ? void 0 : genericArgs.at(0);\n if ((genericArg === null || genericArg === void 0 ? void 0 : genericArg.kind) !== \"type\") {\n throw new IdlError(`Invalid generic field: ${field.name}`);\n }\n return IdlCoder.fieldLayout({ ...field, type: genericArg.type }, types);\n }\n throw new IdlError(`Not yet implemented: ${JSON.stringify(field.type)}`);\n }\n }\n }\n /**\n * Get the type layout of the given defined type(struct or enum).\n */\n static typeDefLayout({ typeDef, types, name, genericArgs, }) {\n switch (typeDef.type.kind) {\n case \"struct\": {\n const fieldLayouts = handleDefinedFields(typeDef.type.fields, () => [], (fields) => fields.map((f) => {\n const genArgs = genericArgs\n ? IdlCoder.resolveGenericArgs({\n type: f.type,\n typeDef,\n genericArgs,\n })\n : genericArgs;\n return IdlCoder.fieldLayout(f, types, genArgs);\n }), (fields) => fields.map((f, i) => {\n const genArgs = genericArgs\n ? IdlCoder.resolveGenericArgs({\n type: f,\n typeDef,\n genericArgs,\n })\n : genericArgs;\n return IdlCoder.fieldLayout({ name: i.toString(), type: f }, types, genArgs);\n }));\n return borsh.struct(fieldLayouts, name);\n }\n case \"enum\": {\n const variants = typeDef.type.variants.map((variant) => {\n const fieldLayouts = handleDefinedFields(variant.fields, () => [], (fields) => fields.map((f) => {\n const genArgs = genericArgs\n ? IdlCoder.resolveGenericArgs({\n type: f.type,\n typeDef,\n genericArgs,\n })\n : genericArgs;\n return IdlCoder.fieldLayout(f, types, genArgs);\n }), (fields) => fields.map((f, i) => {\n const genArgs = genericArgs\n ? IdlCoder.resolveGenericArgs({\n type: f,\n typeDef,\n genericArgs,\n })\n : genericArgs;\n return IdlCoder.fieldLayout({ name: i.toString(), type: f }, types, genArgs);\n }));\n return borsh.struct(fieldLayouts, variant.name);\n });\n if (name !== undefined) {\n // Buffer-layout lib requires the name to be null (on construction)\n // when used as a field.\n return borsh.rustEnum(variants).replicate(name);\n }\n return borsh.rustEnum(variants, name);\n }\n case \"type\": {\n return IdlCoder.fieldLayout({ type: typeDef.type.alias, name }, types);\n }\n }\n }\n /**\n * Get the type of the size in bytes. Returns `1` for variable length types.\n */\n static typeSize(ty, idl, genericArgs) {\n var _a;\n switch (ty) {\n case \"bool\":\n return 1;\n case \"u8\":\n return 1;\n case \"i8\":\n return 1;\n case \"i16\":\n return 2;\n case \"u16\":\n return 2;\n case \"u32\":\n return 4;\n case \"i32\":\n return 4;\n case \"f32\":\n return 4;\n case \"u64\":\n return 8;\n case \"i64\":\n return 8;\n case \"f64\":\n return 8;\n case \"u128\":\n return 16;\n case \"i128\":\n return 16;\n case \"u256\":\n return 32;\n case \"i256\":\n return 32;\n case \"bytes\":\n return 1;\n case \"string\":\n return 1;\n case \"pubkey\":\n return 32;\n default:\n if (\"option\" in ty) {\n return 1 + IdlCoder.typeSize(ty.option, idl, genericArgs);\n }\n if (\"coption\" in ty) {\n return 4 + IdlCoder.typeSize(ty.coption, idl, genericArgs);\n }\n if (\"vec\" in ty) {\n return 1;\n }\n if (\"array\" in ty) {\n let [type, len] = ty.array;\n len = IdlCoder.resolveArrayLen(len, genericArgs);\n return IdlCoder.typeSize(type, idl, genericArgs) * len;\n }\n if (\"defined\" in ty) {\n const typeDef = (_a = idl.types) === null || _a === void 0 ? void 0 : _a.find((t) => t.name === ty.defined.name);\n if (!typeDef) {\n throw new IdlError(`Type not found: ${JSON.stringify(ty)}`);\n }\n const typeSize = (type) => {\n const genArgs = genericArgs !== null && genericArgs !== void 0 ? genericArgs : ty.defined.generics;\n const args = genArgs\n ? IdlCoder.resolveGenericArgs({\n type,\n typeDef,\n genericArgs: genArgs,\n })\n : genArgs;\n return IdlCoder.typeSize(type, idl, args);\n };\n switch (typeDef.type.kind) {\n case \"struct\": {\n return handleDefinedFields(typeDef.type.fields, () => [0], (fields) => fields.map((f) => typeSize(f.type)), (fields) => fields.map((f) => typeSize(f))).reduce((acc, size) => acc + size, 0);\n }\n case \"enum\": {\n const variantSizes = typeDef.type.variants.map((variant) => {\n return handleDefinedFields(variant.fields, () => [0], (fields) => fields.map((f) => typeSize(f.type)), (fields) => fields.map((f) => typeSize(f))).reduce((acc, size) => acc + size, 0);\n });\n return Math.max(...variantSizes) + 1;\n }\n case \"type\": {\n return IdlCoder.typeSize(typeDef.type.alias, idl, genericArgs);\n }\n }\n }\n if (\"generic\" in ty) {\n const genericArg = genericArgs === null || genericArgs === void 0 ? void 0 : genericArgs.at(0);\n if ((genericArg === null || genericArg === void 0 ? void 0 : genericArg.kind) !== \"type\") {\n throw new IdlError(`Invalid generic: ${ty.generic}`);\n }\n return IdlCoder.typeSize(genericArg.type, idl, genericArgs);\n }\n throw new Error(`Invalid type ${JSON.stringify(ty)}`);\n }\n }\n /**\n * Resolve the generic array length or return the constant-sized array length.\n */\n static resolveArrayLen(len, genericArgs) {\n if (typeof len === \"number\")\n return len;\n if (genericArgs) {\n const genericLen = genericArgs.find((g) => g.kind === \"const\");\n if ((genericLen === null || genericLen === void 0 ? void 0 : genericLen.kind) === \"const\") {\n len = +genericLen.value;\n }\n }\n if (typeof len !== \"number\") {\n throw new IdlError(\"Generic array length did not resolve\");\n }\n return len;\n }\n /**\n * Recursively resolve generic arguments i.e. replace all generics with the\n * actual type that they hold based on the initial `genericArgs` given.\n */\n static resolveGenericArgs({ type, typeDef, genericArgs, isDefined, }) {\n if (typeof type !== \"object\")\n return null;\n for (const index in typeDef.generics) {\n const defGeneric = typeDef.generics[index];\n if (\"generic\" in type && defGeneric.name === type.generic) {\n return [genericArgs[index]];\n }\n if (\"option\" in type) {\n const args = IdlCoder.resolveGenericArgs({\n type: type.option,\n typeDef,\n genericArgs,\n isDefined,\n });\n if (!args || !isDefined)\n return args;\n if (args[0].kind === \"type\") {\n return [\n {\n kind: \"type\",\n type: { option: args[0].type },\n },\n ];\n }\n }\n if (\"vec\" in type) {\n const args = IdlCoder.resolveGenericArgs({\n type: type.vec,\n typeDef,\n genericArgs,\n isDefined,\n });\n if (!args || !isDefined)\n return args;\n if (args[0].kind === \"type\") {\n return [\n {\n kind: \"type\",\n type: { vec: args[0].type },\n },\n ];\n }\n }\n if (\"array\" in type) {\n const [elTy, len] = type.array;\n const isGenericLen = typeof len === \"object\";\n const args = IdlCoder.resolveGenericArgs({\n type: elTy,\n typeDef,\n genericArgs,\n isDefined,\n });\n if (args) {\n // Has generic type, also check for generic length\n for (const i in typeDef.generics.slice(+index)) {\n const curIndex = +index + +i;\n if (isGenericLen &&\n typeDef.generics[curIndex].name === len.generic) {\n args.push(genericArgs[curIndex]);\n }\n }\n if (!isDefined)\n return args;\n if (args[0].kind === \"type\" && args[1].kind === \"const\") {\n return [\n {\n kind: \"type\",\n type: { array: [args[0].type, +args[1].value] },\n },\n ];\n }\n }\n // Only generic len\n if (isGenericLen && defGeneric.name === len.generic) {\n const arg = genericArgs[index];\n if (!isDefined)\n return [arg];\n return [\n {\n kind: \"type\",\n type: { array: [elTy, +arg.value] },\n },\n ];\n }\n // Non-generic\n return null;\n }\n if (\"defined\" in type) {\n if (!type.defined.generics)\n return null;\n return type.defined.generics\n .flatMap((g) => {\n switch (g.kind) {\n case \"type\":\n return IdlCoder.resolveGenericArgs({\n type: g.type,\n typeDef,\n genericArgs,\n isDefined: true,\n });\n case \"const\":\n return [g];\n }\n })\n .filter((g) => g !== null);\n }\n }\n return null;\n }\n}\n\n/**\n * Encodes and decodes program instructions.\n */\nclass BorshInstructionCoder {\n constructor(idl) {\n this.idl = idl;\n const ixLayouts = idl.instructions.map((ix) => {\n const name = ix.name;\n const fieldLayouts = ix.args.map((arg) => IdlCoder.fieldLayout(arg, idl.types));\n const layout = borsh.struct(fieldLayouts, name);\n return [name, { discriminator: ix.discriminator, layout }];\n });\n this.ixLayouts = new Map(ixLayouts);\n const sighashLayouts = ixLayouts.map(([name, { discriminator, layout }]) => {\n return [bs58$1.encode(discriminator), { name, layout }];\n });\n this.sighashLayouts = new Map(sighashLayouts);\n }\n /**\n * Encodes a program instruction.\n */\n encode(ixName, ix) {\n const buffer = Buffer$1.alloc(1000); // TODO: use a tighter buffer.\n const encoder = this.ixLayouts.get(ixName);\n if (!encoder) {\n throw new Error(`Unknown method: ${ixName}`);\n }\n const len = encoder.layout.encode(ix, buffer);\n const data = buffer.slice(0, len);\n return Buffer$1.concat([Buffer$1.from(encoder.discriminator), data]);\n }\n /**\n * Decodes a program instruction.\n */\n decode(ix, encoding = \"hex\") {\n if (typeof ix === \"string\") {\n ix = encoding === \"hex\" ? Buffer$1.from(ix, \"hex\") : bs58$1.decode(ix);\n }\n const disc = ix.slice(0, DISCRIMINATOR_SIZE);\n const data = ix.slice(DISCRIMINATOR_SIZE);\n const decoder = this.sighashLayouts.get(bs58$1.encode(disc));\n if (!decoder) {\n return null;\n }\n return {\n name: decoder.name,\n data: decoder.layout.decode(data),\n };\n }\n /**\n * Returns a formatted table of all the fields in the given instruction data.\n */\n format(ix, accountMetas) {\n return InstructionFormatter.format(ix, accountMetas, this.idl);\n }\n}\nclass InstructionFormatter {\n static format(ix, accountMetas, idl) {\n const idlIx = idl.instructions.find((i) => ix.name === i.name);\n if (!idlIx) {\n console.error(\"Invalid instruction given\");\n return null;\n }\n const args = idlIx.args.map((idlField) => {\n return {\n name: idlField.name,\n type: InstructionFormatter.formatIdlType(idlField.type),\n data: InstructionFormatter.formatIdlData(idlField, ix.data[idlField.name], idl.types),\n };\n });\n const flatIdlAccounts = InstructionFormatter.flattenIdlAccounts(idlIx.accounts);\n const accounts = accountMetas.map((meta, idx) => {\n if (idx < flatIdlAccounts.length) {\n return {\n name: flatIdlAccounts[idx].name,\n ...meta,\n };\n }\n // \"Remaining accounts\" are unnamed in Anchor.\n else {\n return {\n name: undefined,\n ...meta,\n };\n }\n });\n return {\n args,\n accounts,\n };\n }\n static formatIdlType(idlType) {\n if (typeof idlType === \"string\") {\n return idlType;\n }\n if (\"option\" in idlType) {\n return `Option<${this.formatIdlType(idlType.option)}>`;\n }\n if (\"coption\" in idlType) {\n return `COption<${this.formatIdlType(idlType.coption)}>`;\n }\n if (\"vec\" in idlType) {\n return `Vec<${this.formatIdlType(idlType.vec)}>`;\n }\n if (\"array\" in idlType) {\n return `Array<${idlType.array[0]}; ${idlType.array[1]}>`;\n }\n if (\"defined\" in idlType) {\n const name = idlType.defined.name;\n if (idlType.defined.generics) {\n const generics = idlType.defined.generics\n .map((g) => {\n switch (g.kind) {\n case \"type\":\n return InstructionFormatter.formatIdlType(g.type);\n case \"const\":\n return g.value;\n }\n })\n .join(\", \");\n return `${name}<${generics}>`;\n }\n return name;\n }\n throw new Error(`Unknown IDL type: ${idlType}`);\n }\n static formatIdlData(idlField, data, types) {\n if (typeof idlField.type === \"string\") {\n return data.toString();\n }\n if (\"vec\" in idlField.type) {\n return (\"[\" +\n data\n .map((d) => this.formatIdlData({ name: \"\", type: idlField.type.vec }, d, types))\n .join(\", \") +\n \"]\");\n }\n if (\"option\" in idlField.type) {\n return data === null\n ? \"null\"\n : this.formatIdlData({ name: \"\", type: idlField.type.option }, data, types);\n }\n if (\"defined\" in idlField.type) {\n if (!types) {\n throw new Error(\"User defined types not provided\");\n }\n const definedName = idlField.type.defined.name;\n const typeDef = types.find((t) => t.name === definedName);\n if (!typeDef) {\n throw new Error(`Type not found: ${definedName}`);\n }\n return InstructionFormatter.formatIdlDataDefined(typeDef, data, types);\n }\n return \"unknown\";\n }\n static formatIdlDataDefined(typeDef, data, types) {\n switch (typeDef.type.kind) {\n case \"struct\": {\n return (\"{ \" +\n handleDefinedFields(typeDef.type.fields, () => \"\", (fields) => {\n return Object.entries(data)\n .map(([key, val]) => {\n const field = fields.find((f) => f.name === key);\n if (!field) {\n throw new Error(`Field not found: ${key}`);\n }\n return (key +\n \": \" +\n InstructionFormatter.formatIdlData(field, val, types));\n })\n .join(\", \");\n }, (fields) => {\n return Object.entries(data)\n .map(([key, val]) => {\n return (key +\n \": \" +\n InstructionFormatter.formatIdlData({ name: \"\", type: fields[key] }, val, types));\n })\n .join(\", \");\n }) +\n \" }\");\n }\n case \"enum\": {\n const variantName = Object.keys(data)[0];\n const variant = typeDef.type.variants.find((v) => v.name === variantName);\n if (!variant) {\n throw new Error(`Unable to find variant: ${variantName}`);\n }\n const enumValue = data[variantName];\n return handleDefinedFields(variant.fields, () => variantName, (fields) => {\n const namedFields = Object.keys(enumValue)\n .map((f) => {\n const fieldData = enumValue[f];\n const idlField = fields.find((v) => v.name === f);\n if (!idlField) {\n throw new Error(`Field not found: ${f}`);\n }\n return (f +\n \": \" +\n InstructionFormatter.formatIdlData(idlField, fieldData, types));\n })\n .join(\", \");\n return `${variantName} { ${namedFields} }`;\n }, (fields) => {\n const tupleFields = Object.entries(enumValue)\n .map(([key, val]) => {\n return (key +\n \": \" +\n InstructionFormatter.formatIdlData({ name: \"\", type: fields[key] }, val, types));\n })\n .join(\", \");\n return `${variantName} { ${tupleFields} }`;\n });\n }\n case \"type\": {\n return InstructionFormatter.formatIdlType(typeDef.type.alias);\n }\n }\n }\n static flattenIdlAccounts(accounts, prefix) {\n return accounts\n .map((account) => {\n const accName = sentenceCase(account.name);\n if (account.hasOwnProperty(\"accounts\")) {\n const newPrefix = prefix ? `${prefix} > ${accName}` : accName;\n return InstructionFormatter.flattenIdlAccounts(account.accounts, newPrefix);\n }\n else {\n return {\n ...account,\n name: prefix ? `${prefix} > ${accName}` : accName,\n };\n }\n })\n .flat();\n }\n}\nfunction sentenceCase(field) {\n const result = field.replace(/([A-Z])/g, \" $1\");\n return result.charAt(0).toUpperCase() + result.slice(1);\n}\n\n/**\n * Number of bytes in anchor discriminators\n */\nconst DISCRIMINATOR_SIZE = 8;\n\n/**\n * Encodes and decodes account objects.\n */\nclass BorshAccountsCoder {\n constructor(idl) {\n this.idl = idl;\n if (!idl.accounts) {\n this.accountLayouts = new Map();\n return;\n }\n const types = idl.types;\n if (!types) {\n throw new Error(\"Accounts require `idl.types`\");\n }\n const layouts = idl.accounts.map((acc) => {\n const typeDef = types.find((ty) => ty.name === acc.name);\n if (!typeDef) {\n throw new Error(`Account not found: ${acc.name}`);\n }\n return [acc.name, IdlCoder.typeDefLayout({ typeDef, types })];\n });\n this.accountLayouts = new Map(layouts);\n }\n async encode(accountName, account) {\n const buffer = Buffer$1.alloc(1000); // TODO: use a tighter buffer.\n const layout = this.accountLayouts.get(accountName);\n if (!layout) {\n throw new Error(`Unknown account: ${accountName}`);\n }\n const len = layout.encode(account, buffer);\n const accountData = buffer.slice(0, len);\n const discriminator = this.accountDiscriminator(accountName);\n return Buffer$1.concat([discriminator, accountData]);\n }\n decode(accountName, data) {\n // Assert the account discriminator is correct.\n const discriminator = this.accountDiscriminator(accountName);\n if (discriminator.compare(data.slice(0, DISCRIMINATOR_SIZE))) {\n throw new Error(\"Invalid account discriminator\");\n }\n return this.decodeUnchecked(accountName, data);\n }\n decodeAny(data) {\n const discriminator = data.slice(0, DISCRIMINATOR_SIZE);\n const accountName = Array.from(this.accountLayouts.keys()).find((key) => this.accountDiscriminator(key).equals(discriminator));\n if (!accountName) {\n throw new Error(\"Account not found\");\n }\n return this.decodeUnchecked(accountName, data);\n }\n decodeUnchecked(accountName, acc) {\n // Chop off the discriminator before decoding.\n const data = acc.subarray(DISCRIMINATOR_SIZE);\n const layout = this.accountLayouts.get(accountName);\n if (!layout) {\n throw new Error(`Unknown account: ${accountName}`);\n }\n return layout.decode(data);\n }\n memcmp(accountName, appendData) {\n const discriminator = this.accountDiscriminator(accountName);\n return {\n offset: 0,\n bytes: bs58$1.encode(appendData ? Buffer$1.concat([discriminator, appendData]) : discriminator),\n };\n }\n size(accountName) {\n return (DISCRIMINATOR_SIZE +\n IdlCoder.typeSize({ defined: { name: accountName } }, this.idl));\n }\n /**\n * Calculates and returns a unique 8 byte discriminator prepended to all anchor accounts.\n *\n * @param name The name of the account to calculate the discriminator.\n */\n accountDiscriminator(name) {\n var _a;\n const account = (_a = this.idl.accounts) === null || _a === void 0 ? void 0 : _a.find((acc) => acc.name === name);\n if (!account) {\n throw new Error(`Account not found: ${name}`);\n }\n return Buffer$1.from(account.discriminator);\n }\n}\n\nclass BorshEventCoder {\n constructor(idl) {\n var _a;\n if (!idl.events) {\n this.layouts = new Map();\n return;\n }\n const types = idl.types;\n if (!types) {\n throw new Error(\"Events require `idl.types`\");\n }\n const layouts = idl.events.map((ev) => {\n const typeDef = types.find((ty) => ty.name === ev.name);\n if (!typeDef) {\n throw new Error(`Event not found: ${ev.name}`);\n }\n return [ev.name, IdlCoder.typeDefLayout({ typeDef, types })];\n });\n this.layouts = new Map(layouts);\n this.discriminators = new Map(((_a = idl.events) !== null && _a !== void 0 ? _a : []).map((ev) => [\n encode(Buffer$1.from(ev.discriminator)),\n ev.name,\n ]));\n }\n decode(log) {\n let logArr;\n // This will throw if log length is not a multiple of 4.\n try {\n logArr = decode(log);\n }\n catch (e) {\n return null;\n }\n const disc = encode(logArr.slice(0, 8));\n // Only deserialize if the discriminator implies a proper event.\n const eventName = this.discriminators.get(disc);\n if (!eventName) {\n return null;\n }\n const layout = this.layouts.get(eventName);\n if (!layout) {\n throw new Error(`Unknown event: ${eventName}`);\n }\n const data = layout.decode(logArr.slice(8));\n return { data, name: eventName };\n }\n}\n\n/**\n * Encodes and decodes user-defined types.\n */\nclass BorshTypesCoder {\n constructor(idl) {\n const types = idl.types;\n if (!types) {\n this.typeLayouts = new Map();\n return;\n }\n const layouts = types\n .filter((ty) => !ty.generics)\n .map((ty) => [\n ty.name,\n IdlCoder.typeDefLayout({ typeDef: ty, types }),\n ]);\n this.typeLayouts = new Map(layouts);\n }\n encode(name, type) {\n const buffer = Buffer$1.alloc(1000); // TODO: use a tighter buffer.\n const layout = this.typeLayouts.get(name);\n if (!layout) {\n throw new Error(`Unknown type: ${name}`);\n }\n const len = layout.encode(type, buffer);\n return buffer.slice(0, len);\n }\n decode(name, data) {\n const layout = this.typeLayouts.get(name);\n if (!layout) {\n throw new Error(`Unknown type: ${name}`);\n }\n return layout.decode(data);\n }\n}\n\n/**\n * BorshCoder is the default Coder for Anchor programs implementing the\n * borsh based serialization interface.\n */\nclass BorshCoder {\n constructor(idl) {\n this.instruction = new BorshInstructionCoder(idl);\n this.accounts = new BorshAccountsCoder(idl);\n this.events = new BorshEventCoder(idl);\n this.types = new BorshTypesCoder(idl);\n }\n}\n\n/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n\n /**\n * Decode from a Buffer into an JavaScript value.\n *\n * @param {Buffer} b - the buffer from which encoded data is read.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {(Number|Array|Object)} - the value of the decoded data.\n *\n * @abstract\n */\n decode(b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Encode a JavaScript value into a Buffer.\n *\n * @param {(Number|Array|Object)} src - the value to be encoded into\n * the buffer. The type accepted depends on the (sub-)type of {@link\n * Layout}.\n *\n * @param {Buffer} b - the buffer into which encoded data will be\n * written.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {Number} - the number of bytes encoded, including the\n * space skipped for internal padding, but excluding data such as\n * {@link Sequence#count|lengths} when stored {@link\n * ExternalLayout|externally}. This is the adjustment to `offset`\n * producing the offset where data for the next layout would be\n * written.\n *\n * @abstract\n */\n encode(src, b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Buffer} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nvar Layout_2 = Layout;\n\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\n\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\n\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n\n if (undefined === offset) {\n offset = 0;\n } else if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n\n super(layout.span, property || layout.property);\n\n /** The subordinated layout. */\n this.layout = layout;\n\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Buffer\n * being accessed. */\n this.offset = offset;\n }\n\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.decode(b, offset + this.offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\n\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super( span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\nconst V2E32 = Math.pow(2, 32);\n\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return {hi32, lo32};\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n } else if (0 <= offset) {\n offset += fd.span;\n }\n }\n }\n}\n\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\n\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n\n super(property || layout.property || 'variant');\n\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\n\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n const upv = ((discr instanceof UInt)\n || (discr instanceof UIntBE));\n if (upv) {\n discr = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discr = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && upv) {\n span += discr.layout.span;\n }\n }\n super(span, property);\n\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discr;\n\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = upv;\n\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisified rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (src.hasOwnProperty(this.discriminator.property)) {\n if (this.defaultLayout\n && src.hasOwnProperty(this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || src.hasOwnProperty(vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (src.hasOwnProperty(vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n let clo = this.registry[discr];\n if (undefined === clo) {\n let contentOffset = 0;\n clo = this.defaultLayout;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[clo.property] = this.defaultLayout.decode(b, offset + contentOffset);\n } else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n return contentOffset + clo.encode(src[clo.property], b,\n offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Buffer)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Buffer}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset) {\n let variant = vb;\n if (Buffer.isBuffer(vb)) {\n if (undefined === offset) {\n offset = 0;\n }\n variant = this.discriminator.decode(vb, offset);\n }\n return this.registry[variant];\n }\n}\n\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n return contentOffset + this.layout.getSpan(b, offset + contentOffset);\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!src.hasOwnProperty(this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n }\n}\n/* eslint-enable no-extend-native */\n\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Buffer.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob$1 extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return b.slice(offset, offset + span);\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(Buffer.isBuffer(src)\n && (span === src.length))) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Buffer as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n b.write(src.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\n\n/** Factory for {@link OffsetLayout}. */\nvar offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nvar u8 = (property => new UInt(1, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nvar u32 = (property => new UInt(4, property));\n\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nvar nu64 = (property => new NearUInt64(property));\n\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nvar ns64 = (property => new NearInt64(property));\n\n/** Factory for {@link Structure} values. */\nvar struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n\n/** Factory for {@link Union} values. */\nvar union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n\n/** Factory for {@link Blob} values. */\nvar blob = ((length, property) => new Blob$1(length, property));\n\nclass SystemInstructionCoder {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n constructor(_) { }\n encode(ixName, ix) {\n switch (ixName) {\n case \"createAccount\": {\n return encodeCreateAccount(ix);\n }\n case \"assign\": {\n return encodeAssign(ix);\n }\n case \"transfer\": {\n return encodeTransfer(ix);\n }\n case \"createAccountWithSeed\": {\n return encodeCreateAccountWithSeed(ix);\n }\n case \"advanceNonceAccount\": {\n return encodeAdvanceNonceAccount(ix);\n }\n case \"withdrawNonceAccount\": {\n return encodeWithdrawNonceAccount(ix);\n }\n case \"initializeNonceAccount\": {\n return encodeInitializeNonceAccount(ix);\n }\n case \"authorizeNonceAccount\": {\n return encodeAuthorizeNonceAccount(ix);\n }\n case \"allocate\": {\n return encodeAllocate(ix);\n }\n case \"allocateWithSeed\": {\n return encodeAllocateWithSeed(ix);\n }\n case \"assignWithSeed\": {\n return encodeAssignWithSeed(ix);\n }\n case \"transferWithSeed\": {\n return encodeTransferWithSeed(ix);\n }\n default: {\n throw new Error(`Invalid instruction: ${ixName}`);\n }\n }\n }\n encodeState(_ixName, _ix) {\n throw new Error(\"System does not have state\");\n }\n}\nclass RustStringLayout extends Layout_2 {\n constructor(property) {\n super(-1, property);\n this.property = property;\n this.layout = struct([\n u32(\"length\"),\n u32(\"lengthPadding\"),\n blob(offset(u32(), -8), \"chars\"),\n ], this.property);\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.layout.span;\n }\n const data = {\n chars: Buffer.from(src, \"utf8\"),\n };\n return this.layout.encode(data, b, offset);\n }\n decode(b, offset = 0) {\n const data = this.layout.decode(b, offset);\n return data[\"chars\"].toString();\n }\n getSpan(b, offset = 0) {\n return (u32().span +\n u32().span +\n new (bn_js__WEBPACK_IMPORTED_MODULE_2___default())(new Uint8Array(b).slice(offset, offset + 4), 10, \"le\").toNumber());\n }\n}\nfunction rustStringLayout(property) {\n return new RustStringLayout(property);\n}\nfunction publicKey$2(property) {\n return blob(32, property);\n}\nfunction encodeCreateAccount({ lamports, space, owner }) {\n return encodeData({\n createAccount: { lamports, space, owner: owner.toBuffer() },\n });\n}\nfunction encodeAssign({ owner }) {\n return encodeData({\n assign: { owner: owner.toBuffer() },\n });\n}\nfunction encodeTransfer({ lamports }) {\n return encodeData({\n transfer: { lamports },\n });\n}\nfunction encodeCreateAccountWithSeed({ base, seed, lamports, space, owner, }) {\n return encodeData({\n createAccountWithSeed: {\n base: base.toBuffer(),\n seed,\n lamports,\n space,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(3).span + seed.length);\n}\nfunction encodeInitializeNonceAccount({ authorized }) {\n return encodeData({\n initializeNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeAdvanceNonceAccount({ authorized }) {\n return encodeData({\n advanceNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeWithdrawNonceAccount({ lamports }) {\n return encodeData({\n withdrawNonceAccount: { lamports },\n });\n}\nfunction encodeAuthorizeNonceAccount({ authorized }) {\n return encodeData({\n authorizeNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeAllocate({ space }) {\n return encodeData({\n allocate: { space },\n });\n}\nfunction encodeAllocateWithSeed({ base, seed, space, owner }) {\n return encodeData({\n allocateWithSeed: {\n base: base.toBuffer(),\n seed,\n space,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(9).span + seed.length);\n}\nfunction encodeAssignWithSeed({ base, seed, owner }) {\n return encodeData({\n assignWithSeed: {\n base: base.toBuffer(),\n seed,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(10).span + seed.length);\n}\nfunction encodeTransferWithSeed({ lamports, seed, owner }) {\n return encodeData({\n transferWithSeed: {\n lamports,\n seed,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(11).span + seed.length);\n}\nconst LAYOUT = union(u32(\"instruction\"));\nLAYOUT.addVariant(0, struct([\n ns64(\"lamports\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"createAccount\");\nLAYOUT.addVariant(1, struct([publicKey$2(\"owner\")]), \"assign\");\nLAYOUT.addVariant(2, struct([ns64(\"lamports\")]), \"transfer\");\nLAYOUT.addVariant(3, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n ns64(\"lamports\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"createAccountWithSeed\");\nLAYOUT.addVariant(4, struct([publicKey$2(\"authorized\")]), \"advanceNonceAccount\");\nLAYOUT.addVariant(5, struct([ns64(\"lamports\")]), \"withdrawNonceAccount\");\nLAYOUT.addVariant(6, struct([publicKey$2(\"authorized\")]), \"initializeNonceAccount\");\nLAYOUT.addVariant(7, struct([publicKey$2(\"authorized\")]), \"authorizeNonceAccount\");\nLAYOUT.addVariant(8, struct([ns64(\"space\")]), \"allocate\");\nLAYOUT.addVariant(9, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"allocateWithSeed\");\nLAYOUT.addVariant(10, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n publicKey$2(\"owner\"),\n]), \"assignWithSeed\");\nLAYOUT.addVariant(11, struct([\n ns64(\"lamports\"),\n rustStringLayout(\"seed\"),\n publicKey$2(\"owner\"),\n]), \"transferWithSeed\");\nfunction encodeData(instruction, maxSpan) {\n const b = Buffer.alloc(maxSpan !== null && maxSpan !== void 0 ? maxSpan : instructionMaxSpan);\n const span = LAYOUT.encode(instruction, b);\n if (maxSpan === undefined) {\n return b.slice(0, span);\n }\n return b;\n}\nconst instructionMaxSpan = Math.max(...Object.values(LAYOUT.registry).map((r) => r.span));\n\nclass SystemAccountsCoder {\n constructor(idl) {\n this.idl = idl;\n }\n async encode(accountName, account) {\n switch (accountName) {\n case \"nonce\": {\n const buffer = Buffer.alloc(NONCE_ACCOUNT_LENGTH);\n const len = NONCE_ACCOUNT_LAYOUT.encode(account, buffer);\n return buffer.slice(0, len);\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n decode(accountName, ix) {\n return this.decodeUnchecked(accountName, ix);\n }\n decodeUnchecked(accountName, ix) {\n switch (accountName) {\n case \"nonce\": {\n return decodeNonceAccount(ix);\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n // TODO: this won't use the appendData.\n memcmp(accountName, _appendData) {\n switch (accountName) {\n case \"nonce\": {\n return {\n dataSize: NONCE_ACCOUNT_LENGTH,\n };\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n size(accountName) {\n return IdlCoder.typeSize({ defined: { name: accountName } }, this.idl);\n }\n}\nfunction decodeNonceAccount(ix) {\n return NONCE_ACCOUNT_LAYOUT.decode(ix);\n}\nclass WrappedLayout$1 extends Layout_2 {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nfunction publicKey$1(property) {\n return new WrappedLayout$1(blob(32), (b) => new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(b), (key) => key.toBuffer(), property);\n}\nconst NONCE_ACCOUNT_LAYOUT = struct([\n u32(\"version\"),\n u32(\"state\"),\n publicKey$1(\"authorizedPubkey\"),\n publicKey$1(\"nonce\"),\n struct([nu64(\"lamportsPerSignature\")], \"feeCalculator\"),\n]);\n\nclass SystemEventsCoder {\n constructor(_idl) { }\n decode(_log) {\n throw new Error(\"System program does not have events\");\n }\n}\n\nclass SystemTypesCoder {\n constructor(_idl) { }\n encode(_name, _type) {\n throw new Error(\"System does not have user-defined types\");\n }\n decode(_name, _typeData) {\n throw new Error(\"System does not have user-defined types\");\n }\n}\n\n/**\n * Coder for the System program.\n */\nclass SystemCoder {\n constructor(idl) {\n this.instruction = new SystemInstructionCoder(idl);\n this.accounts = new SystemAccountsCoder(idl);\n this.events = new SystemEventsCoder(idl);\n this.types = new SystemTypesCoder(idl);\n }\n}\n\nfunction hash(data) {\n return new TextDecoder().decode((0,_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_8__/* .sha256 */ .J)(data));\n}\n\nvar sha256 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hash: hash\n});\n\n// Sync version of web3.PublicKey.createWithSeed.\nfunction createWithSeedSync(fromPublicKey, seed, programId) {\n const buffer = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([\n fromPublicKey.toBuffer(),\n buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(seed),\n programId.toBuffer(),\n ]);\n return new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey((0,_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_8__/* .sha256 */ .J)(buffer));\n}\n\nvar pubkey = /*#__PURE__*/Object.freeze({\n __proto__: null,\n createWithSeedSync: createWithSeedSync\n});\n\nconst TOKEN_PROGRAM_ID = new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\");\nconst ASSOCIATED_PROGRAM_ID = new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\");\nfunction associatedAddress({ mint, owner, }) {\n return _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.findProgramAddressSync([owner.toBuffer(), TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], ASSOCIATED_PROGRAM_ID)[0];\n}\n\nvar token = /*#__PURE__*/Object.freeze({\n __proto__: null,\n TOKEN_PROGRAM_ID: TOKEN_PROGRAM_ID,\n ASSOCIATED_PROGRAM_ID: ASSOCIATED_PROGRAM_ID,\n associatedAddress: associatedAddress\n});\n\nvar browserPonyfill = {exports: {}};\n\n(function (module, exports) {\nvar global = typeof self !== 'undefined' ? self : commonjsGlobal;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException;\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\n((function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n}))({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch; // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch; // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers;\nexports.Request = ctx.Request;\nexports.Response = ctx.Response;\nmodule.exports = exports;\n}(browserPonyfill, browserPonyfill.exports));\n\nvar fetch = /*@__PURE__*/getDefaultExportFromCjs(browserPonyfill.exports);\n\n/**\n * Returns a verified build from the anchor registry. null if no such\n * verified build exists, e.g., if the program has been upgraded since the\n * last verified build.\n */\nasync function verifiedBuild(connection, programId, limit = 5) {\n const url = `https://api.apr.dev/api/v0/program/${programId.toString()}/latest?limit=${limit}`;\n const [programData, latestBuildsResp] = await Promise.all([\n fetchData(connection, programId),\n fetch(url),\n ]);\n // Filter out all non successful builds.\n const latestBuilds = (await latestBuildsResp.json()).filter((b) => !b.aborted && b.state === \"Built\" && b.verified === \"Verified\");\n if (latestBuilds.length === 0) {\n return null;\n }\n // Get the latest build.\n const build = latestBuilds[0];\n // Has the program been upgraded since the last build?\n if (programData.slot.toNumber() !== build.verified_slot) {\n return null;\n }\n // Success.\n return build;\n}\n/**\n * Returns the program data account for this program, containing the\n * metadata for this program, e.g., the upgrade authority.\n */\nasync function fetchData(connection, programId) {\n const accountInfo = await connection.getAccountInfo(programId);\n if (accountInfo === null) {\n throw new Error(\"program account not found\");\n }\n const { program } = decodeUpgradeableLoaderState(accountInfo.data);\n const programdataAccountInfo = await connection.getAccountInfo(program.programdataAddress);\n if (programdataAccountInfo === null) {\n throw new Error(\"program data account not found\");\n }\n const { programData } = decodeUpgradeableLoaderState(programdataAccountInfo.data);\n return programData;\n}\nconst UPGRADEABLE_LOADER_STATE_LAYOUT = _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.rustEnum([\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct([], \"uninitialized\"),\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct([_coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.option(_coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.publicKey(), \"authorityAddress\")], \"buffer\"),\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct([_coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.publicKey(\"programdataAddress\")], \"program\"),\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct([\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.u64(\"slot\"),\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.option(_coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.publicKey(), \"upgradeAuthorityAddress\"),\n ], \"programData\"),\n], undefined, _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.u32());\nfunction decodeUpgradeableLoaderState(data) {\n return UPGRADEABLE_LOADER_STATE_LAYOUT.decode(data);\n}\n\nvar registry = /*#__PURE__*/Object.freeze({\n __proto__: null,\n verifiedBuild: verifiedBuild,\n fetchData: fetchData,\n decodeUpgradeableLoaderState: decodeUpgradeableLoaderState\n});\n\nvar index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n sha256: sha256,\n rpc: rpc,\n publicKey: pubkey,\n bytes: index$1,\n token: token,\n features: features,\n registry: registry\n});\n\nfunction splitArgsAndCtx(idlIx, args) {\n var _a, _b;\n let options = {};\n const inputLen = idlIx.args ? idlIx.args.length : 0;\n if (args.length > inputLen) {\n if (args.length !== inputLen + 1) {\n throw new Error(`provided too many arguments ${args} to instruction ${idlIx === null || idlIx === void 0 ? void 0 : idlIx.name} expecting: ${(_b = (_a = idlIx.args) === null || _a === void 0 ? void 0 : _a.map((a) => a.name)) !== null && _b !== void 0 ? _b : []}`);\n }\n options = args.pop();\n }\n return [args, options];\n}\n\nclass InstructionNamespaceFactory {\n static build(idlIx, encodeFn, programId) {\n if (idlIx.name === \"_inner\") {\n throw new IdlError(\"the _inner name is reserved\");\n }\n const ix = (...args) => {\n const [ixArgs, ctx] = splitArgsAndCtx(idlIx, [...args]);\n validateAccounts(idlIx.accounts, ctx.accounts);\n validateInstruction(idlIx, ...args);\n const keys = ix.accounts(ctx.accounts);\n if (ctx.remainingAccounts !== undefined) {\n keys.push(...ctx.remainingAccounts);\n }\n if (isSet(\"debug-logs\")) {\n console.log(\"Outgoing account metas:\", keys);\n }\n return new TransactionInstruction({\n keys,\n programId,\n data: encodeFn(idlIx.name, toInstruction(idlIx, ...ixArgs)),\n });\n };\n // Utility fn for ordering the accounts for this instruction.\n ix[\"accounts\"] = (accs) => {\n return InstructionNamespaceFactory.accountsArray(accs, idlIx.accounts, programId, idlIx.name);\n };\n return ix;\n }\n static accountsArray(ctx, accounts, programId, ixName) {\n if (!ctx) {\n return [];\n }\n return accounts\n .map((acc) => {\n if (isCompositeAccounts(acc)) {\n const rpcAccs = ctx[acc.name];\n return InstructionNamespaceFactory.accountsArray(rpcAccs, acc.accounts, programId, ixName).flat();\n }\n let pubkey;\n try {\n pubkey = translateAddress(ctx[acc.name]);\n }\n catch (err) {\n throw new Error(`Wrong input type for account \"${acc.name}\" in the instruction accounts object${ixName !== undefined ? ' for instruction \"' + ixName + '\"' : \"\"}. Expected PublicKey or string.`);\n }\n const isOptional = acc.optional && pubkey.equals(programId);\n const isWritable = Boolean(acc.writable && !isOptional);\n const isSigner = Boolean(acc.signer && !isOptional);\n return {\n pubkey,\n isWritable,\n isSigner,\n };\n })\n .flat();\n }\n}\n// Throws error if any argument required for the `ix` is not given.\nfunction validateInstruction(ix, ...args) {\n // todo\n}\n\nclass TransactionFactory {\n static build(idlIx, ixFn) {\n const txFn = (...args) => {\n var _a, _b, _c;\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n const tx = new Transaction();\n if (ctx.preInstructions && ctx.instructions) {\n throw new Error(\"instructions is deprecated, use preInstructions\");\n }\n (_a = ctx.preInstructions) === null || _a === void 0 ? void 0 : _a.forEach((ix) => tx.add(ix));\n (_b = ctx.instructions) === null || _b === void 0 ? void 0 : _b.forEach((ix) => tx.add(ix));\n tx.add(ixFn(...args));\n (_c = ctx.postInstructions) === null || _c === void 0 ? void 0 : _c.forEach((ix) => tx.add(ix));\n return tx;\n };\n return txFn;\n }\n}\n\nclass RpcFactory {\n static build(idlIx, txFn, idlErrors, provider) {\n const rpc = async (...args) => {\n var _a;\n const tx = txFn(...args);\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n if (provider.sendAndConfirm === undefined) {\n throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");\n }\n try {\n return await provider.sendAndConfirm(tx, (_a = ctx.signers) !== null && _a !== void 0 ? _a : [], ctx.options);\n }\n catch (err) {\n throw translateError(err, idlErrors);\n }\n };\n return rpc;\n }\n}\n\nclass AccountFactory {\n static build(idl, coder, programId, provider) {\n var _a;\n return ((_a = idl.accounts) !== null && _a !== void 0 ? _a : []).reduce((accountFns, acc) => {\n accountFns[acc.name] = new AccountClient(idl, acc, programId, provider, coder);\n return accountFns;\n }, {});\n }\n}\nclass AccountClient {\n /**\n * Returns the number of bytes in this account.\n */\n get size() {\n return this._size;\n }\n /**\n * Returns the program ID owning all accounts.\n */\n get programId() {\n return this._programId;\n }\n /**\n * Returns the client's wallet and network provider.\n */\n get provider() {\n return this._provider;\n }\n /**\n * Returns the coder.\n */\n get coder() {\n return this._coder;\n }\n constructor(idl, idlAccount, programId, provider, coder) {\n this._idlAccount = idlAccount;\n this._programId = programId;\n this._provider = provider !== null && provider !== void 0 ? provider : getProvider();\n this._coder = coder !== null && coder !== void 0 ? coder : new BorshCoder(idl);\n this._size = this._coder.accounts.size(idlAccount.name);\n }\n /**\n * Returns a deserialized account, returning null if it doesn't exist.\n *\n * @param address The address of the account to fetch.\n */\n async fetchNullable(address, commitment) {\n const { data } = await this.fetchNullableAndContext(address, commitment);\n return data;\n }\n /**\n * Returns a deserialized account along with the associated rpc response context, returning null if it doesn't exist.\n *\n * @param address The address of the account to fetch.\n */\n async fetchNullableAndContext(address, commitment) {\n const accountInfo = await this.getAccountInfoAndContext(address, commitment);\n const { value, context } = accountInfo;\n return {\n data: value && value.data.length !== 0\n ? this._coder.accounts.decode(this._idlAccount.name, value.data)\n : null,\n context,\n };\n }\n /**\n * Returns a deserialized account.\n *\n * @param address The address of the account to fetch.\n */\n async fetch(address, commitment) {\n const { data } = await this.fetchNullableAndContext(address, commitment);\n if (data === null) {\n throw new Error(`Account does not exist or has no data ${address.toString()}`);\n }\n return data;\n }\n /**\n * Returns a deserialized account along with the associated rpc response context.\n *\n * @param address The address of the account to fetch.\n */\n async fetchAndContext(address, commitment) {\n const { data, context } = await this.fetchNullableAndContext(address, commitment);\n if (data === null) {\n throw new Error(`Account does not exist ${address.toString()}`);\n }\n return { data, context };\n }\n /**\n * Returns multiple deserialized accounts.\n * Accounts not found or with wrong discriminator are returned as null.\n *\n * @param addresses The addresses of the accounts to fetch.\n */\n async fetchMultiple(addresses, commitment) {\n const accounts = await this.fetchMultipleAndContext(addresses, commitment);\n return accounts.map((account) => (account ? account.data : null));\n }\n /**\n * Returns multiple deserialized accounts.\n * Accounts not found or with wrong discriminator are returned as null.\n *\n * @param addresses The addresses of the accounts to fetch.\n */\n async fetchMultipleAndContext(addresses, commitment) {\n const accounts = await getMultipleAccountsAndContext(this._provider.connection, addresses.map((address) => translateAddress(address)), commitment);\n // Decode accounts where discriminator is correct, null otherwise\n return accounts.map((result) => {\n if (result == null) {\n return null;\n }\n const { account, context } = result;\n return {\n data: this._coder.accounts.decode(this._idlAccount.name, account.data),\n context,\n };\n });\n }\n /**\n * Returns all instances of this account type for the program.\n *\n * @param filters User-provided filters to narrow the results from `connection.getProgramAccounts`.\n *\n * When filters are not defined this method returns all\n * the account instances.\n *\n * When filters are of type `Buffer`, the filters are appended\n * after the discriminator.\n *\n * When filters are of type `GetProgramAccountsFilter[]`,\n * filters are appended after the discriminator filter.\n */\n async all(filters) {\n const filter = this.coder.accounts.memcmp(this._idlAccount.name, filters instanceof Buffer ? filters : undefined);\n const coderFilters = [];\n if ((filter === null || filter === void 0 ? void 0 : filter.offset) != undefined && (filter === null || filter === void 0 ? void 0 : filter.bytes) != undefined) {\n coderFilters.push({\n memcmp: { offset: filter.offset, bytes: filter.bytes },\n });\n }\n if ((filter === null || filter === void 0 ? void 0 : filter.dataSize) != undefined) {\n coderFilters.push({ dataSize: filter.dataSize });\n }\n let resp = await this._provider.connection.getProgramAccounts(this._programId, {\n commitment: this._provider.connection.commitment,\n filters: [...coderFilters, ...(Array.isArray(filters) ? filters : [])],\n });\n return resp.map(({ pubkey, account }) => {\n return {\n publicKey: pubkey,\n account: this._coder.accounts.decode(this._idlAccount.name, account.data),\n };\n });\n }\n /**\n * Returns an `EventEmitter` emitting a \"change\" event whenever the account\n * changes.\n */\n subscribe(address, commitment) {\n const sub = subscriptions.get(address.toString());\n if (sub) {\n return sub.ee;\n }\n const ee = new EventEmitter();\n address = translateAddress(address);\n const listener = this._provider.connection.onAccountChange(address, (acc) => {\n const account = this._coder.accounts.decode(this._idlAccount.name, acc.data);\n ee.emit(\"change\", account);\n }, commitment);\n subscriptions.set(address.toString(), {\n ee,\n listener,\n });\n return ee;\n }\n /**\n * Unsubscribes from the account at the given address.\n */\n async unsubscribe(address) {\n let sub = subscriptions.get(address.toString());\n if (!sub) {\n console.warn(\"Address is not subscribed\");\n return;\n }\n if (subscriptions) {\n await this._provider.connection\n .removeAccountChangeListener(sub.listener)\n .then(() => {\n subscriptions.delete(address.toString());\n })\n .catch(console.error);\n }\n }\n /**\n * Returns an instruction for creating this account.\n */\n async createInstruction(signer, sizeOverride) {\n const size = this.size;\n if (this._provider.publicKey === undefined) {\n throw new Error(\"This function requires the Provider interface implementor to have a 'publicKey' field.\");\n }\n return SystemProgram.createAccount({\n fromPubkey: this._provider.publicKey,\n newAccountPubkey: signer.publicKey,\n space: sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size,\n lamports: await this._provider.connection.getMinimumBalanceForRentExemption(sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size),\n programId: this._programId,\n });\n }\n async getAccountInfo(address, commitment) {\n return await this._provider.connection.getAccountInfo(translateAddress(address), commitment);\n }\n async getAccountInfoAndContext(address, commitment) {\n return await this._provider.connection.getAccountInfoAndContext(translateAddress(address), commitment);\n }\n}\n// Tracks all subscriptions.\nconst subscriptions = new Map();\n\nconst PROGRAM_LOG = \"Program log: \";\nconst PROGRAM_DATA = \"Program data: \";\nconst PROGRAM_LOG_START_INDEX = PROGRAM_LOG.length;\nconst PROGRAM_DATA_START_INDEX = PROGRAM_DATA.length;\nclass EventManager {\n constructor(programId, provider, coder) {\n this._programId = programId;\n this._provider = provider;\n this._eventParser = new EventParser(programId, coder);\n this._eventCallbacks = new Map();\n this._eventListeners = new Map();\n this._listenerIdCount = 0;\n }\n addEventListener(eventName, callback) {\n var _a;\n let listener = this._listenerIdCount;\n this._listenerIdCount += 1;\n // Store the listener into the event map.\n if (!this._eventListeners.has(eventName)) {\n this._eventListeners.set(eventName, []);\n }\n this._eventListeners.set(eventName, ((_a = this._eventListeners.get(eventName)) !== null && _a !== void 0 ? _a : []).concat(listener));\n // Store the callback into the listener map.\n this._eventCallbacks.set(listener, [eventName, callback]);\n // Create the subscription singleton, if needed.\n if (this._onLogsSubscriptionId !== undefined) {\n return listener;\n }\n this._onLogsSubscriptionId = this._provider.connection.onLogs(this._programId, (logs, ctx) => {\n if (logs.err) {\n return;\n }\n for (const event of this._eventParser.parseLogs(logs.logs)) {\n const allListeners = this._eventListeners.get(event.name);\n if (allListeners) {\n allListeners.forEach((listener) => {\n const listenerCb = this._eventCallbacks.get(listener);\n if (listenerCb) {\n const [, callback] = listenerCb;\n callback(event.data, ctx.slot, logs.signature);\n }\n });\n }\n }\n });\n return listener;\n }\n async removeEventListener(listener) {\n // Get the callback.\n const callback = this._eventCallbacks.get(listener);\n if (!callback) {\n throw new Error(`Event listener ${listener} doesn't exist!`);\n }\n const [eventName] = callback;\n // Get the listeners.\n let listeners = this._eventListeners.get(eventName);\n if (!listeners) {\n throw new Error(`Event listeners don't exist for ${eventName}!`);\n }\n // Update both maps.\n this._eventCallbacks.delete(listener);\n listeners = listeners.filter((l) => l !== listener);\n this._eventListeners.set(eventName, listeners);\n if (listeners.length === 0) {\n this._eventListeners.delete(eventName);\n }\n // Kill the websocket connection if all listeners have been removed.\n if (this._eventCallbacks.size === 0) {\n if (this._eventListeners.size !== 0) {\n throw new Error(`Expected event listeners size to be 0 but got ${this._eventListeners.size}`);\n }\n if (this._onLogsSubscriptionId !== undefined) {\n await this._provider.connection.removeOnLogsListener(this._onLogsSubscriptionId);\n this._onLogsSubscriptionId = undefined;\n }\n }\n }\n}\nclass EventParser {\n constructor(programId, coder) {\n this.coder = coder;\n this.programId = programId;\n }\n // Each log given, represents an array of messages emitted by\n // a single transaction, which can execute many different programs across\n // CPI boundaries. However, the subscription is only interested in the\n // events emitted by *this* program. In achieving this, we keep track of the\n // program execution context by parsing each log and looking for a CPI\n // `invoke` call. If one exists, we know a new program is executing. So we\n // push the programId onto a stack and switch the program context. This\n // allows us to track, for a given log, which program was executing during\n // its emission, thereby allowing us to know if a given log event was\n // emitted by *this* program. If it was, then we parse the raw string and\n // emit the event if the string matches the event being subscribed to.\n *parseLogs(logs, errorOnDecodeFailure = false) {\n const logScanner = new LogScanner(logs);\n const execution = new ExecutionContext();\n let log = logScanner.next();\n while (log !== null) {\n let [event, newProgram, didPop] = this.handleLog(execution, log, errorOnDecodeFailure);\n if (event) {\n yield event;\n }\n if (newProgram) {\n execution.push(newProgram);\n }\n if (didPop) {\n execution.pop();\n }\n log = logScanner.next();\n }\n }\n // Main log handler. Returns a three element array of the event, the\n // next program that was invoked for CPI, and a boolean indicating if\n // a program has completed execution (and thus should be popped off the\n // execution stack).\n handleLog(execution, log, errorOnDecodeFailure) {\n // Executing program is this program.\n if (execution.stack.length > 0 &&\n execution.program() === this.programId.toString()) {\n return this.handleProgramLog(log, errorOnDecodeFailure);\n }\n // Executing program is not this program.\n else {\n return [null, ...this.handleSystemLog(log)];\n }\n }\n // Handles logs from *this* program.\n handleProgramLog(log, errorOnDecodeFailure) {\n // This is a `msg!` log or a `sol_log_data` log.\n if (log.startsWith(PROGRAM_LOG) || log.startsWith(PROGRAM_DATA)) {\n const logStr = log.startsWith(PROGRAM_LOG)\n ? log.slice(PROGRAM_LOG_START_INDEX)\n : log.slice(PROGRAM_DATA_START_INDEX);\n const event = this.coder.events.decode(logStr);\n if (errorOnDecodeFailure && event === null) {\n throw new Error(`Unable to decode event ${logStr}`);\n }\n return [event, null, false];\n }\n // System log.\n else {\n return [null, ...this.handleSystemLog(log)];\n }\n }\n // Handles logs when the current program being executing is *not* this.\n handleSystemLog(log) {\n // System component.\n const logStart = log.split(\":\")[0];\n // Did the program finish executing?\n if (logStart.match(/^Program (.*) success/g) !== null) {\n return [null, true];\n // Recursive call.\n }\n else if (logStart.startsWith(`Program ${this.programId.toString()} invoke`)) {\n return [this.programId.toString(), false];\n }\n // CPI call.\n else if (logStart.includes(\"invoke\")) {\n return [\"cpi\", false]; // Any string will do.\n }\n else {\n return [null, false];\n }\n }\n}\n// Stack frame execution context, allowing one to track what program is\n// executing for a given log.\nclass ExecutionContext {\n constructor() {\n this.stack = [];\n }\n program() {\n if (!this.stack.length) {\n throw new Error(\"Expected the stack to have elements\");\n }\n return this.stack[this.stack.length - 1];\n }\n push(newProgram) {\n this.stack.push(newProgram);\n }\n pop() {\n if (!this.stack.length) {\n throw new Error(\"Expected the stack to have elements\");\n }\n this.stack.pop();\n }\n}\nclass LogScanner {\n constructor(logs) {\n this.logs = logs;\n }\n next() {\n if (this.logs.length === 0) {\n return null;\n }\n let l = this.logs[0];\n this.logs = this.logs.slice(1);\n return l;\n }\n}\n\nclass SimulateFactory {\n static build(idlIx, txFn, idlErrors, provider, coder, programId, idl) {\n const simulate = async (...args) => {\n var _a;\n const tx = txFn(...args);\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n let resp = undefined;\n if (provider.simulate === undefined) {\n throw new Error(\"This function requires 'Provider.simulate' to be implemented.\");\n }\n try {\n resp = await provider.simulate(tx, ctx.signers, (_a = ctx.options) === null || _a === void 0 ? void 0 : _a.commitment);\n }\n catch (err) {\n throw translateError(err, idlErrors);\n }\n if (resp === undefined) {\n throw new Error(\"Unable to simulate transaction\");\n }\n const logs = resp.logs;\n if (!logs) {\n throw new Error(\"Simulated logs not found\");\n }\n const events = [];\n if (idl.events) {\n let parser = new EventParser(programId, coder);\n for (const event of parser.parseLogs(logs)) {\n events.push(event);\n }\n }\n return { events, raw: logs };\n };\n return simulate;\n }\n}\n\nfunction uint64(property) {\n return new WrappedLayout(blob(8), (b) => u64.fromBuffer(b), (n) => n.toBuffer(), property);\n}\nfunction publicKey(property) {\n return new WrappedLayout(blob(32), (b) => new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(b), (key) => key.toBuffer(), property);\n}\nfunction coption(layout, property) {\n return new COptionLayout(layout, property);\n}\nclass WrappedLayout extends Layout_2 {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nclass COptionLayout extends Layout_2 {\n constructor(layout, property) {\n super(-1, property);\n this.layout = layout;\n this.discriminator = u32();\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.layout.span + this.discriminator.encode(0, b, offset);\n }\n this.discriminator.encode(1, b, offset);\n return this.layout.encode(src, b, offset + 4) + 4;\n }\n decode(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return null;\n }\n else if (discriminator === 1) {\n return this.layout.decode(b, offset + 4);\n }\n throw new Error(\"Invalid coption \" + this.layout.property);\n }\n getSpan(b, offset = 0) {\n return this.layout.getSpan(b, offset + 4) + 4;\n }\n}\nclass u64 extends (bn_js__WEBPACK_IMPORTED_MODULE_2___default()) {\n /**\n * Convert to Buffer representation\n */\n toBuffer() {\n const a = super.toArray().reverse();\n const b = Buffer.from(a);\n if (b.length === 8) {\n return b;\n }\n if (b.length >= 8) {\n throw new Error(\"u64 too large\");\n }\n const zeroPad = Buffer.alloc(8);\n b.copy(zeroPad);\n return zeroPad;\n }\n /**\n * Construct a u64 from Buffer representation\n */\n static fromBuffer(buffer) {\n if (buffer.length !== 8) {\n throw new Error(`Invalid buffer length: ${buffer.length}`);\n }\n return new u64([...buffer]\n .reverse()\n .map((i) => `00${i.toString(16)}`.slice(-2))\n .join(\"\"), 16);\n }\n}\nconst TOKEN_ACCOUNT_LAYOUT = struct([\n publicKey(\"mint\"),\n publicKey(\"owner\"),\n uint64(\"amount\"),\n coption(publicKey(), \"delegate\"),\n ((p) => {\n const U = union(u8(\"discriminator\"), null, p);\n U.addVariant(0, struct([]), \"uninitialized\");\n U.addVariant(1, struct([]), \"initialized\");\n U.addVariant(2, struct([]), \"frozen\");\n return U;\n })(\"state\"),\n coption(uint64(), \"isNative\"),\n uint64(\"delegatedAmount\"),\n coption(publicKey(), \"closeAuthority\"),\n]);\nfunction decodeTokenAccount(b) {\n return TOKEN_ACCOUNT_LAYOUT.decode(b);\n}\n\n// Populates a given accounts context with PDAs and common missing accounts.\nclass AccountsResolver {\n constructor(_args, _accounts, _provider, _programId, _idlIx, accountNamespace, _idlTypes, _customResolver) {\n this._args = _args;\n this._accounts = _accounts;\n this._provider = _provider;\n this._programId = _programId;\n this._idlIx = _idlIx;\n this._idlTypes = _idlTypes;\n this._customResolver = _customResolver;\n this._accountStore = new AccountStore(_provider, accountNamespace, _programId);\n }\n args(args) {\n this._args = args;\n }\n // Note: We serially resolve PDAs one by one rather than doing them\n // in parallel because there can be dependencies between\n // addresses. That is, one PDA can be used as a seed in another.\n async resolve() {\n this.resolveEventCpi(this._idlIx.accounts);\n this.resolveConst(this._idlIx.accounts);\n // Auto populate pdas and relations until we stop finding new accounts\n let depth = 0;\n while ((await this.resolvePdasAndRelations(this._idlIx.accounts)) +\n (await this.resolveCustom()) >\n 0) {\n depth++;\n if (depth === 16) {\n throw new Error(\"Reached maximum depth for account resolution\");\n }\n }\n }\n resolveOptionals(accounts) {\n Object.assign(this._accounts, this.resolveOptionalsHelper(accounts, this._idlIx.accounts));\n }\n get(path) {\n // Only return if pubkey\n const ret = path.reduce((acc, subPath) => acc && acc[subPath], this._accounts);\n if (ret && ret.toBase58) {\n return ret;\n }\n }\n set(path, value) {\n let cur = this._accounts;\n path.forEach((p, i) => {\n var _a;\n const isLast = i === path.length - 1;\n if (isLast) {\n cur[p] = value;\n }\n cur[p] = (_a = cur[p]) !== null && _a !== void 0 ? _a : {};\n cur = cur[p];\n });\n }\n resolveOptionalsHelper(partialAccounts, accounts) {\n const nestedAccountsGeneric = {};\n // Looping through accountItem array instead of on partialAccounts, so\n // we only traverse array once\n for (const accountItem of accounts) {\n const accountName = accountItem.name;\n const partialAccount = partialAccounts[accountName];\n // Skip if the account isn't included (thus would be undefined)\n if (partialAccount === undefined)\n continue;\n if (isPartialAccounts(partialAccount)) {\n // is compound accounts, recurse one level deeper\n if (isCompositeAccounts(accountItem)) {\n nestedAccountsGeneric[accountName] = this.resolveOptionalsHelper(partialAccount, accountItem[\"accounts\"]);\n }\n else {\n // Here we try our best to recover gracefully. If there are optionals we can't check, we will fail then.\n nestedAccountsGeneric[accountName] = flattenPartialAccounts(partialAccount, true);\n }\n }\n else {\n // if not compound accounts, do null/optional check and proceed\n if (partialAccount !== null) {\n nestedAccountsGeneric[accountName] = translateAddress(partialAccount);\n }\n else if (accountItem[\"optional\"]) {\n nestedAccountsGeneric[accountName] = this._programId;\n }\n }\n }\n return nestedAccountsGeneric;\n }\n async resolveCustom() {\n if (this._customResolver) {\n const { accounts, resolved } = await this._customResolver({\n args: this._args,\n accounts: this._accounts,\n provider: this._provider,\n programId: this._programId,\n idlIx: this._idlIx,\n });\n this._accounts = accounts;\n return resolved;\n }\n return 0;\n }\n /**\n * Resolve event CPI accounts `eventAuthority` and `program`.\n *\n * Accounts will only be resolved if they are declared next to each other to\n * reduce the chance of name collision.\n */\n resolveEventCpi(accounts, path = []) {\n for (const i in accounts) {\n const accountOrAccounts = accounts[i];\n if (isCompositeAccounts(accountOrAccounts)) {\n this.resolveEventCpi(accountOrAccounts.accounts, [\n ...path,\n accountOrAccounts.name,\n ]);\n }\n // Validate next index exists\n const nextIndex = +i + 1;\n if (nextIndex === accounts.length)\n return;\n const currentName = accounts[i].name;\n const nextName = accounts[nextIndex].name;\n // Populate event CPI accounts if they exist\n if (currentName === \"eventAuthority\" && nextName === \"program\") {\n const currentPath = [...path, currentName];\n const nextPath = [...path, nextName];\n if (!this.get(currentPath)) {\n this.set(currentPath, PublicKey.findProgramAddressSync([Buffer.from(\"__event_authority\")], this._programId)[0]);\n }\n if (!this.get(nextPath)) {\n this.set(nextPath, this._programId);\n }\n return;\n }\n }\n }\n resolveConst(accounts, path = []) {\n for (const accountOrAccounts of accounts) {\n const name = accountOrAccounts.name;\n if (isCompositeAccounts(accountOrAccounts)) {\n this.resolveConst(accountOrAccounts.accounts, [...path, name]);\n }\n else {\n const account = accountOrAccounts;\n if ((account.signer || account.address) && !this.get([...path, name])) {\n // Default signers to the provider\n if (account.signer) {\n // @ts-expect-error\n if (!this._provider.wallet) {\n throw new Error(\"This function requires the `Provider` interface implementor to have a `wallet` field.\");\n }\n // @ts-expect-error\n this.set([...path, name], this._provider.wallet.publicKey);\n }\n // Set based on `address` field\n if (account.address) {\n this.set([...path, name], translateAddress(account.address));\n }\n }\n }\n }\n }\n async resolvePdasAndRelations(accounts, path = []) {\n let found = 0;\n for (const accountOrAccounts of accounts) {\n const name = accountOrAccounts.name;\n if (isCompositeAccounts(accountOrAccounts)) {\n found += await this.resolvePdasAndRelations(accountOrAccounts.accounts, [...path, name]);\n }\n else {\n const account = accountOrAccounts;\n if ((account.pda || account.relations) && !this.get([...path, name])) {\n found++;\n // Accounts might not get resolved successfully if a seed depends on\n // another seed to be resolved *and* the accounts for resolution are\n // out of order. In this case, skip the accounts that throw in order\n // to resolve those accounts later.\n try {\n if (account.pda) {\n const seeds = await Promise.all(account.pda.seeds.map((seed) => this.toBuffer(seed, path)));\n if (seeds.some((seed) => !seed)) {\n continue;\n }\n const programId = await this.parseProgramId(account, path);\n const [pubkey] = PublicKey.findProgramAddressSync(seeds, programId);\n this.set([...path, name], pubkey);\n }\n }\n catch { }\n try {\n if (account.relations) {\n const accountKey = this.get([...path, account.relations[0]]);\n if (accountKey) {\n const account = await this._accountStore.fetchAccount({\n publicKey: accountKey,\n });\n this.set([...path, name], account[name]);\n }\n }\n }\n catch { }\n }\n }\n }\n return found;\n }\n async parseProgramId(account, path = []) {\n var _a;\n if (!((_a = account.pda) === null || _a === void 0 ? void 0 : _a.program)) {\n return this._programId;\n }\n const buf = await this.toBuffer(account.pda.program, path);\n if (!buf) {\n throw new Error(`Program seed not resolved: ${account.name}`);\n }\n return new PublicKey(buf);\n }\n async toBuffer(seed, path = []) {\n switch (seed.kind) {\n case \"const\":\n return this.toBufferConst(seed);\n case \"arg\":\n return await this.toBufferArg(seed);\n case \"account\":\n return await this.toBufferAccount(seed, path);\n default:\n throw new Error(`Unexpected seed: ${seed}`);\n }\n }\n toBufferConst(seed) {\n return this.toBufferValue(\"bytes\", seed.value);\n }\n async toBufferArg(seed) {\n const [name, ...path] = seed.path.split(\".\");\n const index = this._idlIx.args.findIndex((arg) => arg.name === name);\n if (index === -1) {\n throw new Error(`Unable to find argument for seed: ${name}`);\n }\n const value = path.reduce((acc, path) => (acc !== null && acc !== void 0 ? acc : {})[path], this._args[index]);\n if (value === undefined) {\n return;\n }\n const type = this.getType(this._idlIx.args[index].type, path);\n return this.toBufferValue(type, value);\n }\n async toBufferAccount(seed, path = []) {\n const [name, ...paths] = seed.path.split(\".\");\n const fieldPubkey = this.get([...path, name]);\n if (!fieldPubkey)\n return;\n // The seed is a pubkey of the account.\n if (!paths.length) {\n return this.toBufferValue(\"pubkey\", fieldPubkey);\n }\n if (!seed.account) {\n throw new Error(`Seed account is required in order to resolve type: ${seed.path}`);\n }\n // The key is account data.\n //\n // Fetch and deserialize it.\n const account = await this._accountStore.fetchAccount({\n publicKey: fieldPubkey,\n name: seed.account,\n });\n // Dereference all fields in the path to get the field value\n // used in the seed.\n let accountValue = account;\n let currentPaths = paths;\n while (currentPaths.length > 0) {\n accountValue = accountValue[currentPaths[0]];\n currentPaths = currentPaths.slice(1);\n }\n if (accountValue === undefined)\n return;\n const type = this.getType({ defined: { name: seed.account } }, paths);\n return this.toBufferValue(type, accountValue);\n }\n /**\n * Converts the given idl valaue into a Buffer. The values here must be\n * primitives, e.g. no structs.\n */\n toBufferValue(type, value) {\n switch (type) {\n case \"u8\":\n case \"i8\":\n return Buffer.from([value]);\n case \"u16\":\n case \"i16\":\n return new BN(value).toArrayLike(Buffer, \"le\", 2);\n case \"u32\":\n case \"i32\":\n return new BN(value).toArrayLike(Buffer, \"le\", 4);\n case \"u64\":\n case \"i64\":\n return new BN(value).toArrayLike(Buffer, \"le\", 8);\n case \"u128\":\n case \"i128\":\n return new BN(value).toArrayLike(Buffer, \"le\", 16);\n case \"u256\":\n case \"i256\":\n return new BN(value).toArrayLike(Buffer, \"le\", 32);\n case \"string\":\n return Buffer.from(value);\n case \"pubkey\":\n return value.toBuffer();\n case \"bytes\":\n return Buffer.from(value);\n default:\n if (type === null || type === void 0 ? void 0 : type.array) {\n return Buffer.from(value);\n }\n throw new Error(`Unexpected seed type: ${type}`);\n }\n }\n /**\n * Recursively get the type at some path of either a primitive or a user\n * defined struct.\n */\n getType(type, path = []) {\n var _a;\n const typeName = (_a = type === null || type === void 0 ? void 0 : type.defined) === null || _a === void 0 ? void 0 : _a.name;\n if (typeName) {\n // Handle token account separately\n if (typeName === \"tokenAccount\") {\n switch (path.at(0)) {\n case \"mint\":\n case \"owner\":\n return \"pubkey\";\n case \"amount\":\n case \"delagatedAmount\":\n return \"u64\";\n default:\n throw new Error(`Unknown token account path: ${path}`);\n }\n }\n const definedType = this._idlTypes.find((t) => t.name === typeName);\n if (!definedType) {\n throw new Error(`Type not found: ${typeName}`);\n }\n // Only named structs are supported\n const [fieldName, ...subPath] = path;\n const fields = definedType.type\n .fields;\n const field = fields.find((field) => field.name === fieldName);\n if (!field) {\n throw new Error(`Field not found: ${fieldName}`);\n }\n return this.getType(field.type, subPath);\n }\n return type;\n }\n}\n// TODO: this should be configurable to avoid unnecessary requests.\nclass AccountStore {\n constructor(_provider, accounts, programId) {\n this._provider = _provider;\n this._cache = new Map();\n this._idls = {};\n this._idls[programId.toBase58()] = accounts;\n }\n async fetchAccount({ publicKey, name, }) {\n const address = publicKey.toBase58();\n if (!this._cache.has(address)) {\n const accountInfo = await this._provider.connection.getAccountInfo(publicKey);\n if (accountInfo === null) {\n throw new Error(`Account not found: ${address}`);\n }\n if (name === \"tokenAccount\") {\n const account = decodeTokenAccount(accountInfo.data);\n this._cache.set(address, account);\n }\n else {\n const accounts = await this.getAccountsNs(accountInfo.owner);\n if (accounts) {\n const accountNs = Object.values(accounts)[0];\n if (accountNs) {\n const account = accountNs.coder.accounts.decodeAny(accountInfo.data);\n this._cache.set(address, account);\n }\n }\n }\n }\n return this._cache.get(address);\n }\n async getAccountsNs(programId) {\n const programIdStr = programId.toBase58();\n if (!this._idls[programIdStr]) {\n const idl = await Program.fetchIdl(programId, this._provider);\n if (idl) {\n const program = new Program(idl, this._provider);\n this._idls[programIdStr] = program.account;\n }\n }\n return this._idls[programIdStr];\n }\n}\n\nclass MethodsBuilderFactory {\n static build(provider, programId, idlIx, ixFn, txFn, rpcFn, simulateFn, viewFn, accountNamespace, idlTypes, customResolver) {\n return (...args) => new MethodsBuilder(args, ixFn, txFn, rpcFn, simulateFn, viewFn, provider, programId, idlIx, accountNamespace, idlTypes, customResolver);\n }\n}\nfunction isPartialAccounts(partialAccount) {\n return (typeof partialAccount === \"object\" &&\n partialAccount !== null &&\n !(\"_bn\" in partialAccount) // Ensures not a pubkey\n );\n}\nfunction flattenPartialAccounts(partialAccounts, throwOnNull) {\n const toReturn = {};\n for (const accountName in partialAccounts) {\n const account = partialAccounts[accountName];\n if (account === null) {\n if (throwOnNull)\n throw new Error(\"Failed to resolve optionals due to IDL type mismatch with input accounts!\");\n continue;\n }\n toReturn[accountName] = isPartialAccounts(account)\n ? flattenPartialAccounts(account, true)\n : translateAddress(account);\n }\n return toReturn;\n}\nclass MethodsBuilder {\n constructor(_args, _ixFn, _txFn, _rpcFn, _simulateFn, _viewFn, provider, programId, idlIx, accountNamespace, idlTypes, customResolver) {\n this._args = _args;\n this._ixFn = _ixFn;\n this._txFn = _txFn;\n this._rpcFn = _rpcFn;\n this._simulateFn = _simulateFn;\n this._viewFn = _viewFn;\n this._accounts = {};\n this._remainingAccounts = [];\n this._signers = [];\n this._preInstructions = [];\n this._postInstructions = [];\n this._resolveAccounts = true;\n this._accountsResolver = new AccountsResolver(_args, this._accounts, provider, programId, idlIx, accountNamespace, idlTypes, customResolver);\n }\n args(args) {\n this._args = args;\n this._accountsResolver.args(args);\n }\n /**\n * Set instruction accounts with account resolution.\n *\n * This method only accepts accounts that cannot be resolved.\n *\n * See {@link accountsPartial} for overriding the account resolution or\n * {@link accountsStrict} for strictly specifying all accounts.\n */\n accounts(accounts) {\n // @ts-ignore\n return this.accountsPartial(accounts);\n }\n /**\n * Set instruction accounts with account resolution.\n *\n * There is no functional difference between this method and {@link accounts}\n * method, the only difference is this method allows specifying all accounts\n * even if they can be resolved. On the other hand, {@link accounts} method\n * doesn't accept accounts that can be resolved.\n */\n accountsPartial(accounts) {\n this._resolveAccounts = true;\n this._accountsResolver.resolveOptionals(accounts);\n return this;\n }\n /**\n * Set instruction accounts without account resolution.\n *\n * All accounts strictly need to be specified when this method is used.\n *\n * See {@link accounts} and {@link accountsPartial} methods for automatically\n * resolving accounts.\n */\n accountsStrict(accounts) {\n this._resolveAccounts = false;\n this._accountsResolver.resolveOptionals(accounts);\n return this;\n }\n signers(signers) {\n this._signers = this._signers.concat(signers);\n return this;\n }\n remainingAccounts(accounts) {\n this._remainingAccounts = this._remainingAccounts.concat(accounts);\n return this;\n }\n preInstructions(ixs, prepend = false) {\n if (prepend) {\n this._preInstructions = ixs.concat(this._preInstructions);\n }\n else {\n this._preInstructions = this._preInstructions.concat(ixs);\n }\n return this;\n }\n postInstructions(ixs) {\n this._postInstructions = this._postInstructions.concat(ixs);\n return this;\n }\n /**\n * Get the public keys of the instruction accounts.\n *\n * The return type is an object with account names as keys and their public\n * keys as their values.\n *\n * Note that an account key is `undefined` if the account hasn't yet been\n * specified or resolved.\n */\n async pubkeys() {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._accounts;\n }\n async rpc(options) {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._rpcFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options,\n });\n }\n async rpcAndKeys(options) {\n const pubkeys = await this.pubkeys();\n return {\n pubkeys: pubkeys,\n signature: await this.rpc(options),\n };\n }\n async view(options) {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n if (!this._viewFn) {\n throw new Error(\"Method does not support views\");\n }\n // @ts-ignore\n return this._viewFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options,\n });\n }\n async simulate(options) {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._simulateFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options,\n });\n }\n async instruction() {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._ixFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n });\n }\n /**\n * Convenient shortcut to get instructions and pubkeys via:\n *\n * ```ts\n * const { pubkeys, instructions } = await method.prepare();\n * ```\n */\n async prepare() {\n return {\n instruction: await this.instruction(),\n pubkeys: await this.pubkeys(),\n signers: this._signers,\n };\n }\n async transaction() {\n if (this._resolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._txFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n });\n }\n}\n\nclass ViewFactory {\n static build(programId, idlIx, simulateFn, idl) {\n const isWritable = idlIx.accounts.find((a) => a.writable);\n const hasReturn = !!idlIx.returns;\n if (isWritable || !hasReturn)\n return;\n const view = async (...args) => {\n let simulationResult = await simulateFn(...args);\n const returnPrefix = `Program return: ${programId} `;\n let returnLog = simulationResult.raw.find((l) => l.startsWith(returnPrefix));\n if (!returnLog) {\n throw new Error(\"View expected return log\");\n }\n let returnData = decode(returnLog.slice(returnPrefix.length));\n let returnType = idlIx.returns;\n if (!returnType) {\n throw new Error(\"View expected return type\");\n }\n const coder = IdlCoder.fieldLayout({ type: returnType }, idl.types);\n return coder.decode(returnData);\n };\n return view;\n }\n}\n\nclass NamespaceFactory {\n /**\n * Generates all namespaces for a given program.\n */\n static build(idl, coder, programId, provider, getCustomResolver) {\n const rpc = {};\n const instruction = {};\n const transaction = {};\n const simulate = {};\n const methods = {};\n const view = {};\n const idlErrors = parseIdlErrors(idl);\n const account = idl.accounts\n ? AccountFactory.build(idl, coder, programId, provider)\n : {};\n idl.instructions.forEach((idlIx) => {\n const ixItem = InstructionNamespaceFactory.build(idlIx, (ixName, ix) => coder.instruction.encode(ixName, ix), programId);\n const txItem = TransactionFactory.build(idlIx, ixItem);\n const rpcItem = RpcFactory.build(idlIx, txItem, idlErrors, provider);\n const simulateItem = SimulateFactory.build(idlIx, txItem, idlErrors, provider, coder, programId, idl);\n const viewItem = ViewFactory.build(programId, idlIx, simulateItem, idl);\n const methodItem = MethodsBuilderFactory.build(provider, programId, idlIx, ixItem, txItem, rpcItem, simulateItem, viewItem, account, idl.types || [], getCustomResolver === null || getCustomResolver === void 0 ? void 0 : getCustomResolver(idlIx));\n const name = idlIx.name;\n instruction[name] = ixItem;\n transaction[name] = txItem;\n rpc[name] = rpcItem;\n simulate[name] = simulateItem;\n methods[name] = methodItem;\n if (viewItem) {\n view[name] = viewItem;\n }\n });\n return [\n rpc,\n instruction,\n transaction,\n account,\n simulate,\n methods,\n view,\n ];\n }\n}\n\n/**\n * ## Program\n *\n * Program provides the IDL deserialized client representation of an Anchor\n * program.\n *\n * This API is the one stop shop for all things related to communicating with\n * on-chain programs. Among other things, one can send transactions, fetch\n * deserialized accounts, decode instruction data, subscribe to account\n * changes, and listen to events.\n *\n * In addition to field accessors and methods, the object provides a set of\n * dynamically generated properties, also known as namespaces, that\n * map one-to-one to program methods and accounts. These namespaces generally\n * can be used as follows:\n *\n * ## Usage\n *\n * ```javascript\n * program..\n * ```\n *\n * API specifics are namespace dependent. The examples used in the documentation\n * below will refer to the two counter examples found\n * [here](https://github.com/coral-xyz/anchor#examples).\n */\nclass Program {\n /**\n * Address of the program.\n */\n get programId() {\n return this._programId;\n }\n /**\n * IDL in camelCase format to work in TypeScript.\n *\n * See {@link rawIdl} field if you need the original IDL.\n */\n get idl() {\n return this._idl;\n }\n /**\n * Raw IDL i.e. the original IDL without camelCase conversion.\n *\n * See {@link idl} field if you need the camelCased version of the IDL.\n */\n get rawIdl() {\n return this._rawIdl;\n }\n /**\n * Coder for serializing requests.\n */\n get coder() {\n return this._coder;\n }\n /**\n * Wallet and network provider.\n */\n get provider() {\n return this._provider;\n }\n /**\n * @param idl The interface definition.\n * @param provider The network and wallet context to use. If not provided\n * then uses [[getProvider]].\n * @param getCustomResolver A function that returns a custom account resolver\n * for the given instruction. This is useful for resolving\n * public keys of missing accounts when building instructions\n */\n constructor(idl, provider = getProvider(), coder, getCustomResolver) {\n const camelCasedIdl = convertIdlToCamelCase(idl);\n // Fields.\n this._idl = camelCasedIdl;\n this._rawIdl = idl;\n this._provider = provider;\n this._programId = translateAddress(idl.address);\n this._coder = coder !== null && coder !== void 0 ? coder : new BorshCoder(camelCasedIdl);\n this._events = new EventManager(this._programId, provider, this._coder);\n // Dynamic namespaces.\n const [rpc, instruction, transaction, account, simulate, methods, views] = NamespaceFactory.build(camelCasedIdl, this._coder, this._programId, provider, getCustomResolver);\n this.rpc = rpc;\n this.instruction = instruction;\n this.transaction = transaction;\n this.account = account;\n this.simulate = simulate;\n this.methods = methods;\n this.views = views;\n }\n /**\n * Generates a Program client by fetching the IDL from the network.\n *\n * In order to use this method, an IDL must have been previously initialized\n * via the anchor CLI's `anchor idl init` command.\n *\n * @param programId The on-chain address of the program.\n * @param provider The network and wallet context.\n */\n static async at(address, provider) {\n const programId = translateAddress(address);\n const idl = await Program.fetchIdl(programId, provider);\n if (!idl) {\n throw new Error(`IDL not found for program: ${address.toString()}`);\n }\n return new Program(idl, provider);\n }\n /**\n * Fetches an idl from the blockchain.\n *\n * In order to use this method, an IDL must have been previously initialized\n * via the anchor CLI's `anchor idl init` command.\n *\n * @param programId The on-chain address of the program.\n * @param provider The network and wallet context.\n */\n static async fetchIdl(address, provider) {\n provider = provider !== null && provider !== void 0 ? provider : getProvider();\n const programId = translateAddress(address);\n const idlAddr = await idlAddress(programId);\n const accountInfo = await provider.connection.getAccountInfo(idlAddr);\n if (!accountInfo) {\n return null;\n }\n // Chop off account discriminator.\n let idlAccount = decodeIdlAccount(accountInfo.data.slice(8));\n const inflatedIdl = inflate(idlAccount.data);\n return JSON.parse(decode$2(inflatedIdl));\n }\n /**\n * Invokes the given callback every time the given event is emitted.\n *\n * @param eventName The PascalCase name of the event, provided by the IDL.\n * @param callback The function to invoke whenever the event is emitted from\n * program logs.\n */\n addEventListener(eventName, callback) {\n return this._events.addEventListener(eventName, callback);\n }\n /**\n * Unsubscribes from the given eventName.\n */\n async removeEventListener(listener) {\n return await this._events.removeEventListener(listener);\n }\n}\n\nnew _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(\"11111111111111111111111111111111\");\nfunction program(provider) {\n return new Program(IDL, provider, coder());\n}\nfunction coder() {\n return new SystemCoder(IDL);\n}\nconst IDL = {\n address: \"11111111111111111111111111111111\",\n metadata: {\n name: \"systemProgram\",\n version: \"0.1.0\",\n spec: \"0.1.0\",\n },\n instructions: [\n {\n name: \"advanceNonceAccount\",\n discriminator: [4, 0, 0, 0],\n accounts: [\n {\n name: \"nonce\",\n writable: true,\n },\n {\n name: \"recentBlockhashes\",\n },\n {\n name: \"authorized\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"allocate\",\n discriminator: [8, 0, 0, 0],\n accounts: [\n {\n name: \"pubkey\",\n writable: true,\n signer: true,\n },\n ],\n args: [\n {\n name: \"space\",\n type: \"u64\",\n },\n ],\n },\n {\n name: \"allocateWithSeed\",\n discriminator: [9, 0, 0, 0],\n accounts: [\n {\n name: \"account\",\n writable: true,\n },\n {\n name: \"base\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"pubkey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"assign\",\n discriminator: [1, 0, 0, 0],\n accounts: [\n {\n name: \"pubkey\",\n writable: true,\n signer: true,\n },\n ],\n args: [\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"assignWithSeed\",\n discriminator: [10, 0, 0, 0],\n accounts: [\n {\n name: \"account\",\n writable: true,\n },\n {\n name: \"base\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"pubkey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"authorizeNonceAccount\",\n discriminator: [7, 0, 0, 0],\n accounts: [\n {\n name: \"nonce\",\n writable: true,\n },\n {\n name: \"authorized\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"createAccount\",\n discriminator: [0, 0, 0, 0],\n accounts: [\n {\n name: \"from\",\n writable: true,\n signer: true,\n },\n {\n name: \"to\",\n writable: true,\n signer: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"createAccountWithSeed\",\n discriminator: [3, 0, 0, 0],\n accounts: [\n {\n name: \"from\",\n writable: true,\n signer: true,\n },\n {\n name: \"to\",\n writable: true,\n },\n {\n name: \"base\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"pubkey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"initializeNonceAccount\",\n discriminator: [6, 0, 0, 0],\n accounts: [\n {\n name: \"nonce\",\n writable: true,\n signer: true,\n },\n {\n name: \"recentBlockhashes\",\n },\n {\n name: \"rent\",\n address: \"SysvarRent111111111111111111111111111111111\",\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"transfer\",\n discriminator: [2, 0, 0, 0],\n accounts: [\n {\n name: \"from\",\n writable: true,\n signer: true,\n },\n {\n name: \"to\",\n writable: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n ],\n },\n {\n name: \"transferWithSeed\",\n discriminator: [11, 0, 0, 0],\n accounts: [\n {\n name: \"from\",\n writable: true,\n },\n {\n name: \"base\",\n signer: true,\n },\n {\n name: \"to\",\n writable: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"owner\",\n type: \"pubkey\",\n },\n ],\n },\n {\n name: \"withdrawNonceAccount\",\n discriminator: [5, 0, 0, 0],\n accounts: [\n {\n name: \"nonce\",\n writable: true,\n },\n {\n name: \"to\",\n writable: true,\n },\n {\n name: \"recentBlockhashes\",\n },\n {\n name: \"rent\",\n address: \"SysvarRent111111111111111111111111111111111\",\n },\n {\n name: \"authorized\",\n signer: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n ],\n },\n ],\n accounts: [\n {\n name: \"nonce\",\n discriminator: [],\n },\n ],\n types: [\n {\n name: \"feeCalculator\",\n type: {\n kind: \"struct\",\n fields: [\n {\n name: \"lamportsPerSignature\",\n type: \"u64\",\n },\n ],\n },\n },\n {\n name: \"nonce\",\n type: {\n kind: \"struct\",\n fields: [\n {\n name: \"version\",\n type: \"u32\",\n },\n {\n name: \"state\",\n type: \"u32\",\n },\n {\n name: \"authorizedPubkey\",\n type: \"pubkey\",\n },\n {\n name: \"nonce\",\n type: \"pubkey\",\n },\n {\n name: \"feeCalculator\",\n type: {\n defined: {\n name: \"feeCalculator\",\n },\n },\n },\n ],\n },\n },\n ],\n};\n\nclass Native {\n static system(provider) {\n return program(provider);\n }\n}\n\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ }),\n\n/***/ 3909:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\nvar __webpack_unused_export__;\n\n__webpack_unused_export__ = ({ value: true });\nconst buffer_1 = __webpack_require__(8764);\nconst web3_js_1 = __webpack_require__(6737);\nconst common_js_1 = __webpack_require__(7070);\n/**\n * Node only wallet.\n */\nclass NodeWallet {\n constructor(payer) {\n this.payer = payer;\n }\n static local() {\n const process = __webpack_require__(4155);\n if (!process.env.ANCHOR_WALLET || process.env.ANCHOR_WALLET === \"\") {\n throw new Error(\"expected environment variable `ANCHOR_WALLET` is not set.\");\n }\n const payer = web3_js_1.Keypair.fromSecretKey(buffer_1.Buffer.from(JSON.parse((__webpack_require__(6793).readFileSync)(process.env.ANCHOR_WALLET, {\n encoding: \"utf-8\",\n }))));\n return new NodeWallet(payer);\n }\n async signTransaction(tx) {\n if ((0, common_js_1.isVersionedTransaction)(tx)) {\n tx.sign([this.payer]);\n }\n else {\n tx.partialSign(this.payer);\n }\n return tx;\n }\n async signAllTransactions(txs) {\n return txs.map((t) => {\n if ((0, common_js_1.isVersionedTransaction)(t)) {\n t.sign([this.payer]);\n }\n else {\n t.partialSign(this.payer);\n }\n return t;\n });\n }\n get publicKey() {\n return this.payer.publicKey;\n }\n}\nexports.Z = NodeWallet;\n//# sourceMappingURL=nodewallet.js.map\n\n/***/ }),\n\n/***/ 7070:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var process = __webpack_require__(4155);\n\nvar _a;\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isVersionedTransaction = exports.chunks = exports.isBrowser = void 0;\n/**\n * Returns true if being run inside a web browser,\n * false if in a Node process or electron app.\n */\nexports.isBrowser = process.env.ANCHOR_BROWSER ||\n (typeof window !== \"undefined\" && !((_a = window.process) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(\"type\")));\n/**\n * Splits an array into chunks\n *\n * @param array Array of objects to chunk.\n * @param size The max size of a chunk.\n * @returns A two dimensional array where each T[] length is < the provided size.\n */\nfunction chunks(array, size) {\n return Array.apply(0, new Array(Math.ceil(array.length / size))).map((_, index) => array.slice(index * size, (index + 1) * size));\n}\nexports.chunks = chunks;\n/**\n * Check if a transaction object is a VersionedTransaction or not\n *\n * @param tx\n * @returns bool\n */\nconst isVersionedTransaction = (tx) => {\n return \"version\" in tx;\n};\nexports.isVersionedTransaction = isVersionedTransaction;\n//# sourceMappingURL=common.js.map\n\n/***/ }),\n\n/***/ 8633:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar basex = __webpack_require__(8162)\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n\n\n/***/ }),\n\n/***/ 4037:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nconst UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\n\tfor (let i = 0; i < string.length; i++) {\n\t\tconst character = string[i];\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i) + '-' + string.slice(i);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\ti++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replace(LEADING_CAPITAL, m1 => toLowerCase(m1));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier))\n\t\t.replace(NUMBERS_AND_IDENTIFIER, m => toUpperCase(m));\n};\n\nconst camelCase = (input, options) => {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false ?\n\t\tstring => string.toLowerCase() :\n\t\tstring => string.toLocaleLowerCase(options.locale);\n\tconst toUpperCase = options.locale === false ?\n\t\tstring => string.toUpperCase() :\n\t\tstring => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\n\tif (options.preserveConsecutiveUppercase) {\n\t\tinput = preserveConsecutiveUppercase(input, toLowerCase);\n\t} else {\n\t\tinput = toLowerCase(input);\n\t}\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n};\n\nmodule.exports = camelCase;\n// TODO: Remove this for the next major release\nmodule.exports[\"default\"] = camelCase;\n\n\n/***/ }),\n\n/***/ 5970:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.map = exports.array = exports.rustEnum = exports.str = exports.vecU8 = exports.tagged = exports.vec = exports.bool = exports.option = exports.publicKey = exports.i256 = exports.u256 = exports.i128 = exports.u128 = exports.i64 = exports.u64 = exports.struct = exports.f64 = exports.f32 = exports.i32 = exports.u32 = exports.i16 = exports.u16 = exports.i8 = exports.u8 = void 0;\nconst buffer_layout_1 = __webpack_require__(698);\nconst web3_js_1 = __webpack_require__(6737);\nconst bn_js_1 = __importDefault(__webpack_require__(3550));\nvar buffer_layout_2 = __webpack_require__(698);\nObject.defineProperty(exports, \"u8\", ({ enumerable: true, get: function () { return buffer_layout_2.u8; } }));\nObject.defineProperty(exports, \"i8\", ({ enumerable: true, get: function () { return buffer_layout_2.s8; } }));\nObject.defineProperty(exports, \"u16\", ({ enumerable: true, get: function () { return buffer_layout_2.u16; } }));\nObject.defineProperty(exports, \"i16\", ({ enumerable: true, get: function () { return buffer_layout_2.s16; } }));\nObject.defineProperty(exports, \"u32\", ({ enumerable: true, get: function () { return buffer_layout_2.u32; } }));\nObject.defineProperty(exports, \"i32\", ({ enumerable: true, get: function () { return buffer_layout_2.s32; } }));\nObject.defineProperty(exports, \"f32\", ({ enumerable: true, get: function () { return buffer_layout_2.f32; } }));\nObject.defineProperty(exports, \"f64\", ({ enumerable: true, get: function () { return buffer_layout_2.f64; } }));\nObject.defineProperty(exports, \"struct\", ({ enumerable: true, get: function () { return buffer_layout_2.struct; } }));\nclass BNLayout extends buffer_layout_1.Layout {\n constructor(span, signed, property) {\n super(span, property);\n this.blob = (0, buffer_layout_1.blob)(span);\n this.signed = signed;\n }\n decode(b, offset = 0) {\n const num = new bn_js_1.default(this.blob.decode(b, offset), 10, \"le\");\n if (this.signed) {\n return num.fromTwos(this.span * 8).clone();\n }\n return num;\n }\n encode(src, b, offset = 0) {\n if (this.signed) {\n src = src.toTwos(this.span * 8);\n }\n return this.blob.encode(src.toArrayLike(Buffer, \"le\", this.span), b, offset);\n }\n}\nfunction u64(property) {\n return new BNLayout(8, false, property);\n}\nexports.u64 = u64;\nfunction i64(property) {\n return new BNLayout(8, true, property);\n}\nexports.i64 = i64;\nfunction u128(property) {\n return new BNLayout(16, false, property);\n}\nexports.u128 = u128;\nfunction i128(property) {\n return new BNLayout(16, true, property);\n}\nexports.i128 = i128;\nfunction u256(property) {\n return new BNLayout(32, false, property);\n}\nexports.u256 = u256;\nfunction i256(property) {\n return new BNLayout(32, true, property);\n}\nexports.i256 = i256;\nclass WrappedLayout extends buffer_layout_1.Layout {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nfunction publicKey(property) {\n return new WrappedLayout((0, buffer_layout_1.blob)(32), (b) => new web3_js_1.PublicKey(b), (key) => key.toBuffer(), property);\n}\nexports.publicKey = publicKey;\nclass OptionLayout extends buffer_layout_1.Layout {\n constructor(layout, property) {\n super(-1, property);\n this.layout = layout;\n this.discriminator = (0, buffer_layout_1.u8)();\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.discriminator.encode(0, b, offset);\n }\n this.discriminator.encode(1, b, offset);\n return this.layout.encode(src, b, offset + 1) + 1;\n }\n decode(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return null;\n }\n else if (discriminator === 1) {\n return this.layout.decode(b, offset + 1);\n }\n throw new Error(\"Invalid option \" + this.property);\n }\n getSpan(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return 1;\n }\n else if (discriminator === 1) {\n return this.layout.getSpan(b, offset + 1) + 1;\n }\n throw new Error(\"Invalid option \" + this.property);\n }\n}\nfunction option(layout, property) {\n return new OptionLayout(layout, property);\n}\nexports.option = option;\nfunction bool(property) {\n return new WrappedLayout((0, buffer_layout_1.u8)(), decodeBool, encodeBool, property);\n}\nexports.bool = bool;\nfunction decodeBool(value) {\n if (value === 0) {\n return false;\n }\n else if (value === 1) {\n return true;\n }\n throw new Error(\"Invalid bool: \" + value);\n}\nfunction encodeBool(value) {\n return value ? 1 : 0;\n}\nfunction vec(elementLayout, property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.seq)(elementLayout, (0, buffer_layout_1.offset)(length, -length.span), \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, (values) => ({ values }), property);\n}\nexports.vec = vec;\nfunction tagged(tag, layout, property) {\n const wrappedLayout = (0, buffer_layout_1.struct)([\n u64(\"tag\"),\n layout.replicate(\"data\"),\n ]);\n function decodeTag({ tag: receivedTag, data }) {\n if (!receivedTag.eq(tag)) {\n throw new Error(\"Invalid tag, expected: \" +\n tag.toString(\"hex\") +\n \", got: \" +\n receivedTag.toString(\"hex\"));\n }\n return data;\n }\n return new WrappedLayout(wrappedLayout, decodeTag, (data) => ({ tag, data }), property);\n}\nexports.tagged = tagged;\nfunction vecU8(property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.blob)((0, buffer_layout_1.offset)(length, -length.span), \"data\"),\n ]);\n return new WrappedLayout(layout, ({ data }) => data, (data) => ({ data }), property);\n}\nexports.vecU8 = vecU8;\nfunction str(property) {\n return new WrappedLayout(vecU8(), (data) => data.toString(\"utf-8\"), (s) => Buffer.from(s, \"utf-8\"), property);\n}\nexports.str = str;\nfunction rustEnum(variants, property, discriminant) {\n const unionLayout = (0, buffer_layout_1.union)(discriminant !== null && discriminant !== void 0 ? discriminant : (0, buffer_layout_1.u8)(), property);\n variants.forEach((variant, index) => unionLayout.addVariant(index, variant, variant.property));\n return unionLayout;\n}\nexports.rustEnum = rustEnum;\nfunction array(elementLayout, length, property) {\n const layout = (0, buffer_layout_1.struct)([\n (0, buffer_layout_1.seq)(elementLayout, length, \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, (values) => ({ values }), property);\n}\nexports.array = array;\nclass MapEntryLayout extends buffer_layout_1.Layout {\n constructor(keyLayout, valueLayout, property) {\n super(keyLayout.span + valueLayout.span, property);\n this.keyLayout = keyLayout;\n this.valueLayout = valueLayout;\n }\n decode(b, offset) {\n offset = offset || 0;\n const key = this.keyLayout.decode(b, offset);\n const value = this.valueLayout.decode(b, offset + this.keyLayout.getSpan(b, offset));\n return [key, value];\n }\n encode(src, b, offset) {\n offset = offset || 0;\n const keyBytes = this.keyLayout.encode(src[0], b, offset);\n const valueBytes = this.valueLayout.encode(src[1], b, offset + keyBytes);\n return keyBytes + valueBytes;\n }\n getSpan(b, offset) {\n return (this.keyLayout.getSpan(b, offset) + this.valueLayout.getSpan(b, offset));\n }\n}\nfunction map(keyLayout, valueLayout, property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.seq)(new MapEntryLayout(keyLayout, valueLayout), (0, buffer_layout_1.offset)(length, -length.span), \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => new Map(values), (values) => ({ values: Array.from(values.entries()) }), property);\n}\nexports.map = map;\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 8417:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"Z\": function() { return /* binding */ createCache; }\n});\n\n;// CONCATENATED MODULE: ./node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js\n/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? \"production\" === 'production' : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (false) { var isImportRule; }\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n if (false) {}\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode && tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n\n if (false) {}\n };\n\n return StyleSheet;\n}();\n\n\n\n;// CONCATENATED MODULE: ./node_modules/stylis/src/Utility.js\n/**\n * @param {number}\n * @return {number}\n */\nvar abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nvar Utility_from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nvar Utility_assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nfunction hash (value, length) {\n\treturn Utility_charat(value, 0) ^ 45 ? (((((((length << 2) ^ Utility_charat(value, 0)) << 2) ^ Utility_charat(value, 1)) << 2) ^ Utility_charat(value, 2)) << 2) ^ Utility_charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nfunction trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nfunction Utility_match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nfunction Utility_replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nfunction indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nfunction Utility_charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nfunction Utility_substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nfunction Utility_strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nfunction Utility_sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nfunction Utility_append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nfunction Utility_combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n\n;// CONCATENATED MODULE: ./node_modules/stylis/src/Tokenizer.js\n\n\nvar line = 1\nvar column = 1\nvar Tokenizer_length = 0\nvar position = 0\nvar character = 0\nvar characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nfunction node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nfunction Tokenizer_copy (root, props) {\n\treturn Utility_assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nfunction Tokenizer_char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nfunction prev () {\n\tcharacter = position > 0 ? Utility_charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nfunction next () {\n\tcharacter = position < Tokenizer_length ? Utility_charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nfunction peek () {\n\treturn Utility_charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nfunction caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nfunction slice (begin, end) {\n\treturn Utility_substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nfunction token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nfunction alloc (value) {\n\treturn line = column = 1, Tokenizer_length = Utility_strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nfunction dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nfunction delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nfunction Tokenizer_tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nfunction whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nfunction tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nfunction escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nfunction delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nfunction commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + Utility_from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nfunction identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n\n;// CONCATENATED MODULE: ./node_modules/stylis/src/Enum.js\nvar Enum_MS = '-ms-'\nvar Enum_MOZ = '-moz-'\nvar Enum_WEBKIT = '-webkit-'\n\nvar COMMENT = 'comm'\nvar Enum_RULESET = 'rule'\nvar Enum_DECLARATION = 'decl'\n\nvar PAGE = '@page'\nvar MEDIA = '@media'\nvar IMPORT = '@import'\nvar CHARSET = '@charset'\nvar VIEWPORT = '@viewport'\nvar SUPPORTS = '@supports'\nvar DOCUMENT = '@document'\nvar NAMESPACE = '@namespace'\nvar Enum_KEYFRAMES = '@keyframes'\nvar FONT_FACE = '@font-face'\nvar COUNTER_STYLE = '@counter-style'\nvar FONT_FEATURE_VALUES = '@font-feature-values'\nvar LAYER = '@layer'\n\n;// CONCATENATED MODULE: ./node_modules/stylis/src/Serializer.js\n\n\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nfunction Serializer_serialize (children, callback) {\n\tvar output = ''\n\tvar length = Utility_sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nfunction stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case Enum_DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase Enum_KEYFRAMES: return element.return = element.value + '{' + Serializer_serialize(element.children, callback) + '}'\n\t\tcase Enum_RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn Utility_strlen(children = Serializer_serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n\n;// CONCATENATED MODULE: ./node_modules/stylis/src/Middleware.js\n\n\n\n\n\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nfunction middleware (collection) {\n\tvar length = Utility_sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nfunction rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nfunction prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nfunction namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n\n;// CONCATENATED MODULE: ./node_modules/stylis/src/Parser.js\n\n\n\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nfunction compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nfunction parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && Utility_charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += Utility_replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tUtility_append(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = Utility_strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = Utility_replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (Utility_strlen(characters) - length))\n\t\t\t\t\t\t\tUtility_append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(Utility_replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tUtility_append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && Utility_charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && Utility_append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + Utility_strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += Utility_from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (Utility_strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = Utility_strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && Utility_strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nfunction ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = Utility_sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = Utility_substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : Utility_replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? Enum_RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nfunction comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, Utility_from(Tokenizer_char()), Utility_substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nfunction declaration (value, root, parent, length) {\n\treturn node(value, root, parent, Enum_DECLARATION, Utility_substr(value, 0, length), Utility_substr(value, length + 1, -1), length)\n}\n\n;// CONCATENATED MODULE: ./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js\n\n\n\n\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += Utility_from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value,\n parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\nvar ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n\nvar isIgnoringComment = function isIgnoringComment(element) {\n return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;\n};\n\nvar createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {\n return function (element, index, children) {\n if (element.type !== 'rule' || cache.compat) return;\n var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);\n\n if (unsafePseudoClasses) {\n var isNested = !!element.parent; // in nested rules comments become children of the \"auto-inserted\" rule and that's always the `element.parent`\n //\n // considering this input:\n // .a {\n // .b /* comm */ {}\n // color: hotpink;\n // }\n // we get output corresponding to this:\n // .a {\n // & {\n // /* comm */\n // color: hotpink;\n // }\n // .b {}\n // }\n\n var commentContainer = isNested ? element.parent.children : // global rule at the root level\n children;\n\n for (var i = commentContainer.length - 1; i >= 0; i--) {\n var node = commentContainer[i];\n\n if (node.line < element.line) {\n break;\n } // it is quite weird but comments are *usually* put at `column: element.column - 1`\n // so we seek *from the end* for the node that is earlier than the rule's `element` and check that\n // this will also match inputs like this:\n // .a {\n // /* comm */\n // .b {}\n // }\n //\n // but that is fine\n //\n // it would be the easiest to change the placement of the comment to be the first child of the rule:\n // .a {\n // .b { /* comm */ }\n // }\n // with such inputs we wouldn't have to search for the comment at all\n // TODO: consider changing this comment placement in the next major version\n\n\n if (node.column < element.column) {\n if (isIgnoringComment(node)) {\n return;\n }\n\n break;\n }\n }\n\n unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n });\n }\n };\n};\n\nvar isImportRule = function isImportRule(element) {\n return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;\n};\n\nvar isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {\n for (var i = index - 1; i >= 0; i--) {\n if (!isImportRule(children[i])) {\n return true;\n }\n }\n\n return false;\n}; // use this to remove incorrect elements from further processing\n// so they don't get handed to the `sheet` (or anything else)\n// as that could potentially lead to additional logs which in turn could be overhelming to the user\n\n\nvar nullifyElement = function nullifyElement(element) {\n element.type = '';\n element.value = '';\n element[\"return\"] = '';\n element.children = '';\n element.props = '';\n};\n\nvar incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {\n if (!isImportRule(element)) {\n return;\n }\n\n if (element.parent) {\n console.error(\"`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.\");\n nullifyElement(element);\n } else if (isPrependedWithRegularRules(index, children)) {\n console.error(\"`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.\");\n nullifyElement(element);\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction emotion_cache_browser_esm_prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return Enum_WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return Enum_WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return Enum_WEBKIT + value + Enum_MOZ + value + Enum_MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return Enum_WEBKIT + value + Enum_MS + value + value;\n // order\n\n case 6165:\n return Enum_WEBKIT + value + Enum_MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return Enum_WEBKIT + value + Utility_replace(value, /(\\w+).+(:[^]+)/, Enum_WEBKIT + 'box-$1$2' + Enum_MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return Enum_WEBKIT + value + Enum_MS + 'flex-item-' + Utility_replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return Enum_WEBKIT + value + Enum_MS + 'flex-line-pack' + Utility_replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return Enum_WEBKIT + 'box-' + Utility_replace(value, '-grow', '') + Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return Enum_WEBKIT + Utility_replace(value, /([^-])(transform)/g, '$1' + Enum_WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return Utility_replace(Utility_replace(Utility_replace(value, /(zoom-|grab)/, Enum_WEBKIT + '$1'), /(image-set)/, Enum_WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return Utility_replace(value, /(image-set\\([^]*)/, Enum_WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return Utility_replace(Utility_replace(value, /(.+:)(flex-)?(.*)/, Enum_WEBKIT + 'box-pack:$3' + Enum_MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + Enum_WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return Utility_replace(value, /(.+)-inline(.+)/, Enum_WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (Utility_strlen(value) - 1 - length > 6) switch (Utility_charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (Utility_charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return Utility_replace(value, /(.+:)(.+)-([^]+)/, '$1' + Enum_WEBKIT + '$2-$3' + '$1' + Enum_MOZ + (Utility_charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? emotion_cache_browser_esm_prefix(Utility_replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (Utility_charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (Utility_charat(value, Utility_strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return Utility_replace(value, ':', ':' + Enum_WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return Utility_replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + Enum_WEBKIT + (Utility_charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + Enum_WEBKIT + '$2$3' + '$1' + Enum_MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (Utility_charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return Enum_WEBKIT + value + Enum_MS + value + value;\n }\n\n return value;\n}\n\nvar emotion_cache_browser_esm_prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case Enum_DECLARATION:\n element[\"return\"] = emotion_cache_browser_esm_prefix(element.value, element.length);\n break;\n\n case Enum_KEYFRAMES:\n return Serializer_serialize([Tokenizer_copy(element, {\n value: Utility_replace(element.value, '@', '@' + Enum_WEBKIT)\n })], callback);\n\n case Enum_RULESET:\n if (element.length) return Utility_combine(element.props, function (value) {\n switch (Utility_match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return Serializer_serialize([Tokenizer_copy(element, {\n props: [Utility_replace(value, /:(read-\\w+)/, ':' + Enum_MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return Serializer_serialize([Tokenizer_copy(element, {\n props: [Utility_replace(value, /:(plac\\w+)/, ':' + Enum_WEBKIT + 'input-$1')]\n }), Tokenizer_copy(element, {\n props: [Utility_replace(value, /:(plac\\w+)/, ':' + Enum_MOZ + '$1')]\n }), Tokenizer_copy(element, {\n props: [Utility_replace(value, /:(plac\\w+)/, Enum_MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [emotion_cache_browser_esm_prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (false) {}\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n if (false) {}\n\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' '); // $FlowFixMe\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n if (false) {}\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, false ? 0 : rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return Serializer_serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n if (false) {}\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\n\n\n\n/***/ }),\n\n/***/ 5042:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Z\": function() { return /* binding */ memoize; }\n/* harmony export */ });\nfunction memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\n\n\n\n/***/ }),\n\n/***/ 6498:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"C\": function() { return /* binding */ CacheProvider; },\n/* harmony export */ \"T\": function() { return /* binding */ ThemeContext; },\n/* harmony export */ \"i\": function() { return /* binding */ isBrowser; },\n/* harmony export */ \"w\": function() { return /* binding */ withEmotionCache; }\n/* harmony export */ });\n/* unused harmony exports E, _, a, b, c, h, u */\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294);\n/* harmony import */ var _emotion_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8417);\n/* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8137);\n/* harmony import */ var _emotion_use_insertion_effect_with_fallbacks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1946);\n\n\n\n\n\n\n\n\n\n\nvar isBrowser = \"object\" !== 'undefined';\nvar hasOwn = {}.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */react__WEBPACK_IMPORTED_MODULE_0__.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */(0,_emotion_cache__WEBPACK_IMPORTED_MODULE_1__/* [\"default\"] */ .Z)({\n key: 'css'\n}) : null);\n\nif (false) {}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {\n // the cache will never be null in the browser\n var cache = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nif (!isBrowser) {\n withEmotionCache = function withEmotionCache(func) {\n return function (props) {\n var cache = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(EmotionCacheContext);\n\n if (cache === null) {\n // yes, we're potentially creating this on every render\n // it doesn't actually matter though since it's only on the server\n // so there will only every be a single render\n // that could change in the future because of suspense and etc. but for now,\n // this works and i don't want to optimise for a future thing that we aren't sure about\n cache = (0,_emotion_cache__WEBPACK_IMPORTED_MODULE_1__/* [\"default\"] */ .Z)({\n key: 'css'\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(EmotionCacheContext.Provider, {\n value: cache\n }, func(props, cache));\n } else {\n return func(props, cache);\n }\n };\n };\n}\n\nvar ThemeContext = /* #__PURE__ */react__WEBPACK_IMPORTED_MODULE_0__.createContext({});\n\nif (false) {}\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if (false) {}\n\n return mergedTheme;\n }\n\n if (false) {}\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */(/* unused pure expression or super */ null && (weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n})));\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/React.forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar getLastPart = function getLastPart(functionName) {\n // The match may be something like 'Object.createEmotionProps' or\n // 'Loader.prototype.render'\n var parts = functionName.split('.');\n return parts[parts.length - 1];\n};\n\nvar getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {\n // V8\n var match = /^\\s+at\\s+([A-Za-z0-9$.]+)\\s/.exec(line);\n if (match) return getLastPart(match[1]); // Safari / Firefox\n\n match = /^([A-Za-z0-9$.]+)@/.exec(line);\n if (match) return getLastPart(match[1]);\n return undefined;\n};\n\nvar internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS\n// identifiers, thus we only need to replace what is a valid character for JS,\n// but not for CSS.\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {\n if (!stackTrace) return undefined;\n var lines = stackTrace.split('\\n');\n\n for (var i = 0; i < lines.length; i++) {\n var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just \"Error\"\n\n if (!functionName) continue; // If we reach one of these, we have gone too far and should quit\n\n if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an\n // uppercase letter\n\n if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);\n }\n\n return undefined;\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (false) {}\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwn.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when\n // the label hasn't already been computed\n\n if (false) { var label; }\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */(/* unused pure expression or super */ null && (withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n if (false) { var labelFromStack; }\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwn.call(props, key) && key !== 'css' && key !== typePropName && ( true || 0)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n})));\n\nif (false) {}\n\nvar Emotion$1 = (/* unused pure expression or super */ null && (Emotion));\n\n\n\n\n/***/ }),\n\n/***/ 917:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"F4\": function() { return /* binding */ keyframes; },\n/* harmony export */ \"iv\": function() { return /* binding */ css; },\n/* harmony export */ \"xB\": function() { return /* binding */ Global; }\n/* harmony export */ });\n/* unused harmony exports ClassNames, createElement, jsx */\n/* harmony import */ var _emotion_element_43c6fea0_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6498);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294);\n/* harmony import */ var _emotion_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(444);\n/* harmony import */ var _emotion_use_insertion_effect_with_fallbacks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1946);\n/* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8137);\n/* harmony import */ var _emotion_cache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8417);\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8679);\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\n\n\n\n\n\n\n\nvar pkg = {\n\tname: \"@emotion/react\",\n\tversion: \"11.11.4\",\n\tmain: \"dist/emotion-react.cjs.js\",\n\tmodule: \"dist/emotion-react.esm.js\",\n\tbrowser: {\n\t\t\"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n\t},\n\texports: {\n\t\t\".\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./dist/emotion-react.worker.esm.js\",\n\t\t\t\tbrowser: \"./dist/emotion-react.browser.esm.js\",\n\t\t\t\t\"default\": \"./dist/emotion-react.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./dist/emotion-react.cjs.mjs\",\n\t\t\t\"default\": \"./dist/emotion-react.cjs.js\"\n\t\t},\n\t\t\"./jsx-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js\"\n\t\t},\n\t\t\"./_isolated-hnrs\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js\",\n\t\t\t\tbrowser: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js\",\n\t\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs\",\n\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js\"\n\t\t},\n\t\t\"./jsx-dev-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js\"\n\t\t},\n\t\t\"./package.json\": \"./package.json\",\n\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\"./macro\": {\n\t\t\ttypes: {\n\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t},\n\t\t\t\"default\": \"./macro.js\"\n\t\t}\n\t},\n\ttypes: \"types/index.d.ts\",\n\tfiles: [\n\t\t\"src\",\n\t\t\"dist\",\n\t\t\"jsx-runtime\",\n\t\t\"jsx-dev-runtime\",\n\t\t\"_isolated-hnrs\",\n\t\t\"types/*.d.ts\",\n\t\t\"macro.*\"\n\t],\n\tsideEffects: false,\n\tauthor: \"Emotion Contributors\",\n\tlicense: \"MIT\",\n\tscripts: {\n\t\t\"test:typescript\": \"dtslint types\"\n\t},\n\tdependencies: {\n\t\t\"@babel/runtime\": \"^7.18.3\",\n\t\t\"@emotion/babel-plugin\": \"^11.11.0\",\n\t\t\"@emotion/cache\": \"^11.11.0\",\n\t\t\"@emotion/serialize\": \"^1.1.3\",\n\t\t\"@emotion/use-insertion-effect-with-fallbacks\": \"^1.0.1\",\n\t\t\"@emotion/utils\": \"^1.2.1\",\n\t\t\"@emotion/weak-memoize\": \"^0.3.1\",\n\t\t\"hoist-non-react-statics\": \"^3.3.1\"\n\t},\n\tpeerDependencies: {\n\t\treact: \">=16.8.0\"\n\t},\n\tpeerDependenciesMeta: {\n\t\t\"@types/react\": {\n\t\t\toptional: true\n\t\t}\n\t},\n\tdevDependencies: {\n\t\t\"@definitelytyped/dtslint\": \"0.0.112\",\n\t\t\"@emotion/css\": \"11.11.2\",\n\t\t\"@emotion/css-prettifier\": \"1.1.3\",\n\t\t\"@emotion/server\": \"11.11.0\",\n\t\t\"@emotion/styled\": \"11.11.0\",\n\t\t\"html-tag-names\": \"^1.1.2\",\n\t\treact: \"16.14.0\",\n\t\t\"svg-tag-names\": \"^1.1.1\",\n\t\ttypescript: \"^4.5.5\"\n\t},\n\trepository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n\tpublishConfig: {\n\t\taccess: \"public\"\n\t},\n\t\"umd:main\": \"dist/emotion-react.umd.min.js\",\n\tpreconstruct: {\n\t\tentrypoints: [\n\t\t\t\"./index.js\",\n\t\t\t\"./jsx-runtime.js\",\n\t\t\t\"./jsx-dev-runtime.js\",\n\t\t\t\"./_isolated-hnrs.js\"\n\t\t],\n\t\tumdName: \"emotionReact\",\n\t\texports: {\n\t\t\tenvConditions: [\n\t\t\t\t\"browser\",\n\t\t\t\t\"worker\"\n\t\t\t],\n\t\t\textra: {\n\t\t\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\t\t\"./macro\": {\n\t\t\t\t\ttypes: {\n\t\t\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t\t\t},\n\t\t\t\t\t\"default\": \"./macro.js\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar jsx = function jsx(type, props) {\n var args = arguments;\n\n if (props == null || !hasOwn.call(props, 'css')) {\n // $FlowFixMe\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false; // maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */(0,_emotion_element_43c6fea0_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.w)(function (props, cache) {\n if (false) {}\n\n var styles = props.styles;\n var serialized = (0,_emotion_serialize__WEBPACK_IMPORTED_MODULE_2__/* .serializeStyles */ .O)([styles], undefined, react__WEBPACK_IMPORTED_MODULE_0__.useContext(_emotion_element_43c6fea0_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.T));\n\n if (!_emotion_element_43c6fea0_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__.i) {\n var _ref;\n\n var serializedNames = serialized.name;\n var serializedStyles = serialized.styles;\n var next = serialized.next;\n\n while (next !== undefined) {\n serializedNames += ' ' + next.name;\n serializedStyles += next.styles;\n next = next.next;\n }\n\n var shouldCache = cache.compat === true;\n var rules = cache.insert(\"\", {\n name: serializedNames,\n styles: serializedStyles\n }, cache.sheet, shouldCache);\n\n if (shouldCache) {\n return null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"style\", (_ref = {}, _ref[\"data-emotion\"] = cache.key + \"-global \" + serializedNames, _ref.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref.nonce = cache.sheet.nonce, _ref));\n } // yes, i know these hooks are used conditionally\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n (0,_emotion_use_insertion_effect_with_fallbacks__WEBPACK_IMPORTED_MODULE_1__/* .useInsertionEffectWithLayoutFallback */ .j)(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false; // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n (0,_emotion_use_insertion_effect_with_fallbacks__WEBPACK_IMPORTED_MODULE_1__/* .useInsertionEffectWithLayoutFallback */ .j)(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n (0,_emotion_utils__WEBPACK_IMPORTED_MODULE_6__/* .insertStyles */ .My)(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nif (false) {}\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (0,_emotion_serialize__WEBPACK_IMPORTED_MODULE_2__/* .serializeStyles */ .O)(args);\n}\n\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n if (false) {}\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */(/* unused pure expression or super */ null && (withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && \"production\" !== 'production') {}\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && \"production\" !== 'production') {}\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n})));\n\nif (false) {}\n\nif (false) { var globalKey, globalContext, isTestEnv, isBrowser; }\n\n\n\n\n/***/ }),\n\n/***/ 8137:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"O\": function() { return /* binding */ serializeStyles; }\n});\n\n;// CONCATENATED MODULE: ./node_modules/@emotion/hash/dist/emotion-hash.esm.js\n/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\n\n\n;// CONCATENATED MODULE: ./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js\nvar unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\n\n\n// EXTERNAL MODULE: ./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js\nvar emotion_memoize_esm = __webpack_require__(5042);\n;// CONCATENATED MODULE: ./node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js\n\n\n\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */(0,emotion_memoize_esm/* default */.Z)(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (false) { var hyphenatedCache, hyphenPattern, msPattern, oldProcessStyleValue, contentValues, contentValuePattern; }\n\nvar noComponentSelectorMessage = (/* unused pure expression or super */ null && ('Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.'));\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n if (interpolation.__emotion_styles !== undefined) {\n if (false) {}\n\n return interpolation;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = interpolation.styles + \";\";\n\n if (false) {}\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n } else if (false) {}\n\n break;\n }\n\n case 'string':\n if (false) { var replaced, matched; }\n\n break;\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n if (registered == null) {\n return interpolation;\n }\n\n var cached = registered[interpolation];\n return cached !== undefined ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && \"production\" !== 'production') {}\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (_key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n if (false) {}\n\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\nvar sourceMapPattern;\n\nif (false) {} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n if (false) {}\n\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n if (false) {}\n\n styles += strings[i];\n }\n }\n\n var sourceMap;\n\n if (false) {} // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + // $FlowFixMe we know it's not null\n match[1];\n }\n\n var name = murmur2(styles) + identifierName;\n\n if (false) {}\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\n\n\n\n\n/***/ }),\n\n/***/ 1946:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar react__WEBPACK_IMPORTED_MODULE_0___namespace_cache;\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"L\": function() { return /* binding */ useInsertionEffectAlwaysWithSyncFallback; },\n/* harmony export */ \"j\": function() { return /* binding */ useInsertionEffectWithLayoutFallback; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294);\n\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = /*#__PURE__*/ (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__, 2)))['useInsertion' + 'Effect'] ? /*#__PURE__*/ (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__, 2)))['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect;\n\n\n\n\n/***/ }),\n\n/***/ 444:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"My\": function() { return /* binding */ insertStyles; },\n/* harmony export */ \"fp\": function() { return /* binding */ getRegisteredStyles; },\n/* harmony export */ \"hC\": function() { return /* binding */ registerStyles; }\n/* harmony export */ });\nvar isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\n\n\n\n/***/ }),\n\n/***/ 8628:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"i\": function() { return /* binding */ useDefaultProps; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294);\n/* harmony import */ var _mui_system_DefaultPropsProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2842);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5893);\n'use client';\n\n\n\n\n\n\nfunction DefaultPropsProvider(props) {\n return /*#__PURE__*/_jsx(SystemDefaultPropsProvider, _extends({}, props));\n}\n false ? 0 : void 0;\n/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (DefaultPropsProvider)));\nfunction useDefaultProps(params) {\n return (0,_mui_system_DefaultPropsProvider__WEBPACK_IMPORTED_MODULE_2__/* .useDefaultProps */ .i)(params);\n}\n\n/***/ }),\n\n/***/ 9773:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"Z\": function() { return /* binding */ material_GlobalStyles_GlobalStyles; }\n});\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js\nvar esm_extends = __webpack_require__(7462);\n// EXTERNAL MODULE: ./node_modules/react/index.js\nvar react = __webpack_require__(7294);\n// EXTERNAL MODULE: ./node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js\nvar GlobalStyles = __webpack_require__(1234);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/useTheme.js\nvar useTheme = __webpack_require__(6682);\n// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js\nvar jsx_runtime = __webpack_require__(5893);\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js\n'use client';\n\n\n\n\n\n\nfunction GlobalStyles_GlobalStyles({\n styles,\n themeId,\n defaultTheme = {}\n}) {\n const upperTheme = (0,useTheme/* default */.Z)(defaultTheme);\n const globalStyles = typeof styles === 'function' ? styles(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles;\n return /*#__PURE__*/(0,jsx_runtime.jsx)(GlobalStyles/* default */.Z, {\n styles: globalStyles\n });\n}\n false ? 0 : void 0;\n/* harmony default export */ var esm_GlobalStyles_GlobalStyles = (GlobalStyles_GlobalStyles);\n// EXTERNAL MODULE: ./node_modules/@mui/material/styles/defaultTheme.js\nvar defaultTheme = __webpack_require__(247);\n// EXTERNAL MODULE: ./node_modules/@mui/material/styles/identifier.js\nvar identifier = __webpack_require__(606);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/GlobalStyles/GlobalStyles.js\n'use client';\n\n\n\n\n\n\n\n\nfunction GlobalStyles_GlobalStyles_GlobalStyles(props) {\n return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_GlobalStyles_GlobalStyles, (0,esm_extends/* default */.Z)({}, props, {\n defaultTheme: defaultTheme/* default */.Z,\n themeId: identifier/* default */.Z\n }));\n}\n false ? 0 : void 0;\n/* harmony default export */ var material_GlobalStyles_GlobalStyles = (GlobalStyles_GlobalStyles_GlobalStyles);\n\n/***/ }),\n\n/***/ 1265:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"Z\": function() { return /* binding */ styles_createTheme; }\n});\n\n// UNUSED EXPORTS: createMuiTheme\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js\nvar esm_extends = __webpack_require__(7462);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\nvar objectWithoutPropertiesLoose = __webpack_require__(3366);\n// EXTERNAL MODULE: ./node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js\nvar formatMuiErrorMessage = __webpack_require__(8758);\n// EXTERNAL MODULE: ./node_modules/@mui/utils/deepmerge/deepmerge.js\nvar deepmerge = __webpack_require__(8027);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js + 5 modules\nvar defaultSxConfig = __webpack_require__(4920);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js\nvar styleFunctionSx = __webpack_require__(6523);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/createTheme/createTheme.js + 2 modules\nvar createTheme = __webpack_require__(7172);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/styles/createMixins.js\n\nfunction createMixins(breakpoints, mixins) {\n return (0,esm_extends/* default */.Z)({\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n }\n }, mixins);\n}\n// EXTERNAL MODULE: ./node_modules/@mui/system/colorManipulator.js\nvar colorManipulator = __webpack_require__(2101);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/colors/common.js\nconst common = {\n black: '#000',\n white: '#fff'\n};\n/* harmony default export */ var colors_common = (common);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/colors/grey.js\nconst grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\n/* harmony default export */ var colors_grey = (grey);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/colors/purple.js\nconst purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\n/* harmony default export */ var colors_purple = (purple);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/colors/red.js\nconst red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\n/* harmony default export */ var colors_red = (red);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/colors/orange.js\nconst orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\n/* harmony default export */ var colors_orange = (orange);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/colors/blue.js\nconst blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\n/* harmony default export */ var colors_blue = (blue);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/colors/lightBlue.js\nconst lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\n/* harmony default export */ var colors_lightBlue = (lightBlue);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/colors/green.js\nconst green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\n/* harmony default export */ var colors_green = (green);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/styles/createPalette.js\n\n\n\nconst _excluded = [\"mode\", \"contrastThreshold\", \"tonalOffset\"];\n\n\n\n\n\n\n\n\n\n\nconst light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: colors_common.white,\n default: colors_common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nconst dark = {\n text: {\n primary: colors_common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: colors_common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = (0,colorManipulator/* lighten */.$n)(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = (0,colorManipulator/* darken */._j)(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: colors_blue[200],\n light: colors_blue[50],\n dark: colors_blue[400]\n };\n }\n return {\n main: colors_blue[700],\n light: colors_blue[400],\n dark: colors_blue[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: colors_purple[200],\n light: colors_purple[50],\n dark: colors_purple[400]\n };\n }\n return {\n main: colors_purple[500],\n light: colors_purple[300],\n dark: colors_purple[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: colors_red[500],\n light: colors_red[300],\n dark: colors_red[700]\n };\n }\n return {\n main: colors_red[700],\n light: colors_red[400],\n dark: colors_red[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: colors_lightBlue[400],\n light: colors_lightBlue[300],\n dark: colors_lightBlue[700]\n };\n }\n return {\n main: colors_lightBlue[700],\n light: colors_lightBlue[500],\n dark: colors_lightBlue[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: colors_green[400],\n light: colors_green[300],\n dark: colors_green[700]\n };\n }\n return {\n main: colors_green[800],\n light: colors_green[500],\n dark: colors_green[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: colors_orange[400],\n light: colors_orange[300],\n dark: colors_orange[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: colors_orange[500],\n dark: colors_orange[900]\n };\n}\nfunction createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2\n } = palette,\n other = (0,objectWithoutPropertiesLoose/* default */.Z)(palette, _excluded);\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n const contrastText = (0,colorManipulator/* getContrastRatio */.mi)(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (false) {}\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = (0,esm_extends/* default */.Z)({}, color);\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error( false ? 0 : (0,formatMuiErrorMessage/* default */.Z)(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error( false ? 0 : (0,formatMuiErrorMessage/* default */.Z)(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n const modes = {\n dark,\n light\n };\n if (false) {}\n const paletteOutput = (0,deepmerge/* default */.Z)((0,esm_extends/* default */.Z)({\n // A collection of common colors.\n common: (0,esm_extends/* default */.Z)({}, colors_common),\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey: colors_grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset\n }, modes[mode]), other);\n return paletteOutput;\n}\n;// CONCATENATED MODULE: ./node_modules/@mui/material/styles/createTypography.js\n\n\nconst createTypography_excluded = [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"];\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nfunction createTypography(palette, typography) {\n const _ref = typeof typography === 'function' ? typography(palette) : typography,\n {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2\n } = _ref,\n other = (0,objectWithoutPropertiesLoose/* default */.Z)(_ref, createTypography_excluded);\n if (false) {}\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => (0,esm_extends/* default */.Z)({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}, casing, allVariants);\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return (0,deepmerge/* default */.Z)((0,esm_extends/* default */.Z)({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n });\n}\n;// CONCATENATED MODULE: ./node_modules/@mui/material/styles/shadows.js\nconst shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\n/* harmony default export */ var styles_shadows = (shadows);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/styles/createTransitions.js\n\n\nconst createTransitions_excluded = [\"duration\", \"easing\", \"delay\"];\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nconst easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nconst duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);\n}\nfunction createTransitions(inputTransitions) {\n const mergedEasing = (0,esm_extends/* default */.Z)({}, easing, inputTransitions.easing);\n const mergedDuration = (0,esm_extends/* default */.Z)({}, duration, inputTransitions.duration);\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0\n } = options,\n other = (0,objectWithoutPropertiesLoose/* default */.Z)(options, createTransitions_excluded);\n if (false) {}\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return (0,esm_extends/* default */.Z)({\n getAutoHeightDuration,\n create\n }, inputTransitions, {\n easing: mergedEasing,\n duration: mergedDuration\n });\n}\n;// CONCATENATED MODULE: ./node_modules/@mui/material/styles/zIndex.js\n// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\n/* harmony default export */ var styles_zIndex = (zIndex);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/styles/createTheme.js\n\n\n\nconst createTheme_excluded = [\"breakpoints\", \"mixins\", \"spacing\", \"palette\", \"transitions\", \"typography\", \"shape\"];\n\n\n\n\n\n\n\n\n\n\nfunction createTheme_createTheme(options = {}, ...args) {\n const {\n mixins: mixinsInput = {},\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {}\n } = options,\n other = (0,objectWithoutPropertiesLoose/* default */.Z)(options, createTheme_excluded);\n if (options.vars) {\n throw new Error( false ? 0 : (0,formatMuiErrorMessage/* default */.Z)(18));\n }\n const palette = createPalette(paletteInput);\n const systemTheme = (0,createTheme/* default */.Z)(options);\n let muiTheme = (0,deepmerge/* default */.Z)(systemTheme, {\n mixins: createMixins(systemTheme.breakpoints, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: styles_shadows.slice(),\n typography: createTypography(palette, typographyInput),\n transitions: createTransitions(transitionsInput),\n zIndex: (0,esm_extends/* default */.Z)({}, styles_zIndex)\n });\n muiTheme = (0,deepmerge/* default */.Z)(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => (0,deepmerge/* default */.Z)(acc, argument), muiTheme);\n if (false) {}\n muiTheme.unstable_sxConfig = (0,esm_extends/* default */.Z)({}, defaultSxConfig/* default */.Z, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return (0,styleFunctionSx/* default */.Z)({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nlet warnedOnce = false;\nfunction createMuiTheme(...args) {\n if (false) {}\n return createTheme_createTheme(...args);\n}\n/* harmony default export */ var styles_createTheme = (createTheme_createTheme);\n\n/***/ }),\n\n/***/ 247:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var _createTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1265);\n'use client';\n\n\nconst defaultTheme = (0,_createTheme__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)();\n/* harmony default export */ __webpack_exports__[\"Z\"] = (defaultTheme);\n\n/***/ }),\n\n/***/ 606:\n/***/ (function(__unused_webpack_module, __webpack_exports__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"Z\"] = ('$$material');\n\n/***/ }),\n\n/***/ 1234:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Z\": function() { return /* binding */ GlobalStyles; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294);\n/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(917);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5893);\n'use client';\n\n\n\n\n\nfunction isEmpty(obj) {\n return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\nfunction GlobalStyles(props) {\n const {\n styles,\n defaultTheme = {}\n } = props;\n const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_emotion_react__WEBPACK_IMPORTED_MODULE_2__/* .Global */ .xB, {\n styles: globalStyles\n });\n}\n false ? 0 : void 0;\n\n/***/ }),\n\n/***/ 2101:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\nvar __webpack_unused_export__;\n\n\nvar _interopRequireDefault = __webpack_require__(4836);\n__webpack_unused_export__ = ({\n value: true\n});\nexports.Fq = alpha;\n__webpack_unused_export__ = blend;\n__webpack_unused_export__ = void 0;\nexports._j = darken;\n__webpack_unused_export__ = decomposeColor;\n__webpack_unused_export__ = emphasize;\nexports.mi = getContrastRatio;\n__webpack_unused_export__ = getLuminance;\n__webpack_unused_export__ = hexToRgb;\n__webpack_unused_export__ = hslToRgb;\nexports.$n = lighten;\n__webpack_unused_export__ = private_safeAlpha;\n__webpack_unused_export__ = void 0;\n__webpack_unused_export__ = private_safeDarken;\n__webpack_unused_export__ = private_safeEmphasize;\n__webpack_unused_export__ = private_safeLighten;\n__webpack_unused_export__ = recomposeColor;\n__webpack_unused_export__ = rgbToHex;\nvar _formatMuiErrorMessage2 = _interopRequireDefault(__webpack_require__(743));\nvar _clamp = _interopRequireDefault(__webpack_require__(9425));\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (false) {}\n return (0, _clamp.default)(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nfunction hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nfunction decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n throw new Error( false ? 0 : (0, _formatMuiErrorMessage2.default)(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n throw new Error( false ? 0 : (0, _formatMuiErrorMessage2.default)(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nconst colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? `${val}%` : val).join(' ');\n};\n__webpack_unused_export__ = colorChannel;\nconst private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && \"production\" !== 'production') {}\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\n__webpack_unused_export__ = private_safeColorChannel;\nfunction recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.indexOf('color') !== -1) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nfunction rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nfunction hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nfunction getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nfunction getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nfunction private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && \"production\" !== 'production') {}\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nfunction private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && \"production\" !== 'production') {}\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nfunction private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && \"production\" !== 'production') {}\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nfunction private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && \"production\" !== 'production') {}\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nfunction blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}\n\n/***/ }),\n\n/***/ 2842:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"i\": function() { return /* binding */ useDefaultProps; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294);\n/* harmony import */ var _mui_utils_resolveProps__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2236);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5893);\n'use client';\n\n\n\n\n\nconst PropsContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(undefined);\nfunction DefaultPropsProvider({\n value,\n children\n}) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(PropsContext.Provider, {\n value: value,\n children: children\n });\n}\n false ? 0 : void 0;\nfunction getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name]) {\n return props;\n }\n const config = theme.components[name];\n if (config.defaultProps) {\n // compatible with v5 signature\n return (0,_mui_utils_resolveProps__WEBPACK_IMPORTED_MODULE_2__/* [\"default\"] */ .Z)(config.defaultProps, props);\n }\n if (!config.styleOverrides && !config.variants) {\n // v6 signature, no property 'defaultProps'\n return (0,_mui_utils_resolveProps__WEBPACK_IMPORTED_MODULE_2__/* [\"default\"] */ .Z)(config, props);\n }\n return props;\n}\nfunction useDefaultProps({\n props,\n name\n}) {\n const ctx = react__WEBPACK_IMPORTED_MODULE_0__.useContext(PropsContext);\n return getThemeProps({\n props,\n name,\n theme: {\n components: ctx\n }\n });\n}\n/* harmony default export */ __webpack_exports__[\"Z\"] = (DefaultPropsProvider);\n\n/***/ }),\n\n/***/ 2056:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"V\": function() { return /* binding */ useRtl; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7462);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3366);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5893);\n\n\nconst _excluded = [\"value\"];\n\n\n\nconst RtlContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext();\nfunction RtlProvider(_ref) {\n let {\n value\n } = _ref,\n props = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_2__/* [\"default\"] */ .Z)(_ref, _excluded);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(RtlContext.Provider, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* [\"default\"] */ .Z)({\n value: value != null ? value : true\n }, props));\n}\n false ? 0 : void 0;\nconst useRtl = () => {\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useContext(RtlContext);\n return value != null ? value : false;\n};\n/* harmony default export */ __webpack_exports__[\"Z\"] = (RtlProvider);\n\n/***/ }),\n\n/***/ 5408:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"L7\": function() { return /* binding */ removeUnusedBreakpoints; },\n/* harmony export */ \"P$\": function() { return /* binding */ resolveBreakpointValues; },\n/* harmony export */ \"VO\": function() { return /* binding */ values; },\n/* harmony export */ \"W8\": function() { return /* binding */ createEmptyBreakpointObject; },\n/* harmony export */ \"dt\": function() { return /* binding */ mergeBreakpointsInOrder; },\n/* harmony export */ \"k9\": function() { return /* binding */ handleBreakpoints; }\n/* harmony export */ });\n/* unused harmony export computeBreakpointsBase */\n/* harmony import */ var _mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8027);\n\n\n\n\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nconst values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nfunction handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n // key is breakpoint\n if (Object.keys(themeBreakpoints.values || values).indexOf(breakpoint) !== -1) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme\n }, props[key]));\n }\n return acc;\n }, null);\n return merge(base, extended);\n };\n newStyleFunction.propTypes = false ? 0 : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nfunction createEmptyBreakpointObject(breakpointsInput = {}) {\n var _breakpointsInput$key;\n const breakpointsInOrder = (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nfunction removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nfunction mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => (0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nfunction computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nfunction resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\n/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (breakpoints)));\n\n/***/ }),\n\n/***/ 7064:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Z\": function() { return /* binding */ applyStyles; }\n/* harmony export */ });\n/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n *\n * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nfunction applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars && typeof theme.getColorSchemeSelector === 'function') {\n // If CssVarsProvider is used as a provider,\n // returns '* :where([data-mui-color-scheme=\"light|dark\"]) &'\n const selector = theme.getColorSchemeSelector(key).replace(/(\\[[^\\]]+\\])/, '*:where($1)');\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}\n\n/***/ }),\n\n/***/ 1512:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Z\": function() { return /* binding */ createBreakpoints; }\n/* harmony export */ });\n/* unused harmony export breakpointKeys */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3366);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7462);\n\n\nconst _excluded = [\"values\", \"unit\", \"step\"];\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nconst breakpointKeys = (/* unused pure expression or super */ null && (['xs', 'sm', 'md', 'lg', 'xl']));\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, acc, {\n [obj.key]: obj.val\n });\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nfunction createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5\n } = breakpoints,\n other = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__/* [\"default\"] */ .Z)(breakpoints, _excluded);\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit\n }, other);\n}\n\n/***/ }),\n\n/***/ 7172:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"Z\": function() { return /* binding */ createTheme_createTheme; }\n});\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js\nvar esm_extends = __webpack_require__(7462);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\nvar objectWithoutPropertiesLoose = __webpack_require__(3366);\n// EXTERNAL MODULE: ./node_modules/@mui/utils/deepmerge/deepmerge.js\nvar deepmerge = __webpack_require__(8027);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/createTheme/createBreakpoints.js\nvar createBreakpoints = __webpack_require__(1512);\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/createTheme/shape.js\nconst shape = {\n borderRadius: 4\n};\n/* harmony default export */ var createTheme_shape = (shape);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/spacing.js + 1 modules\nvar esm_spacing = __webpack_require__(8700);\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/createTheme/createSpacing.js\n\n\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nfunction createSpacing(spacingInput = 8) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n\n // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n // Smaller components, such as icons, can align to a 4dp grid.\n // https://m2.material.io/design/layout/understanding-layout.html\n const transform = (0,esm_spacing/* createUnarySpacing */.hB)({\n spacing: spacingInput\n });\n const spacing = (...argsInput) => {\n if (false) {}\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js\nvar styleFunctionSx = __webpack_require__(6523);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js + 5 modules\nvar defaultSxConfig = __webpack_require__(4920);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/createTheme/applyStyles.js\nvar applyStyles = __webpack_require__(7064);\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/createTheme/createTheme.js\n\n\nconst _excluded = [\"breakpoints\", \"palette\", \"spacing\", \"shape\"];\n\n\n\n\n\n\n\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {}\n } = options,\n other = (0,objectWithoutPropertiesLoose/* default */.Z)(options, _excluded);\n const breakpoints = (0,createBreakpoints/* default */.Z)(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = (0,deepmerge/* default */.Z)({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: (0,esm_extends/* default */.Z)({\n mode: 'light'\n }, paletteInput),\n spacing,\n shape: (0,esm_extends/* default */.Z)({}, createTheme_shape, shapeInput)\n }, other);\n muiTheme.applyStyles = applyStyles/* default */.Z;\n muiTheme = args.reduce((acc, argument) => (0,deepmerge/* default */.Z)(acc, argument), muiTheme);\n muiTheme.unstable_sxConfig = (0,esm_extends/* default */.Z)({}, defaultSxConfig/* default */.Z, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return (0,styleFunctionSx/* default */.Z)({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\n/* harmony default export */ var createTheme_createTheme = (createTheme);\n\n/***/ }),\n\n/***/ 7730:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var _mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8027);\n\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return (0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\n/* harmony default export */ __webpack_exports__[\"Z\"] = (merge);\n\n/***/ }),\n\n/***/ 8700:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"hB\": function() { return /* binding */ createUnarySpacing; },\n \"eI\": function() { return /* binding */ createUnaryUnit; },\n \"NA\": function() { return /* binding */ getValue; },\n \"e6\": function() { return /* binding */ margin; },\n \"o3\": function() { return /* binding */ padding; }\n});\n\n// UNUSED EXPORTS: default, getStyleFromPropValue, marginKeys, paddingKeys\n\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/breakpoints.js\nvar breakpoints = __webpack_require__(5408);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/style.js\nvar style = __webpack_require__(4844);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/merge.js\nvar merge = __webpack_require__(7730);\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/memoize.js\nfunction memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/spacing.js\n\n\n\n\n\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nconst marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nconst paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nfunction createUnaryUnit(theme, themeKey, defaultValue, propName) {\n var _getPath;\n const themeSpacing = (_getPath = (0,style/* getPath */.DW)(theme, themeKey, false)) != null ? _getPath : defaultValue;\n if (typeof themeSpacing === 'number') {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (false) {}\n return themeSpacing * abs;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (false) {}\n return themeSpacing[abs];\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (false) {}\n return () => undefined;\n}\nfunction createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nfunction getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n const abs = Math.abs(propValue);\n const transformed = transformer(abs);\n if (propValue >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n return `-${transformed}`;\n}\nfunction getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (keys.indexOf(prop) === -1) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return (0,breakpoints/* handleBreakpoints */.k9)(props, propValue, styleFromPropValue);\n}\nfunction spacing_style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge/* default */.Z, {});\n}\nfunction margin(props) {\n return spacing_style(props, marginKeys);\n}\nmargin.propTypes = false ? 0 : {};\nmargin.filterProps = marginKeys;\nfunction padding(props) {\n return spacing_style(props, paddingKeys);\n}\npadding.propTypes = false ? 0 : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return spacing_style(props, spacingKeys);\n}\nspacing.propTypes = false ? 0 : {};\nspacing.filterProps = spacingKeys;\n/* harmony default export */ var esm_spacing = ((/* unused pure expression or super */ null && (spacing)));\n\n/***/ }),\n\n/***/ 4844:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DW\": function() { return /* binding */ getPath; },\n/* harmony export */ \"Jq\": function() { return /* binding */ getStyleValue; }\n/* harmony export */ });\n/* harmony import */ var _mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2908);\n/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5408);\n\n\n\nfunction getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nfunction getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : (0,_mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return (0,_breakpoints__WEBPACK_IMPORTED_MODULE_1__/* .handleBreakpoints */ .k9)(props, propValue, styleFromPropValue);\n };\n fn.propTypes = false ? 0 : {};\n fn.filterProps = [prop];\n return fn;\n}\n/* harmony default export */ __webpack_exports__[\"ZP\"] = (style);\n\n/***/ }),\n\n/***/ 4920:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"Z\": function() { return /* binding */ styleFunctionSx_defaultSxConfig; }\n});\n\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/spacing.js + 1 modules\nvar spacing = __webpack_require__(8700);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/style.js\nvar style = __webpack_require__(4844);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/merge.js\nvar merge = __webpack_require__(7730);\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/compose.js\n\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return (0,merge/* default */.Z)(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = false ? 0 : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\n/* harmony default export */ var esm_compose = (compose);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/breakpoints.js\nvar breakpoints = __webpack_require__(5408);\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/borders.js\n\n\n\n\n\nfunction borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return (0,style/* default */.ZP)({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nconst border = createBorderStyle('border', borderTransform);\nconst borderTop = createBorderStyle('borderTop', borderTransform);\nconst borderRight = createBorderStyle('borderRight', borderTransform);\nconst borderBottom = createBorderStyle('borderBottom', borderTransform);\nconst borderLeft = createBorderStyle('borderLeft', borderTransform);\nconst borderColor = createBorderStyle('borderColor');\nconst borderTopColor = createBorderStyle('borderTopColor');\nconst borderRightColor = createBorderStyle('borderRightColor');\nconst borderBottomColor = createBorderStyle('borderBottomColor');\nconst borderLeftColor = createBorderStyle('borderLeftColor');\nconst outline = createBorderStyle('outline', borderTransform);\nconst outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nconst borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = (0,spacing/* createUnaryUnit */.eI)(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: (0,spacing/* getValue */.NA)(transformer, propValue)\n });\n return (0,breakpoints/* handleBreakpoints */.k9)(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nborderRadius.propTypes = false ? 0 : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = esm_compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\n/* harmony default export */ var esm_borders = ((/* unused pure expression or super */ null && (borders)));\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/cssGrid.js\n\n\n\n\n\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nconst gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = (0,spacing/* createUnaryUnit */.eI)(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: (0,spacing/* getValue */.NA)(transformer, propValue)\n });\n return (0,breakpoints/* handleBreakpoints */.k9)(props, props.gap, styleFromPropValue);\n }\n return null;\n};\ngap.propTypes = false ? 0 : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nconst columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = (0,spacing/* createUnaryUnit */.eI)(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: (0,spacing/* getValue */.NA)(transformer, propValue)\n });\n return (0,breakpoints/* handleBreakpoints */.k9)(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\ncolumnGap.propTypes = false ? 0 : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nconst rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = (0,spacing/* createUnaryUnit */.eI)(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: (0,spacing/* getValue */.NA)(transformer, propValue)\n });\n return (0,breakpoints/* handleBreakpoints */.k9)(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nrowGap.propTypes = false ? 0 : {};\nrowGap.filterProps = ['rowGap'];\nconst gridColumn = (0,style/* default */.ZP)({\n prop: 'gridColumn'\n});\nconst gridRow = (0,style/* default */.ZP)({\n prop: 'gridRow'\n});\nconst gridAutoFlow = (0,style/* default */.ZP)({\n prop: 'gridAutoFlow'\n});\nconst gridAutoColumns = (0,style/* default */.ZP)({\n prop: 'gridAutoColumns'\n});\nconst gridAutoRows = (0,style/* default */.ZP)({\n prop: 'gridAutoRows'\n});\nconst gridTemplateColumns = (0,style/* default */.ZP)({\n prop: 'gridTemplateColumns'\n});\nconst gridTemplateRows = (0,style/* default */.ZP)({\n prop: 'gridTemplateRows'\n});\nconst gridTemplateAreas = (0,style/* default */.ZP)({\n prop: 'gridTemplateAreas'\n});\nconst gridArea = (0,style/* default */.ZP)({\n prop: 'gridArea'\n});\nconst grid = esm_compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\n/* harmony default export */ var cssGrid = ((/* unused pure expression or super */ null && (grid)));\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/palette.js\n\n\nfunction paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nconst color = (0,style/* default */.ZP)({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst bgcolor = (0,style/* default */.ZP)({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst backgroundColor = (0,style/* default */.ZP)({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = esm_compose(color, bgcolor, backgroundColor);\n/* harmony default export */ var esm_palette = ((/* unused pure expression or super */ null && (palette)));\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/sizing.js\n\n\n\nfunction sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nconst width = (0,style/* default */.ZP)({\n prop: 'width',\n transform: sizingTransform\n});\nconst maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n var _props$theme, _props$theme2;\n const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || breakpoints/* values */.VO[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return (0,breakpoints/* handleBreakpoints */.k9)(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nconst minWidth = (0,style/* default */.ZP)({\n prop: 'minWidth',\n transform: sizingTransform\n});\nconst height = (0,style/* default */.ZP)({\n prop: 'height',\n transform: sizingTransform\n});\nconst maxHeight = (0,style/* default */.ZP)({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nconst minHeight = (0,style/* default */.ZP)({\n prop: 'minHeight',\n transform: sizingTransform\n});\nconst sizeWidth = (0,style/* default */.ZP)({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nconst sizeHeight = (0,style/* default */.ZP)({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nconst boxSizing = (0,style/* default */.ZP)({\n prop: 'boxSizing'\n});\nconst sizing = esm_compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\n/* harmony default export */ var esm_sizing = ((/* unused pure expression or super */ null && (sizing)));\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js\n\n\n\n\n\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n // spacing\n p: {\n style: spacing/* padding */.o3\n },\n pt: {\n style: spacing/* padding */.o3\n },\n pr: {\n style: spacing/* padding */.o3\n },\n pb: {\n style: spacing/* padding */.o3\n },\n pl: {\n style: spacing/* padding */.o3\n },\n px: {\n style: spacing/* padding */.o3\n },\n py: {\n style: spacing/* padding */.o3\n },\n padding: {\n style: spacing/* padding */.o3\n },\n paddingTop: {\n style: spacing/* padding */.o3\n },\n paddingRight: {\n style: spacing/* padding */.o3\n },\n paddingBottom: {\n style: spacing/* padding */.o3\n },\n paddingLeft: {\n style: spacing/* padding */.o3\n },\n paddingX: {\n style: spacing/* padding */.o3\n },\n paddingY: {\n style: spacing/* padding */.o3\n },\n paddingInline: {\n style: spacing/* padding */.o3\n },\n paddingInlineStart: {\n style: spacing/* padding */.o3\n },\n paddingInlineEnd: {\n style: spacing/* padding */.o3\n },\n paddingBlock: {\n style: spacing/* padding */.o3\n },\n paddingBlockStart: {\n style: spacing/* padding */.o3\n },\n paddingBlockEnd: {\n style: spacing/* padding */.o3\n },\n m: {\n style: spacing/* margin */.e6\n },\n mt: {\n style: spacing/* margin */.e6\n },\n mr: {\n style: spacing/* margin */.e6\n },\n mb: {\n style: spacing/* margin */.e6\n },\n ml: {\n style: spacing/* margin */.e6\n },\n mx: {\n style: spacing/* margin */.e6\n },\n my: {\n style: spacing/* margin */.e6\n },\n margin: {\n style: spacing/* margin */.e6\n },\n marginTop: {\n style: spacing/* margin */.e6\n },\n marginRight: {\n style: spacing/* margin */.e6\n },\n marginBottom: {\n style: spacing/* margin */.e6\n },\n marginLeft: {\n style: spacing/* margin */.e6\n },\n marginX: {\n style: spacing/* margin */.e6\n },\n marginY: {\n style: spacing/* margin */.e6\n },\n marginInline: {\n style: spacing/* margin */.e6\n },\n marginInlineStart: {\n style: spacing/* margin */.e6\n },\n marginInlineEnd: {\n style: spacing/* margin */.e6\n },\n marginBlock: {\n style: spacing/* margin */.e6\n },\n marginBlockStart: {\n style: spacing/* margin */.e6\n },\n marginBlockEnd: {\n style: spacing/* margin */.e6\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: gap\n },\n rowGap: {\n style: rowGap\n },\n columnGap: {\n style: columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: sizingTransform\n },\n maxWidth: {\n style: maxWidth\n },\n minWidth: {\n transform: sizingTransform\n },\n height: {\n transform: sizingTransform\n },\n maxHeight: {\n transform: sizingTransform\n },\n minHeight: {\n transform: sizingTransform\n },\n boxSizing: {},\n // typography\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\n/* harmony default export */ var styleFunctionSx_defaultSxConfig = (defaultSxConfig);\n\n/***/ }),\n\n/***/ 6523:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"n\": function() { return /* binding */ unstable_createStyleFunctionSx; }\n/* harmony export */ });\n/* harmony import */ var _mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2908);\n/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7730);\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4844);\n/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5408);\n/* harmony import */ var _defaultSxConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4920);\n\n\n\n\n\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .getPath */ .DW)(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .getStyleValue */ .Jq)(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .getStyleValue */ .Jq)(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : (0,_mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_1__/* [\"default\"] */ .Z)(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return (0,_breakpoints__WEBPACK_IMPORTED_MODULE_2__/* .handleBreakpoints */ .k9)(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n var _theme$unstable_sxCon;\n const {\n sx,\n theme = {}\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : _defaultSxConfig__WEBPACK_IMPORTED_MODULE_3__/* [\"default\"] */ .Z;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = (0,_breakpoints__WEBPACK_IMPORTED_MODULE_2__/* .createEmptyBreakpointObject */ .W8)(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = (0,_merge__WEBPACK_IMPORTED_MODULE_4__/* [\"default\"] */ .Z)(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = (0,_breakpoints__WEBPACK_IMPORTED_MODULE_2__/* .handleBreakpoints */ .k9)({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme\n });\n } else {\n css = (0,_merge__WEBPACK_IMPORTED_MODULE_4__/* [\"default\"] */ .Z)(css, breakpointsValues);\n }\n }\n } else {\n css = (0,_merge__WEBPACK_IMPORTED_MODULE_4__/* [\"default\"] */ .Z)(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n return (0,_breakpoints__WEBPACK_IMPORTED_MODULE_2__/* .removeUnusedBreakpoints */ .L7)(breakpointsKeys, css);\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\n/* harmony default export */ __webpack_exports__[\"Z\"] = (styleFunctionSx);\n\n/***/ }),\n\n/***/ 6682:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export systemDefaultTheme */\n/* harmony import */ var _createTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7172);\n/* harmony import */ var _useThemeWithoutDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4168);\n'use client';\n\n\n\nconst systemDefaultTheme = (0,_createTheme__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return (0,_useThemeWithoutDefault__WEBPACK_IMPORTED_MODULE_1__/* [\"default\"] */ .Z)(defaultTheme);\n}\n/* harmony default export */ __webpack_exports__[\"Z\"] = (useTheme);\n\n/***/ }),\n\n/***/ 4168:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294);\n/* harmony import */ var _mui_styled_engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6498);\n'use client';\n\n\n\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_mui_styled_engine__WEBPACK_IMPORTED_MODULE_1__.T);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\n/* harmony default export */ __webpack_exports__[\"Z\"] = (useTheme);\n\n/***/ }),\n\n/***/ 2908:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Z\": function() { return /* binding */ capitalize; }\n/* harmony export */ });\n/* harmony import */ var _mui_utils_formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8758);\n\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nfunction capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error( false ? 0 : (0,_mui_utils_formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\n/***/ }),\n\n/***/ 9425:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* reexport */ clamp_clamp; }\n});\n\n;// CONCATENATED MODULE: ./node_modules/@mui/utils/clamp/clamp.js\nfunction clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\n/* harmony default export */ var clamp_clamp = (clamp);\n;// CONCATENATED MODULE: ./node_modules/@mui/utils/clamp/index.js\n\n\n/***/ }),\n\n/***/ 8027:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"P\": function() { return /* binding */ isPlainObject; },\n/* harmony export */ \"Z\": function() { return /* binding */ deepmerge; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7462);\n\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nfunction isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (!isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\nfunction deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, target) : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n if (isPlainObject(source[key]) &&\n // Avoid prototype pollution\n Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\n}\n\n/***/ }),\n\n/***/ 8758:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Z\": function() { return /* binding */ formatMuiErrorMessage; }\n/* harmony export */ });\n/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.\n * @param {number} code\n */\nfunction formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe if we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n /* eslint-disable prefer-template */\n let url = 'https://mui.com/production-error/?code=' + code;\n for (let i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}\n\n/***/ }),\n\n/***/ 743:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* reexport safe */ _formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_0__.Z; }\n/* harmony export */ });\n/* harmony import */ var _formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8758);\n\n\n/***/ }),\n\n/***/ 2236:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Z\": function() { return /* binding */ resolveProps; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7462);\n\n/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param {object} defaultProps\n * @param {object} props\n * @returns {object} resolved props\n */\nfunction resolveProps(defaultProps, props) {\n const output = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, props);\n Object.keys(defaultProps).forEach(propName => {\n if (propName.toString().match(/^(components|slots)$/)) {\n output[propName] = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, defaultProps[propName], output[propName]);\n } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {\n const defaultSlotProps = defaultProps[propName] || {};\n const slotProps = props[propName];\n output[propName] = {};\n if (!slotProps || !Object.keys(slotProps)) {\n // Reduce the iteration if the slot props is empty\n output[propName] = defaultSlotProps;\n } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {\n // Reduce the iteration if the default slot props is empty\n output[propName] = slotProps;\n } else {\n output[propName] = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, slotProps);\n Object.keys(defaultSlotProps).forEach(slotPropName => {\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n });\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n });\n return output;\n}\n\n/***/ }),\n\n/***/ 6212:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.createWSOLAccountInstructions = void 0;\nconst spl_token_1 = __webpack_require__(4945);\nconst web3_js_1 = __webpack_require__(6737);\n// TODO use native-mint instead\nfunction createWSOLAccountInstructions(walletAddress, amountIn, rentExemptLamports) {\n const tempAccount = new web3_js_1.Keypair();\n const createAccountInstruction = web3_js_1.SystemProgram.createAccount({\n fromPubkey: walletAddress,\n newAccountPubkey: tempAccount.publicKey,\n lamports: amountIn.toNumber() + rentExemptLamports,\n space: spl_token_1.AccountLayout.span,\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n });\n const initAccountInstruction = spl_token_1.Token.createInitAccountInstruction(spl_token_1.TOKEN_PROGRAM_ID, spl_token_1.NATIVE_MINT, tempAccount.publicKey, walletAddress);\n const closeWSOLAccountInstruction = spl_token_1.Token.createCloseAccountInstruction(spl_token_1.TOKEN_PROGRAM_ID, tempAccount.publicKey, walletAddress, walletAddress, []);\n return {\n address: tempAccount.publicKey,\n instructions: [createAccountInstruction, initAccountInstruction],\n cleanupInstructions: [closeWSOLAccountInstruction],\n signers: [tempAccount],\n };\n}\nexports.createWSOLAccountInstructions = createWSOLAccountInstructions;\n\n\n/***/ }),\n\n/***/ 6259:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(4319), exports);\n__exportStar(__webpack_require__(1084), exports);\n\n\n/***/ }),\n\n/***/ 7855:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.DecimalUtil = void 0;\nconst spl_token_1 = __webpack_require__(4945);\nconst decimal_js_1 = __importDefault(__webpack_require__(3776));\nclass DecimalUtil {\n static adjustDecimals(input, shift = 0) {\n return input.div(decimal_js_1.default.pow(10, shift));\n }\n static fromU64(input, shift = 0) {\n return new decimal_js_1.default(input.toString()).div(new decimal_js_1.default(10).pow(shift));\n }\n static fromNumber(input, shift = 0) {\n return new decimal_js_1.default(input).div(new decimal_js_1.default(10).pow(shift));\n }\n static toU64(input, shift = 0) {\n if (input.isNeg()) {\n throw new Error(\"Negative decimal value ${input} cannot be converted to u64.\");\n }\n const shiftedValue = input.mul(new decimal_js_1.default(10).pow(shift));\n const zeroDecimalValue = shiftedValue.trunc();\n return new spl_token_1.u64(zeroDecimalValue.toString());\n }\n}\nexports.DecimalUtil = DecimalUtil;\n\n\n/***/ }),\n\n/***/ 4319:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(7855), exports);\n__exportStar(__webpack_require__(4667), exports);\n__exportStar(__webpack_require__(7399), exports);\n\n\n/***/ }),\n\n/***/ 4667:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MathUtil = exports.U64_MAX = exports.U128 = exports.TWO = exports.ONE = exports.ZERO = void 0;\nconst anchor_1 = __webpack_require__(4758);\nconst decimal_js_1 = __importDefault(__webpack_require__(3776));\n/**\n * @category Math\n */\nexports.ZERO = new anchor_1.BN(0);\n/**\n * @category Math\n */\nexports.ONE = new anchor_1.BN(1);\n/**\n * @category Math\n */\nexports.TWO = new anchor_1.BN(2);\n/**\n * @category Math\n */\nexports.U128 = exports.TWO.pow(new anchor_1.BN(128));\n/**\n * @category Math\n */\nexports.U64_MAX = exports.TWO.pow(new anchor_1.BN(64)).sub(exports.ONE);\n/**\n * @category Math\n */\nclass MathUtil {\n static toX64_BN(num) {\n return num.mul(new anchor_1.BN(2).pow(new anchor_1.BN(64)));\n }\n static toX64_Decimal(num) {\n return num.mul(decimal_js_1.default.pow(2, 64));\n }\n static toX64(num) {\n return new anchor_1.BN(num.mul(decimal_js_1.default.pow(2, 64)).floor().toFixed());\n }\n static fromX64(num) {\n return new decimal_js_1.default(num.toString()).mul(decimal_js_1.default.pow(2, -64));\n }\n static fromX64_Decimal(num) {\n return num.mul(decimal_js_1.default.pow(2, -64));\n }\n static fromX64_BN(num) {\n return num.div(new anchor_1.BN(2).pow(new anchor_1.BN(64)));\n }\n static shiftRightRoundUp(n) {\n let result = n.shrn(64);\n if (n.mod(exports.U64_MAX).gt(exports.ZERO)) {\n result = result.add(exports.ONE);\n }\n return result;\n }\n static divRoundUp(n0, n1) {\n const hasRemainder = !n0.mod(n1).eq(exports.ZERO);\n if (hasRemainder) {\n return n0.div(n1).add(new anchor_1.BN(1));\n }\n else {\n return n0.div(n1);\n }\n }\n static subUnderflowU128(n0, n1) {\n return n0.add(exports.U128).sub(n1).mod(exports.U128);\n }\n}\nexports.MathUtil = MathUtil;\n\n\n/***/ }),\n\n/***/ 7399:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Percentage = void 0;\nconst spl_token_1 = __webpack_require__(4945);\nconst decimal_js_1 = __importDefault(__webpack_require__(3776));\n/**\n * @category Math\n */\nclass Percentage {\n constructor(numerator, denominator) {\n this.toString = () => {\n return `${this.numerator.toString()}/${this.denominator.toString()}`;\n };\n this.numerator = numerator;\n this.denominator = denominator;\n }\n static fromDecimal(number) {\n return Percentage.fromFraction(number.toDecimalPlaces(1).mul(10).toNumber(), 1000);\n }\n static fromFraction(numerator, denominator) {\n const num = typeof numerator === \"number\" ? new spl_token_1.u64(numerator.toString()) : numerator;\n const denom = typeof denominator === \"number\" ? new spl_token_1.u64(denominator.toString()) : denominator;\n return new Percentage(num, denom);\n }\n toDecimal() {\n if (this.denominator.eq(new spl_token_1.u64(0))) {\n return new decimal_js_1.default(0);\n }\n return new decimal_js_1.default(this.numerator.toString()).div(new decimal_js_1.default(this.denominator.toString()));\n }\n add(p2) {\n const denomGcd = this.denominator.gcd(p2.denominator);\n const denomLcm = this.denominator.div(denomGcd).mul(p2.denominator);\n const p1DenomAdjustment = denomLcm.div(this.denominator);\n const p2DenomAdjustment = denomLcm.div(p2.denominator);\n const p1NumeratorAdjusted = this.numerator.mul(p1DenomAdjustment);\n const p2NumeratorAdjusted = p2.numerator.mul(p2DenomAdjustment);\n const newNumerator = p1NumeratorAdjusted.add(p2NumeratorAdjusted);\n return new Percentage(new spl_token_1.u64(newNumerator.toString()), new spl_token_1.u64(denomLcm.toString()));\n }\n}\nexports.Percentage = Percentage;\n\n\n/***/ }),\n\n/***/ 7623:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.AddressUtil = void 0;\nconst anchor_1 = __webpack_require__(4758);\n/**\n * @category Util\n */\nclass AddressUtil {\n static toPubKey(address) {\n return (0, anchor_1.translateAddress)(address);\n }\n static toPubKeys(addresses) {\n return addresses.map((address) => AddressUtil.toPubKey(address));\n }\n static toString(address) {\n return AddressUtil.toPubKey(address).toBase58();\n }\n static toStrings(addresses) {\n return addresses.map((address) => AddressUtil.toString(address));\n }\n static findProgramAddress(seeds, programId) {\n const [publicKey, bump] = anchor_1.utils.publicKey.findProgramAddressSync(seeds, programId);\n return { publicKey, bump };\n }\n}\nexports.AddressUtil = AddressUtil;\n\n\n/***/ }),\n\n/***/ 6208:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.deriveATA = exports.resolveOrCreateATAs = exports.resolveOrCreateATA = void 0;\nconst spl_token_1 = __webpack_require__(4945);\nconst web3_js_1 = __webpack_require__(6737);\nconst token_instructions_1 = __webpack_require__(6212);\nconst token_util_1 = __webpack_require__(7209);\nconst types_1 = __webpack_require__(7864);\n/**\n * IMPORTANT: wrappedSolAmountIn should only be used for input/source token that\n * could be SOL. This is because when SOL is the output, it is the end\n * destination, and thus does not need to be wrapped with an amount.\n *\n * @param connection Solana connection class\n * @param ownerAddress The user's public key\n * @param tokenMint Token mint address\n * @param wrappedSolAmountIn Optional. Only use for input/source token that could be SOL\n * @param payer Payer that would pay the rent for the creation of the ATAs\n * @param modeIdempotent Optional. Use CreateIdempotent instruction instead of Create instruction\n * @returns\n */\nfunction resolveOrCreateATA(connection, ownerAddress, tokenMint, getAccountRentExempt, wrappedSolAmountIn = new spl_token_1.u64(0), payer = ownerAddress, modeIdempotent = false) {\n return __awaiter(this, void 0, void 0, function* () {\n const instructions = yield resolveOrCreateATAs(connection, ownerAddress, [{ tokenMint, wrappedSolAmountIn }], getAccountRentExempt, payer, modeIdempotent);\n return instructions[0];\n });\n}\nexports.resolveOrCreateATA = resolveOrCreateATA;\n/**\n * IMPORTANT: wrappedSolAmountIn should only be used for input/source token that\n * could be SOL. This is because when SOL is the output, it is the end\n * destination, and thus does not need to be wrapped with an amount.\n *\n * @param connection Solana connection class\n * @param ownerAddress The user's public key\n * @param tokenMint Token mint address\n * @param wrappedSolAmountIn Optional. Only use for input/source token that could be SOL\n * @param payer Payer that would pay the rent for the creation of the ATAs\n * @param modeIdempotent Optional. Use CreateIdempotent instruction instead of Create instruction\n * @returns\n */\nfunction resolveOrCreateATAs(connection, ownerAddress, requests, getAccountRentExempt, payer = ownerAddress, modeIdempotent = false) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const nonNativeMints = requests.filter(({ tokenMint }) => !tokenMint.equals(spl_token_1.NATIVE_MINT));\n const nativeMints = requests.filter(({ tokenMint }) => tokenMint.equals(spl_token_1.NATIVE_MINT));\n if (nativeMints.length > 1) {\n throw new Error(\"Cannot resolve multiple WSolAccounts\");\n }\n let instructionMap = {};\n if (nonNativeMints.length > 0) {\n const nonNativeAddresses = yield Promise.all(nonNativeMints.map(({ tokenMint }) => deriveATA(ownerAddress, tokenMint)));\n const tokenAccountInfos = yield connection.getMultipleAccountsInfo(nonNativeAddresses);\n const tokenAccounts = tokenAccountInfos.map((tai) => token_util_1.TokenUtil.deserializeTokenAccount(tai === null || tai === void 0 ? void 0 : tai.data));\n tokenAccounts.forEach((tokenAccount, index) => {\n const ataAddress = nonNativeAddresses[index];\n let resolvedInstruction;\n if (tokenAccount) {\n // ATA whose owner has been changed is abnormal entity.\n // To prevent to send swap/withdraw/collect output to the ATA, an error should be thrown.\n if (!tokenAccount.owner.equals(ownerAddress)) {\n throw new Error(`ATA with change of ownership detected: ${ataAddress.toBase58()}`);\n }\n resolvedInstruction = Object.assign({ address: ataAddress }, types_1.EMPTY_INSTRUCTION);\n }\n else {\n const createAtaInstruction = createAssociatedTokenAccountInstruction(spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, spl_token_1.TOKEN_PROGRAM_ID, nonNativeMints[index].tokenMint, ataAddress, ownerAddress, payer, modeIdempotent);\n resolvedInstruction = {\n address: ataAddress,\n instructions: [createAtaInstruction],\n cleanupInstructions: [],\n signers: [],\n };\n }\n instructionMap[nonNativeMints[index].tokenMint.toBase58()] = resolvedInstruction;\n });\n }\n if (nativeMints.length > 0) {\n const accountRentExempt = yield getAccountRentExempt();\n const wrappedSolAmountIn = ((_a = nativeMints[0]) === null || _a === void 0 ? void 0 : _a.wrappedSolAmountIn) || new spl_token_1.u64(0);\n instructionMap[spl_token_1.NATIVE_MINT.toBase58()] = (0, token_instructions_1.createWSOLAccountInstructions)(ownerAddress, wrappedSolAmountIn, accountRentExempt);\n }\n // Preserve order of resolution\n return requests.map(({ tokenMint }) => instructionMap[tokenMint.toBase58()]);\n });\n}\nexports.resolveOrCreateATAs = resolveOrCreateATAs;\nfunction deriveATA(ownerAddress, tokenMint) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield spl_token_1.Token.getAssociatedTokenAddress(spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, spl_token_1.TOKEN_PROGRAM_ID, tokenMint, ownerAddress);\n });\n}\nexports.deriveATA = deriveATA;\nfunction createAssociatedTokenAccountInstruction(associatedTokenProgramId, tokenProgramId, mint, associatedAccount, owner, payer, modeIdempotent) {\n if (!modeIdempotent) {\n return spl_token_1.Token.createAssociatedTokenAccountInstruction(associatedTokenProgramId, tokenProgramId, mint, associatedAccount, owner, payer);\n }\n // create CreateIdempotent instruction\n // spl-token v0.1.8 doesn't have a method for CreateIdempotent.\n // https://github.com/solana-labs/solana-program-library/blob/master/associated-token-account/program/src/instruction.rs#L26\n const keys = [\n { pubkey: payer, isSigner: true, isWritable: true },\n { pubkey: associatedAccount, isSigner: false, isWritable: true },\n { pubkey: owner, isSigner: false, isWritable: false },\n { pubkey: mint, isSigner: false, isWritable: false },\n { pubkey: web3_js_1.SystemProgram.programId, isSigner: false, isWritable: false },\n { pubkey: tokenProgramId, isSigner: false, isWritable: false },\n ];\n const instructionData = Buffer.from([1]);\n return new web3_js_1.TransactionInstruction({\n keys,\n programId: associatedTokenProgramId,\n data: instructionData,\n });\n}\n\n\n/***/ }),\n\n/***/ 1084:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(7623), exports);\n__exportStar(__webpack_require__(6208), exports);\n__exportStar(__webpack_require__(4911), exports);\n__exportStar(__webpack_require__(2888), exports);\n__exportStar(__webpack_require__(7209), exports);\n__exportStar(__webpack_require__(6493), exports);\n\n\n/***/ }),\n\n/***/ 9431:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getMultipleAccounts = exports.getMultipleParsedAccounts = exports.getParsedAccount = void 0;\nconst tiny_invariant_1 = __importDefault(__webpack_require__(6018));\nconst address_util_1 = __webpack_require__(7623);\nfunction getParsedAccount(connection, address, parser) {\n return __awaiter(this, void 0, void 0, function* () {\n const value = yield connection.getAccountInfo(address_util_1.AddressUtil.toPubKey(address));\n return parser.parse(value === null || value === void 0 ? void 0 : value.data);\n });\n}\nexports.getParsedAccount = getParsedAccount;\nfunction getMultipleParsedAccounts(connection, addresses, parser) {\n return __awaiter(this, void 0, void 0, function* () {\n if (addresses.length === 0) {\n return [];\n }\n const values = yield getMultipleAccounts(connection, address_util_1.AddressUtil.toPubKeys(addresses));\n const results = values\n .map((value) => parser.parse(value === null || value === void 0 ? void 0 : value.data))\n .filter((value) => value !== undefined);\n (0, tiny_invariant_1.default)(results.length === addresses.length, \"not enough results fetched\");\n return results;\n });\n}\nexports.getMultipleParsedAccounts = getMultipleParsedAccounts;\nfunction getMultipleAccounts(connection, addresses) {\n return __awaiter(this, void 0, void 0, function* () {\n if (addresses.length === 0) {\n return [];\n }\n const responses = [];\n const chunk = 100; // getMultipleAccounts has limitation of 100 accounts per request\n for (let i = 0; i < addresses.length; i += chunk) {\n const addressChunk = addresses.slice(i, i + chunk);\n const res = connection.getMultipleAccountsInfo(address_util_1.AddressUtil.toPubKeys(addressChunk), connection.commitment);\n responses.push(res);\n }\n const combinedResult = (yield Promise.all(responses)).flat();\n (0, tiny_invariant_1.default)(combinedResult.length === addresses.length, \"getMultipleAccounts not enough results\");\n return combinedResult;\n });\n}\nexports.getMultipleAccounts = getMultipleAccounts;\n\n\n/***/ }),\n\n/***/ 4911:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(9431), exports);\n__exportStar(__webpack_require__(2388), exports);\n\n\n/***/ }),\n\n/***/ 2388:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.staticImplements = exports.ParsableMintInfo = exports.ParsableTokenAccountInfo = void 0;\nconst web3_js_1 = __webpack_require__(6737);\nconst spl_token_1 = __webpack_require__(4945);\nconst token_util_1 = __webpack_require__(7209);\n/**\n * @category Parsables\n */\nlet ParsableTokenAccountInfo = class ParsableTokenAccountInfo {\n constructor() { }\n static parse(data) {\n if (!data) {\n return null;\n }\n try {\n return token_util_1.TokenUtil.deserializeTokenAccount(data);\n }\n catch (e) {\n console.error(`error while parsing TokenAccount: ${e}`);\n return null;\n }\n }\n};\nParsableTokenAccountInfo = __decorate([\n staticImplements()\n], ParsableTokenAccountInfo);\nexports.ParsableTokenAccountInfo = ParsableTokenAccountInfo;\n/**\n * @category Parsables\n */\nlet ParsableMintInfo = class ParsableMintInfo {\n constructor() { }\n static parse(data) {\n if (!data) {\n return null;\n }\n try {\n if (data.byteLength !== spl_token_1.MintLayout.span) {\n throw new Error(\"Invalid data length for MintInfo\");\n }\n const buffer = spl_token_1.MintLayout.decode(data);\n const mintInfo = {\n mintAuthority: buffer.mintAuthorityOption === 0 ? null : new web3_js_1.PublicKey(buffer.mintAuthority),\n supply: spl_token_1.u64.fromBuffer(buffer.supply),\n decimals: buffer.decimals,\n isInitialized: buffer.isInitialized !== 0,\n freezeAuthority: buffer.freezeAuthorityOption === 0 ? null : new web3_js_1.PublicKey(buffer.freezeAuthority),\n };\n return mintInfo;\n }\n catch (e) {\n console.error(`error while parsing MintInfo: ${e}`);\n return null;\n }\n }\n};\nParsableMintInfo = __decorate([\n staticImplements()\n], ParsableMintInfo);\nexports.ParsableMintInfo = ParsableMintInfo;\n/**\n * Class decorator to define an interface with static methods\n * Reference: https://github.com/Microsoft/TypeScript/issues/13462#issuecomment-295685298\n */\nfunction staticImplements() {\n return (constructor) => {\n constructor;\n };\n}\nexports.staticImplements = staticImplements;\n\n\n/***/ }),\n\n/***/ 2888:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.PublicKeyUtils = void 0;\nclass PublicKeyUtils {\n /**\n * Check whether a string is a Base58 string.\n * @param value\n * @returns Whether the string is a Base58 string.\n */\n static isBase58(value) {\n return /^[A-HJ-NP-Za-km-z1-9]*$/.test(value);\n }\n /**\n * Order a list of public keys by bytes.\n * @param keys a list of public keys to order\n * @returns an ordered array of public keys\n */\n static orderKeys(...keys) {\n return keys.sort(comparePublicKeys);\n }\n}\nexports.PublicKeyUtils = PublicKeyUtils;\nfunction comparePublicKeys(key1, key2) {\n const bytes1 = key1.toBytes();\n const bytes2 = key2.toBytes();\n // PublicKeys should be zero-padded 32 byte length\n if (bytes1.byteLength !== bytes2.byteLength) {\n return bytes1.byteLength - bytes2.byteLength;\n }\n for (let i = 0; i < bytes1.byteLength; i++) {\n let byte1 = bytes1[i];\n let byte2 = bytes2[i];\n if (byte1 !== byte2) {\n return byte1 - byte2;\n }\n }\n return 0;\n}\n\n\n/***/ }),\n\n/***/ 7209:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TokenUtil = void 0;\nconst spl_token_1 = __webpack_require__(4945);\nconst web3_js_1 = __webpack_require__(6737);\nconst tiny_invariant_1 = __importDefault(__webpack_require__(6018));\nconst math_1 = __webpack_require__(4319);\nconst web3_1 = __webpack_require__(1084);\n/**\n * @category Util\n */\nclass TokenUtil {\n static isNativeMint(mint) {\n return mint.equals(spl_token_1.NATIVE_MINT);\n }\n /**\n * Create an ix to send a spl-token / native-mint to another wallet.\n * This function will handle the associated token accounts internally for spl-token.\n * SOL is sent directly to the user's wallet.\n *\n * @param connection - Connection object\n * @param sourceWallet - PublicKey for the sender's wallet\n * @param destinationWallet - PublicKey for the receiver's wallet\n * @param tokenMint - Mint for the token that is being sent.\n * @param tokenDecimals - Decimal for the token that is being sent.\n * @param amount - Amount of token to send\n * @param getAccountRentExempt - Fn to fetch the account rent exempt value\n * @param payer - PublicKey for the payer that would fund the possibly new token-accounts. (must sign the txn)\n * @returns\n */\n static createSendTokensToWalletInstruction(connection, sourceWallet, destinationWallet, tokenMint, tokenDecimals, amount, getAccountRentExempt, payer) {\n return __awaiter(this, void 0, void 0, function* () {\n (0, tiny_invariant_1.default)(!amount.eq(math_1.ZERO), \"SendToken transaction must send more than 0 tokens.\");\n // Specifically handle SOL, which is not a spl-token.\n if (tokenMint.equals(spl_token_1.NATIVE_MINT)) {\n const sendSolTxn = web3_js_1.SystemProgram.transfer({\n fromPubkey: sourceWallet,\n toPubkey: destinationWallet,\n lamports: BigInt(amount.toString()),\n });\n return {\n instructions: [sendSolTxn],\n cleanupInstructions: [],\n signers: [],\n };\n }\n const sourceTokenAccount = yield (0, web3_1.deriveATA)(sourceWallet, tokenMint);\n const _a = yield (0, web3_1.resolveOrCreateATA)(connection, destinationWallet, tokenMint, getAccountRentExempt, amount, payer), { address: destinationTokenAccount } = _a, destinationAtaIx = __rest(_a, [\"address\"]);\n const transferIx = spl_token_1.Token.createTransferCheckedInstruction(spl_token_1.TOKEN_PROGRAM_ID, sourceTokenAccount, tokenMint, destinationTokenAccount, sourceWallet, [], new spl_token_1.u64(amount.toString()), tokenDecimals);\n return {\n instructions: destinationAtaIx.instructions.concat(transferIx),\n cleanupInstructions: destinationAtaIx.cleanupInstructions,\n signers: destinationAtaIx.signers,\n };\n });\n }\n}\nexports.TokenUtil = TokenUtil;\nTokenUtil.deserializeTokenAccount = (data) => {\n if (!data) {\n return null;\n }\n if (data.byteLength !== spl_token_1.AccountLayout.span) {\n throw new Error(\"Invalid data length for TokenAccount\");\n }\n const accountInfo = spl_token_1.AccountLayout.decode(data);\n accountInfo.mint = new web3_js_1.PublicKey(accountInfo.mint);\n accountInfo.owner = new web3_js_1.PublicKey(accountInfo.owner);\n accountInfo.amount = spl_token_1.u64.fromBuffer(accountInfo.amount);\n if (accountInfo.delegateOption === 0) {\n accountInfo.delegate = null;\n accountInfo.delegatedAmount = new spl_token_1.u64(0);\n }\n else {\n accountInfo.delegate = new web3_js_1.PublicKey(accountInfo.delegate);\n accountInfo.delegatedAmount = spl_token_1.u64.fromBuffer(accountInfo.delegatedAmount);\n }\n accountInfo.isInitialized = accountInfo.state !== 0;\n accountInfo.isFrozen = accountInfo.state === 2;\n if (accountInfo.isNativeOption === 1) {\n accountInfo.rentExemptReserve = spl_token_1.u64.fromBuffer(accountInfo.isNative);\n accountInfo.isNative = true;\n }\n else {\n accountInfo.rentExemptReserve = null;\n accountInfo.isNative = false;\n }\n if (accountInfo.closeAuthorityOption === 0) {\n accountInfo.closeAuthority = null;\n }\n else {\n accountInfo.closeAuthority = new web3_js_1.PublicKey(accountInfo.closeAuthority);\n }\n return accountInfo;\n};\n\n\n/***/ }),\n\n/***/ 6493:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(8801), exports);\n__exportStar(__webpack_require__(785), exports);\n__exportStar(__webpack_require__(7864), exports);\n\n\n/***/ }),\n\n/***/ 8801:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TransactionBuilder = void 0;\nconst web3_js_1 = __webpack_require__(6737);\nconst transactions_processor_1 = __webpack_require__(785);\n/**\n * @category Transactions Util\n */\nclass TransactionBuilder {\n constructor(connection, wallet) {\n this.connection = connection;\n this.wallet = wallet;\n this.instructions = [];\n this.signers = [];\n }\n /**\n * Append an instruction into this builder.\n * @param instruction - An Instruction\n * @returns Returns this transaction builder.\n */\n addInstruction(instruction) {\n this.instructions.push(instruction);\n return this;\n }\n /**\n * Append a list of instructions into this builder.\n * @param instructions - A list of Instructions\n * @returns Returns this transaction builder.\n */\n addInstructions(instructions) {\n this.instructions = this.instructions.concat(instructions);\n return this;\n }\n /**\n * Prepend a list of instructions into this builder.\n * @param instruction - An Instruction\n * @returns Returns this transaction builder.\n */\n prependInstruction(instruction) {\n this.instructions.unshift(instruction);\n return this;\n }\n /**\n * Prepend a list of instructions into this builder.\n * @param instructions - A list of Instructions\n * @returns Returns this transaction builder.\n */\n prependInstructions(instructions) {\n this.instructions = instructions.concat(this.instructions);\n return this;\n }\n addSigner(signer) {\n this.signers.push(signer);\n return this;\n }\n isEmpty() {\n return this.instructions.length == 0;\n }\n /**\n * Compresses all instructions & signers in this builder\n * into one single instruction\n * @param compressPost Compress all post instructions into the instructions field\n * @returns Instruction object containing all\n */\n compressIx(compressPost) {\n let instructions = [];\n let cleanupInstructions = [];\n let signers = [];\n this.instructions.forEach((curr) => {\n instructions = instructions.concat(curr.instructions);\n // Cleanup instructions should execute in reverse order\n cleanupInstructions = curr.cleanupInstructions.concat(cleanupInstructions);\n signers = signers.concat(curr.signers);\n });\n if (compressPost) {\n instructions = instructions.concat(cleanupInstructions);\n cleanupInstructions = [];\n }\n return {\n instructions: [...instructions],\n cleanupInstructions: [...cleanupInstructions],\n signers,\n };\n }\n /**\n * Returns the size of the current transaction in bytes.\n * @returns the size of the current transaction in bytes.\n * @throws error if transaction is over maximum package size.\n */\n txnSize(options = { latestBlockhash: undefined }) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.isEmpty()) {\n return 0;\n }\n const request = yield this.build(options);\n return request.transaction.serialize({ requireAllSignatures: false }).length;\n });\n }\n /**\n * Constructs a transaction payload with the gathered instructions\n * @returns a TransactionPayload object that can be excuted or agregated into other transactions\n */\n build(options = { latestBlockhash: undefined }) {\n return __awaiter(this, void 0, void 0, function* () {\n const { latestBlockhash } = options;\n let recentBlockhash = !latestBlockhash\n ? yield this.connection.getLatestBlockhash(\"singleGossip\")\n : latestBlockhash;\n const transaction = new web3_js_1.Transaction(Object.assign(Object.assign({}, recentBlockhash), { feePayer: this.wallet.publicKey }));\n const ix = this.compressIx(true);\n transaction.add(...ix.instructions);\n transaction.feePayer = this.wallet.publicKey;\n return {\n transaction: transaction,\n signers: ix.signers.concat(this.signers),\n };\n });\n }\n /**\n * Constructs a transaction payload with the gathered instructions, sign it with the provider and send it out\n * @returns the txId of the transaction\n */\n buildAndExecute() {\n return __awaiter(this, void 0, void 0, function* () {\n const tx = yield this.build();\n const tp = new transactions_processor_1.TransactionProcessor(this.connection, this.wallet);\n const { execute } = yield tp.signAndConstructTransaction(tx);\n return execute();\n });\n }\n /**\n * Send multiple transactions at once.\n * @deprecated This method is here for legacy reasons and we prefer the use of TransactionProcessor\n */\n static sendAll(provider, txns, opts) {\n return __awaiter(this, void 0, void 0, function* () {\n const txRequest = yield Promise.all(txns.map((txBuilder) => __awaiter(this, void 0, void 0, function* () {\n const { transaction, signers } = yield txBuilder.build();\n return { tx: transaction, signers };\n })));\n return yield provider.sendAll(txRequest, opts);\n });\n }\n}\nexports.TransactionBuilder = TransactionBuilder;\n\n\n/***/ }),\n\n/***/ 785:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TransactionProcessor = void 0;\nclass TransactionProcessor {\n constructor(connection, wallet, commitment = \"confirmed\") {\n this.connection = connection;\n this.wallet = wallet;\n this.commitment = commitment;\n }\n signTransaction(txRequest) {\n return __awaiter(this, void 0, void 0, function* () {\n const { transactions, lastValidBlockHeight, blockhash } = yield this.signTransactions([\n txRequest,\n ]);\n return { transaction: transactions[0], lastValidBlockHeight, blockhash };\n });\n }\n signTransactions(txRequests) {\n return __awaiter(this, void 0, void 0, function* () {\n const { blockhash, lastValidBlockHeight } = yield this.connection.getLatestBlockhash(this.commitment);\n const feePayer = this.wallet.publicKey;\n const pSignedTxs = txRequests.map((txRequest) => {\n return rewriteTransaction(txRequest, feePayer, blockhash);\n });\n const transactions = yield this.wallet.signAllTransactions(pSignedTxs);\n return {\n transactions,\n lastValidBlockHeight,\n blockhash,\n };\n });\n }\n sendTransaction(transaction, lastValidBlockHeight, blockhash) {\n return __awaiter(this, void 0, void 0, function* () {\n const execute = this.constructSendTransactions([transaction], lastValidBlockHeight, blockhash);\n const txs = yield execute();\n const ex = txs[0];\n if (ex.status === \"fulfilled\") {\n return ex.value;\n }\n else {\n throw ex.reason;\n }\n });\n }\n constructSendTransactions(transactions, lastValidBlockHeight, blockhash, parallel = true) {\n const executeTx = (tx) => __awaiter(this, void 0, void 0, function* () {\n const rawTxs = tx.serialize();\n return this.connection.sendRawTransaction(rawTxs, {\n preflightCommitment: this.commitment,\n });\n });\n const confirmTx = (txId) => __awaiter(this, void 0, void 0, function* () {\n const result = yield this.connection.confirmTransaction({\n signature: txId,\n lastValidBlockHeight: lastValidBlockHeight,\n blockhash,\n }, this.commitment);\n if (result.value.err) {\n throw new Error(`Transaction failed: ${JSON.stringify(result.value)}`);\n }\n });\n return () => __awaiter(this, void 0, void 0, function* () {\n if (parallel) {\n const results = transactions.map((tx) => __awaiter(this, void 0, void 0, function* () {\n const txId = yield executeTx(tx);\n yield confirmTx(txId);\n return txId;\n }));\n return Promise.allSettled(results);\n }\n else {\n const results = [];\n for (const tx of transactions) {\n const txId = yield executeTx(tx);\n yield confirmTx(txId);\n results.push(txId);\n }\n return Promise.allSettled(results);\n }\n });\n }\n signAndConstructTransaction(txRequest) {\n return __awaiter(this, void 0, void 0, function* () {\n const { transaction, lastValidBlockHeight, blockhash } = yield this.signTransaction(txRequest);\n return {\n signedTx: transaction,\n execute: () => __awaiter(this, void 0, void 0, function* () { return this.sendTransaction(transaction, lastValidBlockHeight, blockhash); }),\n };\n });\n }\n signAndConstructTransactions(txRequests, parallel = true) {\n return __awaiter(this, void 0, void 0, function* () {\n const { transactions, lastValidBlockHeight, blockhash } = yield this.signTransactions(txRequests);\n const execute = this.constructSendTransactions(transactions, lastValidBlockHeight, blockhash, parallel);\n return { signedTxs: transactions, execute };\n });\n }\n}\nexports.TransactionProcessor = TransactionProcessor;\nfunction rewriteTransaction(txRequest, feePayer, blockhash) {\n var _a;\n const signers = (_a = txRequest.signers) !== null && _a !== void 0 ? _a : [];\n const tx = txRequest.transaction;\n tx.feePayer = feePayer;\n tx.recentBlockhash = blockhash;\n signers.filter((s) => s !== undefined).forEach((keypair) => tx.partialSign(keypair));\n return tx;\n}\n\n\n/***/ }),\n\n/***/ 7864:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.EMPTY_INSTRUCTION = void 0;\n/**\n * @category Transactions Util\n */\nexports.EMPTY_INSTRUCTION = {\n instructions: [],\n cleanupInstructions: [],\n signers: [],\n};\n\n\n/***/ }),\n\n/***/ 4758:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ACCOUNT_DISCRIMINATOR_SIZE\": function() { return /* binding */ Dt; },\n/* harmony export */ \"AccountClient\": function() { return /* binding */ En; },\n/* harmony export */ \"AnchorError\": function() { return /* binding */ vt; },\n/* harmony export */ \"AnchorProvider\": function() { return /* binding */ st; },\n/* harmony export */ \"BN\": function() { return /* reexport default from dynamic */ bn_js__WEBPACK_IMPORTED_MODULE_2___default.a; },\n/* harmony export */ \"BorshAccountsCoder\": function() { return /* binding */ Nt; },\n/* harmony export */ \"BorshCoder\": function() { return /* binding */ Kt; },\n/* harmony export */ \"BorshEventCoder\": function() { return /* binding */ Rt; },\n/* harmony export */ \"BorshInstructionCoder\": function() { return /* binding */ Tt; },\n/* harmony export */ \"BorshStateCoder\": function() { return /* binding */ Ut; },\n/* harmony export */ \"EventManager\": function() { return /* binding */ xn; },\n/* harmony export */ \"EventParser\": function() { return /* binding */ Pn; },\n/* harmony export */ \"IdlError\": function() { return /* binding */ gt; },\n/* harmony export */ \"LangErrorCode\": function() { return /* binding */ _t; },\n/* harmony export */ \"LangErrorMessage\": function() { return /* binding */ St; },\n/* harmony export */ \"MethodsBuilderFactory\": function() { return /* binding */ Nn; },\n/* harmony export */ \"Native\": function() { return /* binding */ Yn; },\n/* harmony export */ \"Program\": function() { return /* binding */ Vn; },\n/* harmony export */ \"ProgramError\": function() { return /* binding */ bt; },\n/* harmony export */ \"ProgramErrorStack\": function() { return /* binding */ wt; },\n/* harmony export */ \"Spl\": function() { return /* binding */ Jn; },\n/* harmony export */ \"SplTokenCoder\": function() { return /* binding */ Ne; },\n/* harmony export */ \"StateClient\": function() { return /* binding */ _n; },\n/* harmony export */ \"SystemCoder\": function() { return /* binding */ Qe; },\n/* harmony export */ \"eventDiscriminator\": function() { return /* binding */ Vt; },\n/* harmony export */ \"getProvider\": function() { return /* binding */ lt; },\n/* harmony export */ \"parseIdlErrors\": function() { return /* binding */ M; },\n/* harmony export */ \"setProvider\": function() { return /* binding */ dt; },\n/* harmony export */ \"splitArgsAndCtx\": function() { return /* binding */ wn; },\n/* harmony export */ \"stateDiscriminator\": function() { return /* binding */ jt; },\n/* harmony export */ \"toInstruction\": function() { return /* binding */ x; },\n/* harmony export */ \"translateAddress\": function() { return /* binding */ L; },\n/* harmony export */ \"translateError\": function() { return /* binding */ At; },\n/* harmony export */ \"utils\": function() { return /* binding */ yn; },\n/* harmony export */ \"validateAccounts\": function() { return /* binding */ P; },\n/* harmony export */ \"web3\": function() { return /* reexport module object */ _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__; }\n/* harmony export */ });\n/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8764);\n/* harmony import */ var _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6737);\n/* harmony import */ var bn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3550);\n/* harmony import */ var bn_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(bn_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var bs58__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5658);\n/* harmony import */ var bs58__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(bs58__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var base64_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9742);\n/* harmony import */ var camelcase__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3204);\n/* harmony import */ var camelcase__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(camelcase__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var js_sha256__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2023);\n/* harmony import */ var js_sha256__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(js_sha256__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9593);\n/* harmony import */ var _project_serum_borsh__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var pako__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7885);\n/* harmony import */ var eventemitter3__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(6729);\n/* harmony import */ var eventemitter3__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(eventemitter3__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var assert__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(9282);\n/* harmony import */ var assert__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(assert__WEBPACK_IMPORTED_MODULE_10__);\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\nvar w=Object.freeze({__proto__:null,encode:function(t){return t.reduce(((t,e)=>t+e.toString(16).padStart(2,\"0\")),\"0x\")},decode:function(e){0===e.indexOf(\"0x\")&&(e=e.substr(2)),e.length%2==1&&(e=\"0\"+e);let n=e.match(/.{2}/g);return null===n?buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from([]):buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(n.map((t=>parseInt(t,16))))}});function v(t){return new TextDecoder(\"utf-8\").decode(t)}function b(t){return(new TextEncoder).encode(t)}var A=Object.freeze({__proto__:null,decode:v,encode:b});function _(t){return bs58__WEBPACK_IMPORTED_MODULE_3___default().encode(t)}var S=Object.freeze({__proto__:null,encode:_,decode:function(t){return bs58__WEBPACK_IMPORTED_MODULE_3___default().decode(t)}});function E(e){return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(base64_js__WEBPACK_IMPORTED_MODULE_4__.toByteArray(e))}var I=Object.freeze({__proto__:null,encode:function(t){return base64_js__WEBPACK_IMPORTED_MODULE_4__.fromByteArray(t)},decode:E}),k=Object.freeze({__proto__:null,hex:w,utf8:A,bs58:S,base64:I});function M(t){const e=new Map;return t.errors&&t.errors.forEach((t=>{var n;let r=null!==(n=t.msg)&&void 0!==n?n:t.name;e.set(t.code,r)})),e}function x(t,...e){if(t.args.length!=e.length)throw new Error(\"Invalid argument length\");const n={};let r=0;return t.args.forEach((t=>{n[t.name]=e[r],r+=1})),n}function P(t,e={}){t.forEach((t=>{if(\"accounts\"in t)P(t.accounts,e[t.name]);else if(void 0===e[t.name])throw new Error(`Invalid arguments: ${t.name} not provided.`)}))}function L(t){return t instanceof _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey?t:new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(t)}class T extends TypeError{constructor(t,e){let n;const{message:r,...o}=t,{path:i}=t;super(0===i.length?r:\"At path: \"+i.join(\".\")+\" -- \"+r),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var r;return null!=(r=n)?r:n=[t,...e()]}}}function C(t){return\"object\"==typeof t&&null!=t}function z(t){return\"string\"==typeof t?JSON.stringify(t):\"\"+t}function B(t,e,n,r){if(!0===t)return;!1===t?t={}:\"string\"==typeof t&&(t={message:t});const{path:o,branch:i}=e,{type:s}=n,{refinement:a,message:c=\"Expected a value of type `\"+s+\"`\"+(a?\" with refinement `\"+a+\"`\":\"\")+\", but received: `\"+z(r)+\"`\"}=t;return{value:r,type:s,refinement:a,key:o[o.length-1],path:o,branch:i,...t,message:c}}function*O(t,e,n,r){var o;C(o=t)&&\"function\"==typeof o[Symbol.iterator]||(t=[t]);for(const o of t){const t=B(o,e,n,r);t&&(yield t)}}function*D(t,e,n){void 0===n&&(n={});const{path:r=[],branch:o=[t],coerce:i=!1,mask:s=!1}=n,a={path:r,branch:o};if(i&&(t=e.coercer(t,a),s&&\"type\"!==e.type&&C(e.schema)&&C(t)&&!Array.isArray(t)))for(const n in t)void 0===e.schema[n]&&delete t[n];let c=!0;for(const n of e.validator(t,a))c=!1,yield[n,void 0];for(let[n,u,d]of e.entries(t,a)){const e=D(u,d,{path:void 0===n?r:[...r,n],branch:void 0===n?o:[...o,u],coerce:i,mask:s});for(const r of e)r[0]?(c=!1,yield[r[0],void 0]):i&&(u=r[1],void 0===n?t=u:t instanceof Map?t.set(n,u):t instanceof Set?t.add(u):C(t)&&(t[n]=u))}if(c)for(const n of e.refiner(t,a))c=!1,yield[n,void 0];c&&(yield[void 0,t])}class N{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:e,schema:n,validator:r,refiner:o,coercer:i=(t=>t),entries:s=function*(){}}=t;this.type=e,this.schema=n,this.entries=s,this.coercer=i,this.validator=r?(t,e)=>O(r(t,e),e,this,t):()=>[],this.refiner=o?(t,e)=>O(o(t,e),e,this,t):()=>[]}assert(t){return function(t,e){const n=U(t,e);if(n[0])throw n[0]}(t,this)}create(t){return R(t,this)}is(t){return V(t,this)}mask(t){return function(t,e){const n=U(t,e,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}(t,this)}validate(t,e){return void 0===e&&(e={}),U(t,this,e)}}function R(t,e){const n=U(t,e,{coerce:!0});if(n[0])throw n[0];return n[1]}function V(t,e){return!U(t,e)[0]}function U(t,e,n){void 0===n&&(n={});const r=D(t,e,n),o=function(t){const{done:e,value:n}=t.next();return e?void 0:n}(r);if(o[0]){return[new T(o[0],(function*(){for(const t of r)t[0]&&(yield t[0])})),void 0]}return[void 0,o[1]]}function j(t,e){return new N({type:t,schema:null,validator:e})}function $(t){return new N({type:\"array\",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[n,r]of e.entries())yield[n,r,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||\"Expected an array value, but received: \"+z(t)})}function K(t){const e=z(t),n=typeof t;return new N({type:\"literal\",schema:\"string\"===n||\"number\"===n||\"boolean\"===n?t:null,validator:n=>n===t||\"Expected the literal `\"+e+\"`, but received: \"+z(n)})}function q(t){return new N({...t,validator:(e,n)=>null===e||t.validator(e,n),refiner:(e,n)=>null===e||t.refiner(e,n)})}function F(){return j(\"number\",(t=>\"number\"==typeof t&&!isNaN(t)||\"Expected a number, but received: \"+z(t)))}function W(t){return new N({...t,validator:(e,n)=>void 0===e||t.validator(e,n),refiner:(e,n)=>void 0===e||t.refiner(e,n)})}function G(){return j(\"string\",(t=>\"string\"==typeof t||\"Expected a string, but received: \"+z(t)))}function H(t){const e=Object.keys(t);return new N({type:\"type\",schema:t,*entries(n){if(C(n))for(const r of e)yield[r,n[r],t[r]]},validator:t=>C(t)||\"Expected an object, but received: \"+z(t)})}function J(t){const e=t.map((t=>t.type)).join(\" | \");return new N({type:\"union\",schema:null,coercer:(e,n)=>(t.find((t=>{const[n]=t.validate(e,{coerce:!0});return!n}))||Z()).coercer(e,n),validator(n,r){const o=[];for(const e of t){const[...t]=D(n,e,r),[i]=t;if(!i[0])return[];for(const[e]of t)e&&o.push(e)}return[\"Expected the value to satisfy a union of `\"+e+\"`, but received: \"+z(n),...o]}})}function Z(){return j(\"unknown\",(()=>!0))}async function X(t,e,n){if(e.length<=99)return await Q(t,e,n);{const r=function(t,e){return Array.apply(0,new Array(Math.ceil(t.length/e))).map(((n,r)=>t.slice(r*e,(r+1)*e)))}(e,99);return(await Promise.all(r.map((e=>Q(t,e,n))))).flat()}}async function Q(t,e,n){const r=null!=n?n:t.commitment;return(await t.getMultipleAccountsInfo(e,r)).map(((t,n)=>null===t?null:{publicKey:e[n],account:t}))}async function Y(t,e,n,r,i){n&&n.length>0&&e.sign(...n);const s=e._compile(),a=s.serialize(),c=e._serialize(a).toString(\"base64\"),u={encoding:\"base64\",commitment:null!=r?r:t.commitment};if(i){const t=(Array.isArray(i)?i:s.nonProgramIds()).map((t=>t.toBase58()));u.accounts={encoding:\"base64\",addresses:t}}n&&(u.sigVerify=!0);const d=[c,u],l=R(await t._rpcRequest(\"simulateTransaction\",d),rt);if(\"error\"in l){let t;if(\"data\"in l.error&&(t=l.error.data.logs,t&&Array.isArray(t))){const e=\"\\n \",n=e+t.join(e);console.error(l.error.message,n)}throw new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SendTransactionError(\"failed to simulate transaction: \"+l.error.message,t)}return l.result}function tt(t){return function(t,e,n){return new N({...t,coercer:(r,o)=>V(r,e)?t.coercer(n(r,o),o):t.coercer(r,o)})}(nt(t),et,(e=>\"error\"in e?e:{...e,result:R(e.result,t)}))}const et=nt(Z());function nt(t){return J([H({jsonrpc:K(\"2.0\"),id:G(),result:t}),H({jsonrpc:K(\"2.0\"),id:G(),error:H({code:Z(),message:G(),data:W(j(\"any\",(()=>!0)))})})])}const rt=(ot=H({err:q(J([H({}),G()])),logs:q($(G())),accounts:W(q($(q(H({executable:j(\"boolean\",(t=>\"boolean\"==typeof t)),owner:G(),lamports:F(),data:$(G()),rentEpoch:W(F())}))))),unitsConsumed:W(F())}),tt(H({context:H({slot:F()}),value:ot})));var ot,it=Object.freeze({__proto__:null,invoke:async function(t,e,o,i){t=L(t),i||(i=lt());const s=new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.Transaction;if(s.add(new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.TransactionInstruction({programId:t,keys:null!=e?e:[],data:o})),void 0===i.sendAndConfirm)throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");return await i.sendAndConfirm(s,[])},getMultipleAccounts:X,simulateTransaction:Y});class st{constructor(t,e,n){this.connection=t,this.wallet=e,this.opts=n,this.publicKey=e.publicKey}static defaultOptions(){return{preflightCommitment:\"processed\",commitment:\"processed\"}}static local(t,e){throw new Error(\"Provider local is not available on browser.\")}static env(){throw new Error(\"Provider env is not available on browser.\")}async sendAndConfirm(t,e,n){var r;void 0===n&&(n=this.opts),t.feePayer=this.wallet.publicKey,t.recentBlockhash=(await this.connection.getRecentBlockhash(n.preflightCommitment)).blockhash,t=await this.wallet.signTransaction(t),(null!=e?e:[]).forEach((e=>{t.partialSign(e)}));const i=t.serialize();try{return await ct(this.connection,i,n)}catch(e){if(e instanceof ut){const n=await this.connection.getTransaction(_(t.signature),{commitment:\"confirmed\"});if(n){const t=null===(r=n.meta)||void 0===r?void 0:r.logMessages;throw t?new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SendTransactionError(e.message,t):e}throw e}throw e}}async sendAll(t,e){void 0===e&&(e=this.opts);const n=await this.connection.getRecentBlockhash(e.preflightCommitment);let r=t.map((t=>{var e;let r=t.tx,o=null!==(e=t.signers)&&void 0!==e?e:[];return r.feePayer=this.wallet.publicKey,r.recentBlockhash=n.blockhash,o.forEach((t=>{r.partialSign(t)})),r}));const o=await this.wallet.signAllTransactions(r),i=[];for(let t=0;tt.startsWith(\"Program log: AnchorError\")));if(-1===n)return null;const r=t[n],o=[r];let i;if(n+11)return null;r=t[0].match(/([0-9]+)/g)[0]}try{o=parseInt(r)}catch(t){return null}let i=e.get(o);return void 0!==i?new bt(o,i,t.logs):(i=St.get(o),void 0!==i?new bt(o,i,t.logs):null)}get program(){var t;return null===(t=this._programErrorStack)||void 0===t?void 0:t.stack[this._programErrorStack.stack.length-1]}get programErrorStack(){var t;return null===(t=this._programErrorStack)||void 0===t?void 0:t.stack}toString(){return this.msg}}function At(t,e){mt(\"debug-logs\")&&console.log(\"Translating error:\",t);const n=vt.parse(t.logs);if(n)return n;const r=bt.parse(t,e);if(r)return r;if(t.logs){const e={get:function(e,n){return\"programErrorStack\"===n?e.programErrorStack.stack:\"program\"===n?e.programErrorStack.stack[t.programErrorStack.stack.length-1]:Reflect.get(...arguments)}};return t.programErrorStack=wt.parse(t.logs),new Proxy(t,e)}return t}const _t={InstructionMissing:100,InstructionFallbackNotFound:101,InstructionDidNotDeserialize:102,InstructionDidNotSerialize:103,IdlInstructionStub:1e3,IdlInstructionInvalidProgram:1001,ConstraintMut:2e3,ConstraintHasOne:2001,ConstraintSigner:2002,ConstraintRaw:2003,ConstraintOwner:2004,ConstraintRentExempt:2005,ConstraintSeeds:2006,ConstraintExecutable:2007,ConstraintState:2008,ConstraintAssociated:2009,ConstraintAssociatedInit:2010,ConstraintClose:2011,ConstraintAddress:2012,ConstraintZero:2013,ConstraintTokenMint:2014,ConstraintTokenOwner:2015,ConstraintMintMintAuthority:2016,ConstraintMintFreezeAuthority:2017,ConstraintMintDecimals:2018,ConstraintSpace:2019,RequireViolated:2500,RequireEqViolated:2501,RequireKeysEqViolated:2502,RequireNeqViolated:2503,RequireKeysNeqViolated:2504,RequireGtViolated:2505,RequireGteViolated:2506,AccountDiscriminatorAlreadySet:3e3,AccountDiscriminatorNotFound:3001,AccountDiscriminatorMismatch:3002,AccountDidNotDeserialize:3003,AccountDidNotSerialize:3004,AccountNotEnoughKeys:3005,AccountNotMutable:3006,AccountOwnedByWrongProgram:3007,InvalidProgramId:3008,InvalidProgramExecutable:3009,AccountNotSigner:3010,AccountNotSystemOwned:3011,AccountNotInitialized:3012,AccountNotProgramData:3013,AccountNotAssociatedTokenAccount:3014,AccountSysvarMismatch:3015,AccountReallocExceedsLimit:3016,AccountDuplicateReallocs:3017,StateInvalidAddress:4e3,DeclaredProgramIdMismatch:4100,Deprecated:5e3},St=new Map([[_t.InstructionMissing,\"8 byte instruction identifier not provided\"],[_t.InstructionFallbackNotFound,\"Fallback functions are not supported\"],[_t.InstructionDidNotDeserialize,\"The program could not deserialize the given instruction\"],[_t.InstructionDidNotSerialize,\"The program could not serialize the given instruction\"],[_t.IdlInstructionStub,\"The program was compiled without idl instructions\"],[_t.IdlInstructionInvalidProgram,\"The transaction was given an invalid program for the IDL instruction\"],[_t.ConstraintMut,\"A mut constraint was violated\"],[_t.ConstraintHasOne,\"A has_one constraint was violated\"],[_t.ConstraintSigner,\"A signer constraint was violated\"],[_t.ConstraintRaw,\"A raw constraint was violated\"],[_t.ConstraintOwner,\"An owner constraint was violated\"],[_t.ConstraintRentExempt,\"A rent exemption constraint was violated\"],[_t.ConstraintSeeds,\"A seeds constraint was violated\"],[_t.ConstraintExecutable,\"An executable constraint was violated\"],[_t.ConstraintState,\"A state constraint was violated\"],[_t.ConstraintAssociated,\"An associated constraint was violated\"],[_t.ConstraintAssociatedInit,\"An associated init constraint was violated\"],[_t.ConstraintClose,\"A close constraint was violated\"],[_t.ConstraintAddress,\"An address constraint was violated\"],[_t.ConstraintZero,\"Expected zero account discriminant\"],[_t.ConstraintTokenMint,\"A token mint constraint was violated\"],[_t.ConstraintTokenOwner,\"A token owner constraint was violated\"],[_t.ConstraintMintMintAuthority,\"A mint mint authority constraint was violated\"],[_t.ConstraintMintFreezeAuthority,\"A mint freeze authority constraint was violated\"],[_t.ConstraintMintDecimals,\"A mint decimals constraint was violated\"],[_t.ConstraintSpace,\"A space constraint was violated\"],[_t.RequireViolated,\"A require expression was violated\"],[_t.RequireEqViolated,\"A require_eq expression was violated\"],[_t.RequireKeysEqViolated,\"A require_keys_eq expression was violated\"],[_t.RequireNeqViolated,\"A require_neq expression was violated\"],[_t.RequireKeysNeqViolated,\"A require_keys_neq expression was violated\"],[_t.RequireGtViolated,\"A require_gt expression was violated\"],[_t.RequireGteViolated,\"A require_gte expression was violated\"],[_t.AccountDiscriminatorAlreadySet,\"The account discriminator was already set on this account\"],[_t.AccountDiscriminatorNotFound,\"No 8 byte discriminator was found on the account\"],[_t.AccountDiscriminatorMismatch,\"8 byte discriminator did not match what was expected\"],[_t.AccountDidNotDeserialize,\"Failed to deserialize the account\"],[_t.AccountDidNotSerialize,\"Failed to serialize the account\"],[_t.AccountNotEnoughKeys,\"Not enough account keys given to the instruction\"],[_t.AccountNotMutable,\"The given account is not mutable\"],[_t.AccountOwnedByWrongProgram,\"The given account is owned by a different program than expected\"],[_t.InvalidProgramId,\"Program ID was not as expected\"],[_t.InvalidProgramExecutable,\"Program account is not executable\"],[_t.AccountNotSigner,\"The given account did not sign\"],[_t.AccountNotSystemOwned,\"The given account is not owned by the system program\"],[_t.AccountNotInitialized,\"The program expected this account to be already initialized\"],[_t.AccountNotProgramData,\"The given account is not a program data account\"],[_t.AccountNotAssociatedTokenAccount,\"The given account is not the associated token account\"],[_t.AccountSysvarMismatch,\"The given public key does not match the required sysvar\"],[_t.AccountReallocExceedsLimit,\"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit\"],[_t.AccountDuplicateReallocs,\"The account was duplicated for more than one reallocation\"],[_t.StateInvalidAddress,\"The given state account does not have the correct address\"],[_t.DeclaredProgramIdMismatch,\"The declared program id does not match the actual program id\"],[_t.Deprecated,\"The API being used is deprecated and should no longer be used\"]]);\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nvar Et=function(){return Et=Object.assign||function(t){for(var e,n=1,r=arguments.length;nt.name===r));if(1!==o.length)throw new gt(`Type not found: ${JSON.stringify(t)}`);return Lt.typeDefLayout(o[0],e,n)}if(\"array\"in t.type){let r=t.type.array[0],o=t.type.array[1],i=Lt.fieldLayout({name:void 0,type:r},e);return _project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.array(i,o,n)}throw new Error(`Not yet implemented: ${t}`)}}static typeDefLayout(t,e=[],n){if(\"struct\"===t.type.kind){const r=t.type.fields.map((t=>Lt.fieldLayout(t,e)));return _project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.struct(r,n)}if(\"enum\"===t.type.kind){let r=t.type.variants.map((t=>{const n=camelcase__WEBPACK_IMPORTED_MODULE_5___default()(t.name);if(void 0===t.fields)return _project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.struct([],n);const r=t.fields.map((t=>{if(!t.hasOwnProperty(\"name\"))throw new Error(\"Tuple enum variants not yet implemented.\");return Lt.fieldLayout(t,e)}));return _project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.struct(r,n)}));return void 0!==n?_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.rustEnum(r).replicate(n):_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.rustEnum(r,n)}throw new Error(`Unknown type kint: ${t}`)}}class Tt{constructor(t){this.idl=t,this.ixLayout=Tt.parseIxLayout(t);const e=new Map;t.instructions.forEach((t=>{const n=zt(\"global\",t.name);e.set(bs58__WEBPACK_IMPORTED_MODULE_3___default().encode(n),{layout:this.ixLayout.get(t.name),name:t.name})})),t.state&&t.state.methods.map((t=>{const n=zt(\"state\",t.name);e.set(bs58__WEBPACK_IMPORTED_MODULE_3___default().encode(n),{layout:this.ixLayout.get(t.name),name:t.name})})),this.sighashLayouts=e}encode(t,e){return this._encode(\"global\",t,e)}encodeState(t,e){return this._encode(\"state\",t,e)}_encode(e,n,r){const o=buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(1e3),i=camelcase__WEBPACK_IMPORTED_MODULE_5___default()(n),s=this.ixLayout.get(i);if(!s)throw new Error(`Unknown method: ${i}`);const a=s.encode(r,o),c=o.slice(0,a);return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([zt(e,n),c])}static parseIxLayout(t){const e=(t.state?t.state.methods:[]).map((e=>{let n=e.args.map((e=>{var n,r;return Lt.fieldLayout(e,Array.from([...null!==(n=t.accounts)&&void 0!==n?n:[],...null!==(r=t.types)&&void 0!==r?r:[]]))}));const r=camelcase__WEBPACK_IMPORTED_MODULE_5___default()(e.name);return[r,_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.struct(n,r)]})).concat(t.instructions.map((e=>{let n=e.args.map((e=>{var n,r;return Lt.fieldLayout(e,Array.from([...null!==(n=t.accounts)&&void 0!==n?n:[],...null!==(r=t.types)&&void 0!==r?r:[]]))}));const r=camelcase__WEBPACK_IMPORTED_MODULE_5___default()(e.name);return[r,_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.struct(n,r)]})));return new Map(e)}decode(e,n=\"hex\"){\"string\"==typeof e&&(e=\"hex\"===n?buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(e,\"hex\"):bs58__WEBPACK_IMPORTED_MODULE_3___default().decode(e));let r=bs58__WEBPACK_IMPORTED_MODULE_3___default().encode(e.slice(0,8)),o=e.slice(8);const i=this.sighashLayouts.get(r);return i?{data:i.layout.decode(o),name:i.name}:null}format(t,e){return Ct.format(t,e,this.idl)}}class Ct{static format(t,e,n){const r=n.instructions.filter((e=>t.name===e.name))[0];if(void 0===r)return console.error(\"Invalid instruction given\"),null;const o=r.args.map((e=>({name:e.name,type:Ct.formatIdlType(e.type),data:Ct.formatIdlData(e,t.data[e.name],n.types)}))),i=Ct.flattenIdlAccounts(r.accounts);return{args:o,accounts:e.map(((t,e)=>e`;if(\"option\"in t)return`Option<${this.formatIdlType(t.option)}>`;if(\"defined\"in t)return t.defined;if(\"array\"in t)return`Array<${t.array[0]}; ${t.array[1]}>`;throw new Error(`Unknown IDL type: ${t}`)}static formatIdlData(t,e,n){if(\"string\"==typeof t.type)return e.toString();if(t.type.hasOwnProperty(\"vec\"))return\"[\"+e.map((e=>this.formatIdlData({name:\"\",type:t.type.vec},e))).join(\", \")+\"]\";if(t.type.hasOwnProperty(\"option\"))return null===e?\"null\":this.formatIdlData({name:\"\",type:t.type.option},e,n);if(t.type.hasOwnProperty(\"defined\")){if(void 0===n)throw new Error(\"User defined types not provided\");const r=n.filter((e=>e.name===t.type.defined));if(1!==r.length)throw new Error(`Type not found: ${t.type.defined}`);return Ct.formatIdlDataDefined(r[0],e,n)}return\"unknown\"}static formatIdlDataDefined(t,e,n){if(\"struct\"===t.type.kind){const r=t.type;return\"{ \"+Object.keys(e).map((t=>{const o=r.fields.filter((e=>e.name===t))[0];if(void 0===o)throw new Error(\"Unable to find type\");return t+\": \"+Ct.formatIdlData(o,e[t],n)})).join(\", \")+\" }\"}if(0===t.type.variants.length)return\"{}\";if(t.type.variants[0].name){const r=t.type.variants,o=Object.keys(e)[0],i=e[o],s=Object.keys(i).map((t=>{var e;const s=i[t],a=null===(e=r[o])||void 0===e?void 0:e.filter((e=>e.name===t))[0];if(void 0===a)throw new Error(\"Unable to find variant\");return t+\": \"+Ct.formatIdlData(a,s,n)})).join(\", \"),a=camelcase__WEBPACK_IMPORTED_MODULE_5___default()(o,{pascalCase:!0});return 0===s.length?a:`${a} { ${s} }`}return\"Tuple formatting not yet implemented\"}static flattenIdlAccounts(t,e){return t.map((t=>{const n=function(t){const e=t.replace(/([A-Z])/g,\" $1\");return e.charAt(0).toUpperCase()+e.slice(1)}(t.name);if(t.hasOwnProperty(\"accounts\")){const r=e?`${e} > ${n}`:n;return Ct.flattenIdlAccounts(t.accounts,r)}return{...t,name:e?`${e} > ${n}`:n}})).flat()}}function zt(e,n){var r;let o=`${e}:${void 0===r&&(r={}),Pt(n,Et({delimiter:\"_\"},r))}`;return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(js_sha256__WEBPACK_IMPORTED_MODULE_6__.sha256.digest(o)).slice(0,8)}function Bt(t,e){if(\"enum\"===e.type.kind){let n=e.type.variants.map((e=>void 0===e.fields?0:e.fields.map((e=>{if(\"object\"!=typeof e||!(\"name\"in e))throw new Error(\"Tuple enum variants not yet implemented.\");return Ot(t,e.type)})).reduce(((t,e)=>t+e))));return Math.max(...n)+1}return void 0===e.type.fields?0:e.type.fields.map((e=>Ot(t,e.type))).reduce(((t,e)=>t+e),0)}function Ot(t,e){var n,r;switch(e){case\"bool\":case\"u8\":case\"i8\":case\"bytes\":case\"string\":return 1;case\"i16\":case\"u16\":return 2;case\"u32\":case\"i32\":case\"f32\":return 4;case\"u64\":case\"i64\":case\"f64\":return 8;case\"u128\":case\"i128\":return 16;case\"publicKey\":return 32;default:if(\"vec\"in e)return 1;if(\"option\"in e)return 1+Ot(t,e.option);if(\"coption\"in e)return 4+Ot(t,e.coption);if(\"defined\"in e){const o=null!==(r=null===(n=t.types)||void 0===n?void 0:n.filter((t=>t.name===e.defined)))&&void 0!==r?r:[];if(1!==o.length)throw new gt(`Type not found: ${JSON.stringify(e)}`);return Bt(t,o[0])}if(\"array\"in e){let n=e.array[0],r=e.array[1];return Ot(t,n)*r}throw new Error(`Invalid type ${JSON.stringify(e)}`)}}const Dt=8;class Nt{constructor(t){if(void 0===t.accounts)return void(this.accountLayouts=new Map);const e=t.accounts.map((e=>[e.name,Lt.typeDefLayout(e,t.types)]));this.accountLayouts=new Map(e),this.idl=t}async encode(e,n){const r=buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(1e3),o=this.accountLayouts.get(e);if(!o)throw new Error(`Unknown account: ${e}`);const i=o.encode(n,r);let s=r.slice(0,i),a=Nt.accountDiscriminator(e);return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([a,s])}decode(t,e){if(Nt.accountDiscriminator(t).compare(e.slice(0,8)))throw new Error(\"Invalid account discriminator\");return this.decodeUnchecked(t,e)}decodeUnchecked(t,e){const n=e.slice(8),r=this.accountLayouts.get(t);if(!r)throw new Error(`Unknown account: ${t}`);return r.decode(n)}memcmp(e,n){const r=Nt.accountDiscriminator(e);return{offset:0,bytes:bs58__WEBPACK_IMPORTED_MODULE_3___default().encode(n?buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([r,n]):r)}}size(t){var e;return 8+(null!==(e=Bt(this.idl,t))&&void 0!==e?e:0)}static accountDiscriminator(e){return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(js_sha256__WEBPACK_IMPORTED_MODULE_6__.sha256.digest(`account:${camelcase__WEBPACK_IMPORTED_MODULE_5___default()(e,{pascalCase:!0})}`)).slice(0,8)}}class Rt{constructor(t){if(void 0===t.events)return void(this.layouts=new Map);const e=t.events.map((e=>{let n={name:e.name,type:{kind:\"struct\",fields:e.fields.map((t=>({name:t.name,type:t.type})))}};return[e.name,Lt.typeDefLayout(n,t.types)]}));this.layouts=new Map(e),this.discriminators=new Map(void 0===t.events?[]:t.events.map((t=>[base64_js__WEBPACK_IMPORTED_MODULE_4__.fromByteArray(Vt(t.name)),t.name])))}decode(e){let n;try{n=buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(base64_js__WEBPACK_IMPORTED_MODULE_4__.toByteArray(e))}catch(t){return null}const r=base64_js__WEBPACK_IMPORTED_MODULE_4__.fromByteArray(n.slice(0,8)),o=this.discriminators.get(r);if(void 0===o)return null;const i=this.layouts.get(o);if(!i)throw new Error(`Unknown event: ${o}`);return{data:i.decode(n.slice(8)),name:o}}}function Vt(e){return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(js_sha256__WEBPACK_IMPORTED_MODULE_6__.sha256.digest(`event:${e}`)).slice(0,8)}class Ut{constructor(t){if(void 0===t.state)throw new Error(\"Idl state not defined.\");this.layout=Lt.typeDefLayout(t.state.struct,t.types)}async encode(e,n){const r=buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(1e3),o=this.layout.encode(n,r),i=await jt(e),s=r.slice(0,o);return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([i,s])}decode(t){const e=t.slice(8);return this.layout.decode(e)}}async function jt(e){let n=mt(\"anchor-deprecated-state\")?\"account\":\"state\";return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(js_sha256__WEBPACK_IMPORTED_MODULE_6__.sha256.digest(`${n}:${e}`)).slice(0,8)}class $t{constructor(t){if(void 0===t.types)return void(this.typeLayouts=new Map);const e=t.types.map((e=>[e.name,Lt.typeDefLayout(e,t.types)]));this.typeLayouts=new Map(e),this.idl=t}encode(e,n){const r=buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(1e3),o=this.typeLayouts.get(e);if(!o)throw new Error(`Unknown type: ${e}`);const i=o.encode(n,r);return r.slice(0,i)}decode(t,e){const n=this.typeLayouts.get(t);if(!n)throw new Error(`Unknown type: ${t}`);return n.decode(e)}}class Kt{constructor(t){this.instruction=new Tt(t),this.accounts=new Nt(t),this.events=new Rt(t),t.state&&(this.state=new Ut(t)),this.types=new $t(t)}}var qt=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof __webpack_require__.g?__webpack_require__.g:\"undefined\"!=typeof self?self:{};function Ft(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,\"default\")?t.default:t}class Wt{constructor(t,e){if(!Number.isInteger(t))throw new TypeError(\"span must be an integer\");this.span=t,this.property=e}makeDestinationObject(){return{}}decode(t,e){throw new Error(\"Layout is abstract\")}encode(t,e,n){throw new Error(\"Layout is abstract\")}getSpan(t,e){if(0>this.span)throw new RangeError(\"indeterminate span\");return this.span}replicate(t){const e=Object.create(this.constructor.prototype);return Object.assign(e,this),e.property=t,e}fromArray(t){}}var Gt=Wt;class Ht extends Wt{isCount(){throw new Error(\"ExternalLayout is abstract\")}}class Jt extends Ht{constructor(t,e,n){if(!(t instanceof Wt))throw new TypeError(\"layout must be a Layout\");if(void 0===e)e=0;else if(!Number.isInteger(e))throw new TypeError(\"offset must be integer or undefined\");super(t.span,n||t.property),this.layout=t,this.offset=e}isCount(){return this.layout instanceof Zt||this.layout instanceof Xt}decode(t,e){return void 0===e&&(e=0),this.layout.decode(t,e+this.offset)}encode(t,e,n){return void 0===n&&(n=0),this.layout.encode(t,e,n+this.offset)}}class Zt extends Wt{constructor(t,e){if(super(t,e),6t&&e instanceof Wt),!0))throw new TypeError(\"fields must be array of Layout instances\");\"boolean\"==typeof e&&void 0===n&&(n=e,e=void 0);for(const e of t)if(0>e.span&&void 0===e.property)throw new Error(\"fields cannot contain unnamed variable-length layout\");let r=-1;try{r=t.reduce(((t,e)=>t+e.getSpan()),0)}catch(t){}super(r,e),this.fields=t,this.decodePrefixes=!!n}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let n=0;try{n=this.fields.reduce(((n,r)=>{const o=r.getSpan(t,e);return e+=o,n+o}),0)}catch(t){throw new RangeError(\"indeterminate span\")}return n}decode(t,e){void 0===e&&(e=0);const n=this.makeDestinationObject();for(const r of this.fields)if(void 0!==r.property&&(n[r.property]=r.decode(t,e)),e+=r.getSpan(t,e),this.decodePrefixes&&t.length===e)break;return n}encode(t,e,n){void 0===n&&(n=0);const r=n;let o=0,i=0;for(const r of this.fields){let s=r.span;if(i=0s&&(s=r.getSpan(e,n)))}o=n,n+=s}return o+i-r}fromArray(t){const e=this.makeDestinationObject();for(const n of this.fields)void 0!==n.property&&0n.span?e=-1:0<=e&&(e+=n.span)}}}class oe{constructor(t){this.property=t}decode(){throw new Error(\"UnionDiscriminator is abstract\")}encode(){throw new Error(\"UnionDiscriminator is abstract\")}}class ie extends oe{constructor(t,e){if(!(t instanceof Ht&&t.isCount()))throw new TypeError(\"layout must be an unsigned integer ExternalLayout\");super(e||t.property||\"variant\"),this.layout=t}decode(t,e){return this.layout.decode(t,e)}encode(t,e,n){return this.layout.encode(t,e,n)}}class se extends Wt{constructor(t,e,n){const r=t instanceof Zt||t instanceof Xt;if(r)t=new ie(new Jt(t));else if(t instanceof Ht&&t.isCount())t=new ie(t);else if(!(t instanceof oe))throw new TypeError(\"discr must be a UnionDiscriminator or an unsigned integer layout\");if(void 0===e&&(e=null),!(null===e||e instanceof Wt))throw new TypeError(\"defaultLayout must be null or a Layout\");if(null!==e){if(0>e.span)throw new Error(\"defaultLayout must have constant span\");void 0===e.property&&(e=e.replicate(\"content\"))}let o=-1;e&&(o=e.span,0<=o&&r&&(o+=t.layout.span)),super(o,n),this.discriminator=t,this.usesPrefixDiscriminator=r,this.defaultLayout=e,this.registry={};let i=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(t){return i(t)},this.configGetSourceVariant=function(t){i=t.bind(this)}}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);const n=this.getVariant(t,e);if(!n)throw new Error(\"unable to determine span for unrecognized variant\");return n.getSpan(t,e)}defaultGetSourceVariant(t){if(t.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&t.hasOwnProperty(this.defaultLayout.property))return;const e=this.registry[t[this.discriminator.property]];if(e&&(!e.layout||t.hasOwnProperty(e.property)))return e}else for(const e in this.registry){const n=this.registry[e];if(t.hasOwnProperty(n.property))return n}throw new Error(\"unable to infer src variant\")}decode(t,e){let n;void 0===e&&(e=0);const r=this.discriminator,o=r.decode(t,e);let i=this.registry[o];if(void 0===i){let s=0;i=this.defaultLayout,this.usesPrefixDiscriminator&&(s=r.layout.span),n=this.makeDestinationObject(),n[r.property]=o,n[i.property]=this.defaultLayout.decode(t,e+s)}else n=i.decode(t,e);return n}encode(t,e,n){void 0===n&&(n=0);const r=this.getSourceVariant(t);if(void 0===r){const r=this.discriminator,o=this.defaultLayout;let i=0;return this.usesPrefixDiscriminator&&(i=r.layout.span),r.encode(t[r.property],e,n),i+o.encode(t[o.property],e,n+i)}return r.encode(t,e,n)}addVariant(t,e,n){const r=new ae(this,t,e,n);return this.registry[t]=r,r}getVariant(t,e){let n=t;return Buffer.isBuffer(t)&&(void 0===e&&(e=0),n=this.discriminator.decode(t,e)),this.registry[n]}}class ae extends Wt{constructor(t,e,n,r){if(!(t instanceof se))throw new TypeError(\"union must be a Union\");if(!Number.isInteger(e)||0>e)throw new TypeError(\"variant must be a (non-negative) integer\");if(\"string\"==typeof n&&void 0===r&&(r=n,n=null),n){if(!(n instanceof Wt))throw new TypeError(\"layout must be a Layout\");if(null!==t.defaultLayout&&0<=n.span&&n.span>t.defaultLayout.span)throw new Error(\"variant span exceeds span of containing union\");if(\"string\"!=typeof r)throw new TypeError(\"variant must have a String property\")}let o=t.span;0>t.span&&(o=n?n.span:0,0<=o&&t.usesPrefixDiscriminator&&(o+=t.discriminator.layout.span)),super(o,r),this.union=t,this.variant=e,this.layout=n||null}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),n+this.layout.getSpan(t,e+n)}decode(t,e){const n=this.makeDestinationObject();if(void 0===e&&(e=0),this!==this.union.getVariant(t,e))throw new Error(\"variant mismatch\");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(t,e+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(t,e,n){void 0===n&&(n=0);let r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!t.hasOwnProperty(this.property))throw new TypeError(\"variant lacks property \"+this.property);this.union.discriminator.encode(this.variant,e,n);let o=r;if(this.layout&&(this.layout.encode(t[this.property],e,n+r),o+=this.layout.getSpan(e,n+r),0<=this.union.span&&o>this.union.span))throw new Error(\"encoded variant overruns containing union\");return o}fromArray(t){if(this.layout)return this.layout.fromArray(t)}}class ce extends Wt{constructor(t,e){if(!(t instanceof Ht&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError(\"length must be positive integer or an unsigned integer ExternalLayout\");let n=-1;t instanceof Ht||(n=t),super(n,e),this.length=t}getSpan(t,e){let n=this.span;return 0>n&&(n=this.length.decode(t,e)),n}decode(t,e){void 0===e&&(e=0);let n=this.span;return 0>n&&(n=this.length.decode(t,e)),t.slice(e,e+n)}encode(t,e,n){let r=this.length;if(this.length instanceof Ht&&(r=t.length),!Buffer.isBuffer(t)||r!==t.length)throw new TypeError((o=\"Blob.encode\",((i=this).property?o+\"[\"+i.property+\"]\":o)+\" requires (length \"+r+\") Buffer as src\"));var o,i;if(n+r>e.length)throw new RangeError(\"encoding overruns Buffer\");return e.write(t.toString(\"hex\"),n,r,\"hex\"),this.length instanceof Ht&&this.length.encode(r,e,n),r}}var ue=(t,e,n)=>new Jt(t,e,n),de=t=>new Zt(1,t),le=t=>new Zt(4,t),he=t=>new ee(t),pe=t=>new ne(t),fe=(t,e,n)=>new re(t,e,n),me=(t,e,n)=>new se(t,e,n),ye=(t,e)=>new ce(t,e);class ge{constructor(t){}encode(t,n){switch(camelcase__WEBPACK_IMPORTED_MODULE_5___default()(t)){case\"initializeMint\":return function({decimals:t,mintAuthority:n,freezeAuthority:r}){return be({initializeMint:{decimals:t,mintAuthority:n.toBuffer(),freezeAuthorityOption:!!r,freezeAuthority:(r||_solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey[\"default\"]).toBuffer()}})}(n);case\"initializeAccount\":return be({initializeAccount:{}});case\"initializeMultisig\":return function({m:t}){return be({initializeMultisig:{m:t}})}(n);case\"transfer\":return function({amount:t}){return be({transfer:{amount:t}})}(n);case\"approve\":return function({amount:t}){return be({approve:{amount:t}})}(n);case\"revoke\":return be({revoke:{}});case\"setAuthority\":return function({authorityType:t,newAuthority:e}){return be({setAuthority:{authorityType:t,newAuthority:e}})}(n);case\"mintTo\":return function({amount:t}){return be({mintTo:{amount:t}})}(n);case\"burn\":return function({amount:t}){return be({burn:{amount:t}})}(n);case\"closeAccount\":return be({closeAccount:{}});case\"freezeAccount\":return be({freezeAccount:{}});case\"thawAccount\":return be({thawAccount:{}});case\"transferChecked\":return function({amount:t,decimals:e}){return be({transferChecked:{amount:t,decimals:e}})}(n);case\"approvedChecked\":return function({amount:t,decimals:e}){return be({approveChecked:{amount:t,decimals:e}})}(n);case\"mintToChecked\":return function({amount:t,decimals:e}){return be({mintToChecked:{amount:t,decimals:e}})}(n);case\"burnChecked\":return function({amount:t,decimals:e}){return be({burnChecked:{amount:t,decimals:e}})}(n);case\"intializeAccount2\":return function({authority:t}){return be({initilaizeAccount2:{authority:t}})}(n);case\"syncNative\":return be({syncNative:{}});case\"initializeAccount3\":return function({authority:t}){return be({initializeAccount3:{authority:t}})}(n);case\"initializeMultisig2\":return function({m:t}){return be({initializeMultisig2:{m:t}})}(n);case\"initializeMint2\":return function({decimals:t,mintAuthority:e,freezeAuthority:n}){return be({encodeInitializeMint2:{decimals:t,mintAuthority:e,freezeAuthority:n}})}(n);default:throw new Error(`Invalid instruction: ${t}`)}}encodeState(t,e){throw new Error(\"SPL token does not have state\")}}const we=me(de(\"instruction\"));function ve(t){return ye(32,t)}function be(t){let e=Buffer.alloc(Ae),n=we.encode(t,e);return e.slice(0,n)}we.addVariant(0,fe([de(\"decimals\"),ye(32,\"mintAuthority\"),de(\"freezeAuthorityOption\"),ve(\"freezeAuthority\")]),\"initializeMint\"),we.addVariant(1,fe([]),\"initializeAccount\"),we.addVariant(2,fe([de(\"m\")]),\"initializeMultisig\"),we.addVariant(3,fe([he(\"amount\")]),\"transfer\"),we.addVariant(4,fe([he(\"amount\")]),\"approve\"),we.addVariant(5,fe([]),\"revoke\"),we.addVariant(6,fe([de(\"authorityType\"),de(\"newAuthorityOption\"),ve(\"newAuthority\")]),\"setAuthority\"),we.addVariant(7,fe([he(\"amount\")]),\"mintTo\"),we.addVariant(8,fe([he(\"amount\")]),\"burn\"),we.addVariant(9,fe([]),\"closeAccount\"),we.addVariant(10,fe([]),\"freezeAccount\"),we.addVariant(11,fe([]),\"thawAccount\"),we.addVariant(12,fe([he(\"amount\"),de(\"decimals\")]),\"transferChecked\"),we.addVariant(13,fe([he(\"amount\"),de(\"decimals\")]),\"approvedChecked\"),we.addVariant(14,fe([he(\"amount\"),de(\"decimals\")]),\"mintToChecked\"),we.addVariant(15,fe([he(\"amount\"),de(\"decimals\")]),\"burnedChecked\"),we.addVariant(16,fe([ve(\"authority\")]),\"InitializeAccount2\"),we.addVariant(17,fe([]),\"syncNative\"),we.addVariant(18,fe([ve(\"authority\")]),\"initializeAccount3\"),we.addVariant(19,fe([de(\"m\")]),\"initializeMultisig2\"),we.addVariant(20,fe([de(\"decimals\"),ve(\"mintAuthority\"),de(\"freezeAuthorityOption\"),ve(\"freezeAuthority\")]),\"initializeMint2\");const Ae=Math.max(...Object.values(we.registry).map((t=>t.span)));class _e{constructor(t){}encode(t,e){throw new Error(\"SPL token does not have state\")}decode(t){throw new Error(\"SPL token does not have state\")}}function Se(t){return new ke(ye(8),(t=>Le.fromBuffer(t)),(t=>t.toBuffer()),t)}function Ee(t){return new ke(ye(32),(t=>new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(t)),(t=>t.toBuffer()),t)}function Ie(t,e){return new Me(t,e)}class ke extends Gt{constructor(t,e,n,r){super(t.span,r),this.layout=t,this.decoder=e,this.encoder=n}decode(t,e){return this.decoder(this.layout.decode(t,e))}encode(t,e,n){return this.layout.encode(this.encoder(t),e,n)}getSpan(t,e){return this.layout.getSpan(t,e)}}class Me extends Gt{constructor(t,e){super(-1,e),this.layout=t,this.discriminator=le()}encode(t,e,n=0){return null==t?this.layout.span+this.discriminator.encode(0,e,n):(this.discriminator.encode(1,e,n),this.layout.encode(t,e,n+4)+4)}decode(t,e=0){const n=this.discriminator.decode(t,e);if(0===n)return null;if(1===n)return this.layout.decode(t,e+4);throw new Error(\"Invalid coption \"+this.layout.property)}getSpan(t,e=0){return this.layout.getSpan(t,e+4)+4}}function xe(t){if(0===t)return!1;if(1===t)return!0;throw new Error(\"Invalid bool: \"+t)}function Pe(t){return t?1:0}class Le extends (bn_js__WEBPACK_IMPORTED_MODULE_2___default()){toBuffer(){const t=super.toArray().reverse(),e=Buffer.from(t);if(8===e.length)return e;if(e.length>=8)throw new Error(\"u64 too large\");const n=Buffer.alloc(8);return e.copy(n),n}static fromBuffer(t){if(8!==t.length)throw new Error(`Invalid buffer length: ${t.length}`);return new Le([...t].reverse().map((t=>`00${t.toString(16)}`.slice(-2))).join(\"\"),16)}}class Te{constructor(t){this.idl=t}async encode(t,e){switch(t){case\"token\":{const t=Buffer.alloc(165),n=Be.encode(e,t);return t.slice(0,n)}case\"mint\":{const t=Buffer.alloc(82),n=Ce.encode(e,t);return t.slice(0,n)}default:throw new Error(`Invalid account name: ${t}`)}}decode(t,e){return this.decodeUnchecked(t,e)}decodeUnchecked(t,e){switch(t){case\"token\":return function(t){return Be.decode(t)}(e);case\"mint\":return function(t){return Ce.decode(t)}(e);default:throw new Error(`Invalid account name: ${t}`)}}memcmp(t,e){switch(t){case\"token\":return{dataSize:165};case\"mint\":return{dataSize:82};default:throw new Error(`Invalid account name: ${t}`)}}size(t){var e;return null!==(e=Bt(this.idl,t))&&void 0!==e?e:0}}const Ce=fe([Ie(Ee(),\"mintAuthority\"),Se(\"supply\"),de(\"decimals\"),(ze=\"isInitialized\",new ke(de(),xe,Pe,ze)),Ie(Ee(),\"freezeAuthority\")]);var ze;const Be=fe([Ee(\"mint\"),Ee(\"authority\"),Se(\"amount\"),Ie(Ee(),\"delegate\"),de(\"state\"),Ie(Se(),\"isNative\"),Se(\"delegatedAmount\"),Ie(Ee(),\"closeAuthority\")]);class Oe{constructor(t){}decode(t){throw new Error(\"SPL token program does not have events\")}}class De{constructor(t){}encode(t,e){throw new Error(\"SPL token does not have user-defined types\")}decode(t,e){throw new Error(\"SPL token does not have user-defined types\")}}class Ne{constructor(t){this.instruction=new ge(t),this.accounts=new Te(t),this.events=new Oe(t),this.state=new _e(t),this.types=new De(t)}}class Re{constructor(t){}encode(t,e){switch(camelcase__WEBPACK_IMPORTED_MODULE_5___default()(t)){case\"createAccount\":return function({lamports:t,space:e,owner:n}){return Ke({createAccount:{lamports:t,space:e,owner:n.toBuffer()}})}(e);case\"assign\":return function({owner:t}){return Ke({assign:{owner:t.toBuffer()}})}(e);case\"transfer\":return function({lamports:t}){return Ke({transfer:{lamports:t}})}(e);case\"createAccountWithSeed\":return function({base:t,seed:e,lamports:n,space:r,owner:o}){return Ke({createAccountWithSeed:{base:t.toBuffer(),seed:e,lamports:n,space:r,owner:o.toBuffer()}},$e.getVariant(3).span+e.length)}(e);case\"advanceNonceAccount\":return function({authorized:t}){return Ke({advanceNonceAccount:{authorized:t.toBuffer()}})}(e);case\"withdrawNonceAccount\":return function({lamports:t}){return Ke({withdrawNonceAccount:{lamports:t}})}(e);case\"initializeNonceAccount\":return function({authorized:t}){return Ke({initializeNonceAccount:{authorized:t.toBuffer()}})}(e);case\"authorizeNonceAccount\":return function({authorized:t}){return Ke({authorizeNonceAccount:{authorized:t.toBuffer()}})}(e);case\"allocate\":return function({space:t}){return Ke({allocate:{space:t}})}(e);case\"allocateWithSeed\":return function({base:t,seed:e,space:n,owner:r}){return Ke({allocateWithSeed:{base:t.toBuffer(),seed:e,space:n,owner:r.toBuffer()}},$e.getVariant(9).span+e.length)}(e);case\"assignWithSeed\":return function({base:t,seed:e,owner:n}){return Ke({assignWithSeed:{base:t.toBuffer(),seed:e,owner:n.toBuffer()}},$e.getVariant(10).span+e.length)}(e);case\"transferWithSeed\":return function({lamports:t,seed:e,owner:n}){return Ke({transferWithSeed:{lamports:t,seed:e,owner:n.toBuffer()}},$e.getVariant(11).span+e.length)}(e);default:throw new Error(`Invalid instruction: ${t}`)}}encodeState(t,e){throw new Error(\"System does not have state\")}}class Ve extends Gt{constructor(t){super(-1,t),this.property=t,this.layout=fe([le(\"length\"),le(\"lengthPadding\"),ye(ue(le(),-8),\"chars\")],this.property)}encode(t,e,n=0){if(null==t)return this.layout.span;const r={chars:Buffer.from(t,\"utf8\")};return this.layout.encode(r,e,n)}decode(t,e=0){return this.layout.decode(t,e).chars.toString()}getSpan(t,e=0){return le().span+le().span+new (bn_js__WEBPACK_IMPORTED_MODULE_2___default())(new Uint8Array(t).slice(e,e+4),10,\"le\").toNumber()}}function Ue(t){return new Ve(t)}function je(t){return ye(32,t)}const $e=me(le(\"instruction\"));function Ke(t,e){const n=Buffer.alloc(null!=e?e:qe),r=$e.encode(t,n);return void 0===e?n.slice(0,r):n}$e.addVariant(0,fe([pe(\"lamports\"),pe(\"space\"),je(\"owner\")]),\"createAccount\"),$e.addVariant(1,fe([je(\"owner\")]),\"assign\"),$e.addVariant(2,fe([pe(\"lamports\")]),\"transfer\"),$e.addVariant(3,fe([je(\"base\"),Ue(\"seed\"),pe(\"lamports\"),pe(\"space\"),je(\"owner\")]),\"createAccountWithSeed\"),$e.addVariant(4,fe([je(\"authorized\")]),\"advanceNonceAccount\"),$e.addVariant(5,fe([pe(\"lamports\")]),\"withdrawNonceAccount\"),$e.addVariant(6,fe([je(\"authorized\")]),\"initializeNonceAccount\"),$e.addVariant(7,fe([je(\"authorized\")]),\"authorizeNonceAccount\"),$e.addVariant(8,fe([pe(\"space\")]),\"allocate\"),$e.addVariant(9,fe([je(\"base\"),Ue(\"seed\"),pe(\"space\"),je(\"owner\")]),\"allocateWithSeed\"),$e.addVariant(10,fe([je(\"base\"),Ue(\"seed\"),je(\"owner\")]),\"assignWithSeed\"),$e.addVariant(11,fe([pe(\"lamports\"),Ue(\"seed\"),je(\"owner\")]),\"transferWithSeed\");const qe=Math.max(...Object.values($e.registry).map((t=>t.span)));class Fe{constructor(t){}encode(t,e){throw new Error(\"System does not have state\")}decode(t){throw new Error(\"System does not have state\")}}class We{constructor(t){this.idl=t}async encode(t,e){if(\"nonce\"===t){const t=Buffer.alloc(_solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.NONCE_ACCOUNT_LENGTH),n=Je.encode(e,t);return t.slice(0,n)}throw new Error(`Invalid account name: ${t}`)}decode(t,e){return this.decodeUnchecked(t,e)}decodeUnchecked(t,e){if(\"nonce\"===t)return function(t){return Je.decode(t)}(e);throw new Error(`Invalid account name: ${t}`)}memcmp(t,e){if(\"nonce\"===t)return{dataSize:_solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.NONCE_ACCOUNT_LENGTH};throw new Error(`Invalid account name: ${t}`)}size(t){var e;return null!==(e=Bt(this.idl,t))&&void 0!==e?e:0}}class Ge extends Gt{constructor(t,e,n,r){super(t.span,r),this.layout=t,this.decoder=e,this.encoder=n}decode(t,e){return this.decoder(this.layout.decode(t,e))}encode(t,e,n){return this.layout.encode(this.encoder(t),e,n)}getSpan(t,e){return this.layout.getSpan(t,e)}}function He(t){return new Ge(ye(32),(t=>new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(t)),(t=>t.toBuffer()),t)}const Je=fe([le(\"version\"),le(\"state\"),He(\"authorizedPubkey\"),He(\"nonce\"),fe([he(\"lamportsPerSignature\")],\"feeCalculator\")]);class Ze{constructor(t){}decode(t){throw new Error(\"System program does not have events\")}}class Xe{constructor(t){}encode(t,e){throw new Error(\"System does not have user-defined types\")}decode(t,e){throw new Error(\"System does not have user-defined types\")}}class Qe{constructor(t){this.instruction=new Re(t),this.accounts=new We(t),this.events=new Ze(t),this.state=new Fe(t),this.types=new Xe(t)}}var Ye=Object.freeze({__proto__:null,hash:function(t){return (0,js_sha256__WEBPACK_IMPORTED_MODULE_6__.sha256)(t)}});function tn(n,r,o){const i=buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([n.toBuffer(),buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(r),o.toBuffer()]),s=js_sha256__WEBPACK_IMPORTED_MODULE_6__.sha256.digest(i);return new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(s))}function en(n,r){let o=buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(0);n.forEach((function(e){if(e.length>32)throw new TypeError(\"Max seed length exceeded\");o=buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([o,rn(e)])})),o=buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([o,r.toBuffer(),buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(\"ProgramDerivedAddress\")]);let i=(0,js_sha256__WEBPACK_IMPORTED_MODULE_6__.sha256)(new Uint8Array(o)),s=new (bn_js__WEBPACK_IMPORTED_MODULE_2___default())(i,16).toArray(void 0,32);if(_solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.isOnCurve(new Uint8Array(s)))throw new Error(\"Invalid seeds, address must fall off the curve\");return new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(s)}function nn(e,n){let r,o=255;for(;0!=o;){try{r=en(e.concat(buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from([o])),n)}catch(t){if(t instanceof TypeError)throw t;o--;continue}return[r,o]}throw new Error(\"Unable to find a viable program address nonce\")}const rn=e=>e instanceof buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer?e:e instanceof Uint8Array?buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(e.buffer,e.byteOffset,e.byteLength):buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(e);async function on(n,...r){let o=[buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from([97,110,99,104,111,114])];r.forEach((e=>{o.push(e instanceof buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer?e:L(e).toBuffer())}));const[i]=await _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.findProgramAddress(o,L(n));return i}var sn=Object.freeze({__proto__:null,createWithSeedSync:tn,createProgramAddressSync:en,findProgramAddressSync:nn,associated:on});const an=new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\"),cn=new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\");var un=Object.freeze({__proto__:null,TOKEN_PROGRAM_ID:an,ASSOCIATED_PROGRAM_ID:cn,associatedAddress:async function({mint:t,owner:n}){return(await _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.findProgramAddress([n.toBuffer(),an.toBuffer(),t.toBuffer()],cn))[0]}}),dn={exports:{}};!function(t,e){var n=\"undefined\"!=typeof self?self:qt,r=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){var n=\"URLSearchParams\"in t,r=\"Symbol\"in t&&\"iterator\"in Symbol,o=\"FileReader\"in t&&\"Blob\"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),i=\"FormData\"in t,s=\"ArrayBuffer\"in t;if(s)var a=[\"[object Int8Array]\",\"[object Uint8Array]\",\"[object Uint8ClampedArray]\",\"[object Int16Array]\",\"[object Uint16Array]\",\"[object Int32Array]\",\"[object Uint32Array]\",\"[object Float32Array]\",\"[object Float64Array]\"],c=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if(\"string\"!=typeof t&&(t=String(t)),/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError(\"Invalid character in header field name\");return t.toLowerCase()}function d(t){return\"string\"!=typeof t&&(t=String(t)),t}function l(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError(\"Already read\"));t.bodyUsed=!0}function f(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function m(t){var e=new FileReader,n=f(e);return e.readAsArrayBuffer(t),n}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?\"string\"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&o&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=y(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText=\"\",this.headers.get(\"content-type\")||(\"string\"==typeof t?this.headers.set(\"content-type\",\"text/plain;charset=UTF-8\"):this._bodyBlob&&this._bodyBlob.type?this.headers.set(\"content-type\",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set(\"content-type\",\"application/x-www-form-urlencoded;charset=UTF-8\"))},o&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error(\"could not read FormData body as blob\");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,n=f(e);return e.readAsText(t),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,(\"GET\"===this.method||\"HEAD\"===this.method)&&o)throw new TypeError(\"Body not allowed for GET or HEAD requests\");this._initBody(o)}function b(t){var e=new FormData;return t.trim().split(\"&\").forEach((function(t){if(t){var n=t.split(\"=\"),r=n.shift().replace(/\\+/g,\" \"),o=n.join(\"=\").replace(/\\+/g,\" \");e.append(decodeURIComponent(r),decodeURIComponent(o))}})),e}function A(t,e){e||(e={}),this.type=\"default\",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=\"statusText\"in e?e.statusText:\"OK\",this.headers=new h(e.headers),this.url=e.url||\"\",this._initBody(t)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},g.call(v.prototype),g.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},A.error=function(){var t=new A(null,{status:0,statusText:\"\"});return t.type=\"error\",t};var _=[301,302,303,307,308];A.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError(\"Invalid status code\");return new A(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function S(t,n){return new Promise((function(r,i){var s=new v(t,n);if(s.signal&&s.signal.aborted)return i(new e.DOMException(\"Aborted\",\"AbortError\"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var t,e,n={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||\"\",e=new h,t.replace(/\\r?\\n[\\t ]+/g,\" \").split(/\\r?\\n/).forEach((function(t){var n=t.split(\":\"),r=n.shift().trim();if(r){var o=n.join(\":\").trim();e.append(r,o)}})),e)};n.url=\"responseURL\"in a?a.responseURL:n.headers.get(\"X-Request-URL\");var o=\"response\"in a?a.response:a.responseText;r(new A(o,n))},a.onerror=function(){i(new TypeError(\"Network request failed\"))},a.ontimeout=function(){i(new TypeError(\"Network request failed\"))},a.onabort=function(){i(new e.DOMException(\"Aborted\",\"AbortError\"))},a.open(s.method,s.url,!0),\"include\"===s.credentials?a.withCredentials=!0:\"omit\"===s.credentials&&(a.withCredentials=!1),\"responseType\"in a&&o&&(a.responseType=\"blob\"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener(\"abort\",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener(\"abort\",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}S.polyfill=!0,t.fetch||(t.fetch=S,t.Headers=h,t.Request=v,t.Response=A),e.Headers=h,e.Request=v,e.Response=A,e.fetch=S,Object.defineProperty(e,\"__esModule\",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e}(dn,dn.exports);var ln=Ft(dn.exports);async function hn(t,e){const n=await t.getAccountInfo(e);if(null===n)throw new Error(\"program account not found\");const{program:r}=fn(n.data),o=await t.getAccountInfo(r.programdataAddress);if(null===o)throw new Error(\"program data account not found\");const{programData:i}=fn(o.data);return i}const pn=_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.rustEnum([_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.struct([],\"uninitialized\"),_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.struct([_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.option(_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.publicKey(),\"authorityAddress\")],\"buffer\"),_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.struct([_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.publicKey(\"programdataAddress\")],\"program\"),_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.struct([_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.u64(\"slot\"),_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.option(_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.publicKey(),\"upgradeAuthorityAddress\")],\"programData\")],void 0,_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.u32());function fn(t){return pn.decode(t)}var mn=Object.freeze({__proto__:null,verifiedBuild:async function(t,e,n=5){const r=`https://api.apr.dev/api/v0/program/${e.toString()}/latest?limit=${n}`,[o,i]=await Promise.all([hn(t,e),ln(r)]),s=(await i.json()).filter((t=>!t.aborted&&\"Built\"===t.state&&\"Verified\"===t.verified));if(0===s.length)return null;const a=s[0];return o.slot.toNumber()!==a.verified_slot?null:a},fetchData:hn,decodeUpgradeableLoaderState:fn}),yn=Object.freeze({__proto__:null,sha256:Ye,rpc:it,publicKey:sn,bytes:k,token:un,features:yt,registry:mn});const gn=_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.struct([_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.publicKey(\"authority\"),_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__.vecU8(\"data\")]);function wn(t,e){var n,r;let o={};const i=t.args?t.args.length:0;if(e.length>i){if(e.length!==i+1)throw new Error(`provided too many arguments ${e} to instruction ${null==t?void 0:t.name} expecting: ${null!==(r=null===(n=t.args)||void 0===n?void 0:n.map((t=>t.name)))&&void 0!==r?r:[]}`);o=e.pop()}return[e,o]}class vn{static build(t,e,n){if(\"_inner\"===t.name)throw new gt(\"the _inner name is reserved\");const o=(...i)=>{const[s,a]=wn(t,[...i]);P(t.accounts,a.accounts);const c=o.accounts(a.accounts);return void 0!==a.remainingAccounts&&c.push(...a.remainingAccounts),mt(\"debug-logs\")&&console.log(\"Outgoing account metas:\",c),new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.TransactionInstruction({keys:c,programId:n,data:e(t.name,x(t,...s))})};return o.accounts=e=>vn.accountsArray(e,t.accounts,t.name),o}static accountsArray(t,e,n){return t?e.map((e=>{if(void 0!==(\"accounts\"in e?e.accounts:void 0)){const r=t[e.name];return vn.accountsArray(r,e.accounts,n).flat()}{const r=e;let o;try{o=L(t[e.name])}catch(t){throw new Error(`Wrong input type for account \"${e.name}\" in the instruction accounts object${void 0!==n?' for instruction \"'+n+'\"':\"\"}. Expected PublicKey or string.`)}return{pubkey:o,isWritable:r.isMut,isSigner:r.isSigner}}})).flat():[]}}class bn{static build(t,e,n,r){return async(...o)=>{var i;const s=e(...o),[,a]=wn(t,[...o]);if(void 0===r.sendAndConfirm)throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");try{return await r.sendAndConfirm(s,null!==(i=a.signers)&&void 0!==i?i:[],a.options)}catch(t){throw At(t,n)}}}}class An{static build(t,e){return(...r)=>{var o,i,s;const[,a]=wn(t,[...r]),c=new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.Transaction;if(a.preInstructions&&a.instructions)throw new Error(\"instructions is deprecated, use preInstructions\");return null===(o=a.preInstructions)||void 0===o||o.forEach((t=>c.add(t))),null===(i=a.instructions)||void 0===i||i.forEach((t=>c.add(t))),c.add(e(...r)),null===(s=a.postInstructions)||void 0===s||s.forEach((t=>c.add(t))),c}}}class _n{constructor(t,e,n=lt(),r=new Kt(t)){this.provider=n,this.coder=r,this._idl=t,this._programId=e,this._address=Sn(e),this._sub=null;const[o,i,a]=(()=>{var o;let i={},a={},c={};return null===(o=t.state)||void 0===o||o.methods.forEach((o=>{const u=vn.build(o,((t,e)=>r.instruction.encodeState(t,e)),e);u.accounts=t=>{const r=function(t,e,n,r){if(\"new\"===n.name){const[n]=nn([],t);if(void 0===e.wallet)throw new Error(\"This function requires the Provider interface implementor to have a 'wallet' field.\");return[{pubkey:e.wallet.publicKey,isWritable:!1,isSigner:!0},{pubkey:Sn(t),isWritable:!0,isSigner:!1},{pubkey:n,isWritable:!1,isSigner:!1},{pubkey:_solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SystemProgram.programId,isWritable:!1,isSigner:!1},{pubkey:t,isWritable:!1,isSigner:!1}]}return P(n.accounts,r),[{pubkey:Sn(t),isWritable:!0,isSigner:!1}]}(e,n,o,t);return r.concat(vn.accountsArray(t,o.accounts,o.name))};const d=An.build(o,u),l=bn.build(o,d,M(t),n),p=camelcase__WEBPACK_IMPORTED_MODULE_5___default()(o.name);i[p]=u,a[p]=d,c[p]=l})),[i,a,c]})();this.instruction=o,this.transaction=i,this.rpc=a}get programId(){return this._programId}async fetch(){const t=this.address(),e=await this.provider.connection.getAccountInfo(t);if(null===e)throw new Error(`Account does not exist ${t.toString()}`);const n=this._idl.state;if(!n)throw new Error(\"State is not specified in IDL.\");if((await jt(n.struct.name)).compare(e.data.slice(0,8)))throw new Error(\"Invalid account discriminator\");return this.coder.state.decode(e.data)}address(){return this._address}subscribe(t){if(null!==this._sub)return this._sub.ee;const e=new (eventemitter3__WEBPACK_IMPORTED_MODULE_9___default()),n=this.provider.connection.onAccountChange(this.address(),(t=>{const n=this.coder.state.decode(t.data);e.emit(\"change\",n)}),t);return this._sub={ee:e,listener:n},e}unsubscribe(){null!==this._sub&&this.provider.connection.removeAccountChangeListener(this._sub.listener).then((async()=>{this._sub=null})).catch(console.error)}}function Sn(t){let[e]=nn([],t);return tn(e,\"unversioned\",t)}class En{constructor(t,e,n,r,o){this._idlAccount=e,this._programId=n,this._provider=null!=r?r:lt(),this._coder=null!=o?o:new Kt(t),this._size=this._coder.accounts.size(e)}get size(){return this._size}get programId(){return this._programId}get provider(){return this._provider}get coder(){return this._coder}async fetchNullable(t,e){const n=await this.getAccountInfo(t,e);return null===n?null:this._coder.accounts.decode(this._idlAccount.name,n.data)}async fetch(t,e){const n=await this.fetchNullable(t,e);if(null===n)throw new Error(`Account does not exist ${t.toString()}`);return n}async fetchMultiple(t,e){return(await X(this._provider.connection,t.map((t=>L(t))),e)).map((t=>null==t?null:this._coder.accounts.decode(this._idlAccount.name,null==t?void 0:t.account.data)))}async all(t){return(await this._provider.connection.getProgramAccounts(this._programId,{commitment:this._provider.connection.commitment,filters:[{memcmp:this.coder.accounts.memcmp(this._idlAccount.name,t instanceof Buffer?t:void 0)},...Array.isArray(t)?t:[]]})).map((({pubkey:t,account:e})=>({publicKey:t,account:this._coder.accounts.decode(this._idlAccount.name,e.data)})))}subscribe(t,e){const n=In.get(t.toString());if(n)return n.ee;const r=new (eventemitter3__WEBPACK_IMPORTED_MODULE_9___default());t=L(t);const o=this._provider.connection.onAccountChange(t,(t=>{const e=this._coder.accounts.decode(this._idlAccount.name,t.data);r.emit(\"change\",e)}),e);return In.set(t.toString(),{ee:r,listener:o}),r}async unsubscribe(t){let e=In.get(t.toString());e?In&&await this._provider.connection.removeAccountChangeListener(e.listener).then((()=>{In.delete(t.toString())})).catch(console.error):console.warn(\"Address is not subscribed\")}async createInstruction(t,e){const n=this.size;if(void 0===this._provider.wallet)throw new Error(\"This function requires the Provider interface implementor to have a 'wallet' field.\");return _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SystemProgram.createAccount({fromPubkey:this._provider.wallet.publicKey,newAccountPubkey:t.publicKey,space:null!=e?e:n,lamports:await this._provider.connection.getMinimumBalanceForRentExemption(null!=e?e:n),programId:this._programId})}async associated(...t){const e=await this.associatedAddress(...t);return await this.fetch(e)}async associatedAddress(...t){return await on(this._programId,...t)}async getAccountInfo(t,e){return await this._provider.connection.getAccountInfo(L(t),e)}}const In=new Map,kn=\"Program log: \".length,Mn=\"Program data: \".length;class xn{constructor(t,e,n){this._programId=t,this._provider=e,this._eventParser=new Pn(t,n),this._eventCallbacks=new Map,this._eventListeners=new Map,this._listenerIdCount=0}addEventListener(t,e){var n;let r=this._listenerIdCount;return this._listenerIdCount+=1,t in this._eventCallbacks||this._eventListeners.set(t,[]),this._eventListeners.set(t,(null!==(n=this._eventListeners.get(t))&&void 0!==n?n:[]).concat(r)),this._eventCallbacks.set(r,[t,e]),void 0!==this._onLogsSubscriptionId||(this._onLogsSubscriptionId=this._provider.connection.onLogs(this._programId,((t,e)=>{if(!t.err)for(const n of this._eventParser.parseLogs(t.logs)){const r=this._eventListeners.get(n.name);r&&r.forEach((r=>{const o=this._eventCallbacks.get(r);if(o){const[,r]=o;r(n.data,e.slot,t.signature)}}))}}))),r}async removeEventListener(t){const e=this._eventCallbacks.get(t);if(!e)throw new Error(`Event listener ${t} doesn't exist!`);const[n]=e;let r=this._eventListeners.get(n);if(!r)throw new Error(`Event listeners don't exist for ${n}!`);this._eventCallbacks.delete(t),r=r.filter((e=>e!==t)),0===r.length&&this._eventListeners.delete(n),0==this._eventCallbacks.size&&(assert__WEBPACK_IMPORTED_MODULE_10__.ok(0===this._eventListeners.size),void 0!==this._onLogsSubscriptionId&&(await this._provider.connection.removeOnLogsListener(this._onLogsSubscriptionId),this._onLogsSubscriptionId=void 0))}}class Pn{constructor(t,e){this.coder=e,this.programId=t}*parseLogs(t){const e=new Tn(t),n=new Ln;let r=e.next();for(;null!==r;){let[t,o,i]=this.handleLog(n,r);t&&(yield t),o&&n.push(o),i&&n.pop(),r=e.next()}}handleLog(t,e){return t.stack.length>0&&t.program()===this.programId.toString()?this.handleProgramLog(e):[null,...this.handleSystemLog(e)]}handleProgramLog(t){if(t.startsWith(\"Program log: \")||t.startsWith(\"Program data: \")){const e=t.startsWith(\"Program log: \")?t.slice(kn):t.slice(Mn);return[this.coder.events.decode(e),null,!1]}return[null,...this.handleSystemLog(t)]}handleSystemLog(t){const e=t.split(\":\")[0];return null!==e.match(/^Program (.*) success/g)?[null,!0]:e.startsWith(`Program ${this.programId.toString()} invoke`)?[this.programId.toString(),!1]:e.includes(\"invoke\")?[\"cpi\",!1]:[null,!1]}}class Ln{constructor(){this.stack=[]}program(){return assert__WEBPACK_IMPORTED_MODULE_10__.ok(this.stack.length>0),this.stack[this.stack.length-1]}push(t){this.stack.push(t)}pop(){assert__WEBPACK_IMPORTED_MODULE_10__.ok(this.stack.length>0),this.stack.pop()}}class Tn{constructor(t){this.logs=t}next(){if(0===this.logs.length)return null;let t=this.logs[0];return this.logs=this.logs.slice(1),t}}const Cn=new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\");function zn(){return new Ne(Bn)}const Bn={version:\"0.1.0\",name:\"spl_token\",instructions:[{name:\"initializeMint\",accounts:[{name:\"mint\",isMut:!0,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[{name:\"decimals\",type:\"u8\"},{name:\"mintAuthority\",type:\"publicKey\"},{name:\"freezeAuthority\",type:{coption:\"publicKey\"}}]},{name:\"initializeAccount\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[]},{name:\"initializeMultisig\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[{name:\"m\",type:\"u8\"}]},{name:\"transfer\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"destination\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"}]},{name:\"approve\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"delegate\",isMut:!1,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"}]},{name:\"revoke\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[]},{name:\"setAuthority\",accounts:[{name:\"mint\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"authorityType\",type:\"u8\"},{name:\"newAuthority\",type:{coption:\"publicKey\"}}]},{name:\"mintTo\",accounts:[{name:\"mint\",isMut:!0,isSigner:!1},{name:\"to\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"}]},{name:\"burn\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"}]},{name:\"closeAccount\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"destination\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!1}],args:[]},{name:\"freezeAccount\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[]},{name:\"thawAccount\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[]},{name:\"transferChecked\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"destination\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"},{name:\"decimals\",type:\"u8\"}]},{name:\"approveChecked\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"delegate\",isMut:!1,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"},{name:\"decimals\",type:\"u8\"}]},{name:\"mintToChecked\",accounts:[{name:\"mint\",isMut:!0,isSigner:!1},{name:\"to\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"},{name:\"decimals\",type:\"u8\"}]},{name:\"burnChecked\",accounts:[{name:\"source\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!0,isSigner:!1},{name:\"authority\",isMut:!1,isSigner:!0}],args:[{name:\"amount\",type:\"u64\"},{name:\"decimals\",type:\"u8\"}]},{name:\"initializeAccount2\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[{name:\"authority\",type:\"publicKey\"}]},{name:\"syncNative\",accounts:[{name:\"account\",isMut:!0,isSigner:!1}],args:[]},{name:\"initializeAccount3\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1}],args:[{name:\"authority\",type:\"publicKey\"}]},{name:\"initializeMultisig2\",accounts:[{name:\"account\",isMut:!0,isSigner:!1}],args:[{name:\"m\",type:\"u8\"}]},{name:\"initializeMint2\",accounts:[{name:\"mint\",isMut:!0,isSigner:!1}],args:[{name:\"decimals\",type:\"u8\"},{name:\"mintAuthority\",type:\"publicKey\"},{name:\"freezeAuthority\",type:{coption:\"publicKey\"}}]}],accounts:[{name:\"mint\",type:{kind:\"struct\",fields:[{name:\"mintAuthority\",type:{coption:\"publicKey\"}},{name:\"supply\",type:\"u64\"},{name:\"decimals\",type:\"u8\"},{name:\"isInitialized\",type:\"bool\"},{name:\"freezeAuthority\",type:{coption:\"publicKey\"}}]}},{name:\"token\",type:{kind:\"struct\",fields:[{name:\"mint\",type:\"publicKey\"},{name:\"authority\",type:\"publicKey\"},{name:\"amount\",type:\"u64\"},{name:\"delegate\",type:{coption:\"publicKey\"}},{name:\"state\",type:\"u8\"},{name:\"isNative\",type:{coption:\"u64\"}},{name:\"delegatedAmount\",type:\"u64\"},{name:\"closeAuthority\",type:{coption:\"publicKey\"}}]}}]};class On{constructor(t,e,n,r,o,i){this._args=t,this._accounts=e,this._provider=n,this._programId=r,this._idlIx=o,this._accountStore=new Dn(n,i)}async resolve(){for(let t=0;t0&&!this._accounts[n]&&await this.autoPopulatePda(e)}}async autoPopulatePda(t){if(!t.pda||!t.pda.seeds)throw new Error(\"Must have seeds\");const n=await Promise.all(t.pda.seeds.map((t=>this.toBuffer(t)))),r=await this.parseProgramId(t),[o]=await _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.findProgramAddress(n,r);this._accounts[camelcase__WEBPACK_IMPORTED_MODULE_5___default()(t.name)]=o}async parseProgramId(t){var n;if(!(null===(n=t.pda)||void 0===n?void 0:n.programId))return this._programId;switch(t.pda.programId.kind){case\"const\":return new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(this.toBufferConst(t.pda.programId.value));case\"arg\":return this.argValue(t.pda.programId);case\"account\":return await this.accountValue(t.pda.programId);default:throw new Error(`Unexpected program seed kind: ${t.pda.programId.kind}`)}}async toBuffer(t){switch(t.kind){case\"const\":return this.toBufferConst(t);case\"arg\":return await this.toBufferArg(t);case\"account\":return await this.toBufferAccount(t);default:throw new Error(`Unexpected seed kind: ${t.kind}`)}}toBufferConst(t){return this.toBufferValue(t.type,t.value)}async toBufferArg(t){const e=this.argValue(t);return this.toBufferValue(t.type,e)}argValue(t){const e=camelcase__WEBPACK_IMPORTED_MODULE_5___default()(t.path.split(\".\")[0]),n=this._idlIx.args.findIndex((t=>t.name===e));if(-1===n)throw new Error(`Unable to find argument for seed: ${e}`);return this._args[n]}async toBufferAccount(t){const e=await this.accountValue(t);return this.toBufferValue(t.type,e)}async accountValue(t){const e=t.path.split(\".\"),n=e[0],r=this._accounts[camelcase__WEBPACK_IMPORTED_MODULE_5___default()(n)];if(1===e.length)return r;const o=await this._accountStore.fetchAccount(t.account,r);return this.parseAccountValue(o,e.slice(1))}parseAccountValue(t,e){let n;for(;e.length>0;)n=t[camelcase__WEBPACK_IMPORTED_MODULE_5___default()(e[0])],e=e.slice(1);return n}toBufferValue(t,e){switch(t){case\"u8\":return Buffer.from([e]);case\"u16\":let n=Buffer.alloc(2);return n.writeUInt16LE(e),n;case\"u32\":let r=Buffer.alloc(4);return r.writeUInt32LE(e),r;case\"u64\":let o=Buffer.alloc(8);return o.writeBigUInt64LE(BigInt(e)),o;case\"string\":return Buffer.from(b(e));case\"publicKey\":return e.toBuffer();default:if(t.array)return Buffer.from(e);throw new Error(`Unexpected seed type: ${t}`)}}}On.CONST_ACCOUNTS={associatedTokenProgram:cn,rent:_solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SYSVAR_RENT_PUBKEY,systemProgram:_solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SystemProgram.programId,tokenProgram:an};class Dn{constructor(t,e){this._provider=t,this._accounts=e,this._cache=new Map}async fetchAccount(t,e){const n=e.toString();if(!this._cache.has(n))if(\"TokenAccount\"===t){const t=await this._provider.connection.getAccountInfo(e);if(null===t)throw new Error(`invalid account info for ${n}`);const r=zn().accounts.decode(\"token\",t.data);this._cache.set(n,r)}else{const r=this._accounts[camelcase__WEBPACK_IMPORTED_MODULE_5___default()(t)].fetch(e);this._cache.set(n,r)}return this._cache.get(n)}}class Nn{static build(t,e,n,r,o,i,s,a,c){return(...u)=>new Rn(u,r,o,i,s,a,t,e,n,c)}}class Rn{constructor(t,e,n,r,o,i,s,a,c,u){this._args=t,this._ixFn=e,this._txFn=n,this._rpcFn=r,this._simulateFn=o,this._viewFn=i,this._accounts={},this._remainingAccounts=[],this._signers=[],this._preInstructions=[],this._postInstructions=[],this._autoResolveAccounts=!0,this._accountsResolver=new On(t,this._accounts,s,a,c,u)}async pubkeys(){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._accounts}accounts(t){return this._autoResolveAccounts=!0,Object.assign(this._accounts,t),this}accountsStrict(t){return this._autoResolveAccounts=!1,Object.assign(this._accounts,t),this}signers(t){return this._signers=this._signers.concat(t),this}remainingAccounts(t){return this._remainingAccounts=this._remainingAccounts.concat(t),this}preInstructions(t){return this._preInstructions=this._preInstructions.concat(t),this}postInstructions(t){return this._postInstructions=this._postInstructions.concat(t),this}async rpc(t){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._rpcFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:t})}async view(t){if(this._autoResolveAccounts&&await this._accountsResolver.resolve(),!this._viewFn)throw new Error(\"Method does not support views\");return this._viewFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:t})}async simulate(t){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._simulateFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions,options:t})}async instruction(){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._ixFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions})}async transaction(){return this._autoResolveAccounts&&await this._accountsResolver.resolve(),this._txFn(...this._args,{accounts:this._accounts,signers:this._signers,remainingAccounts:this._remainingAccounts,preInstructions:this._preInstructions,postInstructions:this._postInstructions})}}class Vn{constructor(t,e,n,r){e=L(e),n||(n=lt()),this._idl=t,this._provider=n,this._programId=e,this._coder=null!=r?r:new Kt(t),this._events=new xn(this._programId,n,this._coder);const[o,i,s,a,c,u,d,l]=class{static build(t,e,n,r){const o={},i={},s={},a={},c={},u={},d=M(t),l=t.accounts?class{static build(t,e,n,r){var o;const i={};return null===(o=t.accounts)||void 0===o||o.forEach((o=>{const s=camelcase__WEBPACK_IMPORTED_MODULE_5___default()(o.name);i[s]=new En(t,o,n,r,e)})),i}}.build(t,e,n,r):{},p=class{static build(t,e,n,r){if(void 0!==t.state)return new _n(t,n,r,e)}}.build(t,e,n,r);return t.instructions.forEach((p=>{const f=vn.build(p,((t,n)=>e.instruction.encode(t,n)),n),m=An.build(p,f),y=bn.build(p,m,d,r),g=class{static build(t,e,n,r,o,i,s){return async(...a)=>{var c;const u=e(...a),[,d]=wn(t,[...a]);let l;if(void 0===r.simulate)throw new Error(\"This function requires 'Provider.simulate' to be implemented.\");try{l=await r.simulate(u,d.signers,null===(c=d.options)||void 0===c?void 0:c.commitment)}catch(t){throw At(t,n)}if(void 0===l)throw new Error(\"Unable to simulate transaction\");const h=l.logs;if(!h)throw new Error(\"Simulated logs not found\");const p=[];if(s.events){let t=new Pn(i,o);for(const e of t.parseLogs(h))p.push(e)}return{events:p,raw:h}}}}.build(p,m,d,r,e,n,t),w=class{static build(t,e,n,r){const o=e.accounts.find((t=>t.isMut)),i=!!e.returns;if(!o&&i)return async(...o)=>{var i,s;let a=await n(...o);const c=`Program return: ${t} `;let u=a.raw.find((t=>t.startsWith(c)));if(!u)throw new Error(\"View expected return log\");let d=E(u.slice(c.length)),l=e.returns;if(!l)throw new Error(\"View expected return type\");return Lt.fieldLayout({type:l},Array.from([...null!==(i=r.accounts)&&void 0!==i?i:[],...null!==(s=r.types)&&void 0!==s?s:[]])).decode(d)}}}.build(n,p,g,t),v=Nn.build(r,n,p,f,m,y,g,w,l),b=camelcase__WEBPACK_IMPORTED_MODULE_5___default()(p.name);i[b]=f,s[b]=m,o[b]=y,a[b]=g,c[b]=v,w&&(u[b]=w)})),[o,i,s,l,a,c,p,u]}}.build(t,this._coder,e,n);this.rpc=o,this.instruction=i,this.transaction=s,this.account=a,this.simulate=c,this.methods=u,this.state=d,this.views=l}get programId(){return this._programId}get idl(){return this._idl}get coder(){return this._coder}get provider(){return this._provider}static async at(t,e){const n=L(t),r=await Vn.fetchIdl(n,e);if(!r)throw new Error(`IDL not found for program: ${t.toString()}`);return new Vn(r,n,e)}static async fetchIdl(t,n){n=null!=n?n:lt();const r=L(t),o=await async function(t){const n=(await _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.findProgramAddress([],t))[0];return await _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.createWithSeed(n,\"anchor:idl\",t)}(r),i=await n.connection.getAccountInfo(o);if(!i)return null;let s=(a=i.data.slice(8),gn.decode(a));var a;const c=(0,pako__WEBPACK_IMPORTED_MODULE_8__/* .inflate */ .rr)(s.data);return JSON.parse(v(c))}addEventListener(t,e){return this._events.addEventListener(t,e)}async removeEventListener(t){return await this._events.removeEventListener(t)}}class Un{constructor(t){}encode(t,e){if(\"create\"===camelcase__WEBPACK_IMPORTED_MODULE_5___default()(t))return Buffer.alloc(0);throw new Error(`Invalid instruction: ${t}`)}encodeState(t,e){throw new Error(\"SPL associated token does not have state\")}}class jn{constructor(t){}encode(t,e){throw new Error(\"SPL associated token does not have state\")}decode(t){throw new Error(\"SPL associated token does not have state\")}}class $n{constructor(t){this.idl=t}async encode(t,e){throw new Error(`Invalid account name: ${t}`)}decode(t,e){return this.decodeUnchecked(t,e)}decodeUnchecked(t,e){throw new Error(`Invalid account name: ${t}`)}memcmp(t,e){throw new Error(`Invalid account name: ${t}`)}size(t){var e;return null!==(e=Bt(this.idl,t))&&void 0!==e?e:0}}class Kn{constructor(t){}decode(t){throw new Error(\"SPL associated token program does not have events\")}}class qn{constructor(t){}encode(t,e){throw new Error(\"SPL associated token does not have user-defined types\")}decode(t,e){throw new Error(\"SPL associated token does not have user-defined types\")}}class Fn{constructor(t){this.instruction=new Un(t),this.accounts=new $n(t),this.events=new Kn(t),this.state=new jn(t),this.types=new qn(t)}}const Wn=new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\");function Gn(t){return new Vn(Hn,Wn,t,new Fn(Hn))}const Hn={version:\"0.1.0\",name:\"spl_associated_token\",instructions:[{name:\"create\",accounts:[{name:\"authority\",isMut:!0,isSigner:!0},{name:\"associatedAccount\",isMut:!0,isSigner:!1},{name:\"owner\",isMut:!1,isSigner:!1},{name:\"mint\",isMut:!1,isSigner:!1},{name:\"systemProgram\",isMut:!1,isSigner:!1},{name:\"tokenProgram\",isMut:!1,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[]}]};class Jn{static token(t){return function(t){return new Vn(Bn,Cn,t,zn())}(t)}static associatedToken(t){return Gn(t)}}const Zn=new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(\"11111111111111111111111111111111\");function Xn(t){return new Vn(Qn,Zn,t,new Qe(Qn))}const Qn={version:\"0.1.0\",name:\"system_program\",instructions:[{name:\"createAccount\",accounts:[{name:\"from\",isMut:!0,isSigner:!0},{name:\"to\",isMut:!0,isSigner:!0}],args:[{name:\"lamports\",type:\"u64\"},{name:\"space\",type:\"u64\"},{name:\"owner\",type:\"publicKey\"}]},{name:\"assign\",accounts:[{name:\"pubkey\",isMut:!0,isSigner:!0}],args:[{name:\"owner\",type:\"publicKey\"}]},{name:\"transfer\",accounts:[{name:\"from\",isMut:!0,isSigner:!0},{name:\"to\",isMut:!0,isSigner:!1}],args:[{name:\"lamports\",type:\"u64\"}]},{name:\"createAccountWithSeed\",accounts:[{name:\"from\",isMut:!0,isSigner:!0},{name:\"to\",isMut:!0,isSigner:!1},{name:\"base\",isMut:!1,isSigner:!0}],args:[{name:\"base\",type:\"publicKey\"},{name:\"seed\",type:\"string\"},{name:\"lamports\",type:\"u64\"},{name:\"space\",type:\"u64\"},{name:\"owner\",type:\"publicKey\"}]},{name:\"advanceNonceAccount\",accounts:[{name:\"nonce\",isMut:!0,isSigner:!1},{name:\"recentBlockhashes\",isMut:!1,isSigner:!1},{name:\"authorized\",isMut:!1,isSigner:!0}],args:[{name:\"authorized\",type:\"publicKey\"}]},{name:\"withdrawNonceAccount\",accounts:[{name:\"nonce\",isMut:!0,isSigner:!1},{name:\"to\",isMut:!0,isSigner:!1},{name:\"recentBlockhashes\",isMut:!1,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1},{name:\"authorized\",isMut:!1,isSigner:!0}],args:[{name:\"lamports\",type:\"u64\"}]},{name:\"initializeNonceAccount\",accounts:[{name:\"nonce\",isMut:!0,isSigner:!0},{name:\"recentBlockhashes\",isMut:!1,isSigner:!1},{name:\"rent\",isMut:!1,isSigner:!1}],args:[{name:\"authorized\",type:\"publicKey\"}]},{name:\"authorizeNonceAccount\",accounts:[{name:\"nonce\",isMut:!0,isSigner:!1},{name:\"authorized\",isMut:!1,isSigner:!0}],args:[{name:\"authorized\",type:\"publicKey\"}]},{name:\"allocate\",accounts:[{name:\"pubkey\",isMut:!0,isSigner:!0}],args:[{name:\"space\",type:\"u64\"}]},{name:\"allocateWithSeed\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"base\",isMut:!1,isSigner:!0}],args:[{name:\"base\",type:\"publicKey\"},{name:\"seed\",type:\"string\"},{name:\"space\",type:\"u64\"},{name:\"owner\",type:\"publicKey\"}]},{name:\"assignWithSeed\",accounts:[{name:\"account\",isMut:!0,isSigner:!1},{name:\"base\",isMut:!1,isSigner:!0}],args:[{name:\"base\",type:\"publicKey\"},{name:\"seed\",type:\"string\"},{name:\"owner\",type:\"publicKey\"}]},{name:\"transferWithSeed\",accounts:[{name:\"from\",isMut:!0,isSigner:!1},{name:\"base\",isMut:!1,isSigner:!0},{name:\"to\",isMut:!0,isSigner:!1}],args:[{name:\"lamports\",type:\"u64\"},{name:\"seed\",type:\"string\"},{name:\"owner\",type:\"publicKey\"}]}],accounts:[{name:\"nonce\",type:{kind:\"struct\",fields:[{name:\"version\",type:\"u32\"},{name:\"state\",type:\"u32\"},{name:\"authorizedPubkey\",type:\"publicKey\"},{name:\"nonce\",type:\"publicKey\"},{name:\"feeCalculator\",type:{defined:\"FeeCalculator\"}}]}}],types:[{name:\"FeeCalculator\",type:{kind:\"struct\",fields:[{name:\"lamportsPerSignature\",type:\"u64\"}]}}]};class Yn{static system(t){return Xn(t)}}\n//# sourceMappingURL=index.js.map\n\n\n/***/ }),\n\n/***/ 5658:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar basex = __webpack_require__(8162)\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n\n\n/***/ }),\n\n/***/ 9593:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.map = exports.array = exports.rustEnum = exports.str = exports.vecU8 = exports.tagged = exports.vec = exports.bool = exports.option = exports.publicKey = exports.i128 = exports.u128 = exports.i64 = exports.u64 = exports.struct = exports.f64 = exports.f32 = exports.i32 = exports.u32 = exports.i16 = exports.u16 = exports.i8 = exports.u8 = void 0;\nconst buffer_layout_1 = __webpack_require__(698);\nconst web3_js_1 = __webpack_require__(6737);\nconst bn_js_1 = __importDefault(__webpack_require__(3550));\nvar buffer_layout_2 = __webpack_require__(698);\nObject.defineProperty(exports, \"u8\", ({ enumerable: true, get: function () { return buffer_layout_2.u8; } }));\nObject.defineProperty(exports, \"i8\", ({ enumerable: true, get: function () { return buffer_layout_2.s8; } }));\nObject.defineProperty(exports, \"u16\", ({ enumerable: true, get: function () { return buffer_layout_2.u16; } }));\nObject.defineProperty(exports, \"i16\", ({ enumerable: true, get: function () { return buffer_layout_2.s16; } }));\nObject.defineProperty(exports, \"u32\", ({ enumerable: true, get: function () { return buffer_layout_2.u32; } }));\nObject.defineProperty(exports, \"i32\", ({ enumerable: true, get: function () { return buffer_layout_2.s32; } }));\nObject.defineProperty(exports, \"f32\", ({ enumerable: true, get: function () { return buffer_layout_2.f32; } }));\nObject.defineProperty(exports, \"f64\", ({ enumerable: true, get: function () { return buffer_layout_2.f64; } }));\nObject.defineProperty(exports, \"struct\", ({ enumerable: true, get: function () { return buffer_layout_2.struct; } }));\nclass BNLayout extends buffer_layout_1.Layout {\n constructor(span, signed, property) {\n super(span, property);\n this.blob = buffer_layout_1.blob(span);\n this.signed = signed;\n }\n decode(b, offset = 0) {\n const num = new bn_js_1.default(this.blob.decode(b, offset), 10, 'le');\n if (this.signed) {\n return num.fromTwos(this.span * 8).clone();\n }\n return num;\n }\n encode(src, b, offset = 0) {\n if (this.signed) {\n src = src.toTwos(this.span * 8);\n }\n return this.blob.encode(src.toArrayLike(Buffer, 'le', this.span), b, offset);\n }\n}\nfunction u64(property) {\n return new BNLayout(8, false, property);\n}\nexports.u64 = u64;\nfunction i64(property) {\n return new BNLayout(8, true, property);\n}\nexports.i64 = i64;\nfunction u128(property) {\n return new BNLayout(16, false, property);\n}\nexports.u128 = u128;\nfunction i128(property) {\n return new BNLayout(16, true, property);\n}\nexports.i128 = i128;\nclass WrappedLayout extends buffer_layout_1.Layout {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nfunction publicKey(property) {\n return new WrappedLayout(buffer_layout_1.blob(32), (b) => new web3_js_1.PublicKey(b), (key) => key.toBuffer(), property);\n}\nexports.publicKey = publicKey;\nclass OptionLayout extends buffer_layout_1.Layout {\n constructor(layout, property) {\n super(-1, property);\n this.layout = layout;\n this.discriminator = buffer_layout_1.u8();\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.discriminator.encode(0, b, offset);\n }\n this.discriminator.encode(1, b, offset);\n return this.layout.encode(src, b, offset + 1) + 1;\n }\n decode(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return null;\n }\n else if (discriminator === 1) {\n return this.layout.decode(b, offset + 1);\n }\n throw new Error('Invalid option ' + this.property);\n }\n getSpan(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return 1;\n }\n else if (discriminator === 1) {\n return this.layout.getSpan(b, offset + 1) + 1;\n }\n throw new Error('Invalid option ' + this.property);\n }\n}\nfunction option(layout, property) {\n return new OptionLayout(layout, property);\n}\nexports.option = option;\nfunction bool(property) {\n return new WrappedLayout(buffer_layout_1.u8(), decodeBool, encodeBool, property);\n}\nexports.bool = bool;\nfunction decodeBool(value) {\n if (value === 0) {\n return false;\n }\n else if (value === 1) {\n return true;\n }\n throw new Error('Invalid bool: ' + value);\n}\nfunction encodeBool(value) {\n return value ? 1 : 0;\n}\nfunction vec(elementLayout, property) {\n const length = buffer_layout_1.u32('length');\n const layout = buffer_layout_1.struct([\n length,\n buffer_layout_1.seq(elementLayout, buffer_layout_1.offset(length, -length.span), 'values'),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, values => ({ values }), property);\n}\nexports.vec = vec;\nfunction tagged(tag, layout, property) {\n const wrappedLayout = buffer_layout_1.struct([\n u64('tag'),\n layout.replicate('data'),\n ]);\n function decodeTag({ tag: receivedTag, data }) {\n if (!receivedTag.eq(tag)) {\n throw new Error('Invalid tag, expected: ' +\n tag.toString('hex') +\n ', got: ' +\n receivedTag.toString('hex'));\n }\n return data;\n }\n return new WrappedLayout(wrappedLayout, decodeTag, data => ({ tag, data }), property);\n}\nexports.tagged = tagged;\nfunction vecU8(property) {\n const length = buffer_layout_1.u32('length');\n const layout = buffer_layout_1.struct([\n length,\n buffer_layout_1.blob(buffer_layout_1.offset(length, -length.span), 'data'),\n ]);\n return new WrappedLayout(layout, ({ data }) => data, data => ({ data }), property);\n}\nexports.vecU8 = vecU8;\nfunction str(property) {\n return new WrappedLayout(vecU8(), data => data.toString('utf-8'), s => Buffer.from(s, 'utf-8'), property);\n}\nexports.str = str;\nfunction rustEnum(variants, property, discriminant) {\n const unionLayout = buffer_layout_1.union(discriminant !== null && discriminant !== void 0 ? discriminant : buffer_layout_1.u8(), property);\n variants.forEach((variant, index) => unionLayout.addVariant(index, variant, variant.property));\n return unionLayout;\n}\nexports.rustEnum = rustEnum;\nfunction array(elementLayout, length, property) {\n const layout = buffer_layout_1.struct([\n buffer_layout_1.seq(elementLayout, length, 'values'),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, values => ({ values }), property);\n}\nexports.array = array;\nclass MapEntryLayout extends buffer_layout_1.Layout {\n constructor(keyLayout, valueLayout, property) {\n super(keyLayout.span + valueLayout.span, property);\n this.keyLayout = keyLayout;\n this.valueLayout = valueLayout;\n }\n decode(b, offset) {\n offset = offset || 0;\n const key = this.keyLayout.decode(b, offset);\n const value = this.valueLayout.decode(b, offset + this.keyLayout.getSpan(b, offset));\n return [key, value];\n }\n encode(src, b, offset) {\n offset = offset || 0;\n const keyBytes = this.keyLayout.encode(src[0], b, offset);\n const valueBytes = this.valueLayout.encode(src[1], b, offset + keyBytes);\n return keyBytes + valueBytes;\n }\n getSpan(b, offset) {\n return (this.keyLayout.getSpan(b, offset) + this.valueLayout.getSpan(b, offset));\n }\n}\nfunction map(keyLayout, valueLayout, property) {\n const length = buffer_layout_1.u32('length');\n const layout = buffer_layout_1.struct([\n length,\n buffer_layout_1.seq(new MapEntryLayout(keyLayout, valueLayout), buffer_layout_1.offset(length, -length.span), 'values'),\n ]);\n return new WrappedLayout(layout, ({ values }) => new Map(values), values => ({ values: Array.from(values.entries()) }), property);\n}\nexports.map = map;\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 817:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.IDL = void 0;\nexports.IDL = {\n \"version\": \"0.0.1\",\n \"name\": \"merkle_distributor\",\n \"instructions\": [\n {\n \"name\": \"newDistributor\",\n \"docs\": [\n \"READ THE FOLLOWING:\",\n \"\",\n \"This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.\",\n \"\",\n \"An attack could look like:\",\n \"- A legitimate user opens a new distributor.\",\n \"- Someone observes the call to this instruction.\",\n \"- They replace the clawback_receiver, admin, or time parameters with their own.\",\n \"\",\n \"One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own.\",\n \"Then the attacker can steal all funds from the distributor to their own clawback_receiver account.\",\n \"\",\n \"HOW TO AVOID:\",\n \"- When you call into this instruction, ensure your transaction succeeds.\",\n \"- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and\",\n \"assert the parameters are what you expect, most importantly the clawback_receiver and admin.\",\n \"- If your transaction fails, double check the value on-chain matches what you expect.\"\n ],\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"[MerkleDistributor].\"\n ],\n \"pda\": {\n \"seeds\": [\n {\n \"kind\": \"const\",\n \"type\": \"string\",\n \"value\": \"MerkleDistributor\"\n },\n {\n \"kind\": \"account\",\n \"type\": \"publicKey\",\n \"account\": \"Mint\",\n \"path\": \"mint\"\n },\n {\n \"kind\": \"arg\",\n \"type\": \"u64\",\n \"path\": \"version\"\n }\n ]\n }\n },\n {\n \"name\": \"clawbackReceiver\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"Clawback receiver token account\"\n ]\n },\n {\n \"name\": \"mint\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The mint to distribute.\"\n ]\n },\n {\n \"name\": \"tokenVault\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"Token vault\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin wallet, responsible for creating the distributor and paying for the transaction.\",\n \"Also has the authority to set the clawback receiver and change itself.\"\n ]\n },\n {\n \"name\": \"systemProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The [System] program.\"\n ]\n },\n {\n \"name\": \"associatedTokenProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The [Associated Token] program.\"\n ]\n },\n {\n \"name\": \"tokenProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The [Token] program.\"\n ]\n }\n ],\n \"args\": [\n {\n \"name\": \"version\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"root\",\n \"type\": {\n \"array\": [\n \"u8\",\n 32\n ]\n }\n },\n {\n \"name\": \"maxTotalClaim\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"maxNumNodes\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"startTs\",\n \"type\": \"i64\"\n },\n {\n \"name\": \"endTs\",\n \"type\": \"i64\"\n }\n ]\n },\n {\n \"name\": \"newClaim\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"claimStatus\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"Claim status PDA\"\n ],\n \"pda\": {\n \"seeds\": [\n {\n \"kind\": \"const\",\n \"type\": \"string\",\n \"value\": \"ClaimStatus\"\n },\n {\n \"kind\": \"account\",\n \"type\": \"publicKey\",\n \"path\": \"claimant\"\n },\n {\n \"kind\": \"account\",\n \"type\": \"publicKey\",\n \"account\": \"MerkleDistributor\",\n \"path\": \"distributor\"\n }\n ]\n }\n },\n {\n \"name\": \"from\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"Distributor ATA containing the tokens to distribute.\"\n ]\n },\n {\n \"name\": \"to\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"Account to send the claimed tokens to.\"\n ]\n },\n {\n \"name\": \"claimant\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Who is claiming the tokens.\"\n ]\n },\n {\n \"name\": \"tokenProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"SPL [Token] program.\"\n ]\n },\n {\n \"name\": \"systemProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The [System] program.\"\n ]\n }\n ],\n \"args\": [\n {\n \"name\": \"index\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"proof\",\n \"type\": {\n \"vec\": {\n \"array\": [\n \"u8\",\n 32\n ]\n }\n }\n }\n ]\n },\n {\n \"name\": \"clawback\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"from\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"Distributor ATA containing the tokens to distribute.\"\n ]\n },\n {\n \"name\": \"to\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The Clawback token account.\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin account\"\n ]\n },\n {\n \"name\": \"systemProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"The [System] program.\"\n ]\n },\n {\n \"name\": \"tokenProgram\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"SPL [Token] program.\"\n ]\n }\n ],\n \"args\": [\n {\n \"name\": \"amount\",\n \"type\": \"u64\"\n }\n ]\n },\n {\n \"name\": \"setClawbackReceiver\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"newClawbackAccount\",\n \"isMut\": false,\n \"isSigner\": false,\n \"docs\": [\n \"New clawback account\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin signer\"\n ]\n }\n ],\n \"args\": []\n },\n {\n \"name\": \"setAdmin\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin signer\"\n ]\n },\n {\n \"name\": \"newAdmin\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"New admin account\"\n ]\n }\n ],\n \"args\": []\n },\n {\n \"name\": \"setTimestamp\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin signer\"\n ]\n }\n ],\n \"args\": [\n {\n \"name\": \"startTs\",\n \"type\": \"i64\"\n },\n {\n \"name\": \"endTs\",\n \"type\": \"i64\"\n }\n ]\n },\n {\n \"name\": \"setMerkleRoot\",\n \"accounts\": [\n {\n \"name\": \"distributor\",\n \"isMut\": true,\n \"isSigner\": false,\n \"docs\": [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n \"name\": \"admin\",\n \"isMut\": true,\n \"isSigner\": true,\n \"docs\": [\n \"Admin signer\"\n ]\n }\n ],\n \"args\": [\n {\n \"name\": \"root\",\n \"type\": {\n \"array\": [\n \"u8\",\n 32\n ]\n }\n },\n {\n \"name\": \"maxTotalClaim\",\n \"type\": \"u64\"\n },\n {\n \"name\": \"maxNumNodes\",\n \"type\": \"u64\"\n }\n ]\n }\n ],\n \"accounts\": [\n {\n \"name\": \"claimStatus\",\n \"docs\": [\n \"Holds whether or not a claimant has claimed tokens.\"\n ],\n \"type\": {\n \"kind\": \"struct\",\n \"fields\": [\n {\n \"name\": \"isClaimed\",\n \"docs\": [\n \"If true, the tokens have been claimed.\"\n ],\n \"type\": \"bool\"\n },\n {\n \"name\": \"claimant\",\n \"docs\": [\n \"Authority that claimed the tokens.\"\n ],\n \"type\": \"publicKey\"\n },\n {\n \"name\": \"claimedAt\",\n \"docs\": [\n \"When the tokens were claimed.\"\n ],\n \"type\": \"i64\"\n },\n {\n \"name\": \"amount\",\n \"docs\": [\n \"Amount of tokens claimed.\"\n ],\n \"type\": \"u64\"\n }\n ]\n }\n },\n {\n \"name\": \"merkleDistributor\",\n \"docs\": [\n \"State for the account which distributes tokens.\"\n ],\n \"type\": {\n \"kind\": \"struct\",\n \"fields\": [\n {\n \"name\": \"bump\",\n \"docs\": [\n \"Bump seed.\"\n ],\n \"type\": \"u8\"\n },\n {\n \"name\": \"version\",\n \"docs\": [\n \"Version of the airdrop\"\n ],\n \"type\": \"u64\"\n },\n {\n \"name\": \"root\",\n \"docs\": [\n \"The 256-bit merkle root.\"\n ],\n \"type\": {\n \"array\": [\n \"u8\",\n 32\n ]\n }\n },\n {\n \"name\": \"mint\",\n \"docs\": [\n \"[Mint] of the token to be distributed.\"\n ],\n \"type\": \"publicKey\"\n },\n {\n \"name\": \"tokenVault\",\n \"docs\": [\n \"Token Address of the vault\"\n ],\n \"type\": \"publicKey\"\n },\n {\n \"name\": \"maxTotalClaim\",\n \"docs\": [\n \"Maximum number of tokens that can ever be claimed from this [MerkleDistributor].\"\n ],\n \"type\": \"u64\"\n },\n {\n \"name\": \"maxNumNodes\",\n \"docs\": [\n \"Maximum number of nodes in [MerkleDistributor].\"\n ],\n \"type\": \"u64\"\n },\n {\n \"name\": \"totalAmountClaimed\",\n \"docs\": [\n \"Total amount of tokens that have been claimed.\"\n ],\n \"type\": \"u64\"\n },\n {\n \"name\": \"numNodesClaimed\",\n \"docs\": [\n \"Number of nodes that have been claimed.\"\n ],\n \"type\": \"u64\"\n },\n {\n \"name\": \"startTs\",\n \"docs\": [\n \"Claim time start (Unix Timestamp)\"\n ],\n \"type\": \"i64\"\n },\n {\n \"name\": \"endTs\",\n \"docs\": [\n \"Claim time end (Unix Timestamp)\"\n ],\n \"type\": \"i64\"\n },\n {\n \"name\": \"clawbackReceiver\",\n \"docs\": [\n \"Clawback receiver\"\n ],\n \"type\": \"publicKey\"\n },\n {\n \"name\": \"admin\",\n \"docs\": [\n \"Admin wallet\"\n ],\n \"type\": \"publicKey\"\n }\n ]\n }\n }\n ],\n \"events\": [\n {\n \"name\": \"NewClaimEvent\",\n \"fields\": [\n {\n \"name\": \"claimant\",\n \"type\": \"publicKey\",\n \"index\": false\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"i64\",\n \"index\": false\n }\n ]\n },\n {\n \"name\": \"ClaimedEvent\",\n \"fields\": [\n {\n \"name\": \"claimant\",\n \"type\": \"publicKey\",\n \"index\": false\n },\n {\n \"name\": \"amount\",\n \"type\": \"u64\",\n \"index\": false\n }\n ]\n }\n ],\n \"errors\": [\n {\n \"code\": 6000,\n \"name\": \"InvalidProof\",\n \"msg\": \"Invalid Merkle proof\"\n },\n {\n \"code\": 6001,\n \"name\": \"ExceededMaxClaim\",\n \"msg\": \"Exceeded maximum claim amount\"\n },\n {\n \"code\": 6002,\n \"name\": \"MaxNodesExceeded\",\n \"msg\": \"Exceeded maximum node count\"\n },\n {\n \"code\": 6003,\n \"name\": \"Unauthorized\",\n \"msg\": \"Account is not authorized to execute this instruction\"\n },\n {\n \"code\": 6004,\n \"name\": \"OwnerMismatch\",\n \"msg\": \"Token account owner did not match intended owner\"\n },\n {\n \"code\": 6005,\n \"name\": \"SameClawbackReceiver\",\n \"msg\": \"New and old Clawback receivers are identical\"\n },\n {\n \"code\": 6006,\n \"name\": \"SameAdmin\",\n \"msg\": \"New and old admin are identical\"\n },\n {\n \"code\": 6007,\n \"name\": \"ClaimExpired\",\n \"msg\": \"Claim window expired\"\n },\n {\n \"code\": 6008,\n \"name\": \"ArithmeticError\",\n \"msg\": \"Arithmetic Error (overflow/underflow)\"\n },\n {\n \"code\": 6009,\n \"name\": \"StartTimestampAfterEnd\",\n \"msg\": \"Start Timestamp cannot be after end Timestamp\"\n },\n {\n \"code\": 6010,\n \"name\": \"TimestampsNotInFuture\",\n \"msg\": \"Timestamps cannot be in the past\"\n },\n {\n \"code\": 6011,\n \"name\": \"DistributionAlreadyStarted\",\n \"msg\": \"Distribution already started\"\n },\n {\n \"code\": 6012,\n \"name\": \"InsufficientClawbackAmount\",\n \"msg\": \"Insufficient clawback amount\"\n }\n ]\n};\n\n\n/***/ }),\n\n/***/ 5945:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.DistributorClient = void 0;\nconst web3_js_1 = __webpack_require__(6737);\nconst anchor_1 = __webpack_require__(4758);\nconst common_sdk_1 = __webpack_require__(6259);\nconst token_utils_1 = __webpack_require__(9510);\nconst utils_1 = __webpack_require__(2209);\nconst buffer_layout_1 = __webpack_require__(9386);\nconst buffer_layout_utils_1 = __webpack_require__(7278);\nconst spl_token_1 = __webpack_require__(4945);\nclass DistributorClient {\n constructor(ctx, pda) {\n this.ctx = ctx;\n this.pda = pda;\n }\n newDistributor(mint, root, clawbackReceiver, maxTotalClaim, maxNumNodes, startTs, endTs, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const clawbackReceiverATA = (0, token_utils_1.getATAAddressSync)({ mint, owner: clawbackReceiver });\n const tx = new common_sdk_1.TransactionBuilder(this.ctx.provider.connection, this.ctx.provider.wallet);\n const clawbackTokenAccountInfo = yield this.ctx.connection.getAccountInfo(clawbackReceiverATA);\n if (clawbackTokenAccountInfo === null) {\n tx.addInstruction({\n instructions: [\n spl_token_1.Token.createAssociatedTokenAccountInstruction(token_utils_1.ASSOCIATED_TOKEN_PROGRAM_ID, token_utils_1.TOKEN_PROGRAM_ID, mint, clawbackReceiverATA, clawbackReceiver, this.ctx.wallet.publicKey)\n ],\n cleanupInstructions: [],\n signers: [],\n });\n }\n const tokenVault = (0, token_utils_1.getATAAddressSync)({ mint, owner: distributor.key });\n const newDistributorIx = yield this.ctx.methods.newDistributor({\n accounts: {\n distributor: distributor.key,\n clawbackReceiver: clawbackReceiverATA,\n mint,\n tokenVault,\n admin: this.ctx.wallet.publicKey,\n },\n inputs: {\n version,\n root: (0, utils_1.toBytes32Array)(root),\n maxTotalClaim,\n maxNumNodes,\n startTs,\n endTs,\n },\n });\n if (newDistributorIx.ix) {\n tx.addInstruction(newDistributorIx.ix);\n }\n return tx;\n });\n }\n setAdmin(mint, newAdmin, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const distributorData = yield this.ctx.program.account.merkleDistributor.fetch(distributor.key);\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n const tx = (yield this.ctx.methods.setAdmin({\n accounts: {\n distributor: distributor.key,\n admin: this.ctx.wallet.publicKey,\n newAdmin\n },\n inputs: {},\n })).toTx();\n return tx;\n });\n }\n setClawbackReceiver(mint, clawbackReceiver, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const distributorData = yield this.ctx.program.account.merkleDistributor.fetch(distributor.key);\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n const clawbackReceiverATA = (0, token_utils_1.getATAAddressSync)({ mint, owner: clawbackReceiver });\n const tx = new common_sdk_1.TransactionBuilder(this.ctx.provider.connection, this.ctx.provider.wallet);\n const clawbackTokenAccountInfo = yield this.ctx.connection.getAccountInfo(clawbackReceiverATA);\n if (clawbackTokenAccountInfo === null) {\n tx.addInstruction({\n instructions: [\n spl_token_1.Token.createAssociatedTokenAccountInstruction(token_utils_1.ASSOCIATED_TOKEN_PROGRAM_ID, token_utils_1.TOKEN_PROGRAM_ID, mint, clawbackReceiverATA, clawbackReceiver, this.ctx.wallet.publicKey)\n ],\n cleanupInstructions: [],\n signers: [],\n });\n }\n const setClawbackReceiverIx = yield this.ctx.methods.setClawbackReceiver({\n accounts: {\n distributor: distributor.key,\n admin: this.ctx.wallet.publicKey,\n newClawbackAccount: clawbackReceiverATA,\n },\n inputs: {},\n });\n if (setClawbackReceiverIx.ix) {\n tx.addInstruction(setClawbackReceiverIx.ix);\n }\n return tx;\n });\n }\n setMerkleRoot(mint, root, maxTotalClaim, maxNumNodes, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const distributorData = yield this.ctx.program.account.merkleDistributor.fetch(distributor.key);\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n const tx = (yield this.ctx.methods.setMerkleRoot({\n accounts: {\n distributor: distributor.key,\n admin: this.ctx.wallet.publicKey,\n },\n inputs: {\n root: (0, utils_1.toBytes32Array)(root),\n maxTotalClaim,\n maxNumNodes,\n },\n })).toTx();\n return tx;\n });\n }\n setTimestamp(mint, startTs, endTs, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const distributorData = yield this.ctx.program.account.merkleDistributor.fetch(distributor.key);\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n const tx = (yield this.ctx.methods.setTimestamp({\n accounts: {\n distributor: distributor.key,\n admin: this.ctx.wallet.publicKey,\n },\n inputs: {\n startTs,\n endTs,\n },\n })).toTx();\n return tx;\n });\n }\n deposit(mint, amount, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n let distributorData;\n try {\n distributorData = yield this.ctx.fetcher.getOneMerkleDistributor(distributor.key);\n }\n catch (error) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n const fromAssociatedTokenAccount = (0, token_utils_1.getATAAddressSync)({\n mint,\n owner: this.ctx.wallet.publicKey\n });\n // tokenVault is initialized when creating the distributor\n const tokenVault = distributorData.tokenVault;\n const tx = new common_sdk_1.TransactionBuilder(this.ctx.provider.connection, this.ctx.provider.wallet);\n const keys = (0, utils_1.addSigners)([\n { pubkey: fromAssociatedTokenAccount, isSigner: false, isWritable: true },\n { pubkey: tokenVault, isSigner: false, isWritable: true },\n ], this.ctx.wallet.publicKey, []);\n const transferInstructionData = (0, buffer_layout_1.struct)([(0, buffer_layout_1.u8)('instruction'), (0, buffer_layout_utils_1.u64)('amount')]);\n const data = Buffer.alloc(transferInstructionData.span);\n transferInstructionData.encode({ instruction: utils_1.TokenInstruction.Transfer, amount: BigInt(amount.toString()) }, data);\n tx.addInstruction({\n instructions: [new web3_js_1.TransactionInstruction({\n keys,\n programId: token_utils_1.TOKEN_PROGRAM_ID,\n data\n })],\n cleanupInstructions: [],\n signers: []\n });\n return tx;\n });\n }\n newClaim(mint, index, amount, proof, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n if (proof.length === 0) {\n throw new Error(\"Proof is empty\");\n }\n const distributor = this.pda.distributor(mint, version);\n const claimStatus = this.pda.claim_status(this.ctx.wallet.publicKey, distributor.key);\n try {\n yield this.ctx.program.account.claimStatus.fetch(claimStatus.key);\n throw Error(`Already claimed`);\n }\n catch (error) {\n if (!error.message.includes(\"Account does not exist\")) {\n throw error;\n }\n }\n const from = (0, token_utils_1.getATAAddressSync)({ mint, owner: distributor.key });\n const to = (0, token_utils_1.getATAAddressSync)({ mint, owner: this.ctx.wallet.publicKey });\n const toTokenAccountInfo = yield this.ctx.connection.getAccountInfo(to);\n const tx = new common_sdk_1.TransactionBuilder(this.ctx.provider.connection, this.ctx.provider.wallet);\n if (toTokenAccountInfo === null) {\n tx.addInstruction({\n instructions: [(0, token_utils_1.createATAInstruction)({ address: to, mint, owner: this.ctx.wallet.publicKey, payer: this.ctx.wallet.publicKey })],\n cleanupInstructions: [],\n signers: [],\n });\n }\n const newClaimIx = yield this.ctx.methods.newClaim({\n accounts: {\n distributor: distributor.key,\n claimStatus: claimStatus.key,\n from,\n to,\n claimant: this.ctx.wallet.publicKey,\n },\n inputs: {\n index,\n amount,\n proof: proof.map((p) => (0, utils_1.toBytes32Array)(p)),\n },\n });\n if (newClaimIx.ix) {\n tx.addInstruction(newClaimIx.ix);\n }\n return tx;\n });\n }\n clawback(mint, amount, version = new anchor_1.BN(1)) {\n return __awaiter(this, void 0, void 0, function* () {\n const distributor = this.pda.distributor(mint, version);\n const distributorData = yield this.ctx.program.account.merkleDistributor.fetch(distributor.key);\n if (!distributorData) {\n throw new Error(`Distributor of token ${mint.toBase58()} version ${version.toString()} not found`);\n }\n if (distributorData.admin.toBase58() !== this.ctx.wallet.publicKey.toBase58()) {\n throw new Error(`Admin of distributor ${distributor.key.toBase58()} is not the current wallet`);\n }\n amount = amount.gt(new anchor_1.BN(0)) ? amount : new anchor_1.BN(0);\n const from = (0, token_utils_1.getATAAddressSync)({ mint, owner: distributor.key });\n const tx = (yield this.ctx.methods.clawback({\n accounts: {\n distributor: distributor.key,\n from,\n to: distributorData.clawbackReceiver,\n claimant: this.ctx.wallet.publicKey,\n },\n inputs: { amount },\n })).toTx();\n return tx;\n });\n }\n}\nexports.DistributorClient = DistributorClient;\n\n\n/***/ }),\n\n/***/ 6628:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(5945), exports);\n\n\n/***/ }),\n\n/***/ 2535:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MERKLE_DISTRIBUTOR_PROGRAM_ID = exports.PROGRAM_ID = void 0;\nconst web3_js_1 = __webpack_require__(6737);\nexports.PROGRAM_ID = new web3_js_1.PublicKey(\"EqaUmBqKuUsS8C1HwvckQymErozrmzzivxkP9CazU2mX\");\nexports.MERKLE_DISTRIBUTOR_PROGRAM_ID = exports.PROGRAM_ID;\n\n\n/***/ }),\n\n/***/ 6494:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Context = void 0;\nconst anchor_1 = __webpack_require__(4758);\nconst types_1 = __webpack_require__(1496);\nconst fetcher_1 = __webpack_require__(9727);\nconst methods_1 = __webpack_require__(9791);\n/**\n * @category Core\n */\nclass Context {\n static from(connection, wallet, programId, fetcher = new fetcher_1.AccountFetcher(connection), opts = anchor_1.AnchorProvider.defaultOptions()) {\n const anchorProvider = new anchor_1.AnchorProvider(connection, wallet, opts);\n const program = new anchor_1.Program(types_1.MerkleDistributorIDL, programId, anchorProvider);\n return new Context(anchorProvider, anchorProvider.wallet, program, fetcher, opts);\n }\n static fromWorkspace(provider, program, fetcher = new fetcher_1.AccountFetcher(provider.connection), opts = anchor_1.AnchorProvider.defaultOptions()) {\n return new Context(provider, provider.wallet, program, fetcher, opts);\n }\n static withProvider(provider, programId, fetcher = new fetcher_1.AccountFetcher(provider.connection), opts = anchor_1.AnchorProvider.defaultOptions()) {\n const program = new anchor_1.Program(types_1.MerkleDistributorIDL, programId, provider);\n return new Context(provider, provider.wallet, program, fetcher, opts);\n }\n constructor(provider, wallet, program, fetcher, opts) {\n this.connection = provider.connection;\n this.wallet = wallet;\n this.opts = opts;\n // It's a hack but it works on Anchor workspace *shrug*\n this.program = program;\n this.provider = provider;\n this.fetcher = fetcher;\n this.methods = new methods_1.Methods(this);\n }\n}\nexports.Context = Context;\n\n\n/***/ }),\n\n/***/ 554:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.AccountFetcher = void 0;\nconst anchor_1 = __webpack_require__(4758);\nconst tiny_invariant_1 = __importDefault(__webpack_require__(6018));\nconst parsing_1 = __webpack_require__(7001);\nclass AccountFetcher {\n constructor(connection, cache) {\n this._cache = {};\n this.connection = connection;\n this._cache = cache !== null && cache !== void 0 ? cache : {};\n }\n /*** Public Methods ***/\n /**\n * Update the cached value of all entities currently in the cache.\n * Uses batched rpc request for network efficient fetch.\n */\n refreshAll() {\n return __awaiter(this, void 0, void 0, function* () {\n const addresses = Object.keys(this._cache);\n const data = yield this.bulkRequest(addresses);\n for (const [idx, [key, cachedContent]] of Object.entries(this._cache).entries()) {\n const entity = cachedContent.entity;\n const value = entity.parse(data[idx]);\n this._cache[key] = { entity, value };\n }\n });\n }\n /*** Private Methods ***/\n /**\n * Retrieve from cache or fetch from rpc, an account\n */\n get(address, entity, refresh) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const key = address.toBase58();\n const cachedValue = (_a = this._cache[key]) === null || _a === void 0 ? void 0 : _a.value;\n if (cachedValue !== undefined && !refresh) {\n return cachedValue;\n }\n const accountInfo = yield this.connection.getAccountInfo(address);\n const accountData = accountInfo === null || accountInfo === void 0 ? void 0 : accountInfo.data;\n const value = entity.parse(accountData);\n this._cache[key] = { entity, value };\n return value;\n });\n }\n /**\n * Retrieve from cache or fetch from rpc, a list of accounts\n */\n list(addresses, entity, refresh) {\n return __awaiter(this, void 0, void 0, function* () {\n const keys = addresses.map((address) => address.toBase58());\n const cachedValues = keys.map((key) => {\n var _a;\n return [\n key,\n refresh ? undefined : (_a = this._cache[key]) === null || _a === void 0 ? void 0 : _a.value,\n ];\n });\n /* Look for accounts not found in cache */\n const undefinedAccounts = [];\n cachedValues.forEach(([key, value], cacheIndex) => {\n if (value === undefined) {\n undefinedAccounts.push({ cacheIndex, key });\n }\n });\n /* Fetch accounts not found in cache */\n if (undefinedAccounts.length > 0) {\n const data = yield this.bulkRequest(undefinedAccounts.map((account) => account.key));\n undefinedAccounts.forEach(({ cacheIndex, key }, dataIndex) => {\n var _a;\n const value = entity.parse(data[dataIndex]);\n (0, tiny_invariant_1.default)(((_a = cachedValues[cacheIndex]) === null || _a === void 0 ? void 0 : _a[1]) === undefined, \"unexpected non-undefined value\");\n cachedValues[cacheIndex] = [key, value];\n this._cache[key] = { entity, value };\n });\n }\n const result = cachedValues\n .map(([_, value]) => value)\n .filter((value) => value !== undefined);\n (0, tiny_invariant_1.default)(result.length === addresses.length, \"not enough results fetched\");\n return result;\n });\n }\n /**\n * Make batch rpc request\n */\n bulkRequest(addresses) {\n return __awaiter(this, void 0, void 0, function* () {\n const responses = [];\n const chunk = 100; // getMultipleAccounts has limitation of 100 accounts per request\n for (let i = 0; i < addresses.length; i += chunk) {\n const addressesSubset = addresses.slice(i, i + chunk);\n const res = this.connection._rpcRequest(\"getMultipleAccounts\", [\n addressesSubset,\n { commitment: this.connection.commitment },\n ]);\n responses.push(res);\n }\n const combinedResult = [];\n (yield Promise.all(responses)).forEach((res) => {\n var _a;\n (0, tiny_invariant_1.default)(!res.error, `bulkRequest result error: ${res.error}`);\n (0, tiny_invariant_1.default)(!!((_a = res.result) === null || _a === void 0 ? void 0 : _a.value), \"bulkRequest no value\");\n res.result.value.forEach((account) => {\n if (!account || account.data[1] !== \"base64\") {\n combinedResult.push(null);\n }\n else {\n combinedResult.push(Buffer.from(account.data[0], account.data[1]));\n }\n });\n });\n (0, tiny_invariant_1.default)(combinedResult.length === addresses.length, \"bulkRequest not enough results\");\n return combinedResult;\n });\n }\n // YOUR CODE:\n getOneMerkleDistributor(address, refresh = false) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.get((0, anchor_1.translateAddress)(address), parsing_1.ParsableMerkleDistributor, refresh);\n });\n }\n getOneClaimStatus(address, refresh = false) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.get((0, anchor_1.translateAddress)(address), parsing_1.ParsableClaimStatus, refresh);\n });\n }\n}\nexports.AccountFetcher = AccountFetcher;\n\n\n/***/ }),\n\n/***/ 9727:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(554), exports);\n__exportStar(__webpack_require__(7001), exports);\n\n\n/***/ }),\n\n/***/ 7001:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ParsableClaimStatus = exports.ParsableMerkleDistributor = void 0;\nconst anchor_1 = __webpack_require__(4758);\nconst types_1 = __webpack_require__(1496);\n/**\n * Class decorator to define an interface with static methods\n * Reference: https://github.com/Microsoft/TypeScript/issues/13462#issuecomment-295685298\n */\nfunction staticImplements() {\n return (constructor) => {\n constructor;\n };\n}\nfunction parseAnchorAccount(accountName, data) {\n const discriminator = anchor_1.BorshAccountsCoder.accountDiscriminator(accountName);\n if (discriminator.compare(data.subarray(0, 8))) {\n console.error(\"incorrect account name during parsing\");\n return null;\n }\n try {\n return types_1.accountsCoder.decode(accountName, data);\n }\n catch (_e) {\n console.error(\"unknown account name during parsing\");\n return null;\n }\n}\n// YOUR ACCOUNTS\nlet ParsableMerkleDistributor = class ParsableMerkleDistributor {\n constructor() { }\n static parse(data) {\n if (!data) {\n return null;\n }\n try {\n return parseAnchorAccount(types_1.AccountName.MerkleDistributor, data);\n }\n catch (e) {\n console.error(`error while parsing MerkleDistributor: ${e}`);\n return null;\n }\n }\n};\nParsableMerkleDistributor = __decorate([\n staticImplements()\n], ParsableMerkleDistributor);\nexports.ParsableMerkleDistributor = ParsableMerkleDistributor;\nlet ParsableClaimStatus = class ParsableClaimStatus {\n constructor() { }\n static parse(data) {\n if (!data) {\n return null;\n }\n try {\n return parseAnchorAccount(types_1.AccountName.ClaimStatus, data);\n }\n catch (e) {\n console.error(`error while parsing ClaimStatus: ${e}`);\n return null;\n }\n }\n};\nParsableClaimStatus = __decorate([\n staticImplements()\n], ParsableClaimStatus);\nexports.ParsableClaimStatus = ParsableClaimStatus;\n\n\n/***/ }),\n\n/***/ 1142:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(1496), exports);\n__exportStar(__webpack_require__(6494), exports);\n__exportStar(__webpack_require__(9791), exports);\n__exportStar(__webpack_require__(7719), exports);\n__exportStar(__webpack_require__(6628), exports);\n__exportStar(__webpack_require__(2535), exports);\n__exportStar(__webpack_require__(2209), exports);\n\n\n/***/ }),\n\n/***/ 5581:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.clawback = void 0;\nconst web3_js_1 = __webpack_require__(6737);\nconst token_utils_1 = __webpack_require__(9510);\nfunction clawback(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .clawback(inputs.amount)\n .accounts(Object.assign(Object.assign({}, accounts), { systemProgram: web3_js_1.SystemProgram.programId, tokenProgram: token_utils_1.TOKEN_PROGRAM_ID }))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.clawback = clawback;\n\n\n/***/ }),\n\n/***/ 6802:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(5581), exports);\n__exportStar(__webpack_require__(7141), exports);\n__exportStar(__webpack_require__(4343), exports);\n__exportStar(__webpack_require__(1498), exports);\n__exportStar(__webpack_require__(6925), exports);\n__exportStar(__webpack_require__(2371), exports);\n__exportStar(__webpack_require__(7549), exports);\n\n\n/***/ }),\n\n/***/ 7141:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.newClaim = void 0;\nconst web3_js_1 = __webpack_require__(6737);\nconst token_utils_1 = __webpack_require__(9510);\nfunction newClaim(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .newClaim(inputs.index, inputs.amount, inputs.proof)\n .accounts(Object.assign(Object.assign({}, accounts), { tokenProgram: token_utils_1.TOKEN_PROGRAM_ID, systemProgram: web3_js_1.SystemProgram.programId }))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.newClaim = newClaim;\n\n\n/***/ }),\n\n/***/ 4343:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.newDistributor = void 0;\nconst web3_js_1 = __webpack_require__(6737);\nconst token_utils_1 = __webpack_require__(9510);\nfunction newDistributor(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .newDistributor(inputs.version, inputs.root, inputs.maxTotalClaim, inputs.maxNumNodes, inputs.startTs, inputs.endTs)\n .accounts(Object.assign(Object.assign({}, accounts), { systemProgram: web3_js_1.SystemProgram.programId, associatedTokenProgram: token_utils_1.ASSOCIATED_TOKEN_PROGRAM_ID, tokenProgram: token_utils_1.TOKEN_PROGRAM_ID }))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.newDistributor = newDistributor;\n\n\n/***/ }),\n\n/***/ 1498:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.setAdmin = void 0;\nfunction setAdmin(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .setAdmin()\n .accounts(Object.assign({}, accounts))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.setAdmin = setAdmin;\n\n\n/***/ }),\n\n/***/ 6925:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.setClawbackReceiver = void 0;\nfunction setClawbackReceiver(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, } = params;\n const ix = yield program.methods\n .setClawbackReceiver()\n .accounts(Object.assign({}, accounts))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.setClawbackReceiver = setClawbackReceiver;\n\n\n/***/ }),\n\n/***/ 2371:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.setMerkleRoot = void 0;\nfunction setMerkleRoot(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .setMerkleRoot(inputs.root, inputs.maxTotalClaim, inputs.maxNumNodes)\n .accounts(Object.assign({}, accounts))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.setMerkleRoot = setMerkleRoot;\n\n\n/***/ }),\n\n/***/ 7549:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.setTimestamp = void 0;\nfunction setTimestamp(program, params) {\n return __awaiter(this, void 0, void 0, function* () {\n const { accounts, inputs } = params;\n const ix = yield program.methods\n .setTimestamp(inputs.startTs, inputs.endTs)\n .accounts(Object.assign({}, accounts))\n .instruction();\n return {\n instructions: [ix],\n cleanupInstructions: [],\n signers: [],\n };\n });\n}\nexports.setTimestamp = setTimestamp;\n\n\n/***/ }),\n\n/***/ 9791:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Methods = void 0;\nconst common_sdk_1 = __webpack_require__(6259);\nconst ixs = __importStar(__webpack_require__(6802));\nclass Methods {\n constructor(ctx, ix) {\n this.ctx = ctx;\n this.ix = ix;\n }\n newDistributor(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.newDistributor(this.ctx.program, params);\n return this;\n });\n }\n setAdmin(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.setAdmin(this.ctx.program, params);\n return this;\n });\n }\n setTimestamp(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.setTimestamp(this.ctx.program, params);\n return this;\n });\n }\n setMerkleRoot(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.setMerkleRoot(this.ctx.program, params);\n return this;\n });\n }\n setClawbackReceiver(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.setClawbackReceiver(this.ctx.program, params);\n return this;\n });\n }\n newClaim(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.newClaim(this.ctx.program, params);\n return this;\n });\n }\n clawback(params) {\n return __awaiter(this, void 0, void 0, function* () {\n this.ix = yield ixs.clawback(this.ctx.program, params);\n return this;\n });\n }\n toTx() {\n const tx = new common_sdk_1.TransactionBuilder(this.ctx.provider.connection, this.ctx.provider.wallet);\n return this.ix ? tx.addInstruction(this.ix) : tx;\n }\n}\nexports.Methods = Methods;\n\n\n/***/ }),\n\n/***/ 7719:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.PDA = void 0;\nconst anchor_1 = __webpack_require__(4758);\nconst web3_js_1 = __webpack_require__(6737);\nconst constants_1 = __webpack_require__(2535);\nclass PDA {\n constructor(programId) {\n this.distributor = (mint, version = new anchor_1.BN(1)) => {\n const [pda, bump] = web3_js_1.PublicKey.findProgramAddressSync([anchor_1.utils.bytes.utf8.encode(\"MerkleDistributor\"), mint.toBytes(), version.toArrayLike(Buffer, \"le\", 8)], constants_1.PROGRAM_ID);\n return {\n key: pda,\n bump,\n };\n };\n this.claim_status = (claimant, distributor) => {\n const [pda, bump] = web3_js_1.PublicKey.findProgramAddressSync([\n anchor_1.utils.bytes.utf8.encode(\"ClaimStatus\"),\n claimant.toBytes(),\n distributor.toBytes(),\n ], constants_1.PROGRAM_ID);\n return {\n key: pda,\n bump,\n };\n };\n this.programId = programId;\n }\n}\nexports.PDA = PDA;\n\n\n/***/ }),\n\n/***/ 1496:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(9320), exports);\n\n\n/***/ }),\n\n/***/ 9320:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.AccountName = exports.accountsCoder = exports.MerkleDistributorIDL = void 0;\nconst anchor_1 = __webpack_require__(4758);\nconst IDL = __importStar(__webpack_require__(8616));\nexports.MerkleDistributorIDL = IDL;\nexports.accountsCoder = new anchor_1.BorshAccountsCoder(exports.MerkleDistributorIDL);\nvar AccountName;\n(function (AccountName) {\n AccountName[\"MerkleDistributor\"] = \"MerkleDistributor\";\n AccountName[\"ClaimStatus\"] = \"ClaimStatus\";\n})(AccountName = exports.AccountName || (exports.AccountName = {}));\n\n\n/***/ }),\n\n/***/ 3162:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.BalanceTree = void 0;\nconst bn_js_1 = __importDefault(__webpack_require__(3550));\nconst js_sha3_1 = __webpack_require__(1094);\nconst merkle_tree_1 = __webpack_require__(2565);\nclass BalanceTree {\n constructor(balances) {\n this._tree = new merkle_tree_1.MerkleTree(balances.map(({ account, amount }, index) => {\n return BalanceTree.toNode(index, account, amount);\n }));\n }\n static verifyProof(index, account, amount, proof, root) {\n let pair = BalanceTree.toNode(index, account, amount);\n for (const item of proof) {\n pair = merkle_tree_1.MerkleTree.combinedHash(pair, item);\n }\n return pair.equals(root);\n }\n // keccak256(abi.encode(index, account, amount))\n static toNode(index, account, amount) {\n let buf = Buffer.concat([\n new bn_js_1.default(index).toArrayLike(Buffer, \"le\", 8),\n account.toBuffer(),\n new bn_js_1.default(amount).toArrayLike(Buffer, \"le\", 8),\n ]);\n buf = Buffer.from((0, js_sha3_1.keccak_256)(buf), \"hex\");\n const LEAF_PREFIX = Buffer.from([0]);\n buf = Buffer.concat([LEAF_PREFIX, buf]);\n return Buffer.from((0, js_sha3_1.keccak_256)(buf), \"hex\");\n }\n getHexRoot() {\n return this._tree.getHexRoot();\n }\n // returns the hex bytes32 values of the proof\n getHexProof(index, account, amount) {\n return this._tree.getHexProof(BalanceTree.toNode(index, account, amount));\n }\n getRoot() {\n return this._tree.getRoot();\n }\n getProof(index, account, amount) {\n return this._tree.getProof(BalanceTree.toNode(index, account, amount));\n }\n}\nexports.BalanceTree = BalanceTree;\n\n\n/***/ }),\n\n/***/ 5976:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.toBytes32Array = void 0;\nconst tiny_invariant_1 = __importDefault(__webpack_require__(6018));\nconst toBytes32Array = (b) => {\n (0, tiny_invariant_1.default)(b.length <= 32, `invalid length ${b.length}`);\n const buf = Buffer.alloc(32);\n b.copy(buf, 32 - b.length);\n return Array.from(buf);\n};\nexports.toBytes32Array = toBytes32Array;\n\n\n/***/ }),\n\n/***/ 3067:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getOrCreateATAInstruction = exports.deriveClaimStatus = void 0;\nconst anchor_1 = __webpack_require__(6908);\nconst spl_token_1 = __webpack_require__(4945);\nfunction deriveClaimStatus(claimant, distributor, programId) {\n return anchor_1.web3.PublicKey.findProgramAddressSync([Buffer.from('ClaimStatus'), claimant.toBytes(), distributor.toBytes()], programId);\n}\nexports.deriveClaimStatus = deriveClaimStatus;\nconst getOrCreateATAInstruction = (tokenMint, owner, connection, allowOwnerOffCurve = true, payer = owner) => __awaiter(void 0, void 0, void 0, function* () {\n let toAccount;\n try {\n toAccount = yield spl_token_1.Token.getAssociatedTokenAddress(spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, spl_token_1.TOKEN_PROGRAM_ID, tokenMint, owner, allowOwnerOffCurve);\n const account = yield connection.getAccountInfo(toAccount);\n if (!account) {\n const ix = spl_token_1.Token.createAssociatedTokenAccountInstruction(spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, spl_token_1.TOKEN_PROGRAM_ID, tokenMint, toAccount, owner, payer);\n return [toAccount, ix];\n }\n return [toAccount, undefined];\n }\n catch (e) {\n /* handle error */\n console.error('Error::getOrCreateATAInstruction', e);\n throw e;\n }\n});\nexports.getOrCreateATAInstruction = getOrCreateATAInstruction;\n\n\n/***/ }),\n\n/***/ 2209:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(3162), exports);\n__exportStar(__webpack_require__(5976), exports);\n__exportStar(__webpack_require__(3067), exports);\n__exportStar(__webpack_require__(2565), exports);\n__exportStar(__webpack_require__(9680), exports);\n__exportStar(__webpack_require__(6635), exports);\n\n\n/***/ }),\n\n/***/ 2565:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MerkleTree = void 0;\nconst js_sha3_1 = __webpack_require__(1094);\nconst tiny_invariant_1 = __importDefault(__webpack_require__(6018));\nconst INTERMEDIATE_PREFIX = Buffer.from([1]);\nfunction getPairElement(idx, layer) {\n const pairIdx = idx % 2 === 0 ? idx + 1 : idx - 1;\n if (pairIdx < layer.length) {\n const pairEl = layer[pairIdx];\n (0, tiny_invariant_1.default)(pairEl, \"pairEl\");\n return pairEl;\n }\n else {\n return null;\n }\n}\nfunction bufDedup(elements) {\n return elements.filter((el, idx) => {\n var _a;\n return idx === 0 || !((_a = elements[idx - 1]) === null || _a === void 0 ? void 0 : _a.equals(el));\n });\n}\nfunction bufArrToHexArr(arr) {\n if (arr.some((el) => !Buffer.isBuffer(el))) {\n throw new Error(\"Array is not an array of buffers\");\n }\n return arr.map((el) => \"0x\" + el.toString(\"hex\"));\n}\nfunction sortAndConcat(...args) {\n const sorted = [...args].sort(Buffer.compare.bind(null));\n const buf = [INTERMEDIATE_PREFIX];\n for (const arg of sorted) {\n buf.push(arg);\n }\n return Buffer.concat(buf);\n}\nclass MerkleTree {\n constructor(elements) {\n this._elements = [...elements];\n // Sort elements\n this._elements.sort(Buffer.compare.bind(null));\n // Deduplicate elements\n this._elements = bufDedup(this._elements);\n this._bufferElementPositionIndex = this._elements.reduce((memo, el, index) => {\n memo[el.toString(\"hex\")] = index;\n return memo;\n }, {});\n // Create layers\n this._layers = this.getLayers(this._elements);\n }\n getLayers(elements) {\n var _a, _b;\n if (elements.length === 0) {\n throw new Error(\"empty tree\");\n }\n const layers = [];\n layers.push(elements);\n // Get next layer until we reach the root\n while (((_b = (_a = layers[layers.length - 1]) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 1) {\n const nextLayerIndex = layers[layers.length - 1];\n (0, tiny_invariant_1.default)(nextLayerIndex, \"nextLayerIndex\");\n layers.push(this.getNextLayer(nextLayerIndex));\n }\n return layers;\n }\n getNextLayer(elements) {\n return elements.reduce((layer, el, idx, arr) => {\n if (idx % 2 === 0) {\n // Hash the current element with its pair element\n const pairEl = arr[idx + 1];\n layer.push(MerkleTree.combinedHash(el, pairEl));\n }\n return layer;\n }, []);\n }\n static combinedHash(first, second) {\n if (!first) {\n (0, tiny_invariant_1.default)(second, \"second element of pair must exist\");\n return second;\n }\n if (!second) {\n (0, tiny_invariant_1.default)(first, \"first element of pair must exist\");\n return first;\n }\n return Buffer.from(js_sha3_1.keccak_256.digest(sortAndConcat(first, second)));\n }\n getRoot() {\n var _a;\n const root = (_a = this._layers[this._layers.length - 1]) === null || _a === void 0 ? void 0 : _a[0];\n (0, tiny_invariant_1.default)(root, \"root\");\n return root;\n }\n getHexRoot() {\n return this.getRoot().toString(\"hex\");\n }\n getProof(el) {\n const initialIdx = this._bufferElementPositionIndex[el.toString(\"hex\")];\n if (typeof initialIdx !== \"number\") {\n throw new Error(\"Element does not exist in Merkle tree\");\n }\n let idx = initialIdx;\n return this._layers.reduce((proof, layer) => {\n const pairElement = getPairElement(idx, layer);\n if (pairElement) {\n proof.push(pairElement);\n }\n idx = Math.floor(idx / 2);\n return proof;\n }, []);\n }\n getHexProof(el) {\n const proof = this.getProof(el);\n return bufArrToHexArr(proof);\n }\n}\nexports.MerkleTree = MerkleTree;\n\n\n/***/ }),\n\n/***/ 9680:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.createMerkleDistributorProgram = void 0;\nconst anchor_1 = __webpack_require__(6908);\nconst merkle_distributor_1 = __webpack_require__(817);\nfunction createMerkleDistributorProgram(provider, programId) {\n const program = new anchor_1.Program(merkle_distributor_1.IDL, programId, provider);\n return program;\n}\nexports.createMerkleDistributorProgram = createMerkleDistributorProgram;\n\n\n/***/ }),\n\n/***/ 6635:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TokenInstruction = exports.addSigners = void 0;\nconst web3_js_1 = __webpack_require__(6737);\n/** @internal */\nfunction addSigners(keys, ownerOrAuthority, multiSigners) {\n keys.push({\n pubkey: ownerOrAuthority,\n isSigner: multiSigners.length === 0,\n isWritable: false\n });\n for (const signer of multiSigners) {\n keys.push({\n pubkey: signer instanceof web3_js_1.PublicKey ? signer : signer.publicKey,\n isSigner: true,\n isWritable: false\n });\n }\n return keys;\n}\nexports.addSigners = addSigners;\n/** Instructions defined by the program */\nvar TokenInstruction;\n(function (TokenInstruction) {\n TokenInstruction[TokenInstruction[\"InitializeMint\"] = 0] = \"InitializeMint\";\n TokenInstruction[TokenInstruction[\"InitializeAccount\"] = 1] = \"InitializeAccount\";\n TokenInstruction[TokenInstruction[\"InitializeMultisig\"] = 2] = \"InitializeMultisig\";\n TokenInstruction[TokenInstruction[\"Transfer\"] = 3] = \"Transfer\";\n TokenInstruction[TokenInstruction[\"Approve\"] = 4] = \"Approve\";\n TokenInstruction[TokenInstruction[\"Revoke\"] = 5] = \"Revoke\";\n TokenInstruction[TokenInstruction[\"SetAuthority\"] = 6] = \"SetAuthority\";\n TokenInstruction[TokenInstruction[\"MintTo\"] = 7] = \"MintTo\";\n TokenInstruction[TokenInstruction[\"Burn\"] = 8] = \"Burn\";\n TokenInstruction[TokenInstruction[\"CloseAccount\"] = 9] = \"CloseAccount\";\n TokenInstruction[TokenInstruction[\"FreezeAccount\"] = 10] = \"FreezeAccount\";\n TokenInstruction[TokenInstruction[\"ThawAccount\"] = 11] = \"ThawAccount\";\n TokenInstruction[TokenInstruction[\"TransferChecked\"] = 12] = \"TransferChecked\";\n TokenInstruction[TokenInstruction[\"ApproveChecked\"] = 13] = \"ApproveChecked\";\n TokenInstruction[TokenInstruction[\"MintToChecked\"] = 14] = \"MintToChecked\";\n TokenInstruction[TokenInstruction[\"BurnChecked\"] = 15] = \"BurnChecked\";\n TokenInstruction[TokenInstruction[\"InitializeAccount2\"] = 16] = \"InitializeAccount2\";\n TokenInstruction[TokenInstruction[\"SyncNative\"] = 17] = \"SyncNative\";\n TokenInstruction[TokenInstruction[\"InitializeAccount3\"] = 18] = \"InitializeAccount3\";\n TokenInstruction[TokenInstruction[\"InitializeMultisig2\"] = 19] = \"InitializeMultisig2\";\n TokenInstruction[TokenInstruction[\"InitializeMint2\"] = 20] = \"InitializeMint2\";\n TokenInstruction[TokenInstruction[\"GetAccountDataSize\"] = 21] = \"GetAccountDataSize\";\n TokenInstruction[TokenInstruction[\"InitializeImmutableOwner\"] = 22] = \"InitializeImmutableOwner\";\n TokenInstruction[TokenInstruction[\"AmountToUiAmount\"] = 23] = \"AmountToUiAmount\";\n TokenInstruction[TokenInstruction[\"UiAmountToAmount\"] = 24] = \"UiAmountToAmount\";\n TokenInstruction[TokenInstruction[\"InitializeMintCloseAuthority\"] = 25] = \"InitializeMintCloseAuthority\";\n TokenInstruction[TokenInstruction[\"TransferFeeExtension\"] = 26] = \"TransferFeeExtension\";\n TokenInstruction[TokenInstruction[\"ConfidentialTransferExtension\"] = 27] = \"ConfidentialTransferExtension\";\n TokenInstruction[TokenInstruction[\"DefaultAccountStateExtension\"] = 28] = \"DefaultAccountStateExtension\";\n TokenInstruction[TokenInstruction[\"Reallocate\"] = 29] = \"Reallocate\";\n TokenInstruction[TokenInstruction[\"MemoTransferExtension\"] = 30] = \"MemoTransferExtension\";\n TokenInstruction[TokenInstruction[\"CreateNativeMint\"] = 31] = \"CreateNativeMint\";\n TokenInstruction[TokenInstruction[\"InitializeNonTransferableMint\"] = 32] = \"InitializeNonTransferableMint\";\n TokenInstruction[TokenInstruction[\"InterestBearingMintExtension\"] = 33] = \"InterestBearingMintExtension\";\n TokenInstruction[TokenInstruction[\"CpiGuardExtension\"] = 34] = \"CpiGuardExtension\";\n TokenInstruction[TokenInstruction[\"InitializePermanentDelegate\"] = 35] = \"InitializePermanentDelegate\";\n TokenInstruction[TokenInstruction[\"TransferHookExtension\"] = 36] = \"TransferHookExtension\";\n // ConfidentialTransferFeeExtension = 37,\n // WithdrawalExcessLamports = 38,\n TokenInstruction[TokenInstruction[\"MetadataPointerExtension\"] = 39] = \"MetadataPointerExtension\";\n TokenInstruction[TokenInstruction[\"GroupPointerExtension\"] = 40] = \"GroupPointerExtension\";\n TokenInstruction[TokenInstruction[\"GroupMemberPointerExtension\"] = 41] = \"GroupMemberPointerExtension\";\n})(TokenInstruction = exports.TokenInstruction || (exports.TokenInstruction = {}));\n\n\n/***/ }),\n\n/***/ 6908:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AccountClient\": function() { return /* binding */ AccountClient; },\n/* harmony export */ \"AnchorError\": function() { return /* binding */ AnchorError; },\n/* harmony export */ \"AnchorProvider\": function() { return /* binding */ AnchorProvider; },\n/* harmony export */ \"BN\": function() { return /* reexport default from dynamic */ bn_js__WEBPACK_IMPORTED_MODULE_2___default.a; },\n/* harmony export */ \"BorshAccountsCoder\": function() { return /* binding */ BorshAccountsCoder; },\n/* harmony export */ \"BorshCoder\": function() { return /* binding */ BorshCoder; },\n/* harmony export */ \"BorshEventCoder\": function() { return /* binding */ BorshEventCoder; },\n/* harmony export */ \"BorshInstructionCoder\": function() { return /* binding */ BorshInstructionCoder; },\n/* harmony export */ \"DISCRIMINATOR_SIZE\": function() { return /* binding */ DISCRIMINATOR_SIZE; },\n/* harmony export */ \"EventManager\": function() { return /* binding */ EventManager; },\n/* harmony export */ \"EventParser\": function() { return /* binding */ EventParser; },\n/* harmony export */ \"IdlError\": function() { return /* binding */ IdlError; },\n/* harmony export */ \"LangErrorCode\": function() { return /* binding */ LangErrorCode; },\n/* harmony export */ \"LangErrorMessage\": function() { return /* binding */ LangErrorMessage; },\n/* harmony export */ \"MethodsBuilderFactory\": function() { return /* binding */ MethodsBuilderFactory; },\n/* harmony export */ \"Native\": function() { return /* binding */ Native; },\n/* harmony export */ \"Program\": function() { return /* binding */ Program; },\n/* harmony export */ \"ProgramError\": function() { return /* binding */ ProgramError; },\n/* harmony export */ \"ProgramErrorStack\": function() { return /* binding */ ProgramErrorStack; },\n/* harmony export */ \"SystemCoder\": function() { return /* binding */ SystemCoder; },\n/* harmony export */ \"eventDiscriminator\": function() { return /* binding */ eventDiscriminator; },\n/* harmony export */ \"getProvider\": function() { return /* binding */ getProvider; },\n/* harmony export */ \"parseIdlErrors\": function() { return /* binding */ parseIdlErrors; },\n/* harmony export */ \"setProvider\": function() { return /* binding */ setProvider; },\n/* harmony export */ \"splitArgsAndCtx\": function() { return /* binding */ splitArgsAndCtx; },\n/* harmony export */ \"toInstruction\": function() { return /* binding */ toInstruction; },\n/* harmony export */ \"translateAddress\": function() { return /* binding */ translateAddress; },\n/* harmony export */ \"translateError\": function() { return /* binding */ translateError; },\n/* harmony export */ \"utils\": function() { return /* binding */ index; },\n/* harmony export */ \"validateAccounts\": function() { return /* binding */ validateAccounts; },\n/* harmony export */ \"web3\": function() { return /* reexport module object */ _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__; }\n/* harmony export */ });\n/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8764);\n/* harmony import */ var _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6737);\n/* harmony import */ var bn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3550);\n/* harmony import */ var bn_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(bn_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var bs58__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6486);\n/* harmony import */ var bs58__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(bs58__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var camelcase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7370);\n/* harmony import */ var camelcase__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(camelcase__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1295);\n/* harmony import */ var _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7748);\n/* harmony import */ var pako__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7885);\n/* harmony import */ var eventemitter3__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6729);\n/* harmony import */ var eventemitter3__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(eventemitter3__WEBPACK_IMPORTED_MODULE_7__);\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Splits an array into chunks\n *\n * @param array Array of objects to chunk.\n * @param size The max size of a chunk.\n * @returns A two dimensional array where each T[] length is < the provided size.\n */\nfunction chunks(array, size) {\n return Array.apply(0, new Array(Math.ceil(array.length / size))).map((_, index) => array.slice(index * size, (index + 1) * size));\n}\n/**\n * Check if a transaction object is a VersionedTransaction or not\n *\n * @param tx\n * @returns bool\n */\nconst isVersionedTransaction = (tx) => {\n return \"version\" in tx;\n};\n\nfunction encode$3(data) {\n return data.reduce((str, byte) => str + byte.toString(16).padStart(2, \"0\"), \"0x\");\n}\nfunction decode$3(data) {\n if (data.indexOf(\"0x\") === 0) {\n data = data.substr(2);\n }\n if (data.length % 2 === 1) {\n data = \"0\" + data;\n }\n let key = data.match(/.{2}/g);\n if (key === null) {\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from([]);\n }\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(key.map((byte) => parseInt(byte, 16)));\n}\n\nvar hex = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode$3,\n decode: decode$3\n});\n\nfunction decode$2(array) {\n const decoder = new TextDecoder(\"utf-8\") // Browser https://caniuse.com/textencoder.\n ; // Node.\n return decoder.decode(array);\n}\nfunction encode$2(input) {\n const encoder = new TextEncoder() // Browser.\n ; // Node.\n return encoder.encode(input);\n}\n\nvar utf8 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n decode: decode$2,\n encode: encode$2\n});\n\nfunction encode$1(data) {\n return bs58__WEBPACK_IMPORTED_MODULE_3___default().encode(data);\n}\nfunction decode$1(data) {\n return bs58__WEBPACK_IMPORTED_MODULE_3___default().decode(data);\n}\n\nvar bs58 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode$1,\n decode: decode$1\n});\n\nfunction encode(data) {\n return data.toString(\"base64\");\n}\nfunction decode(data) {\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(data, \"base64\");\n}\n\nvar base64 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n encode: encode,\n decode: decode\n});\n\nvar index$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hex: hex,\n utf8: utf8,\n bs58: bs58,\n base64: base64\n});\n\nfunction parseIdlErrors(idl) {\n const errors = new Map();\n if (idl.errors) {\n idl.errors.forEach((e) => {\n var _a;\n let msg = (_a = e.msg) !== null && _a !== void 0 ? _a : e.name;\n errors.set(e.code, msg);\n });\n }\n return errors;\n}\n// Allow either IdLInstruction or IdlStateMethod since the types share fields.\nfunction toInstruction(idlIx, ...args) {\n if (idlIx.args.length != args.length) {\n throw new Error(\"Invalid argument length\");\n }\n const ix = {};\n let idx = 0;\n idlIx.args.forEach((ixArg) => {\n ix[ixArg.name] = args[idx];\n idx += 1;\n });\n return ix;\n}\n// Throws error if any account required for the `ix` is not given.\nfunction validateAccounts(ixAccounts, accounts = {}) {\n ixAccounts.forEach((acc) => {\n if (\"accounts\" in acc) {\n validateAccounts(acc.accounts, accounts[acc.name]);\n }\n else {\n if (accounts[acc.name] === undefined) {\n throw new Error(`Invalid arguments: ${acc.name} not provided.`);\n }\n }\n });\n}\n// Translates an address to a Pubkey.\nfunction translateAddress(address) {\n return address instanceof _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey ? address : new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(address);\n}\n\n/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n this.value = void 0;\n this.key = void 0;\n this.type = void 0;\n this.refinement = void 0;\n this.path = void 0;\n this.branch = void 0;\n this.failures = void 0;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options) {\n if (options === void 0) {\n options = {};\n }\n\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n this.TYPE = void 0;\n this.type = void 0;\n this.schema = void 0;\n this.coercer = void 0;\n this.validator = void 0;\n this.refiner = void 0;\n this.entries = void 0;\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options) {\n if (options === void 0) {\n options = {};\n }\n\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options) {\n if (options === void 0) {\n options = {};\n }\n\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value matches one of a set of types.\n */\n\nfunction union$1(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n coercer(value, ctx) {\n const firstMatch = Structs.find(s => {\n const [e] = s.validate(value, {\n coerce: true\n });\n return !e;\n }) || unknown();\n return firstMatch.coercer(value, ctx);\n },\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n\n/**\n * Sends a transaction to a program with the given accounts and instruction\n * data.\n */\nasync function invoke(programId, accounts, data, provider) {\n programId = translateAddress(programId);\n if (!provider) {\n provider = getProvider();\n }\n const tx = new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.Transaction();\n tx.add(new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.TransactionInstruction({\n programId,\n keys: accounts !== null && accounts !== void 0 ? accounts : [],\n data,\n }));\n if (provider.sendAndConfirm === undefined) {\n throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");\n }\n return await provider.sendAndConfirm(tx, []);\n}\nconst GET_MULTIPLE_ACCOUNTS_LIMIT = 99;\nasync function getMultipleAccounts(connection, publicKeys, commitment) {\n const results = await getMultipleAccountsAndContext(connection, publicKeys, commitment);\n return results.map((result) => {\n return result\n ? { publicKey: result.publicKey, account: result.account }\n : null;\n });\n}\nasync function getMultipleAccountsAndContext(connection, publicKeys, commitment) {\n if (publicKeys.length <= GET_MULTIPLE_ACCOUNTS_LIMIT) {\n return await getMultipleAccountsAndContextCore(connection, publicKeys, commitment);\n }\n else {\n const batches = chunks(publicKeys, GET_MULTIPLE_ACCOUNTS_LIMIT);\n const results = await Promise.all(batches.map((batch) => getMultipleAccountsAndContextCore(connection, batch, commitment)));\n return results.flat();\n }\n}\nasync function getMultipleAccountsAndContextCore(connection, publicKeys, commitmentOverride) {\n const commitment = commitmentOverride !== null && commitmentOverride !== void 0 ? commitmentOverride : connection.commitment;\n const { value: accountInfos, context } = await connection.getMultipleAccountsInfoAndContext(publicKeys, commitment);\n const accounts = accountInfos.map((account, idx) => {\n if (account === null) {\n return null;\n }\n return {\n publicKey: publicKeys[idx],\n account,\n context,\n };\n });\n return accounts;\n}\n// copy from @solana/web3.js that has a commitment param\nasync function simulateTransaction(connection, transaction, signers, commitment, includeAccounts) {\n var _a;\n if (signers && signers.length > 0) {\n transaction.sign(...signers);\n }\n // @ts-expect-error\n const message = transaction._compile();\n const signData = message.serialize();\n // @ts-expect-error\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString(\"base64\");\n const config = {\n encoding: \"base64\",\n commitment: commitment !== null && commitment !== void 0 ? commitment : connection.commitment,\n };\n if (includeAccounts) {\n const addresses = (Array.isArray(includeAccounts) ? includeAccounts : message.nonProgramIds()).map((key) => key.toBase58());\n config[\"accounts\"] = {\n encoding: \"base64\",\n addresses,\n };\n }\n if (signers) {\n config.sigVerify = true;\n }\n const args = [encodedTransaction, config];\n // @ts-expect-error\n const unsafeRes = await connection._rpcRequest(\"simulateTransaction\", args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if (\"error\" in res) {\n let logs;\n if (\"data\" in res.error) {\n logs = (_a = res.error.data) === null || _a === void 0 ? void 0 : _a.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = \"\\n \";\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SendTransactionError(\"failed to simulate transaction: \" + res.error.message, logs);\n }\n return res.result;\n}\n// copy from @solana/web3.js\nfunction jsonRpcResult(schema) {\n return coerce(createRpcResult(schema), UnknownRpcResult, (value) => {\n if (\"error\" in value) {\n return value;\n }\n else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n// copy from @solana/web3.js\nconst UnknownRpcResult = createRpcResult(unknown());\n// copy from @solana/web3.js\nfunction createRpcResult(result) {\n return union$1([\n type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n result,\n }),\n type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n error: type({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n// copy from @solana/web3.js\nfunction jsonRpcResultAndContext(value) {\n return jsonRpcResult(type({\n context: type({\n slot: number(),\n }),\n value,\n }));\n}\n// copy from @solana/web3.js\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({\n err: nullable(union$1([type({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(nullable(array(nullable(type({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }))))),\n unitsConsumed: optional(number()),\n}));\n\nvar rpc = /*#__PURE__*/Object.freeze({\n __proto__: null,\n invoke: invoke,\n getMultipleAccounts: getMultipleAccounts,\n getMultipleAccountsAndContext: getMultipleAccountsAndContext,\n simulateTransaction: simulateTransaction\n});\n\n/**\n * The network and wallet context used to send transactions paid for and signed\n * by the provider.\n */\nclass AnchorProvider {\n /**\n * @param connection The cluster connection where the program is deployed.\n * @param wallet The wallet used to pay for and sign all transactions.\n * @param opts Transaction confirmation options to use by default.\n */\n constructor(connection, wallet, opts) {\n this.connection = connection;\n this.wallet = wallet;\n this.opts = opts;\n this.publicKey = wallet === null || wallet === void 0 ? void 0 : wallet.publicKey;\n }\n static defaultOptions() {\n return {\n preflightCommitment: \"processed\",\n commitment: \"processed\",\n };\n }\n /**\n * Returns a `Provider` with a wallet read from the local filesystem.\n *\n * @param url The network cluster url.\n * @param opts The default transaction confirmation options.\n *\n * (This api is for Node only.)\n */\n static local(url, opts) {\n {\n throw new Error(`Provider local is not available on browser.`);\n }\n }\n /**\n * Returns a `Provider` read from the `ANCHOR_PROVIDER_URL` environment\n * variable\n *\n * (This api is for Node only.)\n */\n static env() {\n {\n throw new Error(`Provider env is not available on browser.`);\n }\n }\n /**\n * Sends the given transaction, paid for and signed by the provider's wallet.\n *\n * @param tx The transaction to send.\n * @param signers The signers of the transaction.\n * @param opts Transaction confirmation options.\n */\n async sendAndConfirm(tx, signers, opts) {\n var _a, _b, _c, _d;\n if (opts === undefined) {\n opts = this.opts;\n }\n if (isVersionedTransaction(tx)) {\n if (signers) {\n tx.sign(signers);\n }\n }\n else {\n tx.feePayer = (_a = tx.feePayer) !== null && _a !== void 0 ? _a : this.wallet.publicKey;\n tx.recentBlockhash = (await this.connection.getLatestBlockhash(opts.preflightCommitment)).blockhash;\n if (signers) {\n for (const signer of signers) {\n tx.partialSign(signer);\n }\n }\n }\n tx = await this.wallet.signTransaction(tx);\n const rawTx = tx.serialize();\n try {\n return await sendAndConfirmRawTransaction(this.connection, rawTx, opts);\n }\n catch (err) {\n // thrown if the underlying 'confirmTransaction' encounters a failed tx\n // the 'confirmTransaction' error does not return logs so we make another rpc call to get them\n if (err instanceof ConfirmError) {\n // choose the shortest available commitment for 'getTransaction'\n // (the json RPC does not support any shorter than \"confirmed\" for 'getTransaction')\n // because that will see the tx sent with `sendAndConfirmRawTransaction` no matter which\n // commitment `sendAndConfirmRawTransaction` used\n const txSig = encode$1(isVersionedTransaction(tx)\n ? ((_b = tx.signatures) === null || _b === void 0 ? void 0 : _b[0]) || new Uint8Array()\n : (_c = tx.signature) !== null && _c !== void 0 ? _c : new Uint8Array());\n const failedTx = await this.connection.getTransaction(txSig, {\n commitment: \"confirmed\",\n });\n if (!failedTx) {\n throw err;\n }\n else {\n const logs = (_d = failedTx.meta) === null || _d === void 0 ? void 0 : _d.logMessages;\n throw !logs ? err : new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SendTransactionError(err.message, logs);\n }\n }\n else {\n throw err;\n }\n }\n }\n /**\n * Similar to `send`, but for an array of transactions and signers.\n * All transactions need to be of the same type, it doesn't support a mix of `VersionedTransaction`s and `Transaction`s.\n *\n * @param txWithSigners Array of transactions and signers.\n * @param opts Transaction confirmation options.\n */\n async sendAll(txWithSigners, opts) {\n var _a, _b, _c;\n if (opts === undefined) {\n opts = this.opts;\n }\n const recentBlockhash = (await this.connection.getLatestBlockhash(opts.preflightCommitment)).blockhash;\n let txs = txWithSigners.map((r) => {\n var _a, _b;\n if (isVersionedTransaction(r.tx)) {\n let tx = r.tx;\n if (r.signers) {\n tx.sign(r.signers);\n }\n return tx;\n }\n else {\n let tx = r.tx;\n let signers = (_a = r.signers) !== null && _a !== void 0 ? _a : [];\n tx.feePayer = (_b = tx.feePayer) !== null && _b !== void 0 ? _b : this.wallet.publicKey;\n tx.recentBlockhash = recentBlockhash;\n signers.forEach((kp) => {\n tx.partialSign(kp);\n });\n return tx;\n }\n });\n const signedTxs = await this.wallet.signAllTransactions(txs);\n const sigs = [];\n for (let k = 0; k < txs.length; k += 1) {\n const tx = signedTxs[k];\n const rawTx = tx.serialize();\n try {\n sigs.push(await sendAndConfirmRawTransaction(this.connection, rawTx, opts));\n }\n catch (err) {\n // thrown if the underlying 'confirmTransaction' encounters a failed tx\n // the 'confirmTransaction' error does not return logs so we make another rpc call to get them\n if (err instanceof ConfirmError) {\n // choose the shortest available commitment for 'getTransaction'\n // (the json RPC does not support any shorter than \"confirmed\" for 'getTransaction')\n // because that will see the tx sent with `sendAndConfirmRawTransaction` no matter which\n // commitment `sendAndConfirmRawTransaction` used\n const txSig = encode$1(isVersionedTransaction(tx)\n ? ((_a = tx.signatures) === null || _a === void 0 ? void 0 : _a[0]) || new Uint8Array()\n : (_b = tx.signature) !== null && _b !== void 0 ? _b : new Uint8Array());\n const failedTx = await this.connection.getTransaction(txSig, {\n commitment: \"confirmed\",\n });\n if (!failedTx) {\n throw err;\n }\n else {\n const logs = (_c = failedTx.meta) === null || _c === void 0 ? void 0 : _c.logMessages;\n throw !logs ? err : new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SendTransactionError(err.message, logs);\n }\n }\n else {\n throw err;\n }\n }\n }\n return sigs;\n }\n /**\n * Simulates the given transaction, returning emitted logs from execution.\n *\n * @param tx The transaction to send.\n * @param signers The signers of the transaction. If unset, the transaction\n * will be simulated with the \"sigVerify: false\" option. This\n * allows for simulation of transactions without asking the\n * wallet for a signature.\n * @param opts Transaction confirmation options.\n */\n async simulate(tx, signers, commitment, includeAccounts) {\n let recentBlockhash = (await this.connection.getLatestBlockhash(commitment !== null && commitment !== void 0 ? commitment : this.connection.commitment)).blockhash;\n let result;\n if (isVersionedTransaction(tx)) {\n if (signers) {\n tx.sign(signers);\n tx = await this.wallet.signTransaction(tx);\n }\n // Doesn't support includeAccounts which has been changed to something\n // else in later versions of this function.\n result = await this.connection.simulateTransaction(tx, { commitment });\n }\n else {\n tx.feePayer = tx.feePayer || this.wallet.publicKey;\n tx.recentBlockhash = recentBlockhash;\n if (signers) {\n tx = await this.wallet.signTransaction(tx);\n }\n result = await simulateTransaction(this.connection, tx, signers, commitment, includeAccounts);\n }\n if (result.value.err) {\n throw new SimulateError(result.value);\n }\n return result.value;\n }\n}\nclass SimulateError extends Error {\n constructor(simulationResponse, message) {\n super(message);\n this.simulationResponse = simulationResponse;\n }\n}\n// Copy of Connection.sendAndConfirmRawTransaction that throws\n// a better error if 'confirmTransaction` returns an error status\nasync function sendAndConfirmRawTransaction(connection, rawTransaction, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n };\n const signature = await connection.sendRawTransaction(rawTransaction, sendOptions);\n const status = (await connection.confirmTransaction(signature, options && options.commitment)).value;\n if (status.err) {\n throw new ConfirmError(`Raw transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n}\nclass ConfirmError extends Error {\n constructor(message) {\n super(message);\n }\n}\n/**\n * Sets the default provider on the client.\n */\nfunction setProvider(provider) {\n _provider = provider;\n}\n/**\n * Returns the default provider being used by the client.\n */\nfunction getProvider() {\n if (_provider === null) {\n return AnchorProvider.local();\n }\n return _provider;\n}\n// Global provider used as the default when a provider is not given.\nlet _provider = null;\n\nconst _AVAILABLE_FEATURES = new Set([\"anchor-deprecated-state\", \"debug-logs\"]);\nconst _FEATURES = new Map();\nfunction set(key) {\n if (!_AVAILABLE_FEATURES.has(key)) {\n throw new Error(\"Invalid feature\");\n }\n _FEATURES.set(key, true);\n}\nfunction isSet(key) {\n return _FEATURES.get(key) !== undefined;\n}\n\nvar features = /*#__PURE__*/Object.freeze({\n __proto__: null,\n set: set,\n isSet: isSet\n});\n\nclass IdlError extends Error {\n constructor(message) {\n super(message);\n this.name = \"IdlError\";\n }\n}\nclass ProgramErrorStack {\n constructor(stack) {\n this.stack = stack;\n }\n static parse(logs) {\n var _a;\n const programKeyRegex = /^Program (\\w*) invoke/;\n const successRegex = /^Program \\w* success/;\n const programStack = [];\n for (let i = 0; i < logs.length; i++) {\n if (successRegex.exec(logs[i])) {\n programStack.pop();\n continue;\n }\n const programKey = (_a = programKeyRegex.exec(logs[i])) === null || _a === void 0 ? void 0 : _a[1];\n if (!programKey) {\n continue;\n }\n programStack.push(new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(programKey));\n }\n return new ProgramErrorStack(programStack);\n }\n}\nclass AnchorError extends Error {\n constructor(errorCode, errorMessage, errorLogs, logs, origin, comparedValues) {\n super(errorLogs.join(\"\\n\").replace(\"Program log: \", \"\"));\n this.errorLogs = errorLogs;\n this.logs = logs;\n this.error = { errorCode, errorMessage, comparedValues, origin };\n this._programErrorStack = ProgramErrorStack.parse(logs);\n }\n static parse(logs) {\n if (!logs) {\n return null;\n }\n const anchorErrorLogIndex = logs.findIndex((log) => log.startsWith(\"Program log: AnchorError\"));\n if (anchorErrorLogIndex === -1) {\n return null;\n }\n const anchorErrorLog = logs[anchorErrorLogIndex];\n const errorLogs = [anchorErrorLog];\n let comparedValues;\n if (anchorErrorLogIndex + 1 < logs.length) {\n // This catches the comparedValues where the following is logged\n // \n // Left:\n // \n // Right:\n // \n if (logs[anchorErrorLogIndex + 1] === \"Program log: Left:\") {\n const pubkeyRegex = /^Program log: (.*)$/;\n const leftPubkey = pubkeyRegex.exec(logs[anchorErrorLogIndex + 2])[1];\n const rightPubkey = pubkeyRegex.exec(logs[anchorErrorLogIndex + 4])[1];\n comparedValues = [\n new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(leftPubkey),\n new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(rightPubkey),\n ];\n errorLogs.push(...logs.slice(anchorErrorLogIndex + 1, anchorErrorLogIndex + 5));\n }\n // This catches the comparedValues where the following is logged\n // \n // Left: \n // Right: \n else if (logs[anchorErrorLogIndex + 1].startsWith(\"Program log: Left:\")) {\n const valueRegex = /^Program log: (Left|Right): (.*)$/;\n const leftValue = valueRegex.exec(logs[anchorErrorLogIndex + 1])[2];\n const rightValue = valueRegex.exec(logs[anchorErrorLogIndex + 2])[2];\n errorLogs.push(...logs.slice(anchorErrorLogIndex + 1, anchorErrorLogIndex + 3));\n comparedValues = [leftValue, rightValue];\n }\n }\n const regexNoInfo = /^Program log: AnchorError occurred\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const noInfoAnchorErrorLog = regexNoInfo.exec(anchorErrorLog);\n const regexFileLine = /^Program log: AnchorError thrown in (.*):(\\d*)\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const fileLineAnchorErrorLog = regexFileLine.exec(anchorErrorLog);\n const regexAccountName = /^Program log: AnchorError caused by account: (.*)\\. Error Code: (.*)\\. Error Number: (\\d*)\\. Error Message: (.*)\\./;\n const accountNameAnchorErrorLog = regexAccountName.exec(anchorErrorLog);\n if (noInfoAnchorErrorLog) {\n const [errorCodeString, errorNumber, errorMessage] = noInfoAnchorErrorLog.slice(1, 4);\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, undefined, comparedValues);\n }\n else if (fileLineAnchorErrorLog) {\n const [file, line, errorCodeString, errorNumber, errorMessage] = fileLineAnchorErrorLog.slice(1, 6);\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n const fileLine = { file, line: parseInt(line) };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, fileLine, comparedValues);\n }\n else if (accountNameAnchorErrorLog) {\n const [accountName, errorCodeString, errorNumber, errorMessage] = accountNameAnchorErrorLog.slice(1, 5);\n const origin = accountName;\n const errorCode = {\n code: errorCodeString,\n number: parseInt(errorNumber),\n };\n return new AnchorError(errorCode, errorMessage, errorLogs, logs, origin, comparedValues);\n }\n else {\n return null;\n }\n }\n get program() {\n return this._programErrorStack.stack[this._programErrorStack.stack.length - 1];\n }\n get programErrorStack() {\n return this._programErrorStack.stack;\n }\n toString() {\n return this.message;\n }\n}\n// An error from a user defined program.\nclass ProgramError extends Error {\n constructor(code, msg, logs) {\n super();\n this.code = code;\n this.msg = msg;\n this.logs = logs;\n if (logs) {\n this._programErrorStack = ProgramErrorStack.parse(logs);\n }\n }\n static parse(err, idlErrors) {\n const errString = err.toString();\n // TODO: don't rely on the error string. web3.js should preserve the error\n // code information instead of giving us an untyped string.\n let unparsedErrorCode;\n if (errString.includes(\"custom program error:\")) {\n let components = errString.split(\"custom program error: \");\n if (components.length !== 2) {\n return null;\n }\n else {\n unparsedErrorCode = components[1];\n }\n }\n else {\n const matches = errString.match(/\"Custom\":([0-9]+)}/g);\n if (!matches || matches.length > 1) {\n return null;\n }\n unparsedErrorCode = matches[0].match(/([0-9]+)/g)[0];\n }\n let errorCode;\n try {\n errorCode = parseInt(unparsedErrorCode);\n }\n catch (parseErr) {\n return null;\n }\n // Parse user error.\n let errorMsg = idlErrors.get(errorCode);\n if (errorMsg !== undefined) {\n return new ProgramError(errorCode, errorMsg, err.logs);\n }\n // Parse framework internal error.\n errorMsg = LangErrorMessage.get(errorCode);\n if (errorMsg !== undefined) {\n return new ProgramError(errorCode, errorMsg, err.logs);\n }\n // Unable to parse the error. Just return the untranslated error.\n return null;\n }\n get program() {\n var _a;\n return (_a = this._programErrorStack) === null || _a === void 0 ? void 0 : _a.stack[this._programErrorStack.stack.length - 1];\n }\n get programErrorStack() {\n var _a;\n return (_a = this._programErrorStack) === null || _a === void 0 ? void 0 : _a.stack;\n }\n toString() {\n return this.msg;\n }\n}\nfunction translateError(err, idlErrors) {\n if (isSet(\"debug-logs\")) {\n console.log(\"Translating error:\", err);\n }\n const anchorError = AnchorError.parse(err.logs);\n if (anchorError) {\n return anchorError;\n }\n const programError = ProgramError.parse(err, idlErrors);\n if (programError) {\n return programError;\n }\n if (err.logs) {\n const handler = {\n get: function (target, prop) {\n if (prop === \"programErrorStack\") {\n return target.programErrorStack.stack;\n }\n else if (prop === \"program\") {\n return target.programErrorStack.stack[err.programErrorStack.stack.length - 1];\n }\n else {\n // this is the normal way to return all other props\n // without modifying them.\n // @ts-expect-error\n return Reflect.get(...arguments);\n }\n },\n };\n err.programErrorStack = ProgramErrorStack.parse(err.logs);\n return new Proxy(err, handler);\n }\n return err;\n}\nconst LangErrorCode = {\n // Instructions.\n InstructionMissing: 100,\n InstructionFallbackNotFound: 101,\n InstructionDidNotDeserialize: 102,\n InstructionDidNotSerialize: 103,\n // IDL instructions.\n IdlInstructionStub: 1000,\n IdlInstructionInvalidProgram: 1001,\n // Constraints.\n ConstraintMut: 2000,\n ConstraintHasOne: 2001,\n ConstraintSigner: 2002,\n ConstraintRaw: 2003,\n ConstraintOwner: 2004,\n ConstraintRentExempt: 2005,\n ConstraintSeeds: 2006,\n ConstraintExecutable: 2007,\n ConstraintState: 2008,\n ConstraintAssociated: 2009,\n ConstraintAssociatedInit: 2010,\n ConstraintClose: 2011,\n ConstraintAddress: 2012,\n ConstraintZero: 2013,\n ConstraintTokenMint: 2014,\n ConstraintTokenOwner: 2015,\n ConstraintMintMintAuthority: 2016,\n ConstraintMintFreezeAuthority: 2017,\n ConstraintMintDecimals: 2018,\n ConstraintSpace: 2019,\n ConstraintAccountIsNone: 2020,\n // Require.\n RequireViolated: 2500,\n RequireEqViolated: 2501,\n RequireKeysEqViolated: 2502,\n RequireNeqViolated: 2503,\n RequireKeysNeqViolated: 2504,\n RequireGtViolated: 2505,\n RequireGteViolated: 2506,\n // Accounts.\n AccountDiscriminatorAlreadySet: 3000,\n AccountDiscriminatorNotFound: 3001,\n AccountDiscriminatorMismatch: 3002,\n AccountDidNotDeserialize: 3003,\n AccountDidNotSerialize: 3004,\n AccountNotEnoughKeys: 3005,\n AccountNotMutable: 3006,\n AccountOwnedByWrongProgram: 3007,\n InvalidProgramId: 3008,\n InvalidProgramExecutable: 3009,\n AccountNotSigner: 3010,\n AccountNotSystemOwned: 3011,\n AccountNotInitialized: 3012,\n AccountNotProgramData: 3013,\n AccountNotAssociatedTokenAccount: 3014,\n AccountSysvarMismatch: 3015,\n AccountReallocExceedsLimit: 3016,\n AccountDuplicateReallocs: 3017,\n // Miscellaneous\n DeclaredProgramIdMismatch: 4100,\n // Used for APIs that shouldn't be used anymore.\n Deprecated: 5000,\n};\nconst LangErrorMessage = new Map([\n // Instructions.\n [\n LangErrorCode.InstructionMissing,\n \"8 byte instruction identifier not provided\",\n ],\n [\n LangErrorCode.InstructionFallbackNotFound,\n \"Fallback functions are not supported\",\n ],\n [\n LangErrorCode.InstructionDidNotDeserialize,\n \"The program could not deserialize the given instruction\",\n ],\n [\n LangErrorCode.InstructionDidNotSerialize,\n \"The program could not serialize the given instruction\",\n ],\n // Idl instructions.\n [\n LangErrorCode.IdlInstructionStub,\n \"The program was compiled without idl instructions\",\n ],\n [\n LangErrorCode.IdlInstructionInvalidProgram,\n \"The transaction was given an invalid program for the IDL instruction\",\n ],\n // Constraints.\n [LangErrorCode.ConstraintMut, \"A mut constraint was violated\"],\n [LangErrorCode.ConstraintHasOne, \"A has one constraint was violated\"],\n [LangErrorCode.ConstraintSigner, \"A signer constraint was violated\"],\n [LangErrorCode.ConstraintRaw, \"A raw constraint was violated\"],\n [LangErrorCode.ConstraintOwner, \"An owner constraint was violated\"],\n [\n LangErrorCode.ConstraintRentExempt,\n \"A rent exemption constraint was violated\",\n ],\n [LangErrorCode.ConstraintSeeds, \"A seeds constraint was violated\"],\n [LangErrorCode.ConstraintExecutable, \"An executable constraint was violated\"],\n [\n LangErrorCode.ConstraintState,\n \"Deprecated Error, feel free to replace with something else\",\n ],\n [LangErrorCode.ConstraintAssociated, \"An associated constraint was violated\"],\n [\n LangErrorCode.ConstraintAssociatedInit,\n \"An associated init constraint was violated\",\n ],\n [LangErrorCode.ConstraintClose, \"A close constraint was violated\"],\n [LangErrorCode.ConstraintAddress, \"An address constraint was violated\"],\n [LangErrorCode.ConstraintZero, \"Expected zero account discriminant\"],\n [LangErrorCode.ConstraintTokenMint, \"A token mint constraint was violated\"],\n [LangErrorCode.ConstraintTokenOwner, \"A token owner constraint was violated\"],\n [\n LangErrorCode.ConstraintMintMintAuthority,\n \"A mint mint authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintFreezeAuthority,\n \"A mint freeze authority constraint was violated\",\n ],\n [\n LangErrorCode.ConstraintMintDecimals,\n \"A mint decimals constraint was violated\",\n ],\n [LangErrorCode.ConstraintSpace, \"A space constraint was violated\"],\n [\n LangErrorCode.ConstraintAccountIsNone,\n \"A required account for the constraint is None\",\n ],\n // Require.\n [LangErrorCode.RequireViolated, \"A require expression was violated\"],\n [LangErrorCode.RequireEqViolated, \"A require_eq expression was violated\"],\n [\n LangErrorCode.RequireKeysEqViolated,\n \"A require_keys_eq expression was violated\",\n ],\n [LangErrorCode.RequireNeqViolated, \"A require_neq expression was violated\"],\n [\n LangErrorCode.RequireKeysNeqViolated,\n \"A require_keys_neq expression was violated\",\n ],\n [LangErrorCode.RequireGtViolated, \"A require_gt expression was violated\"],\n [LangErrorCode.RequireGteViolated, \"A require_gte expression was violated\"],\n // Accounts.\n [\n LangErrorCode.AccountDiscriminatorAlreadySet,\n \"The account discriminator was already set on this account\",\n ],\n [\n LangErrorCode.AccountDiscriminatorNotFound,\n \"No 8 byte discriminator was found on the account\",\n ],\n [\n LangErrorCode.AccountDiscriminatorMismatch,\n \"8 byte discriminator did not match what was expected\",\n ],\n [LangErrorCode.AccountDidNotDeserialize, \"Failed to deserialize the account\"],\n [LangErrorCode.AccountDidNotSerialize, \"Failed to serialize the account\"],\n [\n LangErrorCode.AccountNotEnoughKeys,\n \"Not enough account keys given to the instruction\",\n ],\n [LangErrorCode.AccountNotMutable, \"The given account is not mutable\"],\n [\n LangErrorCode.AccountOwnedByWrongProgram,\n \"The given account is owned by a different program than expected\",\n ],\n [LangErrorCode.InvalidProgramId, \"Program ID was not as expected\"],\n [LangErrorCode.InvalidProgramExecutable, \"Program account is not executable\"],\n [LangErrorCode.AccountNotSigner, \"The given account did not sign\"],\n [\n LangErrorCode.AccountNotSystemOwned,\n \"The given account is not owned by the system program\",\n ],\n [\n LangErrorCode.AccountNotInitialized,\n \"The program expected this account to be already initialized\",\n ],\n [\n LangErrorCode.AccountNotProgramData,\n \"The given account is not a program data account\",\n ],\n [\n LangErrorCode.AccountNotAssociatedTokenAccount,\n \"The given account is not the associated token account\",\n ],\n [\n LangErrorCode.AccountSysvarMismatch,\n \"The given public key does not match the required sysvar\",\n ],\n [\n LangErrorCode.AccountReallocExceedsLimit,\n \"The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit\",\n ],\n [\n LangErrorCode.AccountDuplicateReallocs,\n \"The account was duplicated for more than one reallocation\",\n ],\n // Miscellaneous\n [\n LangErrorCode.DeclaredProgramIdMismatch,\n \"The declared program id does not match the actual program id\",\n ],\n // Deprecated\n [\n LangErrorCode.Deprecated,\n \"The API being used is deprecated and should no longer be used\",\n ],\n]);\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __assign$1 = function() {\r\n __assign$1 = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign$1.apply(this, arguments);\r\n};\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\n\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\n/**\n * Lower case as a function.\n */\nfunction lowerCase(str) {\n return str.toLowerCase();\n}\n\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nvar DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n// Remove all non-word characters.\nvar DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nfunction noCase(input, options) {\n if (options === void 0) { options = {}; }\n var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? \" \" : _d;\n var result = replace(replace(input, splitRegexp, \"$1\\0$2\"), stripRegexp, \"\\0\");\n var start = 0;\n var end = result.length;\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\")\n start++;\n while (result.charAt(end - 1) === \"\\0\")\n end--;\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input, re, value) {\n if (re instanceof RegExp)\n return input.replace(re, value);\n return re.reduce(function (input, re) { return input.replace(re, value); }, input);\n}\n\nfunction dotCase(input, options) {\n if (options === void 0) { options = {}; }\n return noCase(input, __assign({ delimiter: \".\" }, options));\n}\n\nfunction snakeCase(input, options) {\n if (options === void 0) { options = {}; }\n return dotCase(input, __assign$1({ delimiter: \"_\" }, options));\n}\n\nclass IdlCoder {\n static fieldLayout(field, types) {\n const fieldName = field.name !== undefined ? camelcase__WEBPACK_IMPORTED_MODULE_4___default()(field.name) : undefined;\n switch (field.type) {\n case \"bool\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.bool(fieldName);\n }\n case \"u8\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.u8(fieldName);\n }\n case \"i8\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.i8(fieldName);\n }\n case \"u16\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.u16(fieldName);\n }\n case \"i16\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.i16(fieldName);\n }\n case \"u32\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.u32(fieldName);\n }\n case \"i32\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.i32(fieldName);\n }\n case \"f32\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.f32(fieldName);\n }\n case \"u64\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.u64(fieldName);\n }\n case \"i64\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.i64(fieldName);\n }\n case \"f64\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.f64(fieldName);\n }\n case \"u128\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.u128(fieldName);\n }\n case \"i128\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.i128(fieldName);\n }\n case \"u256\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.u256(fieldName);\n }\n case \"i256\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.i256(fieldName);\n }\n case \"bytes\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.vecU8(fieldName);\n }\n case \"string\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.str(fieldName);\n }\n case \"publicKey\": {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.publicKey(fieldName);\n }\n default: {\n if (\"vec\" in field.type) {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.vec(IdlCoder.fieldLayout({\n name: undefined,\n type: field.type.vec,\n }, types), fieldName);\n }\n else if (\"option\" in field.type) {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.option(IdlCoder.fieldLayout({\n name: undefined,\n type: field.type.option,\n }, types), fieldName);\n }\n else if (\"defined\" in field.type) {\n // User defined type.\n if (!types) {\n throw new IdlError(\"User defined types not provided\");\n }\n const defined = field.type.defined;\n const filtered = types.filter((t) => t.name === defined);\n if (filtered.length !== 1) {\n throw new IdlError(`Type not found: ${JSON.stringify(field)}`);\n }\n return IdlCoder.typeDefLayout(filtered[0], types, fieldName);\n }\n else if (\"array\" in field.type) {\n let arrayTy = field.type.array[0];\n let arrayLen = field.type.array[1];\n let innerLayout = IdlCoder.fieldLayout({\n name: undefined,\n type: arrayTy,\n }, types);\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.array(innerLayout, arrayLen, fieldName);\n }\n else {\n throw new Error(`Not yet implemented: ${field}`);\n }\n }\n }\n }\n static typeDefLayout(typeDef, types = [], name) {\n switch (typeDef.type.kind) {\n case \"struct\": {\n const fieldLayouts = typeDef.type.fields.map((field) => {\n return IdlCoder.fieldLayout(field, types);\n });\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct(fieldLayouts, name);\n }\n case \"enum\": {\n let variants = typeDef.type.variants.map((variant) => {\n const name = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(variant.name);\n if (!variant.fields) {\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct([], name);\n }\n const fieldLayouts = variant.fields.map((f, i) => {\n if (f === null || f === void 0 ? void 0 : f.name) {\n return IdlCoder.fieldLayout(f, types);\n }\n return IdlCoder.fieldLayout({ type: f, name: i.toString() }, types);\n });\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct(fieldLayouts, name);\n });\n if (name !== undefined) {\n // Buffer-layout lib requires the name to be null (on construction)\n // when used as a field.\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.rustEnum(variants).replicate(name);\n }\n return _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.rustEnum(variants, name);\n }\n case \"alias\": {\n return IdlCoder.fieldLayout({ type: typeDef.type.value, name: typeDef.name }, types);\n }\n }\n }\n}\n\n/**\n * Namespace for global instruction function signatures (i.e. functions\n * that aren't namespaced by the state or any of its trait implementations).\n */\nconst SIGHASH_GLOBAL_NAMESPACE = \"global\";\n/**\n * Encodes and decodes program instructions.\n */\nclass BorshInstructionCoder {\n constructor(idl) {\n this.idl = idl;\n this.ixLayout = BorshInstructionCoder.parseIxLayout(idl);\n const sighashLayouts = new Map();\n idl.instructions.forEach((ix) => {\n const sh = sighash(SIGHASH_GLOBAL_NAMESPACE, ix.name);\n sighashLayouts.set(bs58__WEBPACK_IMPORTED_MODULE_3___default().encode(sh), {\n layout: this.ixLayout.get(ix.name),\n name: ix.name,\n });\n });\n this.sighashLayouts = sighashLayouts;\n }\n /**\n * Encodes a program instruction.\n */\n encode(ixName, ix) {\n return this._encode(SIGHASH_GLOBAL_NAMESPACE, ixName, ix);\n }\n _encode(nameSpace, ixName, ix) {\n const buffer = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(1000); // TODO: use a tighter buffer.\n const methodName = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(ixName);\n const layout = this.ixLayout.get(methodName);\n if (!layout) {\n throw new Error(`Unknown method: ${methodName}`);\n }\n const len = layout.encode(ix, buffer);\n const data = buffer.slice(0, len);\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([sighash(nameSpace, ixName), data]);\n }\n static parseIxLayout(idl) {\n const ixLayouts = idl.instructions.map((ix) => {\n let fieldLayouts = ix.args.map((arg) => {\n var _a, _b;\n return IdlCoder.fieldLayout(arg, Array.from([...((_a = idl.accounts) !== null && _a !== void 0 ? _a : []), ...((_b = idl.types) !== null && _b !== void 0 ? _b : [])]));\n });\n const name = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(ix.name);\n return [name, _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct(fieldLayouts, name)];\n });\n return new Map(ixLayouts);\n }\n /**\n * Decodes a program instruction.\n */\n decode(ix, encoding = \"hex\") {\n if (typeof ix === \"string\") {\n ix = encoding === \"hex\" ? buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(ix, \"hex\") : bs58__WEBPACK_IMPORTED_MODULE_3___default().decode(ix);\n }\n let sighash = bs58__WEBPACK_IMPORTED_MODULE_3___default().encode(ix.slice(0, 8));\n let data = ix.slice(8);\n const decoder = this.sighashLayouts.get(sighash);\n if (!decoder) {\n return null;\n }\n return {\n data: decoder.layout.decode(data),\n name: decoder.name,\n };\n }\n /**\n * Returns a formatted table of all the fields in the given instruction data.\n */\n format(ix, accountMetas) {\n return InstructionFormatter.format(ix, accountMetas, this.idl);\n }\n}\nclass InstructionFormatter {\n static format(ix, accountMetas, idl) {\n const idlIx = idl.instructions.filter((i) => ix.name === i.name)[0];\n if (idlIx === undefined) {\n console.error(\"Invalid instruction given\");\n return null;\n }\n const args = idlIx.args.map((idlField) => {\n return {\n name: idlField.name,\n type: InstructionFormatter.formatIdlType(idlField.type),\n data: InstructionFormatter.formatIdlData(idlField, ix.data[idlField.name], idl.types),\n };\n });\n const flatIdlAccounts = InstructionFormatter.flattenIdlAccounts(idlIx.accounts);\n const accounts = accountMetas.map((meta, idx) => {\n if (idx < flatIdlAccounts.length) {\n return {\n name: flatIdlAccounts[idx].name,\n ...meta,\n };\n }\n // \"Remaining accounts\" are unnamed in Anchor.\n else {\n return {\n name: undefined,\n ...meta,\n };\n }\n });\n return {\n args,\n accounts,\n };\n }\n static formatIdlType(idlType) {\n if (typeof idlType === \"string\") {\n return idlType;\n }\n if (\"vec\" in idlType) {\n return `Vec<${this.formatIdlType(idlType.vec)}>`;\n }\n if (\"option\" in idlType) {\n return `Option<${this.formatIdlType(idlType.option)}>`;\n }\n if (\"defined\" in idlType) {\n return idlType.defined;\n }\n if (\"array\" in idlType) {\n return `Array<${idlType.array[0]}; ${idlType.array[1]}>`;\n }\n throw new Error(`Unknown IDL type: ${idlType}`);\n }\n static formatIdlData(idlField, data, types) {\n if (typeof idlField.type === \"string\") {\n return data.toString();\n }\n if (idlField.type.hasOwnProperty(\"vec\")) {\n return (\"[\" +\n data\n .map((d) => this.formatIdlData({ name: \"\", type: idlField.type.vec }, d))\n .join(\", \") +\n \"]\");\n }\n if (idlField.type.hasOwnProperty(\"option\")) {\n return data === null\n ? \"null\"\n : this.formatIdlData({ name: \"\", type: idlField.type.option }, data, types);\n }\n if (idlField.type.hasOwnProperty(\"defined\")) {\n if (types === undefined) {\n throw new Error(\"User defined types not provided\");\n }\n const filtered = types.filter((t) => t.name === idlField.type.defined);\n if (filtered.length !== 1) {\n throw new Error(`Type not found: ${idlField.type.defined}`);\n }\n return InstructionFormatter.formatIdlDataDefined(filtered[0], data, types);\n }\n return \"unknown\";\n }\n static formatIdlDataDefined(typeDef, data, types) {\n switch (typeDef.type.kind) {\n case \"struct\": {\n const struct = typeDef.type;\n const fields = Object.keys(data)\n .map((k) => {\n const field = struct.fields.find((f) => f.name === k);\n if (!field) {\n throw new Error(\"Unable to find type\");\n }\n return (k +\n \": \" +\n InstructionFormatter.formatIdlData(field, data[k], types));\n })\n .join(\", \");\n return \"{ \" + fields + \" }\";\n }\n case \"enum\": {\n if (typeDef.type.variants.length === 0) {\n return \"{}\";\n }\n // Struct enum.\n if (typeDef.type.variants[0].name) {\n const variants = typeDef.type.variants;\n const variant = Object.keys(data)[0];\n const enumType = data[variant];\n const namedFields = Object.keys(enumType)\n .map((f) => {\n var _a;\n const fieldData = enumType[f];\n const idlField = (_a = variants[variant]) === null || _a === void 0 ? void 0 : _a.find((v) => v.name === f);\n if (!idlField) {\n throw new Error(\"Unable to find variant\");\n }\n return (f +\n \": \" +\n InstructionFormatter.formatIdlData(idlField, fieldData, types));\n })\n .join(\", \");\n const variantName = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(variant, { pascalCase: true });\n if (namedFields.length === 0) {\n return variantName;\n }\n return `${variantName} { ${namedFields} }`;\n }\n // Tuple enum.\n else {\n // TODO.\n return \"Tuple formatting not yet implemented\";\n }\n }\n case \"alias\": {\n return InstructionFormatter.formatIdlType(typeDef.type.value);\n }\n }\n }\n static flattenIdlAccounts(accounts, prefix) {\n return accounts\n .map((account) => {\n const accName = sentenceCase(account.name);\n if (account.hasOwnProperty(\"accounts\")) {\n const newPrefix = prefix ? `${prefix} > ${accName}` : accName;\n return InstructionFormatter.flattenIdlAccounts(account.accounts, newPrefix);\n }\n else {\n return {\n ...account,\n name: prefix ? `${prefix} > ${accName}` : accName,\n };\n }\n })\n .flat();\n }\n}\nfunction sentenceCase(field) {\n const result = field.replace(/([A-Z])/g, \" $1\");\n return result.charAt(0).toUpperCase() + result.slice(1);\n}\n// Not technically sighash, since we don't include the arguments, as Rust\n// doesn't allow function overloading.\nfunction sighash(nameSpace, ixName) {\n let name = snakeCase(ixName);\n let preimage = `${nameSpace}:${name}`;\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from((0,_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_8__/* .sha256 */ .J)(preimage).slice(0, 8));\n}\n\nfunction accountSize(idl, idlAccount) {\n switch (idlAccount.type.kind) {\n case \"struct\": {\n return idlAccount.type.fields\n .map((f) => typeSize(idl, f.type))\n .reduce((acc, size) => acc + size, 0);\n }\n case \"enum\": {\n const variantSizes = idlAccount.type.variants.map((variant) => {\n if (!variant.fields) {\n return 0;\n }\n return variant.fields\n .map((f) => {\n // Unnamed enum variant\n if (!(typeof f === \"object\" && \"name\" in f)) {\n return typeSize(idl, f);\n }\n // Named enum variant\n return typeSize(idl, f.type);\n })\n .reduce((acc, size) => acc + size, 0);\n });\n return Math.max(...variantSizes) + 1;\n }\n case \"alias\": {\n return typeSize(idl, idlAccount.type.value);\n }\n }\n}\n// Returns the size of the type in bytes. For variable length types, just return\n// 1. Users should override this value in such cases.\nfunction typeSize(idl, ty) {\n var _a, _b;\n switch (ty) {\n case \"bool\":\n return 1;\n case \"u8\":\n return 1;\n case \"i8\":\n return 1;\n case \"i16\":\n return 2;\n case \"u16\":\n return 2;\n case \"u32\":\n return 4;\n case \"i32\":\n return 4;\n case \"f32\":\n return 4;\n case \"u64\":\n return 8;\n case \"i64\":\n return 8;\n case \"f64\":\n return 8;\n case \"u128\":\n return 16;\n case \"i128\":\n return 16;\n case \"u256\":\n return 32;\n case \"i256\":\n return 32;\n case \"bytes\":\n return 1;\n case \"string\":\n return 1;\n case \"publicKey\":\n return 32;\n default:\n if (\"vec\" in ty) {\n return 1;\n }\n if (\"option\" in ty) {\n return 1 + typeSize(idl, ty.option);\n }\n if (\"coption\" in ty) {\n return 4 + typeSize(idl, ty.coption);\n }\n if (\"defined\" in ty) {\n const filtered = (_b = (_a = idl.types) === null || _a === void 0 ? void 0 : _a.filter((t) => t.name === ty.defined)) !== null && _b !== void 0 ? _b : [];\n if (filtered.length !== 1) {\n throw new IdlError(`Type not found: ${JSON.stringify(ty)}`);\n }\n let typeDef = filtered[0];\n return accountSize(idl, typeDef);\n }\n if (\"array\" in ty) {\n let arrayTy = ty.array[0];\n let arraySize = ty.array[1];\n return typeSize(idl, arrayTy) * arraySize;\n }\n throw new Error(`Invalid type ${JSON.stringify(ty)}`);\n }\n}\n\n/**\n * Number of bytes in anchor discriminators\n */\nconst DISCRIMINATOR_SIZE = 8;\nfunction discriminator(preimage) {\n return Buffer.from((0,_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_8__/* .sha256 */ .J)(preimage).slice(0, DISCRIMINATOR_SIZE));\n}\n\n/**\n * Encodes and decodes account objects.\n */\nclass BorshAccountsCoder {\n constructor(idl) {\n if (idl.accounts === undefined) {\n this.accountLayouts = new Map();\n return;\n }\n const layouts = idl.accounts.map((acc) => {\n return [acc.name, IdlCoder.typeDefLayout(acc, idl.types)];\n });\n this.accountLayouts = new Map(layouts);\n this.idl = idl;\n }\n async encode(accountName, account) {\n const buffer = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(1000); // TODO: use a tighter buffer.\n const layout = this.accountLayouts.get(accountName);\n if (!layout) {\n throw new Error(`Unknown account: ${accountName}`);\n }\n const len = layout.encode(account, buffer);\n let accountData = buffer.slice(0, len);\n let discriminator = BorshAccountsCoder.accountDiscriminator(accountName);\n return buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([discriminator, accountData]);\n }\n decode(accountName, data) {\n // Assert the account discriminator is correct.\n const discriminator = BorshAccountsCoder.accountDiscriminator(accountName);\n if (discriminator.compare(data.slice(0, 8))) {\n throw new Error(\"Invalid account discriminator\");\n }\n return this.decodeUnchecked(accountName, data);\n }\n decodeAny(data) {\n const accountDescriminator = data.slice(0, 8);\n const accountName = Array.from(this.accountLayouts.keys()).find((key) => BorshAccountsCoder.accountDiscriminator(key).equals(accountDescriminator));\n if (!accountName) {\n throw new Error(\"Account descriminator not found\");\n }\n return this.decodeUnchecked(accountName, data);\n }\n decodeUnchecked(accountName, ix) {\n // Chop off the discriminator before decoding.\n const data = ix.subarray(DISCRIMINATOR_SIZE);\n const layout = this.accountLayouts.get(accountName);\n if (!layout) {\n throw new Error(`Unknown account: ${accountName}`);\n }\n return layout.decode(data);\n }\n memcmp(accountName, appendData) {\n const discriminator = BorshAccountsCoder.accountDiscriminator(accountName);\n return {\n offset: 0,\n bytes: bs58__WEBPACK_IMPORTED_MODULE_3___default().encode(appendData ? buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([discriminator, appendData]) : discriminator),\n };\n }\n size(idlAccount) {\n var _a;\n return DISCRIMINATOR_SIZE + ((_a = accountSize(this.idl, idlAccount)) !== null && _a !== void 0 ? _a : 0);\n }\n /**\n * Calculates and returns a unique 8 byte discriminator prepended to all anchor accounts.\n *\n * @param name The name of the account to calculate the discriminator.\n */\n static accountDiscriminator(name) {\n const discriminatorPreimage = `account:${camelcase__WEBPACK_IMPORTED_MODULE_4___default()(name, {\n pascalCase: true,\n preserveConsecutiveUppercase: true,\n })}`;\n return discriminator(discriminatorPreimage);\n }\n}\n\nclass BorshEventCoder {\n constructor(idl) {\n if (idl.events === undefined) {\n this.layouts = new Map();\n return;\n }\n const layouts = idl.events.map((event) => {\n let eventTypeDef = {\n name: event.name,\n type: {\n kind: \"struct\",\n fields: event.fields.map((f) => {\n return { name: f.name, type: f.type };\n }),\n },\n };\n return [event.name, IdlCoder.typeDefLayout(eventTypeDef, idl.types)];\n });\n this.layouts = new Map(layouts);\n this.discriminators = new Map(idl.events === undefined\n ? []\n : idl.events.map((e) => [\n encode(eventDiscriminator(e.name)),\n e.name,\n ]));\n }\n decode(log) {\n let logArr;\n // This will throw if log length is not a multiple of 4.\n try {\n logArr = decode(log);\n }\n catch (e) {\n return null;\n }\n const disc = encode(logArr.slice(0, 8));\n // Only deserialize if the discriminator implies a proper event.\n const eventName = this.discriminators.get(disc);\n if (eventName === undefined) {\n return null;\n }\n const layout = this.layouts.get(eventName);\n if (!layout) {\n throw new Error(`Unknown event: ${eventName}`);\n }\n const data = layout.decode(logArr.slice(8));\n return { data, name: eventName };\n }\n}\nfunction eventDiscriminator(name) {\n return discriminator(`event:${name}`);\n}\n\n/**\n * Encodes and decodes user-defined types.\n */\nclass BorshTypesCoder {\n constructor(idl) {\n if (idl.types === undefined) {\n this.typeLayouts = new Map();\n return;\n }\n const layouts = idl.types.map((acc) => {\n return [acc.name, IdlCoder.typeDefLayout(acc, idl.types)];\n });\n this.typeLayouts = new Map(layouts);\n this.idl = idl;\n }\n encode(typeName, type) {\n const buffer = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.alloc(1000); // TODO: use a tighter buffer.\n const layout = this.typeLayouts.get(typeName);\n if (!layout) {\n throw new Error(`Unknown type: ${typeName}`);\n }\n const len = layout.encode(type, buffer);\n return buffer.slice(0, len);\n }\n decode(typeName, typeData) {\n const layout = this.typeLayouts.get(typeName);\n if (!layout) {\n throw new Error(`Unknown type: ${typeName}`);\n }\n return layout.decode(typeData);\n }\n}\n\n/**\n * BorshCoder is the default Coder for Anchor programs implementing the\n * borsh based serialization interface.\n */\nclass BorshCoder {\n constructor(idl) {\n this.instruction = new BorshInstructionCoder(idl);\n this.accounts = new BorshAccountsCoder(idl);\n this.events = new BorshEventCoder(idl);\n this.types = new BorshTypesCoder(idl);\n }\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\n/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n\n /**\n * Decode from a Buffer into an JavaScript value.\n *\n * @param {Buffer} b - the buffer from which encoded data is read.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {(Number|Array|Object)} - the value of the decoded data.\n *\n * @abstract\n */\n decode(b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Encode a JavaScript value into a Buffer.\n *\n * @param {(Number|Array|Object)} src - the value to be encoded into\n * the buffer. The type accepted depends on the (sub-)type of {@link\n * Layout}.\n *\n * @param {Buffer} b - the buffer into which encoded data will be\n * written.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {Number} - the number of bytes encoded, including the\n * space skipped for internal padding, but excluding data such as\n * {@link Sequence#count|lengths} when stored {@link\n * ExternalLayout|externally}. This is the adjustment to `offset`\n * producing the offset where data for the next layout would be\n * written.\n *\n * @abstract\n */\n encode(src, b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Buffer} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nvar Layout_2 = Layout;\n\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\n\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\n\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n\n if (undefined === offset) {\n offset = 0;\n } else if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n\n super(layout.span, property || layout.property);\n\n /** The subordinated layout. */\n this.layout = layout;\n\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Buffer\n * being accessed. */\n this.offset = offset;\n }\n\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.decode(b, offset + this.offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\n\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super( span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\nconst V2E32 = Math.pow(2, 32);\n\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return {hi32, lo32};\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n } else if (0 <= offset) {\n offset += fd.span;\n }\n }\n }\n}\n\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\n\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n\n super(property || layout.property || 'variant');\n\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\n\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n const upv = ((discr instanceof UInt)\n || (discr instanceof UIntBE));\n if (upv) {\n discr = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discr = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && upv) {\n span += discr.layout.span;\n }\n }\n super(span, property);\n\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discr;\n\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = upv;\n\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisified rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (src.hasOwnProperty(this.discriminator.property)) {\n if (this.defaultLayout\n && src.hasOwnProperty(this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || src.hasOwnProperty(vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (src.hasOwnProperty(vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n let clo = this.registry[discr];\n if (undefined === clo) {\n let contentOffset = 0;\n clo = this.defaultLayout;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[clo.property] = this.defaultLayout.decode(b, offset + contentOffset);\n } else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n return contentOffset + clo.encode(src[clo.property], b,\n offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Buffer)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Buffer}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset) {\n let variant = vb;\n if (Buffer.isBuffer(vb)) {\n if (undefined === offset) {\n offset = 0;\n }\n variant = this.discriminator.decode(vb, offset);\n }\n return this.registry[variant];\n }\n}\n\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n return contentOffset + this.layout.getSpan(b, offset + contentOffset);\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!src.hasOwnProperty(this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n }\n}\n/* eslint-enable no-extend-native */\n\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Buffer.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob$1 extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return b.slice(offset, offset + span);\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(Buffer.isBuffer(src)\n && (span === src.length))) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Buffer as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n b.write(src.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\n\n/** Factory for {@link OffsetLayout}. */\nvar offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nvar u8 = (property => new UInt(1, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nvar u32 = (property => new UInt(4, property));\n\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nvar nu64 = (property => new NearUInt64(property));\n\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nvar ns64 = (property => new NearInt64(property));\n\n/** Factory for {@link Structure} values. */\nvar struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n\n/** Factory for {@link Union} values. */\nvar union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n\n/** Factory for {@link Blob} values. */\nvar blob = ((length, property) => new Blob$1(length, property));\n\nclass SystemInstructionCoder {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n constructor(_) { }\n encode(ixName, ix) {\n switch (camelcase__WEBPACK_IMPORTED_MODULE_4___default()(ixName)) {\n case \"createAccount\": {\n return encodeCreateAccount(ix);\n }\n case \"assign\": {\n return encodeAssign(ix);\n }\n case \"transfer\": {\n return encodeTransfer(ix);\n }\n case \"createAccountWithSeed\": {\n return encodeCreateAccountWithSeed(ix);\n }\n case \"advanceNonceAccount\": {\n return encodeAdvanceNonceAccount(ix);\n }\n case \"withdrawNonceAccount\": {\n return encodeWithdrawNonceAccount(ix);\n }\n case \"initializeNonceAccount\": {\n return encodeInitializeNonceAccount(ix);\n }\n case \"authorizeNonceAccount\": {\n return encodeAuthorizeNonceAccount(ix);\n }\n case \"allocate\": {\n return encodeAllocate(ix);\n }\n case \"allocateWithSeed\": {\n return encodeAllocateWithSeed(ix);\n }\n case \"assignWithSeed\": {\n return encodeAssignWithSeed(ix);\n }\n case \"transferWithSeed\": {\n return encodeTransferWithSeed(ix);\n }\n default: {\n throw new Error(`Invalid instruction: ${ixName}`);\n }\n }\n }\n encodeState(_ixName, _ix) {\n throw new Error(\"System does not have state\");\n }\n}\nclass RustStringLayout extends Layout_2 {\n constructor(property) {\n super(-1, property);\n this.property = property;\n this.layout = struct([\n u32(\"length\"),\n u32(\"lengthPadding\"),\n blob(offset(u32(), -8), \"chars\"),\n ], this.property);\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.layout.span;\n }\n const data = {\n chars: Buffer.from(src, \"utf8\"),\n };\n return this.layout.encode(data, b, offset);\n }\n decode(b, offset = 0) {\n const data = this.layout.decode(b, offset);\n return data[\"chars\"].toString();\n }\n getSpan(b, offset = 0) {\n return (u32().span +\n u32().span +\n new (bn_js__WEBPACK_IMPORTED_MODULE_2___default())(new Uint8Array(b).slice(offset, offset + 4), 10, \"le\").toNumber());\n }\n}\nfunction rustStringLayout(property) {\n return new RustStringLayout(property);\n}\nfunction publicKey$2(property) {\n return blob(32, property);\n}\nfunction encodeCreateAccount({ lamports, space, owner }) {\n return encodeData({\n createAccount: { lamports, space, owner: owner.toBuffer() },\n });\n}\nfunction encodeAssign({ owner }) {\n return encodeData({\n assign: { owner: owner.toBuffer() },\n });\n}\nfunction encodeTransfer({ lamports }) {\n return encodeData({\n transfer: { lamports },\n });\n}\nfunction encodeCreateAccountWithSeed({ base, seed, lamports, space, owner, }) {\n return encodeData({\n createAccountWithSeed: {\n base: base.toBuffer(),\n seed,\n lamports,\n space,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(3).span + seed.length);\n}\nfunction encodeInitializeNonceAccount({ authorized }) {\n return encodeData({\n initializeNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeAdvanceNonceAccount({ authorized }) {\n return encodeData({\n advanceNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeWithdrawNonceAccount({ lamports }) {\n return encodeData({\n withdrawNonceAccount: { lamports },\n });\n}\nfunction encodeAuthorizeNonceAccount({ authorized }) {\n return encodeData({\n authorizeNonceAccount: { authorized: authorized.toBuffer() },\n });\n}\nfunction encodeAllocate({ space }) {\n return encodeData({\n allocate: { space },\n });\n}\nfunction encodeAllocateWithSeed({ base, seed, space, owner }) {\n return encodeData({\n allocateWithSeed: {\n base: base.toBuffer(),\n seed,\n space,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(9).span + seed.length);\n}\nfunction encodeAssignWithSeed({ base, seed, owner }) {\n return encodeData({\n assignWithSeed: {\n base: base.toBuffer(),\n seed,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(10).span + seed.length);\n}\nfunction encodeTransferWithSeed({ lamports, seed, owner }) {\n return encodeData({\n transferWithSeed: {\n lamports,\n seed,\n owner: owner.toBuffer(),\n },\n }, LAYOUT.getVariant(11).span + seed.length);\n}\nconst LAYOUT = union(u32(\"instruction\"));\nLAYOUT.addVariant(0, struct([\n ns64(\"lamports\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"createAccount\");\nLAYOUT.addVariant(1, struct([publicKey$2(\"owner\")]), \"assign\");\nLAYOUT.addVariant(2, struct([ns64(\"lamports\")]), \"transfer\");\nLAYOUT.addVariant(3, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n ns64(\"lamports\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"createAccountWithSeed\");\nLAYOUT.addVariant(4, struct([publicKey$2(\"authorized\")]), \"advanceNonceAccount\");\nLAYOUT.addVariant(5, struct([ns64(\"lamports\")]), \"withdrawNonceAccount\");\nLAYOUT.addVariant(6, struct([publicKey$2(\"authorized\")]), \"initializeNonceAccount\");\nLAYOUT.addVariant(7, struct([publicKey$2(\"authorized\")]), \"authorizeNonceAccount\");\nLAYOUT.addVariant(8, struct([ns64(\"space\")]), \"allocate\");\nLAYOUT.addVariant(9, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n ns64(\"space\"),\n publicKey$2(\"owner\"),\n]), \"allocateWithSeed\");\nLAYOUT.addVariant(10, struct([\n publicKey$2(\"base\"),\n rustStringLayout(\"seed\"),\n publicKey$2(\"owner\"),\n]), \"assignWithSeed\");\nLAYOUT.addVariant(11, struct([\n ns64(\"lamports\"),\n rustStringLayout(\"seed\"),\n publicKey$2(\"owner\"),\n]), \"transferWithSeed\");\nfunction encodeData(instruction, maxSpan) {\n const b = Buffer.alloc(maxSpan !== null && maxSpan !== void 0 ? maxSpan : instructionMaxSpan);\n const span = LAYOUT.encode(instruction, b);\n if (maxSpan === undefined) {\n return b.slice(0, span);\n }\n return b;\n}\nconst instructionMaxSpan = Math.max(...Object.values(LAYOUT.registry).map((r) => r.span));\n\nclass SystemAccountsCoder {\n constructor(idl) {\n this.idl = idl;\n }\n async encode(accountName, account) {\n switch (accountName) {\n case \"nonce\": {\n const buffer = Buffer.alloc(_solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.NONCE_ACCOUNT_LENGTH);\n const len = NONCE_ACCOUNT_LAYOUT.encode(account, buffer);\n return buffer.slice(0, len);\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n decode(accountName, ix) {\n return this.decodeUnchecked(accountName, ix);\n }\n decodeUnchecked(accountName, ix) {\n switch (accountName) {\n case \"nonce\": {\n return decodeNonceAccount(ix);\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n // TODO: this won't use the appendData.\n memcmp(accountName, _appendData) {\n switch (accountName) {\n case \"nonce\": {\n return {\n dataSize: _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.NONCE_ACCOUNT_LENGTH,\n };\n }\n default: {\n throw new Error(`Invalid account name: ${accountName}`);\n }\n }\n }\n size(idlAccount) {\n var _a;\n return (_a = accountSize(this.idl, idlAccount)) !== null && _a !== void 0 ? _a : 0;\n }\n}\nfunction decodeNonceAccount(ix) {\n return NONCE_ACCOUNT_LAYOUT.decode(ix);\n}\nclass WrappedLayout$1 extends Layout_2 {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nfunction publicKey$1(property) {\n return new WrappedLayout$1(blob(32), (b) => new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(b), (key) => key.toBuffer(), property);\n}\nconst NONCE_ACCOUNT_LAYOUT = struct([\n u32(\"version\"),\n u32(\"state\"),\n publicKey$1(\"authorizedPubkey\"),\n publicKey$1(\"nonce\"),\n struct([nu64(\"lamportsPerSignature\")], \"feeCalculator\"),\n]);\n\nclass SystemEventsCoder {\n constructor(_idl) { }\n decode(_log) {\n throw new Error(\"System program does not have events\");\n }\n}\n\nclass SystemTypesCoder {\n constructor(_idl) { }\n encode(_name, _type) {\n throw new Error(\"System does not have user-defined types\");\n }\n decode(_name, _typeData) {\n throw new Error(\"System does not have user-defined types\");\n }\n}\n\n/**\n * Coder for the System program.\n */\nclass SystemCoder {\n constructor(idl) {\n this.instruction = new SystemInstructionCoder(idl);\n this.accounts = new SystemAccountsCoder(idl);\n this.events = new SystemEventsCoder(idl);\n this.types = new SystemTypesCoder(idl);\n }\n}\n\nfunction hash(data) {\n return new TextDecoder().decode((0,_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_8__/* .sha256 */ .J)(data));\n}\n\nvar sha256 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hash: hash\n});\n\n// Sync version of web3.PublicKey.createWithSeed.\nfunction createWithSeedSync(fromPublicKey, seed, programId) {\n const buffer = buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.concat([\n fromPublicKey.toBuffer(),\n buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from(seed),\n programId.toBuffer(),\n ]);\n return new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey((0,_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_8__/* .sha256 */ .J)(buffer));\n}\nfunction associated(programId, ...args) {\n let seeds = [buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer.from([97, 110, 99, 104, 111, 114])]; // b\"anchor\".\n args.forEach((arg) => {\n seeds.push(arg instanceof buffer__WEBPACK_IMPORTED_MODULE_0__.Buffer ? arg : translateAddress(arg).toBuffer());\n });\n const [assoc] = _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.findProgramAddressSync(seeds, translateAddress(programId));\n return assoc;\n}\n\nvar pubkey = /*#__PURE__*/Object.freeze({\n __proto__: null,\n createWithSeedSync: createWithSeedSync,\n associated: associated\n});\n\nconst TOKEN_PROGRAM_ID = new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\");\nconst ASSOCIATED_PROGRAM_ID = new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\");\nfunction associatedAddress({ mint, owner, }) {\n return _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.findProgramAddressSync([owner.toBuffer(), TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], ASSOCIATED_PROGRAM_ID)[0];\n}\n\nvar token = /*#__PURE__*/Object.freeze({\n __proto__: null,\n TOKEN_PROGRAM_ID: TOKEN_PROGRAM_ID,\n ASSOCIATED_PROGRAM_ID: ASSOCIATED_PROGRAM_ID,\n associatedAddress: associatedAddress\n});\n\nvar browserPonyfill = {exports: {}};\n\n(function (module, exports) {\nvar global = typeof self !== 'undefined' ? self : commonjsGlobal;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException;\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\n((function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n}))({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch; // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch; // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers;\nexports.Request = ctx.Request;\nexports.Response = ctx.Response;\nmodule.exports = exports;\n}(browserPonyfill, browserPonyfill.exports));\n\nvar fetch = /*@__PURE__*/getDefaultExportFromCjs(browserPonyfill.exports);\n\n/**\n * Returns a verified build from the anchor registry. null if no such\n * verified build exists, e.g., if the program has been upgraded since the\n * last verified build.\n */\nasync function verifiedBuild(connection, programId, limit = 5) {\n const url = `https://api.apr.dev/api/v0/program/${programId.toString()}/latest?limit=${limit}`;\n const [programData, latestBuildsResp] = await Promise.all([\n fetchData(connection, programId),\n fetch(url),\n ]);\n // Filter out all non successful builds.\n const latestBuilds = (await latestBuildsResp.json()).filter((b) => !b.aborted && b.state === \"Built\" && b.verified === \"Verified\");\n if (latestBuilds.length === 0) {\n return null;\n }\n // Get the latest build.\n const build = latestBuilds[0];\n // Has the program been upgraded since the last build?\n if (programData.slot.toNumber() !== build.verified_slot) {\n return null;\n }\n // Success.\n return build;\n}\n/**\n * Returns the program data account for this program, containing the\n * metadata for this program, e.g., the upgrade authority.\n */\nasync function fetchData(connection, programId) {\n const accountInfo = await connection.getAccountInfo(programId);\n if (accountInfo === null) {\n throw new Error(\"program account not found\");\n }\n const { program } = decodeUpgradeableLoaderState(accountInfo.data);\n const programdataAccountInfo = await connection.getAccountInfo(program.programdataAddress);\n if (programdataAccountInfo === null) {\n throw new Error(\"program data account not found\");\n }\n const { programData } = decodeUpgradeableLoaderState(programdataAccountInfo.data);\n return programData;\n}\nconst UPGRADEABLE_LOADER_STATE_LAYOUT = _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.rustEnum([\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct([], \"uninitialized\"),\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct([_coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.option(_coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.publicKey(), \"authorityAddress\")], \"buffer\"),\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct([_coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.publicKey(\"programdataAddress\")], \"program\"),\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct([\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.u64(\"slot\"),\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.option(_coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.publicKey(), \"upgradeAuthorityAddress\"),\n ], \"programData\"),\n], undefined, _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.u32());\nfunction decodeUpgradeableLoaderState(data) {\n return UPGRADEABLE_LOADER_STATE_LAYOUT.decode(data);\n}\n\nvar registry = /*#__PURE__*/Object.freeze({\n __proto__: null,\n verifiedBuild: verifiedBuild,\n fetchData: fetchData,\n decodeUpgradeableLoaderState: decodeUpgradeableLoaderState\n});\n\nvar index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n sha256: sha256,\n rpc: rpc,\n publicKey: pubkey,\n bytes: index$1,\n token: token,\n features: features,\n registry: registry\n});\n\nfunction isIdlAccounts(accountItem) {\n return \"accounts\" in accountItem;\n}\n// Deterministic IDL address as a function of the program id.\nasync function idlAddress(programId) {\n const base = (await _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.findProgramAddress([], programId))[0];\n return await _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.createWithSeed(base, seed(), programId);\n}\n// Seed for generating the idlAddress.\nfunction seed() {\n return \"anchor:idl\";\n}\nconst IDL_ACCOUNT_LAYOUT = _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.struct([\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.publicKey(\"authority\"),\n _coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__.vecU8(\"data\"),\n]);\nfunction decodeIdlAccount(data) {\n return IDL_ACCOUNT_LAYOUT.decode(data);\n}\n\nfunction splitArgsAndCtx(idlIx, args) {\n var _a, _b;\n let options = {};\n const inputLen = idlIx.args ? idlIx.args.length : 0;\n if (args.length > inputLen) {\n if (args.length !== inputLen + 1) {\n throw new Error(`provided too many arguments ${args} to instruction ${idlIx === null || idlIx === void 0 ? void 0 : idlIx.name} expecting: ${(_b = (_a = idlIx.args) === null || _a === void 0 ? void 0 : _a.map((a) => a.name)) !== null && _b !== void 0 ? _b : []}`);\n }\n options = args.pop();\n }\n return [args, options];\n}\n\nclass InstructionNamespaceFactory {\n static build(idlIx, encodeFn, programId) {\n if (idlIx.name === \"_inner\") {\n throw new IdlError(\"the _inner name is reserved\");\n }\n const ix = (...args) => {\n const [ixArgs, ctx] = splitArgsAndCtx(idlIx, [...args]);\n validateAccounts(idlIx.accounts, ctx.accounts);\n validateInstruction(idlIx, ...args);\n const keys = ix.accounts(ctx.accounts);\n if (ctx.remainingAccounts !== undefined) {\n keys.push(...ctx.remainingAccounts);\n }\n if (isSet(\"debug-logs\")) {\n console.log(\"Outgoing account metas:\", keys);\n }\n return new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.TransactionInstruction({\n keys,\n programId,\n data: encodeFn(idlIx.name, toInstruction(idlIx, ...ixArgs)),\n });\n };\n // Utility fn for ordering the accounts for this instruction.\n ix[\"accounts\"] = (accs) => {\n return InstructionNamespaceFactory.accountsArray(accs, idlIx.accounts, programId, idlIx.name);\n };\n return ix;\n }\n static accountsArray(ctx, accounts, programId, ixName) {\n if (!ctx) {\n return [];\n }\n return accounts\n .map((acc) => {\n // Nested accounts.\n const nestedAccounts = \"accounts\" in acc ? acc.accounts : undefined;\n if (nestedAccounts !== undefined) {\n const rpcAccs = ctx[acc.name];\n return InstructionNamespaceFactory.accountsArray(rpcAccs, acc.accounts, programId, ixName).flat();\n }\n else {\n const account = acc;\n let pubkey;\n try {\n pubkey = translateAddress(ctx[acc.name]);\n }\n catch (err) {\n throw new Error(`Wrong input type for account \"${acc.name}\" in the instruction accounts object${ixName !== undefined ? ' for instruction \"' + ixName + '\"' : \"\"}. Expected PublicKey or string.`);\n }\n const optional = account.isOptional && pubkey.equals(programId);\n const isWritable = account.isMut && !optional;\n const isSigner = account.isSigner && !optional;\n return {\n pubkey,\n isWritable,\n isSigner,\n };\n }\n })\n .flat();\n }\n}\n// Throws error if any argument required for the `ix` is not given.\nfunction validateInstruction(ix, ...args) {\n // todo\n}\n\nclass TransactionFactory {\n static build(idlIx, ixFn) {\n const txFn = (...args) => {\n var _a, _b, _c;\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n const tx = new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.Transaction();\n if (ctx.preInstructions && ctx.instructions) {\n throw new Error(\"instructions is deprecated, use preInstructions\");\n }\n (_a = ctx.preInstructions) === null || _a === void 0 ? void 0 : _a.forEach((ix) => tx.add(ix));\n (_b = ctx.instructions) === null || _b === void 0 ? void 0 : _b.forEach((ix) => tx.add(ix));\n tx.add(ixFn(...args));\n (_c = ctx.postInstructions) === null || _c === void 0 ? void 0 : _c.forEach((ix) => tx.add(ix));\n return tx;\n };\n return txFn;\n }\n}\n\nclass RpcFactory {\n static build(idlIx, txFn, idlErrors, provider) {\n const rpc = async (...args) => {\n var _a;\n const tx = txFn(...args);\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n if (provider.sendAndConfirm === undefined) {\n throw new Error(\"This function requires 'Provider.sendAndConfirm' to be implemented.\");\n }\n try {\n return await provider.sendAndConfirm(tx, (_a = ctx.signers) !== null && _a !== void 0 ? _a : [], ctx.options);\n }\n catch (err) {\n throw translateError(err, idlErrors);\n }\n };\n return rpc;\n }\n}\n\nclass AccountFactory {\n static build(idl, coder, programId, provider) {\n var _a;\n const accountFns = {};\n (_a = idl.accounts) === null || _a === void 0 ? void 0 : _a.forEach((idlAccount) => {\n const name = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(idlAccount.name);\n accountFns[name] = new AccountClient(idl, idlAccount, programId, provider, coder);\n });\n return accountFns;\n }\n}\nclass AccountClient {\n /**\n * Returns the number of bytes in this account.\n */\n get size() {\n return this._size;\n }\n /**\n * Returns the program ID owning all accounts.\n */\n get programId() {\n return this._programId;\n }\n /**\n * Returns the client's wallet and network provider.\n */\n get provider() {\n return this._provider;\n }\n /**\n * Returns the coder.\n */\n get coder() {\n return this._coder;\n }\n /**\n * Returns the idl account.\n */\n get idlAccount() {\n return this._idlAccount;\n }\n constructor(idl, idlAccount, programId, provider, coder) {\n this._idlAccount = idlAccount;\n this._programId = programId;\n this._provider = provider !== null && provider !== void 0 ? provider : getProvider();\n this._coder = coder !== null && coder !== void 0 ? coder : new BorshCoder(idl);\n this._size = this._coder.accounts.size(idlAccount);\n }\n /**\n * Returns a deserialized account, returning null if it doesn't exist.\n *\n * @param address The address of the account to fetch.\n */\n async fetchNullable(address, commitment) {\n const { data } = await this.fetchNullableAndContext(address, commitment);\n return data;\n }\n /**\n * Returns a deserialized account along with the associated rpc response context, returning null if it doesn't exist.\n *\n * @param address The address of the account to fetch.\n */\n async fetchNullableAndContext(address, commitment) {\n const accountInfo = await this.getAccountInfoAndContext(address, commitment);\n const { value, context } = accountInfo;\n return {\n data: value && value.data.length !== 0\n ? this._coder.accounts.decode(this._idlAccount.name, value.data)\n : null,\n context,\n };\n }\n /**\n * Returns a deserialized account.\n *\n * @param address The address of the account to fetch.\n */\n async fetch(address, commitment) {\n const { data } = await this.fetchNullableAndContext(address, commitment);\n if (data === null) {\n throw new Error(`Account does not exist or has no data ${address.toString()}`);\n }\n return data;\n }\n /**\n * Returns a deserialized account along with the associated rpc response context.\n *\n * @param address The address of the account to fetch.\n */\n async fetchAndContext(address, commitment) {\n const { data, context } = await this.fetchNullableAndContext(address, commitment);\n if (data === null) {\n throw new Error(`Account does not exist ${address.toString()}`);\n }\n return { data, context };\n }\n /**\n * Returns multiple deserialized accounts.\n * Accounts not found or with wrong discriminator are returned as null.\n *\n * @param addresses The addresses of the accounts to fetch.\n */\n async fetchMultiple(addresses, commitment) {\n const accounts = await this.fetchMultipleAndContext(addresses, commitment);\n return accounts.map((account) => (account ? account.data : null));\n }\n /**\n * Returns multiple deserialized accounts.\n * Accounts not found or with wrong discriminator are returned as null.\n *\n * @param addresses The addresses of the accounts to fetch.\n */\n async fetchMultipleAndContext(addresses, commitment) {\n const accounts = await getMultipleAccountsAndContext(this._provider.connection, addresses.map((address) => translateAddress(address)), commitment);\n // Decode accounts where discriminator is correct, null otherwise\n return accounts.map((result) => {\n if (result == null) {\n return null;\n }\n const { account, context } = result;\n return {\n data: this._coder.accounts.decode(this._idlAccount.name, account.data),\n context,\n };\n });\n }\n /**\n * Returns all instances of this account type for the program.\n *\n * @param filters User-provided filters to narrow the results from `connection.getProgramAccounts`.\n *\n * When filters are not defined this method returns all\n * the account instances.\n *\n * When filters are of type `Buffer`, the filters are appended\n * after the discriminator.\n *\n * When filters are of type `GetProgramAccountsFilter[]`,\n * filters are appended after the discriminator filter.\n */\n async all(filters) {\n const filter = this.coder.accounts.memcmp(this._idlAccount.name, filters instanceof Buffer ? filters : undefined);\n const coderFilters = [];\n if ((filter === null || filter === void 0 ? void 0 : filter.offset) != undefined && (filter === null || filter === void 0 ? void 0 : filter.bytes) != undefined) {\n coderFilters.push({\n memcmp: { offset: filter.offset, bytes: filter.bytes },\n });\n }\n if ((filter === null || filter === void 0 ? void 0 : filter.dataSize) != undefined) {\n coderFilters.push({ dataSize: filter.dataSize });\n }\n let resp = await this._provider.connection.getProgramAccounts(this._programId, {\n commitment: this._provider.connection.commitment,\n filters: [...coderFilters, ...(Array.isArray(filters) ? filters : [])],\n });\n return resp.map(({ pubkey, account }) => {\n return {\n publicKey: pubkey,\n account: this._coder.accounts.decode(this._idlAccount.name, account.data),\n };\n });\n }\n /**\n * Returns an `EventEmitter` emitting a \"change\" event whenever the account\n * changes.\n */\n subscribe(address, commitment) {\n const sub = subscriptions.get(address.toString());\n if (sub) {\n return sub.ee;\n }\n const ee = new (eventemitter3__WEBPACK_IMPORTED_MODULE_7___default())();\n address = translateAddress(address);\n const listener = this._provider.connection.onAccountChange(address, (acc) => {\n const account = this._coder.accounts.decode(this._idlAccount.name, acc.data);\n ee.emit(\"change\", account);\n }, commitment);\n subscriptions.set(address.toString(), {\n ee,\n listener,\n });\n return ee;\n }\n /**\n * Unsubscribes from the account at the given address.\n */\n async unsubscribe(address) {\n let sub = subscriptions.get(address.toString());\n if (!sub) {\n console.warn(\"Address is not subscribed\");\n return;\n }\n if (subscriptions) {\n await this._provider.connection\n .removeAccountChangeListener(sub.listener)\n .then(() => {\n subscriptions.delete(address.toString());\n })\n .catch(console.error);\n }\n }\n /**\n * Returns an instruction for creating this account.\n */\n async createInstruction(signer, sizeOverride) {\n const size = this.size;\n if (this._provider.publicKey === undefined) {\n throw new Error(\"This function requires the Provider interface implementor to have a 'publicKey' field.\");\n }\n return _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SystemProgram.createAccount({\n fromPubkey: this._provider.publicKey,\n newAccountPubkey: signer.publicKey,\n space: sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size,\n lamports: await this._provider.connection.getMinimumBalanceForRentExemption(sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : size),\n programId: this._programId,\n });\n }\n /**\n * @deprecated since version 14.0.\n *\n * Function returning the associated account. Args are keys to associate.\n * Order matters.\n */\n async associated(...args) {\n const addr = await this.associatedAddress(...args);\n return await this.fetch(addr);\n }\n /**\n * @deprecated since version 14.0.\n *\n * Function returning the associated address. Args are keys to associate.\n * Order matters.\n */\n async associatedAddress(...args) {\n return await associated(this._programId, ...args);\n }\n async getAccountInfo(address, commitment) {\n return await this._provider.connection.getAccountInfo(translateAddress(address), commitment);\n }\n async getAccountInfoAndContext(address, commitment) {\n return await this._provider.connection.getAccountInfoAndContext(translateAddress(address), commitment);\n }\n}\n// Tracks all subscriptions.\nconst subscriptions = new Map();\n\nconst PROGRAM_LOG = \"Program log: \";\nconst PROGRAM_DATA = \"Program data: \";\nconst PROGRAM_LOG_START_INDEX = PROGRAM_LOG.length;\nconst PROGRAM_DATA_START_INDEX = PROGRAM_DATA.length;\nclass EventManager {\n constructor(programId, provider, coder) {\n this._programId = programId;\n this._provider = provider;\n this._eventParser = new EventParser(programId, coder);\n this._eventCallbacks = new Map();\n this._eventListeners = new Map();\n this._listenerIdCount = 0;\n }\n addEventListener(eventName, callback) {\n var _a;\n let listener = this._listenerIdCount;\n this._listenerIdCount += 1;\n // Store the listener into the event map.\n if (!this._eventListeners.has(eventName)) {\n this._eventListeners.set(eventName, []);\n }\n this._eventListeners.set(eventName, ((_a = this._eventListeners.get(eventName)) !== null && _a !== void 0 ? _a : []).concat(listener));\n // Store the callback into the listener map.\n this._eventCallbacks.set(listener, [eventName, callback]);\n // Create the subscription singleton, if needed.\n if (this._onLogsSubscriptionId !== undefined) {\n return listener;\n }\n this._onLogsSubscriptionId = this._provider.connection.onLogs(this._programId, (logs, ctx) => {\n if (logs.err) {\n return;\n }\n for (const event of this._eventParser.parseLogs(logs.logs)) {\n const allListeners = this._eventListeners.get(event.name);\n if (allListeners) {\n allListeners.forEach((listener) => {\n const listenerCb = this._eventCallbacks.get(listener);\n if (listenerCb) {\n const [, callback] = listenerCb;\n callback(event.data, ctx.slot, logs.signature);\n }\n });\n }\n }\n });\n return listener;\n }\n async removeEventListener(listener) {\n // Get the callback.\n const callback = this._eventCallbacks.get(listener);\n if (!callback) {\n throw new Error(`Event listener ${listener} doesn't exist!`);\n }\n const [eventName] = callback;\n // Get the listeners.\n let listeners = this._eventListeners.get(eventName);\n if (!listeners) {\n throw new Error(`Event listeners don't exist for ${eventName}!`);\n }\n // Update both maps.\n this._eventCallbacks.delete(listener);\n listeners = listeners.filter((l) => l !== listener);\n this._eventListeners.set(eventName, listeners);\n if (listeners.length === 0) {\n this._eventListeners.delete(eventName);\n }\n // Kill the websocket connection if all listeners have been removed.\n if (this._eventCallbacks.size === 0) {\n if (this._eventListeners.size !== 0) {\n throw new Error(`Expected event listeners size to be 0 but got ${this._eventListeners.size}`);\n }\n if (this._onLogsSubscriptionId !== undefined) {\n await this._provider.connection.removeOnLogsListener(this._onLogsSubscriptionId);\n this._onLogsSubscriptionId = undefined;\n }\n }\n }\n}\nclass EventParser {\n constructor(programId, coder) {\n this.coder = coder;\n this.programId = programId;\n }\n // Each log given, represents an array of messages emitted by\n // a single transaction, which can execute many different programs across\n // CPI boundaries. However, the subscription is only interested in the\n // events emitted by *this* program. In achieving this, we keep track of the\n // program execution context by parsing each log and looking for a CPI\n // `invoke` call. If one exists, we know a new program is executing. So we\n // push the programId onto a stack and switch the program context. This\n // allows us to track, for a given log, which program was executing during\n // its emission, thereby allowing us to know if a given log event was\n // emitted by *this* program. If it was, then we parse the raw string and\n // emit the event if the string matches the event being subscribed to.\n *parseLogs(logs, errorOnDecodeFailure = false) {\n const logScanner = new LogScanner(logs);\n const execution = new ExecutionContext();\n let log = logScanner.next();\n while (log !== null) {\n let [event, newProgram, didPop] = this.handleLog(execution, log, errorOnDecodeFailure);\n if (event) {\n yield event;\n }\n if (newProgram) {\n execution.push(newProgram);\n }\n if (didPop) {\n execution.pop();\n }\n log = logScanner.next();\n }\n }\n // Main log handler. Returns a three element array of the event, the\n // next program that was invoked for CPI, and a boolean indicating if\n // a program has completed execution (and thus should be popped off the\n // execution stack).\n handleLog(execution, log, errorOnDecodeFailure) {\n // Executing program is this program.\n if (execution.stack.length > 0 &&\n execution.program() === this.programId.toString()) {\n return this.handleProgramLog(log, errorOnDecodeFailure);\n }\n // Executing program is not this program.\n else {\n return [null, ...this.handleSystemLog(log)];\n }\n }\n // Handles logs from *this* program.\n handleProgramLog(log, errorOnDecodeFailure) {\n // This is a `msg!` log or a `sol_log_data` log.\n if (log.startsWith(PROGRAM_LOG) || log.startsWith(PROGRAM_DATA)) {\n const logStr = log.startsWith(PROGRAM_LOG)\n ? log.slice(PROGRAM_LOG_START_INDEX)\n : log.slice(PROGRAM_DATA_START_INDEX);\n const event = this.coder.events.decode(logStr);\n if (errorOnDecodeFailure && event === null) {\n throw new Error(`Unable to decode event ${logStr}`);\n }\n return [event, null, false];\n }\n // System log.\n else {\n return [null, ...this.handleSystemLog(log)];\n }\n }\n // Handles logs when the current program being executing is *not* this.\n handleSystemLog(log) {\n // System component.\n const logStart = log.split(\":\")[0];\n // Did the program finish executing?\n if (logStart.match(/^Program (.*) success/g) !== null) {\n return [null, true];\n // Recursive call.\n }\n else if (logStart.startsWith(`Program ${this.programId.toString()} invoke`)) {\n return [this.programId.toString(), false];\n }\n // CPI call.\n else if (logStart.includes(\"invoke\")) {\n return [\"cpi\", false]; // Any string will do.\n }\n else {\n return [null, false];\n }\n }\n}\n// Stack frame execution context, allowing one to track what program is\n// executing for a given log.\nclass ExecutionContext {\n constructor() {\n this.stack = [];\n }\n program() {\n if (!this.stack.length) {\n throw new Error(\"Expected the stack to have elements\");\n }\n return this.stack[this.stack.length - 1];\n }\n push(newProgram) {\n this.stack.push(newProgram);\n }\n pop() {\n if (!this.stack.length) {\n throw new Error(\"Expected the stack to have elements\");\n }\n this.stack.pop();\n }\n}\nclass LogScanner {\n constructor(logs) {\n this.logs = logs;\n }\n next() {\n if (this.logs.length === 0) {\n return null;\n }\n let l = this.logs[0];\n this.logs = this.logs.slice(1);\n return l;\n }\n}\n\nclass SimulateFactory {\n static build(idlIx, txFn, idlErrors, provider, coder, programId, idl) {\n const simulate = async (...args) => {\n var _a;\n const tx = txFn(...args);\n const [, ctx] = splitArgsAndCtx(idlIx, [...args]);\n let resp = undefined;\n if (provider.simulate === undefined) {\n throw new Error(\"This function requires 'Provider.simulate' to be implemented.\");\n }\n try {\n resp = await provider.simulate(tx, ctx.signers, (_a = ctx.options) === null || _a === void 0 ? void 0 : _a.commitment);\n }\n catch (err) {\n throw translateError(err, idlErrors);\n }\n if (resp === undefined) {\n throw new Error(\"Unable to simulate transaction\");\n }\n const logs = resp.logs;\n if (!logs) {\n throw new Error(\"Simulated logs not found\");\n }\n const events = [];\n if (idl.events) {\n let parser = new EventParser(programId, coder);\n for (const event of parser.parseLogs(logs)) {\n events.push(event);\n }\n }\n return { events, raw: logs };\n };\n return simulate;\n }\n}\n\nfunction uint64(property) {\n return new WrappedLayout(blob(8), (b) => u64.fromBuffer(b), (n) => n.toBuffer(), property);\n}\nfunction publicKey(property) {\n return new WrappedLayout(blob(32), (b) => new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(b), (key) => key.toBuffer(), property);\n}\nfunction coption(layout, property) {\n return new COptionLayout(layout, property);\n}\nclass WrappedLayout extends Layout_2 {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nclass COptionLayout extends Layout_2 {\n constructor(layout, property) {\n super(-1, property);\n this.layout = layout;\n this.discriminator = u32();\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.layout.span + this.discriminator.encode(0, b, offset);\n }\n this.discriminator.encode(1, b, offset);\n return this.layout.encode(src, b, offset + 4) + 4;\n }\n decode(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return null;\n }\n else if (discriminator === 1) {\n return this.layout.decode(b, offset + 4);\n }\n throw new Error(\"Invalid coption \" + this.layout.property);\n }\n getSpan(b, offset = 0) {\n return this.layout.getSpan(b, offset + 4) + 4;\n }\n}\nclass u64 extends (bn_js__WEBPACK_IMPORTED_MODULE_2___default()) {\n /**\n * Convert to Buffer representation\n */\n toBuffer() {\n const a = super.toArray().reverse();\n const b = Buffer.from(a);\n if (b.length === 8) {\n return b;\n }\n if (b.length >= 8) {\n throw new Error(\"u64 too large\");\n }\n const zeroPad = Buffer.alloc(8);\n b.copy(zeroPad);\n return zeroPad;\n }\n /**\n * Construct a u64 from Buffer representation\n */\n static fromBuffer(buffer) {\n if (buffer.length !== 8) {\n throw new Error(`Invalid buffer length: ${buffer.length}`);\n }\n return new u64([...buffer]\n .reverse()\n .map((i) => `00${i.toString(16)}`.slice(-2))\n .join(\"\"), 16);\n }\n}\nconst TOKEN_ACCOUNT_LAYOUT = struct([\n publicKey(\"mint\"),\n publicKey(\"owner\"),\n uint64(\"amount\"),\n coption(publicKey(), \"delegate\"),\n ((p) => {\n const U = union(u8(\"discriminator\"), null, p);\n U.addVariant(0, struct([]), \"uninitialized\");\n U.addVariant(1, struct([]), \"initialized\");\n U.addVariant(2, struct([]), \"frozen\");\n return U;\n })(\"state\"),\n coption(uint64(), \"isNative\"),\n uint64(\"delegatedAmount\"),\n coption(publicKey(), \"closeAuthority\"),\n]);\nfunction decodeTokenAccount(b) {\n return TOKEN_ACCOUNT_LAYOUT.decode(b);\n}\n\n// Populates a given accounts context with PDAs and common missing accounts.\nclass AccountsResolver {\n constructor(_args, _accounts, _provider, _programId, _idlIx, _accountNamespace, _idlTypes, _customResolver) {\n this._accounts = _accounts;\n this._provider = _provider;\n this._programId = _programId;\n this._idlIx = _idlIx;\n this._idlTypes = _idlTypes;\n this._customResolver = _customResolver;\n this._args = _args;\n this._accountStore = new AccountStore(_provider, _accountNamespace, this._programId);\n }\n args(_args) {\n this._args = _args;\n }\n // Note: We serially resolve PDAs one by one rather than doing them\n // in parallel because there can be dependencies between\n // addresses. That is, one PDA can be used as a seed in another.\n async resolve() {\n await this.resolveConst(this._idlIx.accounts);\n this._resolveEventCpi(this._idlIx.accounts);\n // Auto populate pdas and relations until we stop finding new accounts\n while ((await this.resolvePdas(this._idlIx.accounts)) +\n (await this.resolveRelations(this._idlIx.accounts)) +\n (await this.resolveCustom()) >\n 0) { }\n }\n async resolveCustom() {\n if (this._customResolver) {\n const { accounts, resolved } = await this._customResolver({\n args: this._args,\n accounts: this._accounts,\n provider: this._provider,\n programId: this._programId,\n idlIx: this._idlIx,\n });\n this._accounts = accounts;\n return resolved;\n }\n return 0;\n }\n resolveOptionalsHelper(partialAccounts, accountItems) {\n const nestedAccountsGeneric = {};\n // Looping through accountItem array instead of on partialAccounts, so\n // we only traverse array once\n for (const accountItem of accountItems) {\n const accountName = accountItem.name;\n const partialAccount = partialAccounts[accountName];\n // Skip if the account isn't included (thus would be undefined)\n if (partialAccount === undefined)\n continue;\n if (isPartialAccounts(partialAccount)) {\n // is compound accounts, recurse one level deeper\n if (isIdlAccounts(accountItem)) {\n nestedAccountsGeneric[accountName] = this.resolveOptionalsHelper(partialAccount, accountItem[\"accounts\"]);\n }\n else {\n // Here we try our best to recover gracefully. If there are optionals we can't check, we will fail then.\n nestedAccountsGeneric[accountName] = flattenPartialAccounts(partialAccount, true);\n }\n }\n else {\n // if not compound accounts, do null/optional check and proceed\n if (partialAccount !== null) {\n nestedAccountsGeneric[accountName] = translateAddress(partialAccount);\n }\n else if (accountItem[\"isOptional\"]) {\n nestedAccountsGeneric[accountName] = this._programId;\n }\n }\n }\n return nestedAccountsGeneric;\n }\n resolveOptionals(accounts) {\n Object.assign(this._accounts, this.resolveOptionalsHelper(accounts, this._idlIx.accounts));\n }\n get(path) {\n // Only return if pubkey\n const ret = path.reduce((acc, subPath) => acc && acc[subPath], this._accounts);\n if (ret && ret.toBase58) {\n return ret;\n }\n }\n set(path, value) {\n let curr = this._accounts;\n path.forEach((p, idx) => {\n const isLast = idx == path.length - 1;\n if (isLast) {\n curr[p] = value;\n }\n curr[p] = curr[p] || {};\n curr = curr[p];\n });\n }\n async resolveConst(accounts, path = []) {\n for (let k = 0; k < accounts.length; k += 1) {\n const accountDescOrAccounts = accounts[k];\n const subAccounts = accountDescOrAccounts.accounts;\n if (subAccounts) {\n await this.resolveConst(subAccounts, [\n ...path,\n camelcase__WEBPACK_IMPORTED_MODULE_4___default()(accountDescOrAccounts.name),\n ]);\n }\n const accountDesc = accountDescOrAccounts;\n const accountDescName = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(accountDescOrAccounts.name);\n // Signers default to the provider.\n if (accountDesc.isSigner && !this.get([...path, accountDescName])) {\n // @ts-expect-error\n if (this._provider.wallet === undefined) {\n throw new Error(\"This function requires the Provider interface implementor to have a 'wallet' field.\");\n }\n // @ts-expect-error\n this.set([...path, accountDescName], this._provider.wallet.publicKey);\n }\n // Common accounts are auto populated with magic names by convention.\n if (Reflect.has(AccountsResolver.CONST_ACCOUNTS, accountDescName) &&\n !this.get([...path, accountDescName])) {\n this.set([...path, accountDescName], AccountsResolver.CONST_ACCOUNTS[accountDescName]);\n }\n }\n }\n /**\n * Resolve event CPI accounts `eventAuthority` and `program`.\n *\n * Accounts will only be resolved if they are declared next to each other to\n * reduce the chance of name collision.\n */\n _resolveEventCpi(accounts, path = []) {\n for (const i in accounts) {\n const accountDescOrAccounts = accounts[i];\n const subAccounts = accountDescOrAccounts.accounts;\n if (subAccounts) {\n this._resolveEventCpi(subAccounts, [\n ...path,\n camelcase__WEBPACK_IMPORTED_MODULE_4___default()(accountDescOrAccounts.name),\n ]);\n }\n // Validate next index exists\n const nextIndex = +i + 1;\n if (nextIndex === accounts.length)\n return;\n const currentName = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(accounts[i].name);\n const nextName = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(accounts[nextIndex].name);\n // Populate event CPI accounts if they exist\n if (currentName === \"eventAuthority\" && nextName === \"program\") {\n const currentPath = [...path, currentName];\n const nextPath = [...path, nextName];\n if (!this.get(currentPath)) {\n this.set(currentPath, _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.findProgramAddressSync([Buffer.from(\"__event_authority\")], this._programId)[0]);\n }\n if (!this.get(nextPath)) {\n this.set(nextPath, this._programId);\n }\n return;\n }\n }\n }\n async resolvePdas(accounts, path = []) {\n let found = 0;\n for (let k = 0; k < accounts.length; k += 1) {\n const accountDesc = accounts[k];\n const subAccounts = accountDesc.accounts;\n if (subAccounts) {\n found += await this.resolvePdas(subAccounts, [\n ...path,\n camelcase__WEBPACK_IMPORTED_MODULE_4___default()(accountDesc.name),\n ]);\n }\n const accountDescCasted = accountDesc;\n const accountDescName = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(accountDesc.name);\n // PDA derived from IDL seeds.\n if (accountDescCasted.pda &&\n accountDescCasted.pda.seeds.length > 0 &&\n !this.get([...path, accountDescName])) {\n if (Boolean(await this.autoPopulatePda(accountDescCasted, path))) {\n found += 1;\n }\n }\n }\n return found;\n }\n async resolveRelations(accounts, path = []) {\n let found = 0;\n for (let k = 0; k < accounts.length; k += 1) {\n const accountDesc = accounts[k];\n const subAccounts = accountDesc.accounts;\n if (subAccounts) {\n found += await this.resolveRelations(subAccounts, [\n ...path,\n camelcase__WEBPACK_IMPORTED_MODULE_4___default()(accountDesc.name),\n ]);\n }\n const relations = accountDesc.relations || [];\n const accountDescName = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(accountDesc.name);\n const newPath = [...path, accountDescName];\n // If we have this account and there's some missing accounts that are relations to this account, fetch them\n const accountKey = this.get(newPath);\n if (accountKey) {\n const matching = relations.filter((rel) => !this.get([...path, camelcase__WEBPACK_IMPORTED_MODULE_4___default()(rel)]));\n found += matching.length;\n if (matching.length > 0) {\n const account = await this._accountStore.fetchAccount({\n publicKey: accountKey,\n });\n await Promise.all(matching.map(async (rel) => {\n const relName = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(rel);\n this.set([...path, relName], account[relName]);\n return account[relName];\n }));\n }\n }\n }\n return found;\n }\n async autoPopulatePda(accountDesc, path = []) {\n if (!accountDesc.pda || !accountDesc.pda.seeds)\n throw new Error(\"Must have seeds\");\n const seeds = await Promise.all(accountDesc.pda.seeds.map((seedDesc) => this.toBuffer(seedDesc, path)));\n if (seeds.some((seed) => typeof seed == \"undefined\")) {\n return;\n }\n const programId = await this.parseProgramId(accountDesc, path);\n if (!programId) {\n return;\n }\n const [pubkey] = await _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey.findProgramAddress(seeds, programId);\n this.set([...path, camelcase__WEBPACK_IMPORTED_MODULE_4___default()(accountDesc.name)], pubkey);\n }\n async parseProgramId(accountDesc, path = []) {\n var _a;\n if (!((_a = accountDesc.pda) === null || _a === void 0 ? void 0 : _a.programId)) {\n return this._programId;\n }\n switch (accountDesc.pda.programId.kind) {\n case \"const\":\n return new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(this.toBufferConst(accountDesc.pda.programId.value));\n case \"arg\":\n return this.argValue(accountDesc.pda.programId);\n case \"account\":\n return await this.accountValue(accountDesc.pda.programId, path);\n default:\n throw new Error(`Unexpected program seed kind: ${accountDesc.pda.programId.kind}`);\n }\n }\n async toBuffer(seedDesc, path = []) {\n switch (seedDesc.kind) {\n case \"const\":\n return this.toBufferConst(seedDesc);\n case \"arg\":\n return await this.toBufferArg(seedDesc);\n case \"account\":\n return await this.toBufferAccount(seedDesc, path);\n default:\n throw new Error(`Unexpected seed kind: ${seedDesc.kind}`);\n }\n }\n /**\n * Recursively get the type at some path of either a primitive or a user defined struct.\n */\n getType(type, path = []) {\n if (path.length > 0 && type.defined) {\n const subType = this._idlTypes.find((t) => t.name === type.defined);\n if (!subType) {\n throw new Error(`Cannot find type ${type.defined}`);\n }\n const structType = subType.type; // enum not supported yet\n const field = structType.fields.find((field) => field.name === path[0]);\n return this.getType(field.type, path.slice(1));\n }\n return type;\n }\n toBufferConst(seedDesc) {\n return this.toBufferValue(this.getType(seedDesc.type, (seedDesc.path || \"\").split(\".\").slice(1)), seedDesc.value);\n }\n async toBufferArg(seedDesc) {\n const argValue = this.argValue(seedDesc);\n if (typeof argValue === \"undefined\") {\n return;\n }\n return this.toBufferValue(this.getType(seedDesc.type, (seedDesc.path || \"\").split(\".\").slice(1)), argValue);\n }\n argValue(seedDesc) {\n const split = seedDesc.path.split(\".\");\n const seedArgName = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(split[0]);\n const idlArgPosition = this._idlIx.args.findIndex((argDesc) => argDesc.name === seedArgName);\n if (idlArgPosition === -1) {\n throw new Error(`Unable to find argument for seed: ${seedArgName}`);\n }\n return split\n .slice(1)\n .reduce((curr, path) => (curr || {})[path], this._args[idlArgPosition]);\n }\n async toBufferAccount(seedDesc, path = []) {\n const accountValue = await this.accountValue(seedDesc, path);\n if (!accountValue) {\n return;\n }\n return this.toBufferValue(seedDesc.type, accountValue);\n }\n async accountValue(seedDesc, path = []) {\n const pathComponents = seedDesc.path.split(\".\");\n const fieldName = pathComponents[0];\n const fieldPubkey = this.get([...path, camelcase__WEBPACK_IMPORTED_MODULE_4___default()(fieldName)]);\n if (fieldPubkey === null) {\n throw new Error(`fieldPubkey is null`);\n }\n // The seed is a pubkey of the account.\n if (pathComponents.length === 1) {\n return fieldPubkey;\n }\n // The key is account data.\n //\n // Fetch and deserialize it.\n const account = await this._accountStore.fetchAccount({\n publicKey: fieldPubkey,\n name: seedDesc.account,\n });\n // Dereference all fields in the path to get the field value\n // used in the seed.\n const fieldValue = this.parseAccountValue(account, pathComponents.slice(1));\n return fieldValue;\n }\n parseAccountValue(account, path) {\n let accountField;\n while (path.length > 0) {\n accountField = account[camelcase__WEBPACK_IMPORTED_MODULE_4___default()(path[0])];\n path = path.slice(1);\n }\n return accountField;\n }\n // Converts the given idl valaue into a Buffer. The values here must be\n // primitives. E.g. no structs.\n //\n // TODO: add more types here as needed.\n toBufferValue(type, value) {\n switch (type) {\n case \"u8\":\n return Buffer.from([value]);\n case \"u16\":\n let b = Buffer.alloc(2);\n b.writeUInt16LE(value);\n return b;\n case \"u32\":\n let buf = Buffer.alloc(4);\n buf.writeUInt32LE(value);\n return buf;\n case \"u64\":\n let bU64 = Buffer.alloc(8);\n bU64.writeBigUInt64LE(BigInt(value));\n return bU64;\n case \"string\":\n return Buffer.from(encode$2(value));\n case \"publicKey\":\n return value.toBuffer();\n default:\n if (type.array) {\n return Buffer.from(value);\n }\n throw new Error(`Unexpected seed type: ${type}`);\n }\n }\n}\nAccountsResolver.CONST_ACCOUNTS = {\n associatedTokenProgram: ASSOCIATED_PROGRAM_ID,\n rent: _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SYSVAR_RENT_PUBKEY,\n systemProgram: _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SystemProgram.programId,\n tokenProgram: TOKEN_PROGRAM_ID,\n clock: _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.SYSVAR_CLOCK_PUBKEY,\n};\n// TODO: this should be configureable to avoid unnecessary requests.\nclass AccountStore {\n // todo: don't use the progrma use the account namespace.\n constructor(_provider, _accounts, _programId) {\n this._provider = _provider;\n this._programId = _programId;\n this._cache = new Map();\n this._idls = {};\n this._idls[_programId.toBase58()] = _accounts;\n }\n async ensureIdl(programId) {\n if (!this._idls[programId.toBase58()]) {\n const idl = await Program.fetchIdl(programId, this._provider);\n if (idl) {\n const program = new Program(idl, programId, this._provider);\n this._idls[programId.toBase58()] = program.account;\n }\n }\n return this._idls[programId.toBase58()];\n }\n async fetchAccount({ publicKey, name, programId = this._programId, }) {\n const address = publicKey.toString();\n if (!this._cache.has(address)) {\n if (name === \"TokenAccount\") {\n const accountInfo = await this._provider.connection.getAccountInfo(publicKey);\n if (accountInfo === null) {\n throw new Error(`invalid account info for ${address}`);\n }\n const data = decodeTokenAccount(accountInfo.data);\n this._cache.set(address, data);\n }\n else if (name) {\n const accounts = await this.ensureIdl(programId);\n if (accounts) {\n const accountFetcher = accounts[camelcase__WEBPACK_IMPORTED_MODULE_4___default()(name)];\n if (accountFetcher) {\n const account = await accountFetcher.fetch(publicKey);\n this._cache.set(address, account);\n }\n }\n }\n else {\n const account = await this._provider.connection.getAccountInfo(publicKey);\n if (account === null) {\n throw new Error(`invalid account info for ${address}`);\n }\n const data = account.data;\n const accounts = await this.ensureIdl(account.owner);\n if (accounts) {\n const firstAccountLayout = Object.values(accounts)[0];\n if (!firstAccountLayout) {\n throw new Error(\"No accounts for this program\");\n }\n const result = firstAccountLayout.coder.accounts.decodeAny(data);\n this._cache.set(address, result);\n }\n }\n }\n return this._cache.get(address);\n }\n}\n\nclass MethodsBuilderFactory {\n static build(provider, programId, idlIx, ixFn, txFn, rpcFn, simulateFn, viewFn, accountNamespace, idlTypes, customResolver) {\n return (...args) => new MethodsBuilder(args, ixFn, txFn, rpcFn, simulateFn, viewFn, provider, programId, idlIx, accountNamespace, idlTypes, customResolver);\n }\n}\nfunction isPartialAccounts(partialAccount) {\n return (typeof partialAccount === \"object\" &&\n partialAccount !== null &&\n !(\"_bn\" in partialAccount) // Ensures not a pubkey\n );\n}\nfunction flattenPartialAccounts(partialAccounts, throwOnNull) {\n const toReturn = {};\n for (const accountName in partialAccounts) {\n const account = partialAccounts[accountName];\n if (account === null) {\n if (throwOnNull)\n throw new Error(\"Failed to resolve optionals due to IDL type mismatch with input accounts!\");\n continue;\n }\n toReturn[accountName] = isPartialAccounts(account)\n ? flattenPartialAccounts(account, true)\n : translateAddress(account);\n }\n return toReturn;\n}\nclass MethodsBuilder {\n constructor(_args, _ixFn, _txFn, _rpcFn, _simulateFn, _viewFn, _provider, _programId, _idlIx, _accountNamespace, _idlTypes, _customResolver) {\n this._ixFn = _ixFn;\n this._txFn = _txFn;\n this._rpcFn = _rpcFn;\n this._simulateFn = _simulateFn;\n this._viewFn = _viewFn;\n this._programId = _programId;\n this._accounts = {};\n this._remainingAccounts = [];\n this._signers = [];\n this._preInstructions = [];\n this._postInstructions = [];\n this._autoResolveAccounts = true;\n this._args = _args;\n this._accountsResolver = new AccountsResolver(_args, this._accounts, _provider, _programId, _idlIx, _accountNamespace, _idlTypes, _customResolver);\n }\n args(_args) {\n this._args = _args;\n this._accountsResolver.args(_args);\n }\n async pubkeys() {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n return this._accounts;\n }\n accounts(accounts) {\n this._autoResolveAccounts = true;\n this._accountsResolver.resolveOptionals(accounts);\n return this;\n }\n accountsStrict(accounts) {\n this._autoResolveAccounts = false;\n this._accountsResolver.resolveOptionals(accounts);\n return this;\n }\n signers(signers) {\n this._signers = this._signers.concat(signers);\n return this;\n }\n remainingAccounts(accounts) {\n this._remainingAccounts = this._remainingAccounts.concat(accounts);\n return this;\n }\n preInstructions(ixs) {\n this._preInstructions = this._preInstructions.concat(ixs);\n return this;\n }\n postInstructions(ixs) {\n this._postInstructions = this._postInstructions.concat(ixs);\n return this;\n }\n async rpc(options) {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._rpcFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options: options,\n });\n }\n async rpcAndKeys(options) {\n const pubkeys = await this.pubkeys();\n return {\n pubkeys,\n signature: await this.rpc(options),\n };\n }\n async view(options) {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n if (!this._viewFn) {\n throw new Error(\"Method does not support views\");\n }\n // @ts-ignore\n return this._viewFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options: options,\n });\n }\n async simulate(options) {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._simulateFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n options: options,\n });\n }\n async instruction() {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._ixFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n });\n }\n /**\n * Convenient shortcut to get instructions and pubkeys via\n * const { pubkeys, instructions } = await prepare();\n */\n async prepare() {\n return {\n instruction: await this.instruction(),\n pubkeys: await this.pubkeys(),\n signers: await this._signers,\n };\n }\n async transaction() {\n if (this._autoResolveAccounts) {\n await this._accountsResolver.resolve();\n }\n // @ts-ignore\n return this._txFn(...this._args, {\n accounts: this._accounts,\n signers: this._signers,\n remainingAccounts: this._remainingAccounts,\n preInstructions: this._preInstructions,\n postInstructions: this._postInstructions,\n });\n }\n}\n\nclass ViewFactory {\n static build(programId, idlIx, simulateFn, idl) {\n const isMut = idlIx.accounts.find((a) => a.isMut);\n const hasReturn = !!idlIx.returns;\n if (isMut || !hasReturn)\n return;\n const view = async (...args) => {\n var _a, _b;\n let simulationResult = await simulateFn(...args);\n const returnPrefix = `Program return: ${programId} `;\n let returnLog = simulationResult.raw.find((l) => l.startsWith(returnPrefix));\n if (!returnLog) {\n throw new Error(\"View expected return log\");\n }\n let returnData = decode(returnLog.slice(returnPrefix.length));\n let returnType = idlIx.returns;\n if (!returnType) {\n throw new Error(\"View expected return type\");\n }\n const coder = IdlCoder.fieldLayout({ type: returnType }, Array.from([...((_a = idl.accounts) !== null && _a !== void 0 ? _a : []), ...((_b = idl.types) !== null && _b !== void 0 ? _b : [])]));\n return coder.decode(returnData);\n };\n return view;\n }\n}\n\nclass NamespaceFactory {\n /**\n * Generates all namespaces for a given program.\n */\n static build(idl, coder, programId, provider, getCustomResolver) {\n const rpc = {};\n const instruction = {};\n const transaction = {};\n const simulate = {};\n const methods = {};\n const view = {};\n const idlErrors = parseIdlErrors(idl);\n const account = idl.accounts\n ? AccountFactory.build(idl, coder, programId, provider)\n : {};\n idl.instructions.forEach((idlIx) => {\n const ixItem = InstructionNamespaceFactory.build(idlIx, (ixName, ix) => coder.instruction.encode(ixName, ix), programId);\n const txItem = TransactionFactory.build(idlIx, ixItem);\n const rpcItem = RpcFactory.build(idlIx, txItem, idlErrors, provider);\n const simulateItem = SimulateFactory.build(idlIx, txItem, idlErrors, provider, coder, programId, idl);\n const viewItem = ViewFactory.build(programId, idlIx, simulateItem, idl);\n const methodItem = MethodsBuilderFactory.build(provider, programId, idlIx, ixItem, txItem, rpcItem, simulateItem, viewItem, account, idl.types || [], getCustomResolver && getCustomResolver(idlIx));\n const name = camelcase__WEBPACK_IMPORTED_MODULE_4___default()(idlIx.name);\n instruction[name] = ixItem;\n transaction[name] = txItem;\n rpc[name] = rpcItem;\n simulate[name] = simulateItem;\n methods[name] = methodItem;\n if (viewItem) {\n view[name] = viewItem;\n }\n });\n return [\n rpc,\n instruction,\n transaction,\n account,\n simulate,\n methods,\n view,\n ];\n }\n}\n\n/**\n * ## Program\n *\n * Program provides the IDL deserialized client representation of an Anchor\n * program.\n *\n * This API is the one stop shop for all things related to communicating with\n * on-chain programs. Among other things, one can send transactions, fetch\n * deserialized accounts, decode instruction data, subscribe to account\n * changes, and listen to events.\n *\n * In addition to field accessors and methods, the object provides a set of\n * dynamically generated properties, also known as namespaces, that\n * map one-to-one to program methods and accounts. These namespaces generally\n * can be used as follows:\n *\n * ## Usage\n *\n * ```javascript\n * program..\n * ```\n *\n * API specifics are namespace dependent. The examples used in the documentation\n * below will refer to the two counter examples found\n * [here](https://github.com/coral-xyz/anchor#examples).\n */\nclass Program {\n /**\n * Address of the program.\n */\n get programId() {\n return this._programId;\n }\n /**\n * IDL defining the program's interface.\n */\n get idl() {\n return this._idl;\n }\n /**\n * Coder for serializing requests.\n */\n get coder() {\n return this._coder;\n }\n /**\n * Wallet and network provider.\n */\n get provider() {\n return this._provider;\n }\n /**\n * @param idl The interface definition.\n * @param programId The on-chain address of the program.\n * @param provider The network and wallet context to use. If not provided\n * then uses [[getProvider]].\n * @param getCustomResolver A function that returns a custom account resolver\n * for the given instruction. This is useful for resolving\n * public keys of missing accounts when building instructions\n */\n constructor(idl, programId, provider, coder, getCustomResolver) {\n programId = translateAddress(programId);\n if (!provider) {\n provider = getProvider();\n }\n // Fields.\n this._idl = idl;\n this._provider = provider;\n this._programId = programId;\n this._coder = coder !== null && coder !== void 0 ? coder : new BorshCoder(idl);\n this._events = new EventManager(this._programId, provider, this._coder);\n // Dynamic namespaces.\n const [rpc, instruction, transaction, account, simulate, methods, views] = NamespaceFactory.build(idl, this._coder, programId, provider, getCustomResolver !== null && getCustomResolver !== void 0 ? getCustomResolver : (() => undefined));\n this.rpc = rpc;\n this.instruction = instruction;\n this.transaction = transaction;\n this.account = account;\n this.simulate = simulate;\n this.methods = methods;\n this.views = views;\n }\n /**\n * Generates a Program client by fetching the IDL from the network.\n *\n * In order to use this method, an IDL must have been previously initialized\n * via the anchor CLI's `anchor idl init` command.\n *\n * @param programId The on-chain address of the program.\n * @param provider The network and wallet context.\n */\n static async at(address, provider) {\n const programId = translateAddress(address);\n const idl = await Program.fetchIdl(programId, provider);\n if (!idl) {\n throw new Error(`IDL not found for program: ${address.toString()}`);\n }\n return new Program(idl, programId, provider);\n }\n /**\n * Fetches an idl from the blockchain.\n *\n * In order to use this method, an IDL must have been previously initialized\n * via the anchor CLI's `anchor idl init` command.\n *\n * @param programId The on-chain address of the program.\n * @param provider The network and wallet context.\n */\n static async fetchIdl(address, provider) {\n provider = provider !== null && provider !== void 0 ? provider : getProvider();\n const programId = translateAddress(address);\n const idlAddr = await idlAddress(programId);\n const accountInfo = await provider.connection.getAccountInfo(idlAddr);\n if (!accountInfo) {\n return null;\n }\n // Chop off account discriminator.\n let idlAccount = decodeIdlAccount(accountInfo.data.slice(8));\n const inflatedIdl = (0,pako__WEBPACK_IMPORTED_MODULE_6__/* .inflate */ .rr)(idlAccount.data);\n return JSON.parse(decode$2(inflatedIdl));\n }\n /**\n * Invokes the given callback every time the given event is emitted.\n *\n * @param eventName The PascalCase name of the event, provided by the IDL.\n * @param callback The function to invoke whenever the event is emitted from\n * program logs.\n */\n addEventListener(eventName, callback) {\n return this._events.addEventListener(eventName, callback);\n }\n /**\n * Unsubscribes from the given eventName.\n */\n async removeEventListener(listener) {\n return await this._events.removeEventListener(listener);\n }\n}\n\nconst SYSTEM_PROGRAM_ID = new _solana_web3_js__WEBPACK_IMPORTED_MODULE_1__.PublicKey(\"11111111111111111111111111111111\");\nfunction program(provider) {\n return new Program(IDL, SYSTEM_PROGRAM_ID, provider, coder());\n}\nfunction coder() {\n return new SystemCoder(IDL);\n}\nconst IDL = {\n version: \"0.1.0\",\n name: \"system_program\",\n instructions: [\n {\n name: \"createAccount\",\n accounts: [\n {\n name: \"from\",\n isMut: true,\n isSigner: true,\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"assign\",\n accounts: [\n {\n name: \"pubkey\",\n isMut: true,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"transfer\",\n accounts: [\n {\n name: \"from\",\n isMut: true,\n isSigner: true,\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: false,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n ],\n },\n {\n name: \"createAccountWithSeed\",\n accounts: [\n {\n name: \"from\",\n isMut: true,\n isSigner: true,\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"base\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"publicKey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"advanceNonceAccount\",\n accounts: [\n {\n name: \"nonce\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"recentBlockhashes\",\n isMut: false,\n isSigner: false,\n },\n {\n name: \"authorized\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"withdrawNonceAccount\",\n accounts: [\n {\n name: \"nonce\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"recentBlockhashes\",\n isMut: false,\n isSigner: false,\n },\n {\n name: \"rent\",\n isMut: false,\n isSigner: false,\n },\n {\n name: \"authorized\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n ],\n },\n {\n name: \"initializeNonceAccount\",\n accounts: [\n {\n name: \"nonce\",\n isMut: true,\n isSigner: true,\n },\n {\n name: \"recentBlockhashes\",\n isMut: false,\n isSigner: false,\n },\n {\n name: \"rent\",\n isMut: false,\n isSigner: false,\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"authorizeNonceAccount\",\n accounts: [\n {\n name: \"nonce\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"authorized\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"authorized\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"allocate\",\n accounts: [\n {\n name: \"pubkey\",\n isMut: true,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"space\",\n type: \"u64\",\n },\n ],\n },\n {\n name: \"allocateWithSeed\",\n accounts: [\n {\n name: \"account\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"base\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"publicKey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"space\",\n type: \"u64\",\n },\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"assignWithSeed\",\n accounts: [\n {\n name: \"account\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"base\",\n isMut: false,\n isSigner: true,\n },\n ],\n args: [\n {\n name: \"base\",\n type: \"publicKey\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n {\n name: \"transferWithSeed\",\n accounts: [\n {\n name: \"from\",\n isMut: true,\n isSigner: false,\n },\n {\n name: \"base\",\n isMut: false,\n isSigner: true,\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: false,\n },\n ],\n args: [\n {\n name: \"lamports\",\n type: \"u64\",\n },\n {\n name: \"seed\",\n type: \"string\",\n },\n {\n name: \"owner\",\n type: \"publicKey\",\n },\n ],\n },\n ],\n accounts: [\n {\n name: \"nonce\",\n type: {\n kind: \"struct\",\n fields: [\n {\n name: \"version\",\n type: \"u32\",\n },\n {\n name: \"state\",\n type: \"u32\",\n },\n {\n name: \"authorizedPubkey\",\n type: \"publicKey\",\n },\n {\n name: \"nonce\",\n type: \"publicKey\",\n },\n {\n name: \"feeCalculator\",\n type: {\n defined: \"FeeCalculator\",\n },\n },\n ],\n },\n },\n ],\n types: [\n {\n name: \"FeeCalculator\",\n type: {\n kind: \"struct\",\n fields: [\n {\n name: \"lamportsPerSignature\",\n type: \"u64\",\n },\n ],\n },\n },\n ],\n};\n\nclass Native {\n static system(provider) {\n return program(provider);\n }\n}\n\n\n//# sourceMappingURL=index.js.map\n\n\n/***/ }),\n\n/***/ 1295:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.map = exports.array = exports.rustEnum = exports.str = exports.vecU8 = exports.tagged = exports.vec = exports.bool = exports.option = exports.publicKey = exports.i256 = exports.u256 = exports.i128 = exports.u128 = exports.i64 = exports.u64 = exports.struct = exports.f64 = exports.f32 = exports.i32 = exports.u32 = exports.i16 = exports.u16 = exports.i8 = exports.u8 = void 0;\nconst buffer_layout_1 = __webpack_require__(698);\nconst web3_js_1 = __webpack_require__(6737);\nconst bn_js_1 = __importDefault(__webpack_require__(3550));\nvar buffer_layout_2 = __webpack_require__(698);\nObject.defineProperty(exports, \"u8\", ({ enumerable: true, get: function () { return buffer_layout_2.u8; } }));\nObject.defineProperty(exports, \"i8\", ({ enumerable: true, get: function () { return buffer_layout_2.s8; } }));\nObject.defineProperty(exports, \"u16\", ({ enumerable: true, get: function () { return buffer_layout_2.u16; } }));\nObject.defineProperty(exports, \"i16\", ({ enumerable: true, get: function () { return buffer_layout_2.s16; } }));\nObject.defineProperty(exports, \"u32\", ({ enumerable: true, get: function () { return buffer_layout_2.u32; } }));\nObject.defineProperty(exports, \"i32\", ({ enumerable: true, get: function () { return buffer_layout_2.s32; } }));\nObject.defineProperty(exports, \"f32\", ({ enumerable: true, get: function () { return buffer_layout_2.f32; } }));\nObject.defineProperty(exports, \"f64\", ({ enumerable: true, get: function () { return buffer_layout_2.f64; } }));\nObject.defineProperty(exports, \"struct\", ({ enumerable: true, get: function () { return buffer_layout_2.struct; } }));\nclass BNLayout extends buffer_layout_1.Layout {\n constructor(span, signed, property) {\n super(span, property);\n this.blob = (0, buffer_layout_1.blob)(span);\n this.signed = signed;\n }\n decode(b, offset = 0) {\n const num = new bn_js_1.default(this.blob.decode(b, offset), 10, \"le\");\n if (this.signed) {\n return num.fromTwos(this.span * 8).clone();\n }\n return num;\n }\n encode(src, b, offset = 0) {\n if (this.signed) {\n src = src.toTwos(this.span * 8);\n }\n return this.blob.encode(src.toArrayLike(Buffer, \"le\", this.span), b, offset);\n }\n}\nfunction u64(property) {\n return new BNLayout(8, false, property);\n}\nexports.u64 = u64;\nfunction i64(property) {\n return new BNLayout(8, true, property);\n}\nexports.i64 = i64;\nfunction u128(property) {\n return new BNLayout(16, false, property);\n}\nexports.u128 = u128;\nfunction i128(property) {\n return new BNLayout(16, true, property);\n}\nexports.i128 = i128;\nfunction u256(property) {\n return new BNLayout(32, false, property);\n}\nexports.u256 = u256;\nfunction i256(property) {\n return new BNLayout(32, true, property);\n}\nexports.i256 = i256;\nclass WrappedLayout extends buffer_layout_1.Layout {\n constructor(layout, decoder, encoder, property) {\n super(layout.span, property);\n this.layout = layout;\n this.decoder = decoder;\n this.encoder = encoder;\n }\n decode(b, offset) {\n return this.decoder(this.layout.decode(b, offset));\n }\n encode(src, b, offset) {\n return this.layout.encode(this.encoder(src), b, offset);\n }\n getSpan(b, offset) {\n return this.layout.getSpan(b, offset);\n }\n}\nfunction publicKey(property) {\n return new WrappedLayout((0, buffer_layout_1.blob)(32), (b) => new web3_js_1.PublicKey(b), (key) => key.toBuffer(), property);\n}\nexports.publicKey = publicKey;\nclass OptionLayout extends buffer_layout_1.Layout {\n constructor(layout, property) {\n super(-1, property);\n this.layout = layout;\n this.discriminator = (0, buffer_layout_1.u8)();\n }\n encode(src, b, offset = 0) {\n if (src === null || src === undefined) {\n return this.discriminator.encode(0, b, offset);\n }\n this.discriminator.encode(1, b, offset);\n return this.layout.encode(src, b, offset + 1) + 1;\n }\n decode(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return null;\n }\n else if (discriminator === 1) {\n return this.layout.decode(b, offset + 1);\n }\n throw new Error(\"Invalid option \" + this.property);\n }\n getSpan(b, offset = 0) {\n const discriminator = this.discriminator.decode(b, offset);\n if (discriminator === 0) {\n return 1;\n }\n else if (discriminator === 1) {\n return this.layout.getSpan(b, offset + 1) + 1;\n }\n throw new Error(\"Invalid option \" + this.property);\n }\n}\nfunction option(layout, property) {\n return new OptionLayout(layout, property);\n}\nexports.option = option;\nfunction bool(property) {\n return new WrappedLayout((0, buffer_layout_1.u8)(), decodeBool, encodeBool, property);\n}\nexports.bool = bool;\nfunction decodeBool(value) {\n if (value === 0) {\n return false;\n }\n else if (value === 1) {\n return true;\n }\n throw new Error(\"Invalid bool: \" + value);\n}\nfunction encodeBool(value) {\n return value ? 1 : 0;\n}\nfunction vec(elementLayout, property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.seq)(elementLayout, (0, buffer_layout_1.offset)(length, -length.span), \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, (values) => ({ values }), property);\n}\nexports.vec = vec;\nfunction tagged(tag, layout, property) {\n const wrappedLayout = (0, buffer_layout_1.struct)([\n u64(\"tag\"),\n layout.replicate(\"data\"),\n ]);\n function decodeTag({ tag: receivedTag, data }) {\n if (!receivedTag.eq(tag)) {\n throw new Error(\"Invalid tag, expected: \" +\n tag.toString(\"hex\") +\n \", got: \" +\n receivedTag.toString(\"hex\"));\n }\n return data;\n }\n return new WrappedLayout(wrappedLayout, decodeTag, (data) => ({ tag, data }), property);\n}\nexports.tagged = tagged;\nfunction vecU8(property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.blob)((0, buffer_layout_1.offset)(length, -length.span), \"data\"),\n ]);\n return new WrappedLayout(layout, ({ data }) => data, (data) => ({ data }), property);\n}\nexports.vecU8 = vecU8;\nfunction str(property) {\n return new WrappedLayout(vecU8(), (data) => data.toString(\"utf-8\"), (s) => Buffer.from(s, \"utf-8\"), property);\n}\nexports.str = str;\nfunction rustEnum(variants, property, discriminant) {\n const unionLayout = (0, buffer_layout_1.union)(discriminant !== null && discriminant !== void 0 ? discriminant : (0, buffer_layout_1.u8)(), property);\n variants.forEach((variant, index) => unionLayout.addVariant(index, variant, variant.property));\n return unionLayout;\n}\nexports.rustEnum = rustEnum;\nfunction array(elementLayout, length, property) {\n const layout = (0, buffer_layout_1.struct)([\n (0, buffer_layout_1.seq)(elementLayout, length, \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => values, (values) => ({ values }), property);\n}\nexports.array = array;\nclass MapEntryLayout extends buffer_layout_1.Layout {\n constructor(keyLayout, valueLayout, property) {\n super(keyLayout.span + valueLayout.span, property);\n this.keyLayout = keyLayout;\n this.valueLayout = valueLayout;\n }\n decode(b, offset) {\n offset = offset || 0;\n const key = this.keyLayout.decode(b, offset);\n const value = this.valueLayout.decode(b, offset + this.keyLayout.getSpan(b, offset));\n return [key, value];\n }\n encode(src, b, offset) {\n offset = offset || 0;\n const keyBytes = this.keyLayout.encode(src[0], b, offset);\n const valueBytes = this.valueLayout.encode(src[1], b, offset + keyBytes);\n return keyBytes + valueBytes;\n }\n getSpan(b, offset) {\n return (this.keyLayout.getSpan(b, offset) + this.valueLayout.getSpan(b, offset));\n }\n}\nfunction map(keyLayout, valueLayout, property) {\n const length = (0, buffer_layout_1.u32)(\"length\");\n const layout = (0, buffer_layout_1.struct)([\n length,\n (0, buffer_layout_1.seq)(new MapEntryLayout(keyLayout, valueLayout), (0, buffer_layout_1.offset)(length, -length.span), \"values\"),\n ]);\n return new WrappedLayout(layout, ({ values }) => new Map(values), (values) => ({ values: Array.from(values.entries()) }), property);\n}\nexports.map = map;\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 6486:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar basex = __webpack_require__(8162)\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n\n\n/***/ }),\n\n/***/ 7370:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nconst UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\n\tfor (let i = 0; i < string.length; i++) {\n\t\tconst character = string[i];\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i) + '-' + string.slice(i);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\ti++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replace(LEADING_CAPITAL, m1 => toLowerCase(m1));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier))\n\t\t.replace(NUMBERS_AND_IDENTIFIER, m => toUpperCase(m));\n};\n\nconst camelCase = (input, options) => {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false ?\n\t\tstring => string.toLowerCase() :\n\t\tstring => string.toLocaleLowerCase(options.locale);\n\tconst toUpperCase = options.locale === false ?\n\t\tstring => string.toUpperCase() :\n\t\tstring => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\n\tif (options.preserveConsecutiveUppercase) {\n\t\tinput = preserveConsecutiveUppercase(input, toLowerCase);\n\t} else {\n\t\tinput = toLowerCase(input);\n\t}\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n};\n\nmodule.exports = camelCase;\n// TODO: Remove this for the next major release\nmodule.exports[\"default\"] = camelCase;\n\n\n/***/ }),\n\n/***/ 71:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getATAAddressesSync = exports.getATAAddresses = exports.getATAAddressSync = exports.getATAAddress = void 0;\nconst solana_contrib_1 = __webpack_require__(4175);\nconst spl_token_1 = __webpack_require__(4945);\n/**\n * Gets an associated token account address.\n *\n * @deprecated use {@link getATAAddressSync}\n */\nconst getATAAddress = async ({ mint, owner, }) => {\n return Promise.resolve((0, exports.getATAAddressSync)({ mint, owner }));\n};\nexports.getATAAddress = getATAAddress;\n/**\n * Gets an associated token account address synchronously.\n */\nconst getATAAddressSync = ({ mint, owner, }) => {\n return (0, solana_contrib_1.getProgramAddress)([owner.toBuffer(), spl_token_1.TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID);\n};\nexports.getATAAddressSync = getATAAddressSync;\n/**\n * Gets multiple associated token account addresses.\n *\n * @deprecated use {@link getATAAddressesSync}\n */\nconst getATAAddresses = ({ mints, owner, }) => {\n return Promise.resolve((0, exports.getATAAddressesSync)({ mints, owner }));\n};\nexports.getATAAddresses = getATAAddresses;\n/**\n * Gets multiple associated token account addresses.\n */\nconst getATAAddressesSync = ({ mints, owner, }) => {\n const result = Object.entries(mints).map((args) => {\n const [name, mint] = args;\n const result = (0, exports.getATAAddressSync)({\n mint,\n owner: owner,\n });\n return {\n address: result,\n name,\n mint,\n };\n });\n const deduped = result.reduce((acc, { address, name, mint }) => {\n return {\n accounts: {\n ...acc.accounts,\n [name]: { address, mint },\n },\n };\n }, { accounts: {} });\n return {\n accounts: deduped.accounts,\n };\n};\nexports.getATAAddressesSync = getATAAddressesSync;\n//# sourceMappingURL=ata.js.map\n\n/***/ }),\n\n/***/ 5300:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * This file is a port of serum-common, which was built for web3.js 0.x.\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.sleep = exports.getTokenAccount = exports.getMintInfo = exports.createAccountRentExempt = exports.createTokenAccountInstrs = exports.createMintAndVault = exports.createMintInstructions = exports.createToken = exports.createMint = exports.SPL_SHARED_MEMORY_ID = exports.DEFAULT_TOKEN_DECIMALS = exports.token = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst spl_token_1 = __webpack_require__(4945);\nconst web3_js_1 = __webpack_require__(6737);\nconst index_js_1 = __webpack_require__(9510);\nexports.token = tslib_1.__importStar(__webpack_require__(7079));\n/**\n * Default number of decimals of a token.\n */\nexports.DEFAULT_TOKEN_DECIMALS = 6;\nexports.SPL_SHARED_MEMORY_ID = new web3_js_1.PublicKey(\"shmem4EWT2sPdVGvTZCzXXRAURL9G5vpPxNwSeKhHUL\");\nasync function createMint(provider, authority, decimals) {\n if (authority === undefined) {\n authority = provider.wallet.publicKey;\n }\n const mint = web3_js_1.Keypair.generate();\n const instructions = await createMintInstructions(provider, authority, mint.publicKey, decimals);\n const tx = new web3_js_1.Transaction();\n tx.add(...instructions);\n await provider.send(tx, [mint]);\n return mint.publicKey;\n}\nexports.createMint = createMint;\n/**\n * Creates a Token.\n *\n * @param provider\n * @param authority The mint authority.\n * @param decimals Number of decimals.\n * @returns\n */\nasync function createToken(provider, authority, decimals = 6) {\n return index_js_1.Token.fromMint(await createMint(provider, authority, decimals), decimals);\n}\nexports.createToken = createToken;\nasync function createMintInstructions(provider, authority, mint, decimals = 6) {\n const instructions = [\n web3_js_1.SystemProgram.createAccount({\n fromPubkey: provider.wallet.publicKey,\n newAccountPubkey: mint,\n space: index_js_1.MintLayout.span,\n lamports: await provider.connection.getMinimumBalanceForRentExemption(index_js_1.MintLayout.span),\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n }),\n spl_token_1.Token.createInitMintInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint, decimals, authority, null),\n ];\n return instructions;\n}\nexports.createMintInstructions = createMintInstructions;\nasync function createMintAndVault(provider, amount, owner, decimals) {\n if (owner === undefined) {\n owner = provider.wallet.publicKey;\n }\n const mint = web3_js_1.Keypair.generate();\n const vault = web3_js_1.Keypair.generate();\n const tx = new web3_js_1.Transaction();\n tx.add(...(await createMintInstructions(provider, provider.wallet.publicKey, mint.publicKey, decimals)), web3_js_1.SystemProgram.createAccount({\n fromPubkey: provider.wallet.publicKey,\n newAccountPubkey: vault.publicKey,\n space: 165,\n lamports: await provider.connection.getMinimumBalanceForRentExemption(165),\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n }), spl_token_1.Token.createInitAccountInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint.publicKey, vault.publicKey, owner), spl_token_1.Token.createMintToInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint.publicKey, vault.publicKey, provider.wallet.publicKey, [], amount));\n await provider.send(tx, [mint, vault]);\n return [mint.publicKey, vault.publicKey];\n}\nexports.createMintAndVault = createMintAndVault;\nasync function createTokenAccountInstrs(provider, newAccountPubkey, mint, owner, lamports) {\n if (lamports === undefined) {\n lamports = await provider.connection.getMinimumBalanceForRentExemption(165);\n }\n return [\n web3_js_1.SystemProgram.createAccount({\n fromPubkey: provider.wallet.publicKey,\n newAccountPubkey,\n space: 165,\n lamports,\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n }),\n spl_token_1.Token.createInitAccountInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint, newAccountPubkey, owner),\n ];\n}\nexports.createTokenAccountInstrs = createTokenAccountInstrs;\nasync function createAccountRentExempt(provider, programId, size) {\n const acc = web3_js_1.Keypair.generate();\n const tx = new web3_js_1.Transaction();\n tx.add(web3_js_1.SystemProgram.createAccount({\n fromPubkey: provider.wallet.publicKey,\n newAccountPubkey: acc.publicKey,\n space: size,\n lamports: await provider.connection.getMinimumBalanceForRentExemption(size),\n programId,\n }));\n await provider.send(tx, [acc]);\n return acc;\n}\nexports.createAccountRentExempt = createAccountRentExempt;\nasync function getMintInfo(provider, addr) {\n const depositorAccInfo = await provider.getAccountInfo(addr);\n if (depositorAccInfo === null) {\n throw new Error(\"Failed to find token mint account\");\n }\n return (0, index_js_1.deserializeMint)(depositorAccInfo.accountInfo.data);\n}\nexports.getMintInfo = getMintInfo;\nasync function getTokenAccount(provider, addr) {\n const depositorAccInfo = await provider.getAccountInfo(addr);\n if (depositorAccInfo === null) {\n throw new Error(\"Failed to find token account\");\n }\n return (0, index_js_1.deserializeAccount)(depositorAccInfo.accountInfo.data);\n}\nexports.getTokenAccount = getTokenAccount;\nfunction sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\nexports.sleep = sleep;\n//# sourceMappingURL=common.js.map\n\n/***/ }),\n\n/***/ 9510:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * [[include:token-utils/README.md]]\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.u64 = exports.TOKEN_PROGRAM_ID = exports.SPLToken = exports.NATIVE_MINT = exports.ASSOCIATED_TOKEN_PROGRAM_ID = exports.ZERO = exports.validateU256 = exports.validateU64 = exports.TEN = exports.Rounding = exports.Percent = exports.parseBigintIsh = exports.ONE = exports.MAX_U256 = exports.MAX_U64 = exports.makeDecimalMultiplier = exports.Fraction = void 0;\nconst tslib_1 = __webpack_require__(7582);\ntslib_1.__exportStar(__webpack_require__(71), exports);\ntslib_1.__exportStar(__webpack_require__(326), exports);\ntslib_1.__exportStar(__webpack_require__(3183), exports);\ntslib_1.__exportStar(__webpack_require__(7535), exports);\ntslib_1.__exportStar(__webpack_require__(3048), exports);\ntslib_1.__exportStar(__webpack_require__(7079), exports);\ntslib_1.__exportStar(__webpack_require__(7092), exports);\ntslib_1.__exportStar(__webpack_require__(1755), exports);\ntslib_1.__exportStar(__webpack_require__(1459), exports);\ntslib_1.__exportStar(__webpack_require__(9117), exports);\nvar token_math_1 = __webpack_require__(7111);\nObject.defineProperty(exports, \"Fraction\", ({ enumerable: true, get: function () { return token_math_1.Fraction; } }));\nObject.defineProperty(exports, \"makeDecimalMultiplier\", ({ enumerable: true, get: function () { return token_math_1.makeDecimalMultiplier; } }));\nObject.defineProperty(exports, \"MAX_U64\", ({ enumerable: true, get: function () { return token_math_1.MAX_U64; } }));\nObject.defineProperty(exports, \"MAX_U256\", ({ enumerable: true, get: function () { return token_math_1.MAX_U256; } }));\nObject.defineProperty(exports, \"ONE\", ({ enumerable: true, get: function () { return token_math_1.ONE; } }));\nObject.defineProperty(exports, \"parseBigintIsh\", ({ enumerable: true, get: function () { return token_math_1.parseBigintIsh; } }));\nObject.defineProperty(exports, \"Percent\", ({ enumerable: true, get: function () { return token_math_1.Percent; } }));\nObject.defineProperty(exports, \"Rounding\", ({ enumerable: true, get: function () { return token_math_1.Rounding; } }));\nObject.defineProperty(exports, \"TEN\", ({ enumerable: true, get: function () { return token_math_1.TEN; } }));\nObject.defineProperty(exports, \"validateU64\", ({ enumerable: true, get: function () { return token_math_1.validateU64; } }));\nObject.defineProperty(exports, \"validateU256\", ({ enumerable: true, get: function () { return token_math_1.validateU256; } }));\nObject.defineProperty(exports, \"ZERO\", ({ enumerable: true, get: function () { return token_math_1.ZERO; } }));\n// serum common\ntslib_1.__exportStar(__webpack_require__(5300), exports);\nvar spl_token_1 = __webpack_require__(4945);\nObject.defineProperty(exports, \"ASSOCIATED_TOKEN_PROGRAM_ID\", ({ enumerable: true, get: function () { return spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID; } }));\nObject.defineProperty(exports, \"NATIVE_MINT\", ({ enumerable: true, get: function () { return spl_token_1.NATIVE_MINT; } }));\nObject.defineProperty(exports, \"SPLToken\", ({ enumerable: true, get: function () { return spl_token_1.Token; } }));\nObject.defineProperty(exports, \"TOKEN_PROGRAM_ID\", ({ enumerable: true, get: function () { return spl_token_1.TOKEN_PROGRAM_ID; } }));\nObject.defineProperty(exports, \"u64\", ({ enumerable: true, get: function () { return spl_token_1.u64; } }));\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 2555:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.buildCreateTokenAccountTX = exports.createTokenAccount = void 0;\nconst solana_contrib_1 = __webpack_require__(4175);\nconst spl_token_1 = __webpack_require__(4945);\nconst web3_js_1 = __webpack_require__(6737);\nconst layout_js_1 = __webpack_require__(3183);\nconst createTokenAccount = async ({ provider, mint, owner = provider.wallet.publicKey, payer = provider.wallet.publicKey, accountSigner = web3_js_1.Keypair.generate(), }) => {\n // Allocate memory for the account\n const rentExemptAccountBalance = await spl_token_1.Token.getMinBalanceRentForExemptAccount(provider.connection);\n return (0, exports.buildCreateTokenAccountTX)({\n provider,\n mint,\n rentExemptAccountBalance,\n owner,\n payer,\n accountSigner,\n });\n};\nexports.createTokenAccount = createTokenAccount;\nconst buildCreateTokenAccountTX = ({ provider, mint, rentExemptAccountBalance, owner = provider.wallet.publicKey, payer = provider.wallet.publicKey, accountSigner = web3_js_1.Keypair.generate(), }) => {\n const tokenAccount = accountSigner.publicKey;\n return {\n key: tokenAccount,\n tx: new solana_contrib_1.TransactionEnvelope(provider, [\n web3_js_1.SystemProgram.createAccount({\n fromPubkey: payer,\n newAccountPubkey: accountSigner.publicKey,\n lamports: rentExemptAccountBalance,\n space: layout_js_1.TokenAccountLayout.span,\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n }),\n spl_token_1.Token.createInitAccountInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint, tokenAccount, owner),\n ], [accountSigner]),\n };\n};\nexports.buildCreateTokenAccountTX = buildCreateTokenAccountTX;\n//# sourceMappingURL=account.js.map\n\n/***/ }),\n\n/***/ 7353:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.createATAInstruction = exports.getOrCreateATAs = exports.getOrCreateATA = void 0;\nconst spl_token_1 = __webpack_require__(4945);\nconst web3_js_1 = __webpack_require__(6737);\nconst ata_js_1 = __webpack_require__(71);\n/**\n * Gets an associated token account, returning a create instruction if it doesn't exist.\n * @param param0\n * @returns\n */\nconst getOrCreateATA = async ({ provider, mint, owner = provider.wallet.publicKey, payer = provider.wallet.publicKey, }) => {\n const address = (0, ata_js_1.getATAAddressSync)({ mint, owner });\n if (await provider.getAccountInfo(address)) {\n return { address, instruction: null };\n }\n else {\n return {\n address,\n instruction: (0, exports.createATAInstruction)({\n mint,\n address,\n owner,\n payer,\n }),\n };\n }\n};\nexports.getOrCreateATA = getOrCreateATA;\n/**\n * Gets ATAs and creates them if they don't exist.\n * @param param0\n * @returns\n */\nconst getOrCreateATAs = async ({ provider, mints, owner = provider.wallet.publicKey, }) => {\n const result = await Promise.all(Object.entries(mints).map(async ([name, mint]) => {\n const mintKey = new web3_js_1.PublicKey(mint);\n const result = await (0, exports.getOrCreateATA)({\n provider,\n mint: mintKey,\n owner: owner,\n payer: provider.wallet.publicKey,\n });\n return {\n address: result.address,\n instruction: result.instruction,\n name,\n mintKey,\n };\n }));\n const deduped = result.reduce((acc, { address, name, instruction }) => {\n return {\n accounts: {\n ...acc.accounts,\n [name]: address,\n },\n createAccountInstructions: {\n ...acc.createAccountInstructions,\n [name]: instruction,\n },\n instructions: instruction\n ? {\n ...acc.instructions,\n [address.toString()]: instruction,\n }\n : acc.instructions,\n };\n }, { accounts: {}, instructions: {}, createAccountInstructions: {} });\n return {\n accounts: deduped.accounts,\n createAccountInstructions: deduped.createAccountInstructions,\n instructions: Object.values(deduped.instructions),\n };\n};\nexports.getOrCreateATAs = getOrCreateATAs;\n/**\n * Instruction for creating an ATA.\n * @returns\n */\nconst createATAInstruction = ({ address, mint, owner, payer, }) => spl_token_1.Token.createAssociatedTokenAccountInstruction(spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID, spl_token_1.TOKEN_PROGRAM_ID, mint, address, owner, payer);\nexports.createATAInstruction = createATAInstruction;\n//# sourceMappingURL=ata.js.map\n\n/***/ }),\n\n/***/ 326:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst tslib_1 = __webpack_require__(7582);\ntslib_1.__exportStar(__webpack_require__(2555), exports);\ntslib_1.__exportStar(__webpack_require__(7353), exports);\ntslib_1.__exportStar(__webpack_require__(4483), exports);\ntslib_1.__exportStar(__webpack_require__(4476), exports);\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 4483:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.createMintToInstruction = exports.createInitMintTX = exports.createInitMintInstructions = void 0;\nconst solana_contrib_1 = __webpack_require__(4175);\nconst spl_token_1 = __webpack_require__(4945);\nconst web3_js_1 = __webpack_require__(6737);\nconst layout_js_1 = __webpack_require__(3183);\n/**\n * Creates instructions for initializing a mint.\n * @param param0\n * @returns\n */\nconst createInitMintInstructions = async ({ provider, mintKP, decimals, mintAuthority = provider.wallet.publicKey, freezeAuthority = null, }) => {\n return (0, exports.createInitMintTX)({\n provider,\n mintKP,\n decimals,\n rentExemptMintBalance: await spl_token_1.Token.getMinBalanceRentForExemptMint(provider.connection),\n mintAuthority,\n freezeAuthority,\n });\n};\nexports.createInitMintInstructions = createInitMintInstructions;\n/**\n * Creates instructions for initializing a mint.\n * @param param0\n * @returns\n */\nconst createInitMintTX = ({ provider, mintKP, decimals, rentExemptMintBalance, mintAuthority = provider.wallet.publicKey, freezeAuthority = null, }) => {\n const from = provider.wallet.publicKey;\n return new solana_contrib_1.TransactionEnvelope(provider, [\n web3_js_1.SystemProgram.createAccount({\n fromPubkey: from,\n newAccountPubkey: mintKP.publicKey,\n space: layout_js_1.MintLayout.span,\n lamports: rentExemptMintBalance,\n programId: spl_token_1.TOKEN_PROGRAM_ID,\n }),\n spl_token_1.Token.createInitMintInstruction(spl_token_1.TOKEN_PROGRAM_ID, mintKP.publicKey, decimals, mintAuthority, freezeAuthority),\n ], [mintKP]);\n};\nexports.createInitMintTX = createInitMintTX;\nconst createMintToInstruction = ({ provider, mint, mintAuthorityKP, to, amount, }) => {\n return new solana_contrib_1.TransactionEnvelope(provider, [\n spl_token_1.Token.createMintToInstruction(spl_token_1.TOKEN_PROGRAM_ID, mint, to, mintAuthorityKP.publicKey, [], amount),\n ], [mintAuthorityKP]);\n};\nexports.createMintToInstruction = createMintToInstruction;\n//# sourceMappingURL=mint.js.map\n\n/***/ }),\n\n/***/ 4476:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.mintNFT = void 0;\nconst spl_token_1 = __webpack_require__(4945);\nconst ata_js_1 = __webpack_require__(7353);\nconst mint_js_1 = __webpack_require__(4483);\nconst mintNFT = async (provider, mintKP, owner = provider.wallet.publicKey) => {\n // Temporary mint authority\n const tempMintAuthority = provider.wallet.publicKey;\n // Mint for the NFT\n const tx = await (0, mint_js_1.createInitMintInstructions)({\n provider,\n mintKP,\n decimals: 0,\n mintAuthority: tempMintAuthority,\n });\n // Token account for the NFT\n const { address, instruction } = await (0, ata_js_1.getOrCreateATA)({\n provider,\n mint: mintKP.publicKey,\n owner: owner,\n payer: provider.wallet.publicKey,\n });\n if (instruction) {\n tx.instructions.push(instruction);\n }\n // Mint to owner's ATA\n tx.instructions.push(spl_token_1.Token.createMintToInstruction(spl_token_1.TOKEN_PROGRAM_ID, mintKP.publicKey, address, tempMintAuthority, [], new spl_token_1.u64(1)));\n // Set mint authority of the NFT to NULL\n tx.instructions.push(spl_token_1.Token.createSetAuthorityInstruction(spl_token_1.TOKEN_PROGRAM_ID, mintKP.publicKey, null, \"MintTokens\", tempMintAuthority, []));\n return tx;\n};\nexports.mintNFT = mintNFT;\n//# sourceMappingURL=nft.js.map\n\n/***/ }),\n\n/***/ 3183:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.deserializeMint = exports.deserializeAccount = exports.MintLayout = exports.TokenAccountLayout = exports.Uint64Layout = exports.PublicKeyLayout = exports.structLayout = exports.TypedStructure = exports.TypedLayout = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst solana_contrib_1 = __webpack_require__(4175);\nconst BufferLayout = tslib_1.__importStar(__webpack_require__(9386));\nconst spl_token_1 = __webpack_require__(4945);\nvar buffer_layout_1 = __webpack_require__(9386);\nObject.defineProperty(exports, \"TypedLayout\", ({ enumerable: true, get: function () { return buffer_layout_1.Layout; } }));\nObject.defineProperty(exports, \"TypedStructure\", ({ enumerable: true, get: function () { return buffer_layout_1.Structure; } }));\n/**\n * Typed struct buffer layout\n * @param fields\n * @param property\n * @param decodePrefixes\n * @returns\n */\nconst structLayout = (fields, property, decodePrefixes) => BufferLayout.struct(fields, property, decodePrefixes);\nexports.structLayout = structLayout;\n/**\n * Layout for a public key\n */\nconst PublicKeyLayout = (property = \"publicKey\") => {\n return BufferLayout.blob(32, property);\n};\nexports.PublicKeyLayout = PublicKeyLayout;\n/**\n * Layout for a 64bit unsigned value\n */\nconst Uint64Layout = (property = \"uint64\") => {\n return BufferLayout.blob(8, property);\n};\nexports.Uint64Layout = Uint64Layout;\n/**\n * Layout for a TokenAccount.\n */\nexports.TokenAccountLayout = spl_token_1.AccountLayout;\n/**\n * Layout for a Mint.\n */\nexports.MintLayout = spl_token_1.MintLayout;\n/**\n * Deserializes a token account.\n * @param address\n * @param data\n * @returns\n */\nconst deserializeAccount = (data) => {\n const accountInfo = exports.TokenAccountLayout.decode(data);\n const mint = new solana_contrib_1.PublicKey(accountInfo.mint);\n const owner = new solana_contrib_1.PublicKey(accountInfo.owner);\n const amount = spl_token_1.u64.fromBuffer(accountInfo.amount);\n let delegate;\n let delegatedAmount;\n if (accountInfo.delegateOption === 0) {\n delegate = null;\n delegatedAmount = new spl_token_1.u64(0);\n }\n else {\n delegate = new solana_contrib_1.PublicKey(accountInfo.delegate);\n delegatedAmount = spl_token_1.u64.fromBuffer(accountInfo.delegatedAmount);\n }\n const isInitialized = accountInfo.state !== 0;\n const isFrozen = accountInfo.state === 2;\n let rentExemptReserve;\n let isNative;\n if (accountInfo.isNativeOption === 1) {\n rentExemptReserve = spl_token_1.u64.fromBuffer(accountInfo.isNative);\n isNative = true;\n }\n else {\n rentExemptReserve = null;\n isNative = false;\n }\n let closeAuthority;\n if (accountInfo.closeAuthorityOption === 0) {\n closeAuthority = null;\n }\n else {\n closeAuthority = new solana_contrib_1.PublicKey(accountInfo.closeAuthority);\n }\n return {\n mint,\n owner,\n amount,\n delegate,\n delegatedAmount,\n isInitialized,\n isFrozen,\n rentExemptReserve,\n isNative,\n closeAuthority,\n };\n};\nexports.deserializeAccount = deserializeAccount;\n/**\n * Deserialize a {@link Buffer} into a {@link MintInfo}.\n * @param data\n * @returns\n */\nconst deserializeMint = (data) => {\n if (data.length !== exports.MintLayout.span) {\n throw new Error(\"Not a valid Mint\");\n }\n const mintInfo = exports.MintLayout.decode(data);\n let mintAuthority;\n if (mintInfo.mintAuthorityOption === 0) {\n mintAuthority = null;\n }\n else {\n mintAuthority = new solana_contrib_1.PublicKey(mintInfo.mintAuthority);\n }\n const supply = spl_token_1.u64.fromBuffer(mintInfo.supply);\n const isInitialized = mintInfo.isInitialized !== 0;\n let freezeAuthority;\n if (mintInfo.freezeAuthorityOption === 0) {\n freezeAuthority = null;\n }\n else {\n freezeAuthority = new solana_contrib_1.PublicKey(mintInfo.freezeAuthority);\n }\n return {\n mintAuthority,\n supply,\n decimals: mintInfo.decimals,\n isInitialized,\n freezeAuthority,\n };\n};\nexports.deserializeMint = deserializeMint;\n//# sourceMappingURL=layout.js.map\n\n/***/ }),\n\n/***/ 7535:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Price = void 0;\nconst token_math_1 = __webpack_require__(7111);\n/**\n * A price of one token relative to another.\n */\nclass Price extends token_math_1.Price {\n /**\n * Constructs a price.\n * @param baseCurrency\n * @param quoteCurrency\n * @param denominator\n * @param numerator\n */\n constructor(baseCurrency, quoteCurrency, denominator, numerator) {\n super(baseCurrency, quoteCurrency, denominator, numerator);\n }\n new(baseCurrency, quoteCurrency, denominator, numerator) {\n return new Price(baseCurrency, quoteCurrency, denominator, numerator);\n }\n static fromUPrice(price) {\n return new Price(price.baseCurrency, price.quoteCurrency, price.denominator, price.numerator);\n }\n}\nexports.Price = Price;\n//# sourceMappingURL=price.js.map\n\n/***/ }),\n\n/***/ 3048:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n/**\n * These types all come from the @solana/spl-token-registry package.\n *\n * We re-export them here so we do not have to have a hard dependency on\n * that package, which is massive.\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ENV = void 0;\n/**\n * Chain ID.\n */\nvar ENV;\n(function (ENV) {\n ENV[ENV[\"MainnetBeta\"] = 101] = \"MainnetBeta\";\n ENV[ENV[\"Testnet\"] = 102] = \"Testnet\";\n ENV[ENV[\"Devnet\"] = 103] = \"Devnet\";\n})(ENV || (exports.ENV = ENV = {}));\n//# sourceMappingURL=splTokenRegistry.js.map\n\n/***/ }),\n\n/***/ 7079:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _a;\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.WRAPPED_SOL = exports.RAW_SOL = exports.chainIdToNetwork = exports.networkToChainId = exports.CHAIN_ID_TO_NETWORK = exports.NETWORK_TO_CHAIN_ID = exports.ChainId = exports.makeTokenForAllNetworks = exports.tokensEqual = exports.Token = exports.RAW_SOL_MINT = void 0;\nconst solana_contrib_1 = __webpack_require__(4175);\nconst spl_token_1 = __webpack_require__(4945);\nconst layout_js_1 = __webpack_require__(3183);\n/**\n * Magic value representing the raw, underlying Solana native asset.\n */\nexports.RAW_SOL_MINT = new solana_contrib_1.PublicKey(\"RawSo11111111111111111111111111111111111112\");\n/**\n * Token information.\n */\nclass Token {\n constructor(info) {\n var _b;\n this.info = info;\n this._mintAccount = null;\n this.network = (_b = (0, exports.chainIdToNetwork)(info.chainId)) !== null && _b !== void 0 ? _b : \"localnet\";\n }\n /**\n * The mint PublicKey of the token.\n *\n * Avoid using this value to print it to a string, as base58\n * strings are relatively slow to create since they require the use\n * of hash functions.\n */\n get mintAccount() {\n if (this._mintAccount) {\n return this._mintAccount;\n }\n this._mintAccount = new solana_contrib_1.PublicKey(this.info.address);\n return this._mintAccount;\n }\n /**\n * If true, this token represents unwrapped, native, \"raw\" SOL.\n */\n get isRawSOL() {\n return this.mintAccount.equals(exports.RAW_SOL_MINT);\n }\n /**\n * The Base58 string representation of the mint address.\n */\n get address() {\n return this.info.address;\n }\n /**\n * The chain ID of the token.\n */\n get chainId() {\n return this.info.chainId;\n }\n /**\n * Number of decimals of the token.\n */\n get decimals() {\n return this.info.decimals;\n }\n /**\n * The name of the token.\n */\n get name() {\n return this.info.name;\n }\n /**\n * The symbol of the token.\n */\n get symbol() {\n return this.info.symbol;\n }\n /**\n * The token's icon to render.\n */\n get icon() {\n return this.info.logoURI;\n }\n equals(other) {\n return (0, exports.tokensEqual)(this, other);\n }\n toString() {\n return `Token[mint=${this.address}, decimals=${this.decimals}, network=${this.network}]`;\n }\n toJSON() {\n return this.info;\n }\n /**\n * Returns true if the given tag is present.\n * @param tag The tag to check.\n * @returns\n */\n hasTag(tag) {\n var _b;\n return !!((_b = this.info.tags) === null || _b === void 0 ? void 0 : _b.includes(tag));\n }\n}\nexports.Token = Token;\n_a = Token;\n/**\n * Loads a token from a Mint.\n * @param mint\n * @param opts\n * @returns\n */\nToken.fromMint = (mint, decimals, opts = {}) => {\n var _b, _c, _d;\n return new _a({\n ...opts,\n // required\n address: mint.toString(),\n decimals,\n // optional\n name: (_b = opts.name) !== null && _b !== void 0 ? _b : `Token ${mint.toString().slice(0, 4)}`,\n symbol: (_c = opts.symbol) !== null && _c !== void 0 ? _c : mint.toString().slice(0, 5),\n chainId: (_d = opts.chainId) !== null && _d !== void 0 ? _d : ChainId.Localnet,\n });\n};\n/**\n * Loads a token from a Connection.\n *\n * @param connection\n * @param mint\n * @param info\n */\nToken.load = async (connection, mint, info = {}) => {\n if (typeof info.decimals === \"number\") {\n return _a.fromMint(mint, info.decimals, info);\n }\n const mintAccountInfo = await connection.getAccountInfo(mint);\n if (!mintAccountInfo) {\n return null;\n }\n const mintInfo = (0, layout_js_1.deserializeMint)(mintAccountInfo.data);\n return _a.fromMint(mint, mintInfo.decimals, info);\n};\n/**\n * Checks if two tokens are equal.\n * @param a\n * @param b\n * @returns\n */\nconst tokensEqual = (a, b) => a !== undefined &&\n b !== undefined &&\n a.address === b.address &&\n a.network === b.network;\nexports.tokensEqual = tokensEqual;\nconst rawSol = {\n address: exports.RAW_SOL_MINT.toString(),\n name: \"Solana\",\n symbol: \"SOL\",\n decimals: 9,\n logoURI: \"https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png\",\n};\nconst wrappedSol = {\n address: spl_token_1.NATIVE_MINT.toString(),\n name: \"Wrapped SOL\",\n symbol: \"SOL\",\n decimals: 9,\n logoURI: \"https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png\",\n};\n/**\n * Creates a Token for all networks.\n */\nconst makeTokenForAllNetworks = (token) => ({\n \"mainnet-beta\": new Token({ ...token, chainId: ChainId.MainnetBeta }),\n devnet: new Token({ ...token, chainId: ChainId.Devnet }),\n testnet: new Token({ ...token, chainId: ChainId.Testnet }),\n localnet: new Token({ ...token, chainId: ChainId.Localnet }),\n});\nexports.makeTokenForAllNetworks = makeTokenForAllNetworks;\n// comes from @solana/spl-token-registry, except we've added localnet\nvar ChainId;\n(function (ChainId) {\n ChainId[ChainId[\"MainnetBeta\"] = 101] = \"MainnetBeta\";\n ChainId[ChainId[\"Testnet\"] = 102] = \"Testnet\";\n ChainId[ChainId[\"Devnet\"] = 103] = \"Devnet\";\n ChainId[ChainId[\"Localnet\"] = 104] = \"Localnet\";\n})(ChainId || (exports.ChainId = ChainId = {}));\nexports.NETWORK_TO_CHAIN_ID = {\n \"mainnet-beta\": ChainId.MainnetBeta,\n devnet: ChainId.Devnet,\n testnet: ChainId.Testnet,\n localnet: 104,\n};\nexports.CHAIN_ID_TO_NETWORK = Object.entries(exports.NETWORK_TO_CHAIN_ID).reduce((acc, [network, env]) => ({ ...acc, [env]: network }), {});\n/**\n * Gets the chain id associated with a network.\n * @param network\n * @returns\n */\nconst networkToChainId = (network) => exports.NETWORK_TO_CHAIN_ID[network];\nexports.networkToChainId = networkToChainId;\n/**\n * Gets the Network associated with a chain id.\n * @param network\n * @returns\n */\nconst chainIdToNetwork = (env) => exports.CHAIN_ID_TO_NETWORK[env];\nexports.chainIdToNetwork = chainIdToNetwork;\n/**\n * Raw Solana token.\n *\n * This is a magic value. This is not a real token.\n */\nexports.RAW_SOL = (0, exports.makeTokenForAllNetworks)(rawSol);\n/**\n * Wrapped Solana token.\n */\nexports.WRAPPED_SOL = (0, exports.makeTokenForAllNetworks)(wrappedSol);\n//# sourceMappingURL=token.js.map\n\n/***/ }),\n\n/***/ 7092:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TokenAmount = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst spl_token_1 = __webpack_require__(4945);\nconst token_math_1 = __webpack_require__(7111);\nconst bn_js_1 = tslib_1.__importDefault(__webpack_require__(3550));\nclass TokenAmount extends token_math_1.TokenAmount {\n // amount _must_ be raw, i.e. in the native representation\n constructor(token, amount) {\n super(token, amount, token_math_1.validateU64);\n }\n new(token, amount) {\n // unsafe but nobody will be extending this anyway probably\n return new TokenAmount(token, amount);\n }\n /**\n * Parses a token amount from a decimal representation.\n * @param token\n * @param uiAmount\n * @returns\n */\n static parse(token, uiAmount) {\n const prev = (0, token_math_1.parseAmountFromString)(token, uiAmount, \".\", \",\");\n return new TokenAmount(token, prev);\n }\n /**\n * Divides this TokenAmount by a raw integer.\n * @param other\n * @returns\n */\n divideByInteger(other) {\n return new TokenAmount(this.token, this.toU64().div(new bn_js_1.default((0, token_math_1.parseBigintIsh)(other).toString())));\n }\n /**\n * String representation of this token amount.\n */\n toString() {\n return `TokenAmount[Token=(${this.token.toString()}), amount=${this.toExact()}`;\n }\n /**\n * JSON representation of the token amount.\n */\n toJSON() {\n return {\n ...super.toJSON(),\n _isTA: true,\n mint: this.token.address,\n uiAmount: this.toExact(),\n };\n }\n /**\n * Converts this to the raw u64 used by the SPL library\n * @returns\n */\n toU64() {\n return new spl_token_1.u64(this.raw.toString());\n }\n}\nexports.TokenAmount = TokenAmount;\n//# sourceMappingURL=tokenAmount.js.map\n\n/***/ }),\n\n/***/ 1755:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.dedupeTokens = exports.makeTokenMap = exports.ORIGIN_CHAINS = void 0;\nconst token_js_1 = __webpack_require__(7079);\n/**\n * Known origin chains.\n */\nexports.ORIGIN_CHAINS = [\n \"bitcoin\",\n \"ethereum\",\n \"terra\",\n \"avalanche\",\n \"binance\",\n \"celo\",\n \"polygon\",\n \"fantom\",\n \"polygon\",\n \"heco\",\n];\n/**\n * Creates a token map from a TokenList.\n * @param tokens\n * @returns\n */\nconst makeTokenMap = (tokenList) => {\n const ret = {};\n tokenList.tokens.forEach((item) => {\n ret[item.address] = new token_js_1.Token(item);\n });\n return ret;\n};\nexports.makeTokenMap = makeTokenMap;\n/**\n * Dedupes a list of tokens, picking the first instance of the token in a list.\n * @param tokens\n * @returns\n */\nconst dedupeTokens = (tokens) => {\n const seen = new Set();\n return tokens.filter((token) => {\n const tokenID = `${token.address}_${token.chainId}`;\n if (seen.has(tokenID)) {\n return false;\n }\n else {\n seen.add(tokenID);\n return true;\n }\n });\n};\nexports.dedupeTokens = dedupeTokens;\n//# sourceMappingURL=tokenList.js.map\n\n/***/ }),\n\n/***/ 1459:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TokenOwner = void 0;\nconst index_js_1 = __webpack_require__(9510);\n/**\n * Wrapper around a token account owner to create token instructions.\n */\nclass TokenOwner {\n constructor(owner) {\n this.owner = owner;\n }\n /**\n * Gets the user's ATA.\n * @param mint\n * @returns\n */\n async getATA(mint) {\n return await (0, index_js_1.getATAAddress)({ mint, owner: this.owner });\n }\n /**\n * Gets the user's ATA.\n * @param mint\n * @returns\n */\n getATASync(mint) {\n return (0, index_js_1.getATAAddressSync)({ mint, owner: this.owner });\n }\n /**\n * Transfers tokens to a token account.\n * @param amount Amount of tokens to transfer.\n * @param to Token account to transfer to.\n * @returns The transaction instruction.\n */\n async transfer(amount, to) {\n return index_js_1.SPLToken.createTransferInstruction(index_js_1.TOKEN_PROGRAM_ID, await this.getATA(amount.token.mintAccount), to, this.owner, [], amount.toU64());\n }\n /**\n * Transfers tokens to a token account, checked..\n * @param amount Amount of tokens to transfer.\n * @param to Token account to transfer to.\n * @returns The transaction instruction.\n */\n async transferChecked(amount, to) {\n return index_js_1.SPLToken.createTransferCheckedInstruction(index_js_1.TOKEN_PROGRAM_ID, await this.getATA(amount.token.mintAccount), amount.token.mintAccount, to, this.owner, [], amount.toU64(), amount.token.decimals);\n }\n /**\n * Mints tokens to a token account.\n * @param amount Amount of tokens to transfer.\n * @param to Token account to transfer to.\n * @returns The transaction instruction.\n */\n mintTo(amount, to) {\n return index_js_1.SPLToken.createMintToInstruction(index_js_1.TOKEN_PROGRAM_ID, amount.token.mintAccount, to, this.owner, [], amount.toU64());\n }\n /**\n * Creates an associated token account instruction.\n * @param mint Mint of the ATA.\n * @param payer Payer to create the ATA. Defaults to the owner.\n * @returns The transaction instruction.\n */\n async createATA(mint, payer = this.owner) {\n return index_js_1.SPLToken.createAssociatedTokenAccountInstruction(index_js_1.ASSOCIATED_TOKEN_PROGRAM_ID, index_js_1.TOKEN_PROGRAM_ID, mint, await this.getATA(mint), this.owner, payer);\n }\n}\nexports.TokenOwner = TokenOwner;\n//# sourceMappingURL=tokenOwner.js.map\n\n/***/ }),\n\n/***/ 9117:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TokenAugmentedProvider = void 0;\nconst solana_contrib_1 = __webpack_require__(4175);\nconst spl_token_1 = __webpack_require__(4945);\nconst web3_js_1 = __webpack_require__(6737);\nconst ata_js_1 = __webpack_require__(71);\nconst common_js_1 = __webpack_require__(5300);\nconst index_js_1 = __webpack_require__(9510);\nconst ata_js_2 = __webpack_require__(7353);\nconst layout_js_1 = __webpack_require__(3183);\nconst token_js_1 = __webpack_require__(7079);\n/**\n * Augmented provider with token utilities.\n */\nclass TokenAugmentedProvider extends solana_contrib_1.SolanaAugmentedProvider {\n constructor(provider) {\n super(provider);\n }\n /**\n * Creates a transaction to create a {@link Token}.\n */\n async createTokenTX({ mintKP = web3_js_1.Keypair.generate(), authority = this.walletKey, decimals = common_js_1.DEFAULT_TOKEN_DECIMALS, } = {}) {\n const instructions = await (0, common_js_1.createMintInstructions)(this.provider, authority, mintKP.publicKey, decimals);\n return {\n token: token_js_1.Token.fromMint(mintKP.publicKey, decimals),\n tx: this.newTX(instructions, [mintKP]),\n };\n }\n /**\n * Transfers tokens from the provider's ATA to a `TokenAccount`.\n */\n async transferTo({ amount, source, destination, }) {\n const txEnv = this.newTX();\n if (!source) {\n const sourceATA = await this.getOrCreateATA({\n mint: amount.token.mintAccount,\n });\n txEnv.append(sourceATA.instruction);\n source = sourceATA.address;\n }\n txEnv.append(index_js_1.SPLToken.createTransferInstruction(spl_token_1.TOKEN_PROGRAM_ID, source, destination, this.walletKey, [], amount.toU64()));\n return txEnv;\n }\n /**\n * Transfers tokens to a recipient's ATA.\n */\n async transfer({ amount, source, to, }) {\n const toATA = await this.getOrCreateATA({\n mint: amount.token.mintAccount,\n owner: to,\n });\n const txEnv = await this.transferTo({\n amount,\n source,\n destination: toATA.address,\n });\n txEnv.prepend(toATA.instruction);\n return txEnv;\n }\n /**\n * Creates a {@link Token}.\n */\n async createToken({ mintKP = web3_js_1.Keypair.generate(), authority = this.walletKey, decimals = common_js_1.DEFAULT_TOKEN_DECIMALS, } = {}) {\n const { token, tx } = await this.createTokenTX({\n mintKP,\n authority,\n decimals,\n });\n await tx.confirm();\n return token;\n }\n /**\n * Gets an ATA address.\n * @returns\n */\n async getATAAddress({ mint, owner = this.walletKey, }) {\n return await (0, ata_js_1.getATAAddress)({ mint, owner });\n }\n /**\n * Gets an ATA address.\n * @returns\n */\n async getATAAddresses({ mints, owner = this.walletKey, }) {\n return await (0, ata_js_1.getATAAddresses)({ mints, owner });\n }\n /**\n * Gets an ATA, creating it if it doesn't exist.\n * @returns\n */\n async getOrCreateATA({ mint, owner = this.walletKey, }) {\n return await (0, ata_js_2.getOrCreateATA)({ provider: this.provider, mint, owner });\n }\n /**\n * Get or create multiple ATAs.\n * @returns\n */\n async getOrCreateATAs({ mints, owner = this.walletKey, }) {\n return await (0, ata_js_2.getOrCreateATAs)({ provider: this.provider, mints, owner });\n }\n /**\n * Loads a token from the blockchain, only if the decimals are not provided.\n * @param mint\n * @returns\n */\n async loadToken(mint, info = {}) {\n return token_js_1.Token.load(this.provider.connection, mint, info);\n }\n /**\n * Mints tokens to a token account.\n * @param mint\n * @returns\n */\n mintToAccount({ amount, destination, }) {\n return this.newTX([\n index_js_1.SPLToken.createMintToInstruction(spl_token_1.TOKEN_PROGRAM_ID, amount.token.mintAccount, destination, this.walletKey, [], amount.toU64()),\n ]);\n }\n /**\n * Mints tokens to the ATA of the `to` account.\n * @param amount The amount of tokens to mint.\n * @param to The owner of the ATA that may be created.\n * @returns\n */\n async mintTo({ amount, to = this.walletKey, }) {\n const toATA = await this.getOrCreateATA({\n mint: amount.token.mintAccount,\n owner: to,\n });\n const txEnv = this.mintToAccount({\n amount,\n destination: toATA.address,\n });\n txEnv.prepend(toATA.instruction);\n return txEnv;\n }\n /**\n * Fetches a mint.\n * @param address\n * @returns\n */\n async fetchMint(address) {\n const accountInfo = await this.getAccountInfo(address);\n if (accountInfo === null) {\n return null;\n }\n return (0, layout_js_1.deserializeMint)(accountInfo.accountInfo.data);\n }\n /**\n * Fetches a token account.\n * @param address\n * @returns\n */\n async fetchTokenAccount(address) {\n const tokenAccountInfo = await this.getAccountInfo(address);\n if (tokenAccountInfo === null) {\n return null;\n }\n return (0, layout_js_1.deserializeAccount)(tokenAccountInfo.accountInfo.data);\n }\n /**\n * Fetches an ATA.\n * @param mint\n * @param owner\n * @returns\n */\n async fetchATA(mint, owner = this.walletKey) {\n const taAddress = await (0, ata_js_1.getATAAddress)({ mint, owner });\n return await this.fetchTokenAccount(taAddress);\n }\n}\nexports.TokenAugmentedProvider = TokenAugmentedProvider;\n//# sourceMappingURL=tokenProvider.js.map\n\n/***/ }),\n\n/***/ 7979:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n/**\n * [[include:option-utils/README.md]]\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.exists = exports.isNotUndefined = exports.isNotNull = exports.mapSome = exports.mapN = void 0;\n/**\n * Applies a function to a list of null/undefined values, unwrapping the null/undefined value or passing it through.\n */\nconst mapN = (fn, ...args) => {\n if (!args.every((arg) => arg !== undefined)) {\n return undefined;\n }\n if (!args.every((arg) => arg !== null)) {\n return null;\n }\n return fn(...args);\n};\nexports.mapN = mapN;\n/**\n * Applies a function to a null/undefined inner value if it is null or undefined,\n * otherwise returns null/undefined.\n *\n * For consistency reasons, we recommend just using {@link mapN} in all cases.\n *\n * @deprecated use {@link mapN}\n * @param obj\n * @param fn\n * @returns\n */\nconst mapSome = (obj, fn) => ((0, exports.exists)(obj) ? fn(obj) : obj);\nexports.mapSome = mapSome;\n/**\n * Checks to see if the provided value is not null.\n *\n * Useful for preserving types in filtering out non-null values.\n *\n * @param value\n * @returns\n */\nconst isNotNull = (value) => {\n return value !== null;\n};\nexports.isNotNull = isNotNull;\n/**\n * Checks to see if the provided value is not undefined.\n *\n * @param value\n * @returns\n */\nconst isNotUndefined = (value) => {\n return value !== undefined;\n};\nexports.isNotUndefined = isNotUndefined;\n/**\n * Checks to see if the provided value is not null or undefined.\n *\n * @param value\n * @returns\n */\nconst exists = (value) => {\n return value !== null && value !== undefined;\n};\nexports.exists = exists;\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 2072:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MultipleConnectionBroadcaster = exports.SingleConnectionBroadcaster = exports.DEFAULT_FALLBACK_RETRY_OPTIONS = exports.DEFAULT_RETRY_OPTIONS = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst error_js_1 = __webpack_require__(8075);\nconst provider_js_1 = __webpack_require__(2645);\nconst index_js_1 = __webpack_require__(2175);\nconst index_js_2 = __webpack_require__(2723);\nconst simulateTransactionWithCommitment_js_1 = __webpack_require__(2377);\nconst sendAndSpamRawTx_js_1 = __webpack_require__(8653);\ntslib_1.__exportStar(__webpack_require__(7720), exports);\n/**\n * Default retry parameters.\n */\nexports.DEFAULT_RETRY_OPTIONS = {\n retryTimes: 3,\n retryInterval: 1000,\n};\n/**\n * Default retry parameters for fallbacks.\n */\nexports.DEFAULT_FALLBACK_RETRY_OPTIONS = {\n retryTimes: 10,\n retryInterval: 300,\n};\n/**\n * Broadcasts transactions to a single connection.\n */\nclass SingleConnectionBroadcaster {\n constructor(sendConnection, opts = provider_js_1.DEFAULT_PROVIDER_OPTIONS) {\n this.sendConnection = sendConnection;\n this.opts = opts;\n }\n /**\n * @inheritdoc\n */\n async getLatestBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.commitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n return await this.sendConnection.getLatestBlockhash(commitment);\n }\n /**\n * @inheritdoc\n */\n async getRecentBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.commitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n const result = await this.sendConnection.getLatestBlockhash(commitment);\n return result.blockhash;\n }\n /**\n * @inheritdoc\n */\n async broadcast(tx, { printLogs = true, ...opts } = this.opts) {\n if (tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before broadcasting.\");\n }\n const rawTx = tx.serialize();\n if (printLogs) {\n return new index_js_1.PendingTransaction(this.sendConnection, await (0, sendAndSpamRawTx_js_1.sendAndSpamRawTx)(this.sendConnection, rawTx, opts, opts));\n }\n return await (0, index_js_2.suppressConsoleErrorAsync)(async () => {\n // hide the logs of TX errors if printLogs = false\n return new index_js_1.PendingTransaction(this.sendConnection, await (0, sendAndSpamRawTx_js_1.sendAndSpamRawTx)(this.sendConnection, rawTx, opts, opts));\n });\n }\n /**\n * @inheritdoc\n */\n async simulate(tx, _a) {\n var _b, _c;\n var { commitment = (_b = this.opts.preflightCommitment) !== null && _b !== void 0 ? _b : \"confirmed\", verifySigners = true, } = _a === void 0 ? {\n commitment: (_c = this.opts.preflightCommitment) !== null && _c !== void 0 ? _c : \"confirmed\",\n verifySigners: true,\n } : _a;\n if (verifySigners && tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before simulating.\");\n }\n return await (0, simulateTransactionWithCommitment_js_1.simulateTransactionWithCommitment)(this.sendConnection, tx, commitment);\n }\n}\nexports.SingleConnectionBroadcaster = SingleConnectionBroadcaster;\n/**\n * Broadcasts transactions to multiple connections simultaneously.\n */\nclass MultipleConnectionBroadcaster {\n constructor(connections, opts = provider_js_1.DEFAULT_PROVIDER_OPTIONS) {\n this.connections = connections;\n this.opts = opts;\n }\n async getLatestBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.preflightCommitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n try {\n const result = await Promise.any(this.connections.map((conn) => conn.getLatestBlockhash(commitment)));\n return result;\n }\n catch (e) {\n if (e instanceof AggregateError) {\n throw (0, error_js_1.firstAggregateError)(e);\n }\n else {\n throw e;\n }\n }\n }\n async getRecentBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.preflightCommitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n try {\n const result = await Promise.any(this.connections.map((conn) => conn.getLatestBlockhash(commitment)));\n return result.blockhash;\n }\n catch (e) {\n if (e instanceof AggregateError) {\n throw (0, error_js_1.firstAggregateError)(e);\n }\n else {\n throw e;\n }\n }\n }\n async _sendRawTransaction(encoded, options) {\n try {\n return await Promise.any(this.connections.map(async (connection) => {\n return new index_js_1.PendingTransaction(connection, await (0, sendAndSpamRawTx_js_1.sendAndSpamRawTx)(connection, encoded, options !== null && options !== void 0 ? options : this.opts));\n }));\n }\n catch (e) {\n if (e instanceof AggregateError) {\n throw (0, error_js_1.firstAggregateError)(e);\n }\n else {\n throw e;\n }\n }\n }\n /**\n * Broadcasts a signed transaction.\n *\n * @param tx\n * @param confirm\n * @param opts\n * @returns\n */\n async broadcast(tx, { printLogs = true, ...opts } = this.opts) {\n if (tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before broadcasting.\");\n }\n const rawTx = tx.serialize();\n if (printLogs) {\n return await this._sendRawTransaction(rawTx, opts);\n }\n return await (0, index_js_2.suppressConsoleErrorAsync)(async () => {\n // hide the logs of TX errors if printLogs = false\n return await this._sendRawTransaction(rawTx, opts);\n });\n }\n /**\n * Simulates a transaction with a commitment.\n * @param tx\n * @param commitment\n * @returns\n */\n async simulate(tx, _a) {\n var _b, _c, _d, _e;\n var { commitment = (_c = (_b = this.opts.preflightCommitment) !== null && _b !== void 0 ? _b : this.opts.commitment) !== null && _c !== void 0 ? _c : \"confirmed\", verifySigners = true, } = _a === void 0 ? {\n commitment: (_e = (_d = this.opts.preflightCommitment) !== null && _d !== void 0 ? _d : this.opts.commitment) !== null && _e !== void 0 ? _e : \"confirmed\",\n verifySigners: true,\n } : _a;\n if (verifySigners && tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before simulating.\");\n }\n try {\n return await Promise.any(this.connections.map(async (connection) => {\n return await (0, simulateTransactionWithCommitment_js_1.simulateTransactionWithCommitment)(connection, tx, commitment);\n }));\n }\n catch (e) {\n if (e instanceof AggregateError) {\n throw (0, error_js_1.firstAggregateError)(e);\n }\n else {\n throw e;\n }\n }\n }\n}\nexports.MultipleConnectionBroadcaster = MultipleConnectionBroadcaster;\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 8653:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.sendAndSpamRawTx = void 0;\nconst index_js_1 = __webpack_require__(2723);\nconst index_js_2 = __webpack_require__(2072);\n/**\n * Sends and spams a raw transaction multiple times.\n * @param connection Connection to send the transaction to. We recommend using a public endpoint such as GenesysGo.\n * @param rawTx\n * @param opts\n */\nconst sendAndSpamRawTx = async (connection, rawTx, sendOptions, { retryTimes = index_js_2.DEFAULT_RETRY_OPTIONS.retryTimes, retryInterval = index_js_2.DEFAULT_RETRY_OPTIONS.retryInterval, } = index_js_2.DEFAULT_RETRY_OPTIONS) => {\n const result = await connection.sendRawTransaction(rawTx, sendOptions);\n // if we could send the TX with preflight, let's spam it.\n void (async () => {\n // technique stolen from Mango.\n for (let i = 0; i < retryTimes; i++) {\n try {\n await (0, index_js_1.sleep)(retryInterval);\n await connection.sendRawTransaction(rawTx, {\n ...sendOptions,\n skipPreflight: true,\n });\n }\n catch (e) {\n console.warn(`[Broadcaster] sendAndSpamRawTx error`, e);\n }\n }\n })();\n return result;\n};\nexports.sendAndSpamRawTx = sendAndSpamRawTx;\n//# sourceMappingURL=sendAndSpamRawTx.js.map\n\n/***/ }),\n\n/***/ 7720:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TieredBroadcaster = void 0;\nconst provider_js_1 = __webpack_require__(2645);\nconst index_js_1 = __webpack_require__(2175);\nconst index_js_2 = __webpack_require__(2723);\nconst index_js_3 = __webpack_require__(2072);\nconst sendAndSpamRawTx_js_1 = __webpack_require__(8653);\n/**\n * Broadcasts transactions to multiple connections simultaneously.\n */\nclass TieredBroadcaster {\n constructor(primaryConnection, \n /**\n * Connections to send to in addition to the primary.\n */\n fallbackConnections, opts = provider_js_1.DEFAULT_PROVIDER_OPTIONS) {\n this.primaryConnection = primaryConnection;\n this.fallbackConnections = fallbackConnections;\n this.opts = opts;\n this.premiumBroadcaster = new index_js_3.SingleConnectionBroadcaster(primaryConnection, opts);\n }\n async getLatestBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.preflightCommitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n return await this.premiumBroadcaster.getLatestBlockhash(commitment);\n }\n async getRecentBlockhash(commitment) {\n var _a;\n if (commitment === void 0) { commitment = (_a = this.opts.preflightCommitment) !== null && _a !== void 0 ? _a : \"confirmed\"; }\n return await this.premiumBroadcaster.getRecentBlockhash(commitment);\n }\n async _sendRawTransaction(encoded, options) {\n const pending = new index_js_1.PendingTransaction(this.primaryConnection, await (0, sendAndSpamRawTx_js_1.sendAndSpamRawTx)(this.primaryConnection, encoded, options !== null && options !== void 0 ? options : this.opts, options !== null && options !== void 0 ? options : index_js_3.DEFAULT_RETRY_OPTIONS));\n void (async () => {\n await Promise.all(this.fallbackConnections.map(async (fc) => {\n var _a;\n try {\n await (0, sendAndSpamRawTx_js_1.sendAndSpamRawTx)(fc, encoded, options !== null && options !== void 0 ? options : this.opts, (_a = options === null || options === void 0 ? void 0 : options.fallbackRetryOptions) !== null && _a !== void 0 ? _a : index_js_3.DEFAULT_FALLBACK_RETRY_OPTIONS);\n }\n catch (e) {\n console.warn(`[Broadcaster] _sendRawTransaction error`, e);\n }\n }));\n })();\n return pending;\n }\n /**\n * Broadcasts a signed transaction.\n *\n * @param tx\n * @param confirm\n * @param opts\n * @returns\n */\n async broadcast(tx, { printLogs = true, ...opts } = this.opts) {\n if (tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before broadcasting.\");\n }\n const rawTx = tx.serialize();\n if (printLogs) {\n return await this._sendRawTransaction(rawTx, opts);\n }\n return await (0, index_js_2.suppressConsoleErrorAsync)(async () => {\n // hide the logs of TX errors if printLogs = false\n return await this._sendRawTransaction(rawTx, opts);\n });\n }\n /**\n * Simulates a transaction with a commitment.\n * @param tx\n * @param commitment\n * @returns\n */\n async simulate(tx, _a) {\n var _b, _c;\n var { commitment = (_b = this.opts.preflightCommitment) !== null && _b !== void 0 ? _b : \"confirmed\", verifySigners = true, } = _a === void 0 ? {\n commitment: (_c = this.opts.preflightCommitment) !== null && _c !== void 0 ? _c : \"confirmed\",\n verifySigners: true,\n } : _a;\n if (verifySigners && tx.signatures.length === 0) {\n throw new Error(\"Transaction must be signed before simulating.\");\n }\n return this.premiumBroadcaster.simulate(tx, {\n commitment,\n verifySigners,\n });\n }\n}\nexports.TieredBroadcaster = TieredBroadcaster;\n//# sourceMappingURL=tiered.js.map\n\n/***/ }),\n\n/***/ 3078:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.COMPUTE_BUDGET_PROGRAM = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst web3_js_1 = __webpack_require__(6737);\n/**\n * The compute budget program.\n * Source: https://github.com/solana-labs/solana/blob/master/program-runtime/src/compute_budget.rs#L101\n */\nexports.COMPUTE_BUDGET_PROGRAM = new web3_js_1.PublicKey(\"ComputeBudget111111111111111111111111111111\");\ntslib_1.__exportStar(__webpack_require__(4781), exports);\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 4781:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.requestHeapFrameInstruction = exports.requestComputeUnitsInstruction = void 0;\nconst web3_js_1 = __webpack_require__(6737);\nconst index_js_1 = __webpack_require__(3078);\nconst layouts_js_1 = __webpack_require__(6251);\n/**\n * Request a specific maximum number of compute units the transaction is\n * allowed to consume and an additional fee to pay.\n */\nconst requestComputeUnitsInstruction = (units, additionalFee) => {\n const data = Buffer.alloc(layouts_js_1.RequestUnitsLayout.span);\n layouts_js_1.RequestUnitsLayout.encode({ instruction: 0, units, additionalFee }, data);\n return new web3_js_1.TransactionInstruction({\n data,\n keys: [],\n programId: index_js_1.COMPUTE_BUDGET_PROGRAM,\n });\n};\nexports.requestComputeUnitsInstruction = requestComputeUnitsInstruction;\n/**\n * Request a specific transaction-wide program heap region size in bytes.\n * The value requested must be a multiple of 1024. This new heap region\n * size applies to each program executed, including all calls to CPIs.\n */\nconst requestHeapFrameInstruction = (bytes) => {\n const data = Buffer.alloc(layouts_js_1.RequestHeapFrameLayout.span);\n layouts_js_1.RequestHeapFrameLayout.encode({ instruction: 1, bytes }, data);\n return new web3_js_1.TransactionInstruction({\n data,\n keys: [],\n programId: index_js_1.COMPUTE_BUDGET_PROGRAM,\n });\n};\nexports.requestHeapFrameInstruction = requestHeapFrameInstruction;\n//# sourceMappingURL=instructions.js.map\n\n/***/ }),\n\n/***/ 6251:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.RequestHeapFrameLayout = exports.RequestUnitsLayout = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst BufferLayout = tslib_1.__importStar(__webpack_require__(9386));\nexports.RequestUnitsLayout = BufferLayout.struct([\n BufferLayout.u8(\"instruction\"),\n BufferLayout.u32(\"units\"),\n BufferLayout.u32(\"additionalFee\"),\n]);\nexports.RequestHeapFrameLayout = BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"bytes\")]);\n//# sourceMappingURL=layouts.js.map\n\n/***/ }),\n\n/***/ 2610:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.DEFAULT_NETWORK_CONFIG_MAP = exports.formatNetwork = void 0;\n/**\n * Formats the network as a string.\n * @param network\n * @returns\n */\nconst formatNetwork = (network) => {\n if (network === \"mainnet-beta\") {\n return \"mainnet\";\n }\n return network;\n};\nexports.formatNetwork = formatNetwork;\n/**\n * Default configuration for all networks.\n */\nexports.DEFAULT_NETWORK_CONFIG_MAP = {\n \"mainnet-beta\": {\n name: \"Mainnet Beta\",\n endpoint: \"https://api.mainnet-beta.solana.com/\",\n },\n devnet: {\n name: \"Devnet\",\n endpoint: \"https://api.devnet.solana.com/\",\n },\n testnet: {\n name: \"Testnet\",\n endpoint: \"https://api.testnet.solana.com/\",\n },\n localnet: {\n name: \"Localnet\",\n endpoint: \"http://127.0.0.1:8899\",\n },\n};\n//# sourceMappingURL=constants.js.map\n\n/***/ }),\n\n/***/ 8075:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.firstAggregateError = void 0;\nconst firstAggregateError = (err) => {\n const errors = err.errors;\n const [firstError, ...remErrors] = [errors.pop(), ...errors];\n if (remErrors.length > 0) {\n console.error(remErrors);\n }\n return firstError;\n};\nexports.firstAggregateError = firstAggregateError;\n//# sourceMappingURL=error.js.map\n\n/***/ }),\n\n/***/ 4175:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * [[include:solana-contrib/README.md]]\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst tslib_1 = __webpack_require__(7582);\ntslib_1.__exportStar(__webpack_require__(2072), exports);\ntslib_1.__exportStar(__webpack_require__(2610), exports);\ntslib_1.__exportStar(__webpack_require__(5545), exports);\ntslib_1.__exportStar(__webpack_require__(2645), exports);\ntslib_1.__exportStar(__webpack_require__(2175), exports);\ntslib_1.__exportStar(__webpack_require__(2723), exports);\ntslib_1.__exportStar(__webpack_require__(4633), exports);\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 5545:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n//# sourceMappingURL=interfaces.js.map\n\n/***/ }),\n\n/***/ 2645:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.SolanaAugmentedProvider = exports.SolanaProvider = exports.SolanaTransactionSigner = exports.doSignAndBroadcastTransaction = exports.SolanaReadonlyProvider = exports.DEFAULT_READONLY_PUBLIC_KEY = exports.DEFAULT_PROVIDER_OPTIONS = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst web3_js_1 = __webpack_require__(6737);\nconst tiny_invariant_1 = tslib_1.__importDefault(__webpack_require__(6018));\nconst index_js_1 = __webpack_require__(2072);\nconst index_js_2 = __webpack_require__(4175);\nconst TransactionEnvelope_js_1 = __webpack_require__(775);\nexports.DEFAULT_PROVIDER_OPTIONS = {\n preflightCommitment: \"confirmed\",\n commitment: \"confirmed\",\n};\nexports.DEFAULT_READONLY_PUBLIC_KEY = web3_js_1.SystemProgram.programId;\n/**\n * Provider that can only read.\n */\nclass SolanaReadonlyProvider {\n /**\n * @param connection The cluster connection where the program is deployed.\n * @param opts Transaction confirmation options to use by default.\n * @param publicKey Optional public key of read-only wallet.\n */\n constructor(connection, opts = exports.DEFAULT_PROVIDER_OPTIONS, publicKey = exports.DEFAULT_READONLY_PUBLIC_KEY) {\n this.connection = connection;\n this.opts = opts;\n this.publicKey = publicKey;\n this.wallet = {\n signTransaction: Promise.resolve.bind(Promise),\n signAllTransactions: Promise.resolve.bind(Promise),\n publicKey: exports.DEFAULT_READONLY_PUBLIC_KEY,\n };\n this.wallet = {\n ...this.wallet,\n publicKey,\n };\n }\n /**\n * Gets\n * @param accountId\n * @returns\n */\n async getAccountInfo(accountId) {\n const accountInfo = await this.connection.getAccountInfo(accountId, this.opts.commitment);\n if (!accountInfo) {\n return null;\n }\n return {\n accountId,\n accountInfo,\n };\n }\n}\nexports.SolanaReadonlyProvider = SolanaReadonlyProvider;\nconst doSignAndBroadcastTransaction = async (wallet, transaction, broadcaster, opts) => {\n const tx = await wallet.signTransaction(transaction);\n if ((opts === null || opts === void 0 ? void 0 : opts.signers) && opts.signers.length > 0) {\n tx.sign(...opts.signers);\n }\n return await broadcaster.broadcast(tx, opts);\n};\nexports.doSignAndBroadcastTransaction = doSignAndBroadcastTransaction;\n/**\n * Signs Solana transactions.\n */\nclass SolanaTransactionSigner {\n constructor(wallet, broadcaster, preflightCommitment = \"confirmed\") {\n this.wallet = wallet;\n this.broadcaster = broadcaster;\n this.preflightCommitment = preflightCommitment;\n }\n get publicKey() {\n return this.wallet.publicKey;\n }\n async signAndBroadcastTransaction(transaction, opts) {\n return await (0, exports.doSignAndBroadcastTransaction)(this.wallet, transaction, this.broadcaster, opts);\n }\n /**\n * Sends the given transaction, paid for and signed by the provider's wallet.\n *\n * @param tx The transaction to send.\n * @param signers The set of signers in addition to the provdier wallet that\n * will sign the transaction.\n * @param opts Transaction confirmation options.\n */\n async sign(tx, signers = [], opts = {\n preflightCommitment: this.preflightCommitment,\n }) {\n const { blockhash, lastValidBlockHeight } = await this.broadcaster.getLatestBlockhash(opts.preflightCommitment);\n tx.feePayer = this.wallet.publicKey;\n tx.lastValidBlockHeight = lastValidBlockHeight;\n tx.recentBlockhash = blockhash;\n await this.wallet.signTransaction(tx);\n signers\n .filter((s) => s !== undefined)\n .forEach((kp) => {\n tx.partialSign(kp);\n });\n return tx;\n }\n /**\n * Similar to `send`, but for an array of transactions and signers.\n */\n async signAll(reqs, opts = {\n preflightCommitment: this.preflightCommitment,\n }) {\n const { blockhash, lastValidBlockHeight } = await this.broadcaster.getLatestBlockhash(opts.preflightCommitment);\n const txs = reqs.map(({ tx, signers = [] }) => {\n tx.feePayer = this.wallet.publicKey;\n tx.lastValidBlockHeight = lastValidBlockHeight;\n tx.recentBlockhash = blockhash;\n signers\n .filter((s) => s !== undefined)\n .forEach((kp) => {\n tx.partialSign(kp);\n });\n return tx;\n });\n const signedTxs = await this.wallet.signAllTransactions(txs);\n return signedTxs;\n }\n}\nexports.SolanaTransactionSigner = SolanaTransactionSigner;\n/**\n * The network and wallet context used to send transactions paid for and signed\n * by the provider.\n *\n * This implementation was taken from Anchor.\n */\nclass SolanaProvider extends SolanaReadonlyProvider {\n /**\n * @param connection The cluster connection where the program is deployed.\n * @param sendConnection The connection where transactions are sent to.\n * @param wallet The wallet used to pay for and sign all transactions.\n * @param opts Transaction confirmation options to use by default.\n */\n constructor(connection, broadcaster, wallet, opts = exports.DEFAULT_PROVIDER_OPTIONS, signer = new SolanaTransactionSigner(wallet, broadcaster, opts.preflightCommitment)) {\n super(connection, opts);\n this.connection = connection;\n this.broadcaster = broadcaster;\n this.wallet = wallet;\n this.opts = opts;\n this.signer = signer;\n }\n async signAndBroadcastTransaction(transaction, opts) {\n return await this.signer.signAndBroadcastTransaction(transaction, opts);\n }\n /**\n * Creates a new SolanaProvider.\n * @deprecated use {@link SolanaProvider.init}\n */\n static load({ connection, sendConnection = connection, wallet, opts, }) {\n return new SolanaProvider(connection, new index_js_1.SingleConnectionBroadcaster(sendConnection, opts), wallet, opts);\n }\n /**\n * Initializes a new SolanaProvider.\n */\n static init({ connection, broadcastConnections = [connection], wallet, opts = exports.DEFAULT_PROVIDER_OPTIONS, }) {\n const firstBroadcastConnection = broadcastConnections[0];\n (0, tiny_invariant_1.default)(firstBroadcastConnection, \"must have at least one broadcast connection\");\n return new SolanaProvider(connection, broadcastConnections.length > 1\n ? new index_js_2.TieredBroadcaster(connection, broadcastConnections, opts)\n : new index_js_1.SingleConnectionBroadcaster(firstBroadcastConnection, opts), wallet, opts);\n }\n /**\n * Sends the given transaction, paid for and signed by the provider's wallet.\n *\n * @param tx The transaction to send.\n * @param signers The set of signers in addition to the provider wallet that\n * will sign the transaction.\n * @param opts Transaction confirmation options.\n */\n async send(tx, signers = [], opts = this.opts) {\n const theTx = await this.signer.sign(tx, signers, opts);\n const pending = await this.broadcaster.broadcast(theTx, opts);\n await pending.wait();\n return pending;\n }\n /**\n * Similar to `send`, but for an array of transactions and signers.\n */\n async sendAll(reqs, opts = this.opts) {\n const txs = await this.signer.signAll(reqs, opts);\n return await Promise.all(txs.map(async (tx) => {\n const pending = await this.broadcaster.broadcast(tx, opts);\n await pending.wait();\n return pending;\n }));\n }\n /**\n * Simulates the given transaction, returning emitted logs from execution.\n *\n * @param tx The transaction to send.\n * @param signers The set of signers in addition to the provider wallet that\n * will sign the transaction. If specified, the provider will\n * sign the transaction.\n * @param opts Transaction confirmation options.\n */\n async simulate(tx, signers, opts = this.opts) {\n let simTX = tx;\n if (signers !== undefined) {\n simTX = await this.signer.sign(tx, signers, opts);\n }\n return await this.broadcaster.simulate(simTX, {\n verifySigners: signers !== undefined,\n commitment: opts.commitment,\n });\n }\n}\nexports.SolanaProvider = SolanaProvider;\n/**\n * Wrapper for a Provider containing utility functions.\n */\nclass SolanaAugmentedProvider {\n constructor(provider) {\n this.provider = provider;\n }\n get walletKey() {\n return this.provider.wallet.publicKey;\n }\n get connection() {\n return this.provider.connection;\n }\n get signer() {\n return this.provider.signer;\n }\n get broadcaster() {\n return this.provider.broadcaster;\n }\n get opts() {\n return this.provider.opts;\n }\n get wallet() {\n return this.provider.wallet;\n }\n signAndBroadcastTransaction(transaction, opts) {\n return this.provider.signAndBroadcastTransaction(transaction, opts);\n }\n send(tx, signers, opts) {\n return this.provider.send(tx, signers, opts);\n }\n sendAll(reqs, opts) {\n return this.provider.sendAll(reqs, opts);\n }\n simulate(tx, signers, opts) {\n return this.provider.simulate(tx, signers, opts);\n }\n getAccountInfo(accountId) {\n return this.provider.getAccountInfo(accountId);\n }\n /**\n * Creates a new transaction using this Provider.\n * @param instructions\n * @param signers\n * @returns\n */\n newTX(instructions = [], signers = []) {\n return TransactionEnvelope_js_1.TransactionEnvelope.create(this, instructions, signers);\n }\n /**\n * Requests an airdrop of tokens.\n * @param amount\n * @returns\n */\n async requestAirdrop(lamports, to = this.wallet.publicKey) {\n return new index_js_2.PendingTransaction(this.connection, await this.connection.requestAirdrop(to, lamports));\n }\n /**\n * Returns this provider with a different signer.\n * @param signer\n * @returns\n */\n withSigner(signer) {\n return new SolanaAugmentedProvider(new SolanaProvider(this.connection, this.broadcaster, new index_js_2.SignerWallet(signer), this.opts));\n }\n}\nexports.SolanaAugmentedProvider = SolanaAugmentedProvider;\n//# sourceMappingURL=provider.js.map\n\n/***/ }),\n\n/***/ 5395:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.PendingTransaction = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst promise_retry_1 = tslib_1.__importDefault(__webpack_require__(5273));\nconst txLink_js_1 = __webpack_require__(3409);\nconst TransactionReceipt_js_1 = __webpack_require__(6920);\n/**\n * Transaction which may or may not be confirmed.\n */\nclass PendingTransaction {\n constructor(connection, signature) {\n this.connection = connection;\n this.signature = signature;\n this._receipt = null;\n }\n /**\n * Gets the transaction receipt, if it has already been fetched.\n *\n * You probably want the async version of this function, `wait`.\n */\n get receipt() {\n return this._receipt;\n }\n /**\n * Waits for the confirmation of the transaction.\n * @returns\n */\n async wait({ commitment = \"confirmed\", maxSupportedTransactionVersion = 0, useWebsocket = true, ...retryOpts } = {}) {\n if (this._receipt) {\n return this._receipt;\n }\n if (useWebsocket) {\n await this.confirm({ commitment, ...retryOpts });\n return await this.pollForReceipt({\n commitment,\n maxSupportedTransactionVersion,\n });\n }\n return await this.pollForReceipt({\n commitment,\n maxSupportedTransactionVersion,\n ...retryOpts,\n });\n }\n /**\n * Fetches the TransactionReceipt via polling.\n * @returns\n */\n async pollForReceipt({ commitment = \"confirmed\", maxSupportedTransactionVersion = 0, ...retryOpts } = {}) {\n const receipt = await (0, promise_retry_1.default)(async (retry) => {\n const result = await this.connection.getTransaction(this.signature, {\n commitment,\n maxSupportedTransactionVersion,\n });\n if (!result) {\n retry(new Error(\"Error fetching transaction\"));\n return;\n }\n return new TransactionReceipt_js_1.TransactionReceipt(this.signature, result);\n }, {\n retries: 5,\n minTimeout: 500,\n ...retryOpts,\n });\n if (!receipt) {\n throw new Error(\"transaction could not be confirmed\");\n }\n this._receipt = receipt;\n return receipt;\n }\n /**\n * Awaits the confirmation of the transaction, via onSignature subscription.\n *\n * @deprecated use {@link PendingTransaction#confirm}\n * @returns\n */\n async awaitSignatureConfirmation(commitment = \"confirmed\") {\n const { value } = await this.connection.confirmTransaction(this.signature, commitment);\n if (value.err) {\n throw value.err;\n }\n return this.signature;\n }\n /**\n * Awaits the confirmation of the transaction, via onSignature subscription.\n * @returns\n */\n async confirm({ commitment = \"confirmed\", blockhash, lastValidBlockHeight, }) {\n let value;\n if (blockhash && lastValidBlockHeight) {\n value = (await this.connection.confirmTransaction({\n signature: this.signature,\n blockhash,\n lastValidBlockHeight,\n }, commitment)).value;\n }\n else {\n value = (await this.connection.confirmTransaction(this.signature, commitment)).value;\n }\n if (value.err) {\n throw new Error(`Transaction ${this.signature} failed (${JSON.stringify(value)})`);\n }\n return this.signature;\n }\n /**\n * Generates a link to view this {@link PendingTransaction} on the official Solana explorer.\n * @param network\n * @returns\n */\n generateSolanaExplorerLink(cluster = \"mainnet-beta\") {\n return (0, txLink_js_1.generateTXLink)(this.signature, cluster);\n }\n}\nexports.PendingTransaction = PendingTransaction;\n//# sourceMappingURL=PendingTransaction.js.map\n\n/***/ }),\n\n/***/ 775:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TransactionEnvelope = exports.PACKET_DATA_SIZE = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst web3_js_1 = __webpack_require__(6737);\nconst tiny_invariant_1 = tslib_1.__importDefault(__webpack_require__(6018));\nconst index_js_1 = __webpack_require__(3078);\nconst index_js_2 = __webpack_require__(2723);\nconst txSizer_js_1 = __webpack_require__(8129);\nconst utils_js_1 = __webpack_require__(2707);\nexports.PACKET_DATA_SIZE = 1280 - 40 - 8;\nconst ASSOCIATED_TOKEN_PROGRAM_ID = new web3_js_1.PublicKey(\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\");\n/**\n * Filters the required signers for a list of instructions.\n * @param ixs\n * @returns\n */\nconst filterRequiredSigners = (ixs, signers) => {\n // filter out the signers required for the transaction\n const requiredSigners = ixs.flatMap((ix) => ix.keys.filter((k) => k.isSigner).map((k) => k.pubkey));\n return signers.filter((s) => requiredSigners.find((rs) => rs.equals(s.publicKey)));\n};\n/**\n * Contains a Transaction that is being built.\n */\nclass TransactionEnvelope {\n constructor(\n /**\n * Provider that will be sending the transaction as the fee payer.\n */\n provider, \n /**\n * Instructions associated with the transaction.\n */\n instructions, \n /**\n * Optional signers of the transaction.\n */\n signers = []) {\n this.provider = provider;\n this.instructions = instructions;\n this.signers = signers;\n }\n /**\n * Prepends the given {@link TransactionInstruction}s to the {@link TransactionEnvelope}.\n * @param instructions The instructions to prepend.\n * @returns\n */\n prepend(...instructions) {\n this.instructions.unshift(...instructions.filter((ix) => !!ix));\n return this;\n }\n /**\n * Appends the given {@link TransactionInstruction}s to the {@link TransactionEnvelope}.\n * @param instructions The instructions to append.\n * @returns\n */\n append(...instructions) {\n this.instructions.push(...instructions.filter((ix) => !!ix));\n return this;\n }\n /**\n * A the given {@link TransactionInstruction}s to the {@link TransactionEnvelope}.\n * @param instructions The instructions to add.\n * @deprecated Use {@link #append} instead.\n * @returns\n */\n addInstructions(...instructions) {\n return this.append(...instructions);\n }\n /**\n * Adds the given {@link Signer}s to the {@link TransactionEnvelope}.\n * @param signers The signers to add.\n * @returns\n */\n addSigners(...signers) {\n this.signers.push(...signers);\n return this;\n }\n /**\n * Builds a transaction from this envelope.\n * @param feePayer Optional override for the fee payer.\n */\n build(feePayer = this.provider.wallet.publicKey) {\n const tx = new web3_js_1.Transaction().add(...this.instructions);\n tx.feePayer = feePayer;\n return tx;\n }\n /**\n * Builds a transaction and estimates the size in bytes.\n * Does not check to see if the transaction is too big.\n *\n * @returns Byte count\n */\n estimateSizeUnsafe() {\n const builtTx = this.build();\n // dummy blockhash that is required for building the transaction\n builtTx.recentBlockhash = \"MaryHadALittLeLambZNdhAUTrsLE1ydg6rmtvFEpKT\";\n return (0, txSizer_js_1.calculateTxSizeUnsafe)(builtTx);\n }\n /**\n * Builds a transaction and estimates the size in bytes. This number is primrily\n * to be used for checking to see if a transaction is too big and instructions\n * need to be split. It may not be 100% accurate.\n *\n * This is used in expectTXTable and is useful for increasing efficiency in\n * dapps that build large transactions.\n *\n * The max transaction size of a v1 Transaction in Solana is 1232 bytes.\n * For info about Transaction v2: https://docs.solana.com/proposals/transactions-v2\n */\n estimateSize() {\n return (0, index_js_2.suppressConsoleError)(() => {\n try {\n const builtTx = this.build();\n // dummy blockhash that is required for building the transaction\n builtTx.recentBlockhash = \"MaryHadALittLeLambZNdhAUTrsLE1ydg6rmtvFEpKT\";\n const size = (0, txSizer_js_1.calculateTxSizeUnsafe)(builtTx);\n if (size > exports.PACKET_DATA_SIZE) {\n return { error: new index_js_2.EstimatedTXTooBigError(builtTx, size) };\n }\n return { size };\n }\n catch (e) {\n return { error: new index_js_2.TXSizeEstimationError(e) };\n }\n });\n }\n /**\n * Partition a large {@link TransactionEnvelope} into smaller, valid {@link Transaction}s.\n * This relies on this envelope already having the correct number of signers.\n *\n * @param feePayer Optional fee payer override.\n * @returns A list of {@link Transaction}s.\n */\n buildPartition(feePayer = this.provider.wallet.publicKey) {\n const partition = this.partition();\n return partition.map((env) => env.build(feePayer));\n }\n /**\n * Partition a large {@link TransactionEnvelope} into smaller, valid transaction envelopes which can be built.\n * This relies on this envelope already having the correct number of signers.\n *\n * @returns\n */\n partition() {\n const estimation = this.estimateSize();\n if (\"size\" in estimation) {\n return [this];\n }\n // empty partition should have no envelopes\n if (this.instructions.length === 0) {\n return [];\n }\n let lastTXEnv = new TransactionEnvelope(this.provider, this.instructions.slice(0, 1), this._filterRequiredSigners(this.instructions.slice(0, 1)));\n let lastEstimation = lastTXEnv.estimateSizeUnsafe();\n const txs = [];\n this.instructions.slice(1).forEach((ix, i) => {\n if (lastEstimation > exports.PACKET_DATA_SIZE) {\n throw new Error(`cannot construct a valid partition: instruction ${i} is too large (${lastEstimation} > ${exports.PACKET_DATA_SIZE})`);\n }\n const nextIXs = [...lastTXEnv.instructions, ix];\n const nextSigners = this._filterRequiredSigners(nextIXs);\n const nextTXEnv = new TransactionEnvelope(this.provider, nextIXs, nextSigners);\n const nextEstimation = nextTXEnv.estimateSizeUnsafe();\n // move to next tx envelope if too big\n if (nextEstimation > exports.PACKET_DATA_SIZE) {\n txs.push(lastTXEnv);\n const nextIXs = [ix];\n lastTXEnv = new TransactionEnvelope(this.provider, nextIXs, this._filterRequiredSigners(nextIXs));\n lastEstimation = lastTXEnv.estimateSizeUnsafe();\n }\n else {\n lastTXEnv = nextTXEnv;\n lastEstimation = nextEstimation;\n }\n });\n txs.push(lastTXEnv);\n return txs;\n }\n /**\n * Filters the required signers for a list of instructions.\n * @param ixs\n * @returns\n */\n _filterRequiredSigners(ixs) {\n return filterRequiredSigners(ixs, this.signers);\n }\n /**\n * Generates a link for inspecting the contents of this {@link TransactionEnvelope}.\n *\n * @returns URL\n */\n generateInspectLink(cluster = \"mainnet-beta\") {\n const t = this.build();\n t.recentBlockhash = utils_js_1.RECENT_BLOCKHASH_STUB;\n const str = t.serializeMessage().toString(\"base64\");\n return (0, utils_js_1.generateInspectLinkFromBase64)(cluster, str);\n }\n /**\n * Simulates the transaction.\n * @param opts\n * @returns\n */\n simulate(opts = {\n verifySigners: true,\n }) {\n return this.provider.simulate(this.build(), opts.verifySigners ? this.signers : undefined, opts);\n }\n /**\n * Simulates the transaction, without validating signers.\n *\n * @deprecated Use {@link TXEnvelope#simulate} instead.\n * @param opts\n * @returns\n */\n simulateUnchecked(opts) {\n return this.simulate({ ...opts, verifySigners: false });\n }\n /**\n * Simulates the transaction and prints a fancy table in the console.\n * ```\n * ┌─────┬───┬───┬───┬───────────┬──────┬─────┬──────┬───┐\n * │index│iso│mar│cum│ programId │quota │used │ left │CPI│\n * ├─────┼───┼───┼───┼───────────┼──────┼─────┼──────┼───┤\n * │ 0 │298│281│464│'ATokenG..'│200000│24270│175730│ 1 │\n * │ 1 │298│ 74│538│'ATokenG..'│178730│21270│157460│ 1 │\n * │ 2 │298│ 74│612│'ATokenG..'│157460│27277│130183│ 1 │\n * │ 3 │298│ 42│686│'ATokenG..'│130183│21270│108913│ 1 │\n * │ 4 │338│265│951│'qExampL..'│108913│76289│ 32624│ 3 │\n * └─────┴───┴───┴───┴───────────┴──────┴─────┴──────┴───┘\n * ```\n *\n * - **index**: the array index of the instruction within the transaction\n * - **iso**: the isolated size of the instruction (marginal cost of only the instruction)\n * - **mar**: the marginal size cost of the instruction (when added to previous)\n * - **cum**: the cumulative size of the instructions up until that instruction\n * - **quota/used/left**: [BPF instruction compute unit info](https://docs.solana.com/developing/programming-model/runtime)\n * - **CPI**: [the maximum depth of CPI](https://docs.solana.com/developing/programming-model/calling-between-programs) (current limit in Solana is 4)\n *\n * @param opts\n * @returns\n */\n simulateTable(opts) {\n return this.simulate(opts).then((simulation) => {\n var _a;\n if ((_a = simulation === null || simulation === void 0 ? void 0 : simulation.value) === null || _a === void 0 ? void 0 : _a.logs) {\n (0, index_js_2.printTXTable)(this, simulation.value.logs, \"\");\n }\n return simulation;\n });\n }\n /**\n * Sends the transaction without confirming it.\n * @param opts\n * @returns\n */\n async send(opts) {\n const signed = await this.provider.signer.sign(this.build(), this.signers, opts);\n return this.provider.broadcaster.broadcast(signed, opts);\n }\n /**\n * Sends the transaction and waits for confirmation.\n * @param opts\n */\n async confirm(opts) {\n return (await this.send(opts)).wait();\n }\n /**\n * Combines the instructions/signers of the other envelope to create one large transaction.\n */\n combine(other) {\n return new TransactionEnvelope(this.provider, [...this.instructions, ...other.instructions], [...this.signers, ...other.signers]);\n }\n /**\n * Get a list of all writable accounts, deduped\n * All of these accounts likely need to be updated after the transaction is confirmed.\n */\n get writableKeys() {\n return [\n ...new Set([\n ...this.instructions\n .map((inst) => inst.keys.filter((key) => key.isWritable).map((k) => k.pubkey))\n .reduce((acc, el) => acc.concat(el)),\n ]).values(),\n ];\n }\n /**\n * Gets the instructions in a format that can be serialized easily to JSON.\n */\n get instructionsJSON() {\n return this.instructions.map((instruction) => ({\n programId: instruction.programId.toString(),\n keys: instruction.keys.map((m) => ({\n isSigner: m.isSigner,\n isWritable: m.isWritable,\n publicKey: m.pubkey.toString(),\n })),\n data: instruction.data.toString(\"base64\"),\n }));\n }\n /**\n * Returns a string representation of the {@link TransactionEnvelope}.\n */\n get debugStr() {\n return [\n \"=> Instructions\",\n this.instructions\n .map((ser, i) => {\n return [\n `Instruction ${i}: ${ser.programId.toString()}`,\n ...ser.keys.map((k, i) => ` [${i}] ${k.pubkey.toString()} ${k.isWritable ? \"(mut)\" : \"\"} ${k.isSigner ? \"(signer)\" : \"\"}`),\n ` Data (base64): ${ser.data.toString(\"base64\")}`,\n ].join(\"\\n\");\n })\n .join(\"\\n\"),\n \"=> Signers\",\n this.signers.map((sg) => sg.publicKey.toString()).join(\"\\n\"),\n ].join(\"\\n\");\n }\n /**\n * Creates a new {@link TransactionEnvelope}.\n * @param provider\n * @param instructions\n * @param signers\n * @returns\n */\n static create(provider, instructions, signers = []) {\n const ixs = instructions.filter((ix) => !!ix);\n return new TransactionEnvelope(provider, ixs, signers);\n }\n /**\n * Add a memo to each transaction envelope specified.\n */\n static addMemos(memo, ...txs) {\n return txs.map((tx) => tx.addMemo(memo));\n }\n /**\n * Combines multiple TransactionEnvelopes into one.\n */\n static combineAll(...txs) {\n return txs.reduce((acc, tx) => acc.combine(tx));\n }\n /**\n * Takes a list of {@link TransactionEnvelope}s and combines them if they\n * are able to be combined under the maximum TX size limit.\n *\n * @param txs\n * @returns\n */\n static pack(...txs) {\n if (txs.length === 0) {\n return [];\n }\n const [first, ...rest] = txs;\n (0, tiny_invariant_1.default)(first);\n const { provider } = first;\n let lastTXEnv = first;\n let lastEstimation = lastTXEnv.estimateSizeUnsafe();\n const partition = [];\n rest.forEach((addedTX, i) => {\n if (lastEstimation > exports.PACKET_DATA_SIZE) {\n throw new Error(`cannot construct a valid partition: instruction ${i} is too large (${lastEstimation} > ${exports.PACKET_DATA_SIZE})`);\n }\n const nextIXs = [...lastTXEnv.instructions, ...addedTX.instructions];\n const nextSigners = filterRequiredSigners(nextIXs, [\n ...lastTXEnv.signers,\n ...addedTX.signers,\n ]);\n const nextTXEnv = new TransactionEnvelope(provider, nextIXs, nextSigners);\n const nextEstimation = nextTXEnv.estimateSizeUnsafe();\n // move to next tx envelope if too big\n if (nextEstimation > exports.PACKET_DATA_SIZE) {\n partition.push(lastTXEnv);\n lastTXEnv = addedTX;\n lastEstimation = lastTXEnv.estimateSizeUnsafe();\n }\n else {\n lastTXEnv = nextTXEnv;\n lastEstimation = nextEstimation;\n }\n });\n partition.push(lastTXEnv);\n return partition;\n }\n /**\n * Combines multiple async TransactionEnvelopes into one, serially.\n */\n static async combineAllAsync(firstTX, ...txs) {\n let acc = await firstTX;\n for (const tx of txs) {\n acc = acc.combine(await tx);\n }\n return acc;\n }\n /**\n * Sends all of the envelopes.\n * @returns Pending transactions\n */\n static async sendAll(txs, opts) {\n const firstTX = txs[0];\n if (!firstTX) {\n return [];\n }\n const provider = firstTX.provider;\n return await provider.sendAll(txs.map((tx) => ({ tx: tx.build(), signers: tx.signers })), opts);\n }\n /**\n * Deduplicate ATA instructions inside the transaction envelope.\n */\n dedupeATAIXs() {\n if (this.instructions.length === 0) {\n return this;\n }\n const seenATAs = new Set();\n const instructions = this.instructions\n .map((ix) => {\n var _a;\n const programId = ix.programId;\n if (programId.equals(ASSOCIATED_TOKEN_PROGRAM_ID)) {\n const ataKey = (_a = ix.keys[1]) === null || _a === void 0 ? void 0 : _a.pubkey.toString();\n if (!ataKey) {\n throw new Error(\"ATA key does not exist on ATA instruction\");\n }\n if (seenATAs.has(ataKey)) {\n return null;\n }\n seenATAs.add(ataKey);\n }\n return ix;\n })\n .filter((ix) => !!ix);\n return new TransactionEnvelope(this.provider, instructions, this.signers);\n }\n /**\n * Split out ATA instructions to a separate transaction envelope.\n */\n splitATAIXs() {\n const ataIXs = new TransactionEnvelope(this.provider, [], this.signers);\n const newTx = new TransactionEnvelope(this.provider, [], this.signers);\n for (const ix of this.instructions) {\n if (ix.programId.equals(ASSOCIATED_TOKEN_PROGRAM_ID)) {\n ataIXs.instructions.push(ix);\n }\n else {\n newTx.instructions.push(ix);\n }\n }\n return {\n ataIXs: ataIXs.dedupeATAIXs(),\n tx: newTx,\n };\n }\n /**\n * Get an instruction from the transaction envelope by index.\n */\n getInstruction(index) {\n const ix = this.instructions[index];\n if (!ix) {\n throw new Error(`No instruction found at index ${index}`);\n }\n return ix;\n }\n /**\n * Attach a memo instruction to this transaction.\n */\n addMemo(memo) {\n this.instructions.push((0, index_js_2.createMemoInstruction)(memo));\n return this;\n }\n /**\n * Request for additional compute units before processing this transaction.\n */\n addAdditionalComputeBudget(units, additionalFee) {\n this.instructions.unshift((0, index_js_1.requestComputeUnitsInstruction)(units, additionalFee));\n return this;\n }\n /**\n * Request a specific transaction-wide program heap region size in bytes.\n */\n addAdditionalHeapFrame(bytes) {\n this.instructions.unshift((0, index_js_1.requestHeapFrameInstruction)(bytes));\n return this;\n }\n}\nexports.TransactionEnvelope = TransactionEnvelope;\n//# sourceMappingURL=TransactionEnvelope.js.map\n\n/***/ }),\n\n/***/ 6920:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TransactionReceipt = exports.confirmTransactionLike = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst tiny_invariant_1 = tslib_1.__importDefault(__webpack_require__(6018));\nconst misc_js_1 = __webpack_require__(2837);\nconst txLink_js_1 = __webpack_require__(3409);\nconst PendingTransaction_js_1 = __webpack_require__(5395);\n/**\n * Confirms a transaction, returning its receipt.\n *\n * @param tx\n * @returns\n */\nconst confirmTransactionLike = async (tx) => {\n const ish = await (0, misc_js_1.valueAsPromise)(tx);\n if (ish instanceof TransactionReceipt) {\n return ish;\n }\n let pending;\n if (ish instanceof PendingTransaction_js_1.PendingTransaction) {\n pending = ish;\n }\n else {\n pending = await ish.send({\n printLogs: false,\n });\n }\n return await pending.wait();\n};\nexports.confirmTransactionLike = confirmTransactionLike;\n/**\n * A transaction that has been processed by the cluster.\n */\nclass TransactionReceipt {\n constructor(\n /**\n * Signature (id) of the transaction.\n */\n signature, \n /**\n * Raw response from web3.js\n */\n response) {\n this.signature = signature;\n this.response = response;\n }\n /**\n * Gets the events associated with this transaction.\n */\n getEvents(eventParser) {\n var _a;\n const logs = (_a = this.response.meta) === null || _a === void 0 ? void 0 : _a.logMessages;\n if (logs && logs.length > 0) {\n return eventParser(logs);\n }\n return [];\n }\n /**\n * Prints the logs associated with this transaction.\n */\n printLogs() {\n var _a, _b;\n console.log((_b = (_a = this.response.meta) === null || _a === void 0 ? void 0 : _a.logMessages) === null || _b === void 0 ? void 0 : _b.join(\"\\n\"));\n }\n /**\n * Gets the compute units used by the transaction.\n * @returns\n */\n get computeUnits() {\n var _a;\n const logs = (_a = this.response.meta) === null || _a === void 0 ? void 0 : _a.logMessages;\n (0, tiny_invariant_1.default)(logs, \"no logs\");\n const consumeLog = logs[logs.length - 2];\n (0, tiny_invariant_1.default)(consumeLog, \"no consume log\");\n const amtStr = consumeLog.split(\" \")[3];\n (0, tiny_invariant_1.default)(amtStr, \"no amount\");\n return parseInt(amtStr);\n }\n /**\n * Generates a link to view this {@link TransactionReceipt} on the official Solana explorer.\n * @param network\n * @returns\n */\n generateSolanaExplorerLink(cluster = \"mainnet-beta\") {\n return (0, txLink_js_1.generateTXLink)(this.signature, cluster);\n }\n}\nexports.TransactionReceipt = TransactionReceipt;\n//# sourceMappingURL=TransactionReceipt.js.map\n\n/***/ }),\n\n/***/ 2175:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst tslib_1 = __webpack_require__(7582);\ntslib_1.__exportStar(__webpack_require__(686), exports);\ntslib_1.__exportStar(__webpack_require__(5395), exports);\ntslib_1.__exportStar(__webpack_require__(7422), exports);\ntslib_1.__exportStar(__webpack_require__(775), exports);\ntslib_1.__exportStar(__webpack_require__(6920), exports);\ntslib_1.__exportStar(__webpack_require__(2707), exports);\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 686:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/**\n * Adapted from explorer.solana.com code written by @jstarry.\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.formatInstructionLogs = exports.formatLogEntry = exports.parseTransactionLogs = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst tiny_invariant_1 = tslib_1.__importDefault(__webpack_require__(6018));\nconst programErr_js_1 = __webpack_require__(7422);\n/**\n * Stack-aware program log parser.\n * @param logs\n * @param error\n * @returns\n */\nconst parseTransactionLogs = (logs, error) => {\n let depth = 0;\n const prettyLogs = [];\n let prettyError;\n if (!logs) {\n if (error)\n throw new Error(JSON.stringify(error));\n throw new Error(\"No logs detected\");\n }\n else if (error) {\n prettyError = (0, programErr_js_1.getTransactionInstructionError)(error);\n }\n logs.forEach((log) => {\n var _a, _b, _c, _d, _e;\n if (log.startsWith(\"Program log:\")) {\n (_a = prettyLogs[prettyLogs.length - 1]) === null || _a === void 0 ? void 0 : _a.logs.push({\n type: \"text\",\n depth,\n text: log,\n });\n }\n else {\n const regex = /Program (\\w*) invoke \\[(\\d)\\]/g;\n const matches = [...log.matchAll(regex)];\n if (matches.length > 0) {\n const programAddress = (_b = matches[0]) === null || _b === void 0 ? void 0 : _b[1];\n (0, tiny_invariant_1.default)(programAddress, \"program address\");\n if (depth === 0) {\n prettyLogs.push({\n programAddress,\n logs: [],\n failed: false,\n });\n }\n else {\n (_c = prettyLogs[prettyLogs.length - 1]) === null || _c === void 0 ? void 0 : _c.logs.push({\n type: \"cpi\",\n depth,\n programAddress: programAddress !== null && programAddress !== void 0 ? programAddress : null,\n });\n }\n depth++;\n }\n else if (log.includes(\"success\")) {\n (_d = prettyLogs[prettyLogs.length - 1]) === null || _d === void 0 ? void 0 : _d.logs.push({\n type: \"success\",\n depth,\n });\n depth--;\n }\n else if (log.includes(\"failed\")) {\n const instructionLog = prettyLogs[prettyLogs.length - 1];\n if (instructionLog && !instructionLog.failed) {\n instructionLog.failed = true;\n instructionLog.logs.push({\n type: \"programError\",\n depth,\n text: log.slice(log.indexOf(\": \") + 2),\n });\n }\n depth--;\n }\n else {\n if (depth === 0) {\n prettyLogs.push({\n logs: [],\n failed: false,\n });\n depth++;\n }\n // system transactions don't start with \"Program log:\"\n (_e = prettyLogs[prettyLogs.length - 1]) === null || _e === void 0 ? void 0 : _e.logs.push({\n type: \"system\",\n depth,\n text: log,\n });\n }\n }\n });\n // If the instruction's simulation returned an error without any logs then add an empty log entry for Runtime error\n // For example BpfUpgradableLoader fails without returning any logs for Upgrade instruction with buffer that doesn't exist\n if (prettyError && prettyLogs.length === 0) {\n prettyLogs.push({\n logs: [],\n failed: true,\n });\n }\n if (prettyError && prettyError.index === prettyLogs.length - 1) {\n const failedIx = prettyLogs[prettyError.index];\n if (failedIx) {\n failedIx.failed = true;\n failedIx.logs.push({\n type: \"runtimeError\",\n depth: 1,\n text: prettyError.message,\n });\n }\n }\n return prettyLogs;\n};\nexports.parseTransactionLogs = parseTransactionLogs;\nconst buildPrefix = (depth) => {\n const prefix = new Array(depth - 1).fill(\"\\u00A0\\u00A0\").join(\"\");\n return prefix + \"> \";\n};\nconst formatLogEntryString = (entry) => {\n switch (entry.type) {\n case \"success\":\n return `Program returned success`;\n case \"programError\":\n return `Program returned error: ${entry.text}`;\n case \"runtimeError\":\n return `Runtime error: ${entry.text}`;\n case \"system\":\n return entry.text;\n case \"text\":\n return entry.text;\n case \"cpi\":\n return `Invoking Unknown ${entry.programAddress ? `(${entry.programAddress}) ` : \"\"}Program`;\n }\n};\n/**\n * Formats a log entry to be printed out.\n * @param entry\n * @param prefix\n * @returns\n */\nconst formatLogEntry = (entry, prefix = false) => {\n const prefixString = prefix ? buildPrefix(entry.depth) : \"\";\n return `${prefixString}${formatLogEntryString(entry)}`;\n};\nexports.formatLogEntry = formatLogEntry;\n/**\n * Formats instruction logs.\n * @param logs\n */\nconst formatInstructionLogs = (logs) => logs\n .map((log, i) => {\n return [\n `=> Instruction #${i}: ${log.programAddress ? `Program ${log.programAddress}` : \"System\"}`,\n ...log.logs.map((entry) => (0, exports.formatLogEntry)(entry, true)),\n ].join(\"\\n\");\n})\n .join(\"\\n\");\nexports.formatInstructionLogs = formatInstructionLogs;\n//# sourceMappingURL=parseTransactionLogs.js.map\n\n/***/ }),\n\n/***/ 7422:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n/**\n * Borrowed from explorer.solana.com code written by @jstarry.\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getTransactionInstructionError = exports.BUILTIN_SOLANA_ERROR_MESSAGES = void 0;\n/**\n * Solana error messages built-in.\n */\nexports.BUILTIN_SOLANA_ERROR_MESSAGES = new Map([\n [\"GenericError\", \"generic instruction error\"],\n [\"InvalidArgument\", \"invalid program argument\"],\n [\"InvalidInstructionData\", \"invalid instruction data\"],\n [\"InvalidAccountData\", \"invalid account data for instruction\"],\n [\"AccountDataTooSmall\", \"account data too small for instruction\"],\n [\"InsufficientFunds\", \"insufficient funds for instruction\"],\n [\"IncorrectProgramId\", \"incorrect program id for instruction\"],\n [\"MissingRequiredSignature\", \"missing required signature for instruction\"],\n [\n \"AccountAlreadyInitialized\",\n \"instruction requires an uninitialized account\",\n ],\n [\"UninitializedAccount\", \"instruction requires an initialized account\"],\n [\n \"UnbalancedInstruction\",\n \"sum of account balances before and after instruction do not match\",\n ],\n [\"ModifiedProgramId\", \"instruction modified the program id of an account\"],\n [\n \"ExternalAccountLamportSpend\",\n \"instruction spent from the balance of an account it does not own\",\n ],\n [\n \"ExternalAccountDataModified\",\n \"instruction modified data of an account it does not own\",\n ],\n [\n \"ReadonlyLamportChange\",\n \"instruction changed the balance of a read-only account\",\n ],\n [\"ReadonlyDataModified\", \"instruction modified data of a read-only account\"],\n [\"DuplicateAccountIndex\", \"instruction contains duplicate accounts\"],\n [\"ExecutableModified\", \"instruction changed executable bit of an account\"],\n [\"RentEpochModified\", \"instruction modified rent epoch of an account\"],\n [\"NotEnoughAccountKeys\", \"insufficient account keys for instruction\"],\n [\"AccountDataSizeChanged\", \"non-system instruction changed account size\"],\n [\"AccountNotExecutable\", \"instruction expected an executable account\"],\n [\n \"AccountBorrowFailed\",\n \"instruction tries to borrow reference for an account which is already borrowed\",\n ],\n [\n \"AccountBorrowOutstanding\",\n \"instruction left account with an outstanding borrowed reference\",\n ],\n [\n \"DuplicateAccountOutOfSync\",\n \"instruction modifications of multiply-passed account differ\",\n ],\n [\"Custom\", \"custom program error: {0}\"],\n [\"InvalidError\", \"program returned invalid error code\"],\n [\"ExecutableDataModified\", \"instruction changed executable accounts data\"],\n [\n \"ExecutableLamportChange\",\n \"instruction changed the balance of a executable account\",\n ],\n [\"ExecutableAccountNotRentExempt\", \"executable accounts must be rent exempt\"],\n [\"UnsupportedProgramId\", \"Unsupported program id\"],\n [\"CallDepth\", \"Cross-program invocation call depth too deep\"],\n [\"MissingAccount\", \"An account required by the instruction is missing\"],\n [\n \"ReentrancyNotAllowed\",\n \"Cross-program invocation reentrancy not allowed for this instruction\",\n ],\n [\n \"MaxSeedLengthExceeded\",\n \"Length of the seed is too long for address generation\",\n ],\n [\"InvalidSeeds\", \"Provided seeds do not result in a valid address\"],\n [\"InvalidRealloc\", \"Failed to reallocate account data\"],\n [\"ComputationalBudgetExceeded\", \"Computational budget exceeded\"],\n [\n \"PrivilegeEscalation\",\n \"Cross-program invocation with unauthorized signer or writable account\",\n ],\n [\n \"ProgramEnvironmentSetupFailure\",\n \"Failed to create program execution environment\",\n ],\n [\"ProgramFailedToComplete\", \"Program failed to complete\"],\n [\"ProgramFailedToCompile\", \"Program failed to compile\"],\n [\"Immutable\", \"Account is immutable\"],\n [\"IncorrectAuthority\", \"Incorrect authority provided\"],\n [\"BorshIoError\", \"Failed to serialize or deserialize account data: {0}\"],\n [\n \"AccountNotRentExempt\",\n \"An account does not have enough lamports to be rent-exempt\",\n ],\n [\"InvalidAccountOwner\", \"Invalid account owner\"],\n [\"ArithmeticOverflow\", \"Program arithmetic overflowed\"],\n [\"UnsupportedSysvar\", \"Unsupported sysvar\"],\n [\"IllegalOwner\", \"Provided owner is not allowed\"],\n]);\nfunction getTransactionInstructionError(error) {\n if (!error) {\n return;\n }\n if (typeof error === \"object\" && \"InstructionError\" in error) {\n const innerError = error[\"InstructionError\"];\n const index = innerError[0];\n const instructionError = innerError[1];\n return {\n index,\n message: getInstructionError(instructionError),\n };\n }\n}\nexports.getTransactionInstructionError = getTransactionInstructionError;\nfunction getInstructionError(error) {\n let out;\n let value = null;\n if (typeof error === \"string\") {\n const message = exports.BUILTIN_SOLANA_ERROR_MESSAGES.get(error);\n if (message) {\n return message;\n }\n }\n else if (\"Custom\" in error) {\n out = exports.BUILTIN_SOLANA_ERROR_MESSAGES.get(\"Custom\");\n value = error[\"Custom\"];\n }\n else if (\"BorshIoError\" in error) {\n out = exports.BUILTIN_SOLANA_ERROR_MESSAGES.get(\"BorshIoError\");\n value = error[\"BorshIoError\"];\n }\n if (out && value) {\n return out.replace(\"{0}\", value);\n }\n return \"Unknown instruction error\";\n}\n//# sourceMappingURL=programErr.js.map\n\n/***/ }),\n\n/***/ 8129:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.calculateTxSizeUnsafe = void 0;\nfunction shortvecEncodeLength(bytes, len) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len === 0) {\n bytes.push(elem);\n break;\n }\n else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n/**\n * Calculates transaction size. If the transaction is too large, it does not throw.\n * @param tx\n * @returns\n */\nconst calculateTxSizeUnsafe = (tx) => {\n // check if fee payer signed.\n const { feePayer } = tx;\n const hasFeePayerSigned = feePayer && tx.signatures.find((s) => s.publicKey.equals(feePayer));\n const signData = tx.serializeMessage();\n const numSigners = tx.signatures.length + (hasFeePayerSigned ? 1 : 0);\n const signatureCount = [];\n shortvecEncodeLength(signatureCount, numSigners);\n return signatureCount.length + numSigners * 64 + signData.length;\n};\nexports.calculateTxSizeUnsafe = calculateTxSizeUnsafe;\n//# sourceMappingURL=txSizer.js.map\n\n/***/ }),\n\n/***/ 2707:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.generateUncheckedInspectLink = exports.generateInspectLinkFromBase64 = exports.serializeToBase64Unchecked = exports.buildStubbedTransaction = exports.RECENT_BLOCKHASH_STUB = void 0;\nconst web3_js_1 = __webpack_require__(6737);\n/**\n * Stub of a recent blockhash that can be used to simulate transactions.\n */\nexports.RECENT_BLOCKHASH_STUB = \"GfVcyD4kkTrj4bKc7WA9sZCin9JDbdT4Zkd3EittNR1W\";\n/**\n * Builds a transaction with a fake `recentBlockhash` and `feePayer` for the purpose\n * of simulating a sequence of instructions.\n *\n * @param cluster\n * @param ixs\n * @returns\n */\nconst buildStubbedTransaction = (cluster, ixs) => {\n const tx = new web3_js_1.Transaction();\n tx.recentBlockhash = exports.RECENT_BLOCKHASH_STUB;\n // random keys that always have money in them\n tx.feePayer =\n cluster === \"devnet\"\n ? new web3_js_1.PublicKey(\"A2jaCHPzD6346348JoEym2KFGX9A7uRBw6AhCdX7gTWP\")\n : new web3_js_1.PublicKey(\"9u9iZBWqGsp5hXBxkVZtBTuLSGNAG9gEQLgpuVw39ASg\");\n tx.instructions = ixs;\n return tx;\n};\nexports.buildStubbedTransaction = buildStubbedTransaction;\n/**\n * Serializes a {@link Transaction} to base64 format without checking signatures.\n * @param tx\n * @returns\n */\nconst serializeToBase64Unchecked = (tx) => tx\n .serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n})\n .toString(\"base64\");\nexports.serializeToBase64Unchecked = serializeToBase64Unchecked;\n/**\n * Generates a link for inspecting the contents of a transaction.\n *\n * @returns URL\n */\nconst generateInspectLinkFromBase64 = (cluster, base64TX) => {\n return `https://${cluster === \"mainnet-beta\" ? \"\" : `${cluster}.`}anchor.so/tx/inspector?message=${encodeURIComponent(base64TX)}`;\n};\nexports.generateInspectLinkFromBase64 = generateInspectLinkFromBase64;\n/**\n * Generates a link for inspecting the contents of a transaction, not checking for\n * or requiring valid signatures.\n *\n * @returns URL\n */\nconst generateUncheckedInspectLink = (cluster, tx) => {\n return (0, exports.generateInspectLinkFromBase64)(cluster, (0, exports.serializeToBase64Unchecked)(tx));\n};\nexports.generateUncheckedInspectLink = generateUncheckedInspectLink;\n//# sourceMappingURL=utils.js.map\n\n/***/ }),\n\n/***/ 2723:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst tslib_1 = __webpack_require__(7582);\ntslib_1.__exportStar(__webpack_require__(2330), exports);\ntslib_1.__exportStar(__webpack_require__(2837), exports);\ntslib_1.__exportStar(__webpack_require__(7502), exports);\ntslib_1.__exportStar(__webpack_require__(3358), exports);\ntslib_1.__exportStar(__webpack_require__(5963), exports);\ntslib_1.__exportStar(__webpack_require__(5112), exports);\ntslib_1.__exportStar(__webpack_require__(2377), exports);\ntslib_1.__exportStar(__webpack_require__(6348), exports);\ntslib_1.__exportStar(__webpack_require__(3409), exports);\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 2330:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.createMemoInstruction = exports.MEMO_PROGRAM_ID = void 0;\nconst web3_js_1 = __webpack_require__(6737);\n/**\n * ID of the memo program.\n */\nexports.MEMO_PROGRAM_ID = new web3_js_1.PublicKey(\"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr\");\n/**\n * Creates a memo program instruction.\n *\n * More info: https://spl.solana.com/memo\n *\n * @param text Text of the memo.\n * @param signers Optional signers to validate.\n * @returns\n */\nconst createMemoInstruction = (text, signers = []) => {\n return new web3_js_1.TransactionInstruction({\n programId: exports.MEMO_PROGRAM_ID,\n keys: signers.map((s) => ({\n pubkey: s,\n isSigner: true,\n isWritable: false,\n })),\n data: Buffer.from(text, \"utf8\"),\n });\n};\nexports.createMemoInstruction = createMemoInstruction;\n//# sourceMappingURL=instructions.js.map\n\n/***/ }),\n\n/***/ 2837:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.formatPubkeyShort = exports.valueAsPromise = exports.sleep = exports.suppressConsoleError = exports.suppressConsoleErrorAsync = void 0;\nconst tslib_1 = __webpack_require__(7582);\ntslib_1.__exportStar(__webpack_require__(7979), exports);\nconst noop = () => {\n // noop\n};\n/**\n * Hide the console.error because @solana/web3.js often emits noisy errors as a\n * side effect.\n */\nconst suppressConsoleErrorAsync = async (fn) => {\n const oldConsoleError = console.error;\n console.error = noop;\n try {\n const result = await fn();\n console.error = oldConsoleError;\n return result;\n }\n catch (e) {\n console.error = oldConsoleError;\n throw e;\n }\n};\nexports.suppressConsoleErrorAsync = suppressConsoleErrorAsync;\n/**\n * Hide the console.error because @solana/web3.js often emits noisy errors as a\n * side effect.\n */\nconst suppressConsoleError = (fn) => {\n const oldConsoleError = console.error;\n console.error = noop;\n try {\n const result = fn();\n console.error = oldConsoleError;\n return result;\n }\n catch (e) {\n console.error = oldConsoleError;\n throw e;\n }\n};\nexports.suppressConsoleError = suppressConsoleError;\nfunction sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\nexports.sleep = sleep;\n/**\n * Awaits for a promise or value.\n */\nconst valueAsPromise = async (awaitable) => {\n if (\"then\" in awaitable) {\n return await awaitable;\n }\n return awaitable;\n};\nexports.valueAsPromise = valueAsPromise;\n/**\n * Shortens a pubkey.\n * @param pubkey\n * @returns\n */\nconst formatPubkeyShort = (pubkey, leading = 7, trailing = 7) => {\n const str = pubkey.toString();\n return str.length > 20\n ? `${str.substring(0, leading)}.....${str.substring(str.length - trailing, str.length)}`\n : str;\n};\nexports.formatPubkeyShort = formatPubkeyShort;\n//# sourceMappingURL=misc.js.map\n\n/***/ }),\n\n/***/ 7502:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var process = __webpack_require__(4155);\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.printAccountOwners = void 0;\nconst web3_js_1 = __webpack_require__(6737);\n/**\n * A useful tool for debugging account structs. It gives a quick glance at\n * addresses and owners. It also converts bignums into JS numbers.\n *\n * Types converted:\n * - **big numbers**: converted to native numbers\n * - **addresses**: format in base58, and prints the owner in parentheses if the account exists\n * - **plain objects**: recursively converts\n *\n * HINT: This function is mainly useful for the browser. If you are writing\n * Rust integration tests, use debugAccountOwners from chai-solana instead, so\n * that you don't have to pass in connection.\n *\n * Usage:\n * ```\n * await printAccountOwners(connection, depositAccounts);\n * // using void is recommend in dapps to avoid slowing down the user experience\n * void printAccountOwners(connection, depositAccounts);\n * ```\n *\n * Example output:\n * ```\n * tests/awesomeTest.spec.ts:583:29 {\n * payer: 'CEGhKVeyXUrihUnNU9EchSuu6pMHEsB8MiKgvhJqYgd1 (11111111111111111111111111111111)',\n * foo: '61tMNVhG66QZQ4UEAoHytqaUN4G1xpk1zsS5YU7Y2Qui (135QzSyjKTKaZ7ebhLpvNA2KUahEjykMjbqz3JV1V4k9)',\n * bar: '9oPMxXVSm5msAecxi4zJpKDwbHS9c6Yos1ru739rVExc (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA)',\n * tokenProgram: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA (BPFLoader2111111111111111111111111111111111)'\n * }\n * ```\n *\n * WARNING: This may break silently if web3 changes its api. This is only\n * intended for debugging purposes only. But it should be safe to use in production.\n */\nasync function printAccountOwners(connection, plainObj) {\n var _a, _b;\n try {\n if (typeof plainObj !== \"object\") {\n throw new Error(\"printAccountOwners only works on objects\");\n }\n else {\n let relativePath;\n const callStack = (_a = new Error().stack) === null || _a === void 0 ? void 0 : _a.split(\"\\n\");\n if (callStack) {\n let expectIndex = callStack.findIndex((l) => l.includes(`at ${printAccountOwners.name}`));\n // debugAccountOwners in chai-solana wraps printAccountOwners\n // We need to get the caller of debugAccountOwners instead\n const debugAccountOwnersIndex = callStack.findIndex((l) => l.includes(`at debugAccountOwners`));\n if (debugAccountOwnersIndex > expectIndex) {\n expectIndex = debugAccountOwnersIndex;\n }\n // Only log the line number in Node.js\n if (expectIndex > 0 &&\n typeof process !== \"undefined\" &&\n process.versions !== undefined &&\n process.versions.node !== undefined) {\n const maybeProcess = process;\n const targetLine = callStack[expectIndex + 1];\n if (targetLine) {\n const cwd = ((_b = process.cwd) === null || _b === void 0 ? void 0 : _b.call(process)) || \"/\";\n // get the part of targetLine after cwd\n const targetLineAfterCwd = targetLine.substring(targetLine.indexOf(cwd) + cwd.length);\n if (targetLineAfterCwd.length > 0) {\n relativePath = targetLineAfterCwd.substring(1).replace(/\\)$/, \"\");\n }\n }\n }\n }\n if (!connection) {\n return;\n }\n if (relativePath) {\n console.log(relativePath, await _transformAccountOwners(plainObj, connection));\n }\n else {\n console.log(await _transformAccountOwners(plainObj, connection));\n }\n }\n }\n catch (e) {\n console.error(\"Error in printAccountOwners:\", e);\n }\n}\nexports.printAccountOwners = printAccountOwners;\n/**\n * This is a patched version of web3's getMultipleAccountsInfo.\n *\n * When it reaches an account that doesn't exist, it will just continue instead\n * of giving up.\n *\n * WARNING: This may break silently if web3 changes its api. This is only\n * intended for debugging purposes only.\n */\nasync function gracefulGetMultipleAccountsInfo(connection, publicKeys) {\n var _a;\n try {\n // To be honest, the web3 internals aren't going to change that much. And if\n // they do, it'll be rare.\n const unknownConection = connection;\n const rpcRequest = unknownConection._rpcRequest;\n if (typeof rpcRequest !== \"function\") {\n console.error(\"_rpcRequest is not a function. Maybe web3 changed?\");\n return [];\n }\n const unsafeRes = await rpcRequest(\"getMultipleAccounts\", [\n publicKeys.map((key) => key.toBase58()),\n { encoding: \"base64\", commitment: \"confirmed\" },\n ]);\n const value = (_a = unsafeRes === null || unsafeRes === void 0 ? void 0 : unsafeRes.result) === null || _a === void 0 ? void 0 : _a.value;\n if (value) {\n return value;\n }\n return [];\n }\n catch (e) {\n console.error(\"Error in gracefulGetMultipleAccountsInfo:\", e);\n return [];\n }\n}\n/**\n * Lots of complexity in this function. But using getMultipleAccountsInfo is\n * very important. Even locally, it reduces the time from 300ms to 40ms. On a\n * remote RPC server, it would probably save much more time.\n */\nconst _transformAccountOwners = async (plainObjWithAddressesAndBignums, connection) => {\n /* eslint-disable */\n const result = {};\n if (!plainObjWithAddressesAndBignums ||\n typeof plainObjWithAddressesAndBignums !== \"object\") {\n return plainObjWithAddressesAndBignums;\n }\n const base58ToResultKey = {};\n const base58ToLookup = [];\n const asyncKeys = [];\n const asyncPromises = [];\n for (const [key, value] of Object.entries(plainObjWithAddressesAndBignums)) {\n if (value && value.toBase58 && typeof value.toBase58 === \"function\") {\n const base58 = value.toBase58();\n base58ToResultKey[base58] = key;\n const pubKey = new web3_js_1.PublicKey(base58);\n if (!base58ToLookup.includes(pubKey)) {\n base58ToLookup.push(pubKey);\n }\n }\n else if (value &&\n value.toNumber &&\n typeof value.toNumber === \"function\") {\n result[key] = value.toNumber();\n }\n else if (isPlainObject(value) && value) {\n asyncKeys.push(key);\n asyncPromises.push(_transformAccountOwners(value, connection));\n }\n else {\n result[key] = value;\n }\n }\n if (Object.keys(base58ToResultKey).length > 0) {\n const accountInfos = await gracefulGetMultipleAccountsInfo(connection, base58ToLookup);\n for (const [base58, resultKey] of Object.entries(base58ToResultKey)) {\n const lookupIndex = base58ToLookup.findIndex((p) => p.toBase58() === base58);\n if (lookupIndex >= 0) {\n const accountInfo = accountInfos[lookupIndex];\n const owner = accountInfo === null || accountInfo === void 0 ? void 0 : accountInfo.owner;\n if (owner) {\n result[resultKey] = `${base58} (${owner})`;\n // Uncomment to verify that this implementation is correct\n // const accountInfo =\n // await connection.getAccountInfo(\n // new PublicKey(base58)\n // );\n // const correctOwner = accountInfo?.owner; // we know for sure this works\n // if (!correctOwner) {\n // throw new Error(\"Unable to load correct owner\");\n // }\n // if (!new PublicKey(owner).equals(correctOwner)) {\n // console.log(\"OWNER MISMATCH\", base58, owner, accountInfo?.owner);\n // throw new Error(\"OWNER MISMATCH\");\n // }\n }\n else {\n result[resultKey] = `${base58}`;\n }\n }\n else {\n result[resultKey] = `${base58}`;\n }\n }\n }\n const asyncValues = await Promise.all(asyncPromises);\n for (let i = 0; i < asyncKeys.length; i++) {\n result[asyncKeys[i]] = asyncValues[i];\n }\n return result;\n};\nfunction isPlainObject(obj) {\n /* eslint-disable */\n return (typeof obj === \"object\" && // separate from primitives\n obj !== null && // is obvious\n obj.constructor === Object && // separate instances (Array, DOM, ...)\n Object.prototype.toString.call(obj) === \"[object Object]\"); // separate build-in like Math\n}\n//# sourceMappingURL=printAccountOwners.js.map\n\n/***/ }),\n\n/***/ 3358:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.estimateTransactionSize = exports.EstimatedTXTooBigError = exports.TXSizeEstimationError = exports.printTXTable = void 0;\nconst web3_js_1 = __webpack_require__(6737);\nconst index_js_1 = __webpack_require__(4175);\n/**\n * Takes in a simulation result of a transaction and prints it in a cool table.\n * ```\n * ┌─────┬───┬───┬───┬───────────┬──────┬─────┬──────┬───┐\n * │index│iso│mar│cum│ programId │quota │used │ left │CPI│\n * ├─────┼───┼───┼───┼───────────┼──────┼─────┼──────┼───┤\n * │ 0 │298│281│464│'ATokenG..'│200000│24270│175730│ 1 │\n * │ 1 │298│ 74│538│'ATokenG..'│178730│21270│157460│ 1 │\n * │ 2 │298│ 74│612│'ATokenG..'│157460│27277│130183│ 1 │\n * │ 3 │298│ 42│686│'ATokenG..'│130183│21270│108913│ 1 │\n * │ 4 │338│265│951│'qExampL..'│108913│76289│ 32624│ 3 │\n * └─────┴───┴───┴───┴───────────┴──────┴─────┴──────┴───┘\n * ```\n *\n * - **index**: the array index of the instruction within the transaction\n * - **iso**: the isolated size of the instruction (marginal cost of only the instruction)\n * - **mar**: the marginal size cost of the instruction (when added to previous)\n * - **cum**: the cumulative size of the instructions up until that instruction\n * - **quota/used/left**: [BPF instruction compute unit info](https://docs.solana.com/developing/programming-model/runtime)\n * - **CPI**: [the maximum depth of CPI](https://docs.solana.com/developing/programming-model/calling-between-programs) (current limit in Solana is 4)\n *\n * Safe for browser usage. Can be conveniently run with txEnvelope.simulateTable()\n */\nconst printTXTable = (tx, transactionLogs, message) => {\n if (message && message !== \"\") {\n console.log((0, exports.estimateTransactionSize)(tx), message);\n }\n else {\n console.log(\"Transaction size:\", (0, exports.estimateTransactionSize)(tx));\n }\n const computeUnitLogStack = [];\n const cpiLogStack = [];\n let currentIndex = -1;\n transactionLogs.forEach((line) => {\n if (line.includes(\" invoke [1]\")) {\n currentIndex++;\n cpiLogStack[currentIndex] = 0;\n }\n const cpiMatch = line.match(/ invoke \\[(\\d)\\]/);\n if (cpiMatch && cpiMatch[1]) {\n const cur = cpiLogStack[currentIndex];\n cpiLogStack[currentIndex] =\n cur === undefined\n ? Number(cpiMatch[1]) - 1\n : Math.max(Number(cpiMatch[1]) - 1, cur);\n }\n const computeMatch = line.match(/consumed \\d* of \\d* compute units/);\n if (computeMatch && computeMatch[0]) {\n computeUnitLogStack[currentIndex] = computeMatch[0];\n }\n });\n const instructionTable = [];\n tx.instructions.forEach((instruction, i) => {\n const computeUnitLog = computeUnitLogStack[i];\n const computeUnitMatch = computeUnitLog === null || computeUnitLog === void 0 ? void 0 : computeUnitLog.match(/consumed (\\d*) of (\\d*)/);\n const [consumed, quota] = (computeUnitMatch === null || computeUnitMatch === void 0 ? void 0 : computeUnitMatch.slice(1, 3).map((num) => parseInt(num, 10))) || [undefined, undefined];\n instructionTable.push({\n iso: isolatedInstructionSize(tx.provider, instruction),\n mar: marginalInstructionSize(tx.provider, tx.instructions.slice(0, i), instruction),\n cum: instructionsSize(tx.provider, tx.instructions.slice(0, i + 1)),\n programId: instruction.programId.toBase58(),\n quota: quota ? quota : i === 0 ? 200000 : undefined,\n used: consumed,\n left: quota && consumed ? quota - consumed : undefined,\n CPI: cpiLogStack[i],\n });\n });\n console.table(instructionTable);\n};\nexports.printTXTable = printTXTable;\nclass TXSizeEstimationError extends Error {\n constructor(underlyingError) {\n super(`could not estimate transaction size`);\n this.underlyingError = underlyingError;\n this.name = \"TXSizeEstimationError\";\n }\n}\nexports.TXSizeEstimationError = TXSizeEstimationError;\nclass EstimatedTXTooBigError extends Error {\n constructor(tx, size) {\n super(`Transaction too large`);\n this.tx = tx;\n this.size = size;\n this.name = \"EstimatedTXTooBigError\";\n }\n}\nexports.EstimatedTXTooBigError = EstimatedTXTooBigError;\n/**\n * Builds a transaction and estimates the size in bytes. This number is primrily\n * to be used for checking to see if a transaction is too big and instructions\n * need to be split. It may not be 100% accurate.\n *\n * This is used in expectTXTable and is useful for increasing efficiency in\n * dapps that build large transactions.\n *\n * The max transaction size of a v1 Transaction in Solana is 1232 bytes.\n * For info about Transaction v2: https://docs.solana.com/proposals/transactions-v2\n *\n * Returns 8888 if the transaction was too big.\n * Returns 9999 if the transaction was unable to be built.\n */\nconst estimateTransactionSize = (txEnvelope) => {\n const result = txEnvelope.estimateSize();\n if (\"size\" in result) {\n return result.size;\n }\n if (result.error instanceof TXSizeEstimationError) {\n console.error(\"Unknown error estimating transaction size\", result.error.underlyingError);\n return 9999;\n }\n return 8888;\n};\nexports.estimateTransactionSize = estimateTransactionSize;\n/**\n * A dummy instruction that is probably tiny and has overlap with most instructions\n */\nconst simpleInstruction = () => {\n const fs = getFakeSigner();\n return web3_js_1.SystemProgram.transfer({\n fromPubkey: fs.publicKey,\n toPubkey: fs.publicKey,\n lamports: 1,\n });\n};\nconst isolatedInstructionSize = (randomProvider, instruction) => {\n return marginalInstructionSize(randomProvider, [simpleInstruction()], instruction);\n};\nconst marginalInstructionSize = (randomProvider, previousInstructions, instruction) => {\n const previousTxSize = instructionsSize(randomProvider, previousInstructions.length ? previousInstructions : [simpleInstruction()]);\n const biggerTxSize = instructionsSize(randomProvider, [\n ...previousInstructions,\n instruction,\n ]);\n return biggerTxSize - previousTxSize;\n};\nconst instructionsSize = (randomProvider, instructions) => {\n const instructionedTx = new index_js_1.TransactionEnvelope(randomProvider, [\n ...instructions,\n ]);\n return (0, exports.estimateTransactionSize)(instructionedTx);\n};\nlet fakeSigner = undefined;\nconst getFakeSigner = () => {\n if (!fakeSigner) {\n fakeSigner = web3_js_1.Keypair.generate();\n }\n return fakeSigner;\n};\n//# sourceMappingURL=printTXTable.js.map\n\n/***/ }),\n\n/***/ 5963:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getProgramAddress = exports.getPublicKey = exports.CachedPublicKey = void 0;\nconst web3_js_1 = __webpack_require__(6737);\nconst pubkeyCache = {};\n/**\n * PublicKey with a cached base58 value.\n */\nclass CachedPublicKey extends web3_js_1.PublicKey {\n constructor(value) {\n super(value);\n this._base58 = super.toBase58();\n }\n equals(other) {\n if (other instanceof CachedPublicKey) {\n return other._base58 === this._base58;\n }\n return super.equals(other);\n }\n toString() {\n return this._base58;\n }\n toBase58() {\n return this._base58;\n }\n}\nexports.CachedPublicKey = CachedPublicKey;\nconst getOrCreatePublicKey = (pk) => {\n const cached = pubkeyCache[pk];\n if (!cached) {\n return (pubkeyCache[pk] = new CachedPublicKey(pk));\n }\n return cached;\n};\n/**\n * Gets or parses a PublicKey.\n * @param pk\n * @returns\n */\nconst getPublicKey = (pk) => {\n if (typeof pk === \"string\") {\n return getOrCreatePublicKey(pk);\n }\n else if (pk instanceof web3_js_1.PublicKey) {\n return getOrCreatePublicKey(pk.toString());\n }\n else {\n return getOrCreatePublicKey(new web3_js_1.PublicKey(pk).toString());\n }\n};\nexports.getPublicKey = getPublicKey;\nconst gpaCache = {};\n/**\n * Concatenates seeds to generate a unique number array.\n * @param seeds\n * @returns\n */\nconst concatSeeds = (seeds) => {\n return Uint8Array.from(seeds.reduce((acc, seed) => [...acc, ...seed], []));\n};\n/**\n * Gets a cached program address for the given seeds.\n * @param seeds\n * @param programId\n * @returns\n */\nconst getProgramAddress = (seeds, programId) => {\n const normalizedSeeds = concatSeeds(seeds);\n const cacheKey = `${normalizedSeeds.toString()}_${programId.toString()}`;\n const cached = gpaCache[cacheKey];\n if (cached) {\n return cached;\n }\n const [key] = web3_js_1.PublicKey.findProgramAddressSync(seeds, programId);\n return (gpaCache[cacheKey] = (0, exports.getPublicKey)(key));\n};\nexports.getProgramAddress = getProgramAddress;\n//# sourceMappingURL=pubkeyCache.js.map\n\n/***/ }),\n\n/***/ 5112:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isPublicKey = exports.parsePublicKey = exports.PublicKey = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst web3_js_1 = __webpack_require__(6737);\nconst bn_js_1 = tslib_1.__importDefault(__webpack_require__(3550));\nvar web3_js_2 = __webpack_require__(6737);\nObject.defineProperty(exports, \"PublicKey\", ({ enumerable: true, get: function () { return web3_js_2.PublicKey; } }));\n/**\n * Returns a {@link PublicKey} if it can be parsed, otherwise returns null.\n * @param pk\n * @returns\n */\nconst parsePublicKey = (pk) => {\n if (!pk) {\n return null;\n }\n if (pk instanceof web3_js_1.PublicKey) {\n return pk;\n }\n if (typeof pk !== \"object\" ||\n Array.isArray(pk) ||\n (\"constructor\" in pk && bn_js_1.default.isBN(pk))) {\n return null;\n }\n try {\n return new web3_js_1.PublicKey(pk);\n }\n catch (e) {\n return null;\n }\n};\nexports.parsePublicKey = parsePublicKey;\n/**\n * Returns true if the given value is a {@link PublicKey}.\n * @param pk\n * @returns\n */\nconst isPublicKey = (pk) => {\n return !!(0, exports.parsePublicKey)(pk);\n};\nexports.isPublicKey = isPublicKey;\n//# sourceMappingURL=publicKey.js.map\n\n/***/ }),\n\n/***/ 2377:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.simulateTransactionWithCommitment = void 0;\nconst web3_js_1 = __webpack_require__(6737);\n/**\n * Copy of Connection.simulateTransaction that takes a commitment parameter.\n */\nasync function simulateTransactionWithCommitment(connection, transaction, commitment = \"confirmed\") {\n var _a;\n const connectionInner = connection;\n // only populate recent blockhash if it isn't on the tx\n if (!transaction.recentBlockhash) {\n const { blockhash } = await connection.getLatestBlockhash(commitment);\n transaction.recentBlockhash = blockhash;\n }\n const wireTransaction = transaction.serialize({\n requireAllSignatures: false,\n });\n const encodedTransaction = wireTransaction.toString(\"base64\");\n const config = { encoding: \"base64\", commitment };\n const res = await connectionInner._rpcRequest(\"simulateTransaction\", [\n encodedTransaction,\n config,\n ]);\n if (res.error) {\n throw new web3_js_1.SendTransactionError(\"failed to simulate transaction: \" + res.error.message, (_a = res.result.value.logs) !== null && _a !== void 0 ? _a : undefined);\n }\n return res.result;\n}\nexports.simulateTransactionWithCommitment = simulateTransactionWithCommitment;\n//# sourceMappingURL=simulateTransactionWithCommitment.js.map\n\n/***/ }),\n\n/***/ 6348:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.tsToDate = exports.dateToTs = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst bn_js_1 = tslib_1.__importDefault(__webpack_require__(3550));\n/**\n * Converts a {@link Date} to a {@link BN} timestamp.\n * @param date\n * @returns\n */\nconst dateToTs = (date) => new bn_js_1.default(Math.floor(date.getTime() / 1000));\nexports.dateToTs = dateToTs;\n/**\n * Converts a {@link BN} timestamp to a {@link Date}.\n * @param ts\n * @returns\n */\nconst tsToDate = (ts) => new Date(ts.toNumber() * 1000);\nexports.tsToDate = tsToDate;\n//# sourceMappingURL=time.js.map\n\n/***/ }),\n\n/***/ 3409:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.generateTXLink = exports.ExplorerType = void 0;\nvar ExplorerType;\n(function (ExplorerType) {\n ExplorerType[\"SOLANA_EXPLORER\"] = \"solana-explorer\";\n ExplorerType[\"SOLSCAN\"] = \"solscan\";\n})(ExplorerType || (exports.ExplorerType = ExplorerType = {}));\nfunction generateTXLink(signature, cluster = \"mainnet-beta\", explorerType = ExplorerType.SOLANA_EXPLORER) {\n switch (explorerType) {\n case ExplorerType.SOLANA_EXPLORER:\n return `https://explorer.solana.com/tx/${signature}?cluster=${cluster}`;\n case ExplorerType.SOLSCAN:\n return `https://solscan.io/tx/${signature}?cluster=${cluster}`;\n default:\n throw new Error(`Explorer type ${explorerType} is not supported.`);\n }\n}\nexports.generateTXLink = generateTXLink;\n//# sourceMappingURL=txLink.js.map\n\n/***/ }),\n\n/***/ 4633:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.SignerWallet = void 0;\nconst provider_js_1 = __webpack_require__(2645);\n/**\n * Wallet based on a Signer.\n */\nclass SignerWallet {\n constructor(signer) {\n this.signer = signer;\n }\n get publicKey() {\n return this.signer.publicKey;\n }\n signAllTransactions(transactions) {\n return Promise.resolve(transactions.map((tx) => {\n tx.partialSign(this.signer);\n return tx;\n }));\n }\n signTransaction(transaction) {\n transaction.partialSign(this.signer);\n return Promise.resolve(transaction);\n }\n /**\n * Creates a Provider from this Wallet by adding a Connection.\n * @param connection\n * @returns\n */\n createProvider(connection, sendConnection, opts) {\n return provider_js_1.SolanaProvider.load({\n connection,\n sendConnection,\n wallet: this,\n opts,\n });\n }\n}\nexports.SignerWallet = SignerWallet;\n//# sourceMappingURL=wallet.js.map\n\n/***/ }),\n\n/***/ 9386:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n */\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.s16 = exports.s8 = exports.nu64be = exports.u48be = exports.u40be = exports.u32be = exports.u24be = exports.u16be = exports.nu64 = exports.u48 = exports.u40 = exports.u32 = exports.u24 = exports.u16 = exports.u8 = exports.offset = exports.greedy = exports.Constant = exports.UTF8 = exports.CString = exports.Blob = exports.Boolean = exports.BitField = exports.BitStructure = exports.VariantLayout = exports.Union = exports.UnionLayoutDiscriminator = exports.UnionDiscriminator = exports.Structure = exports.Sequence = exports.DoubleBE = exports.Double = exports.FloatBE = exports.Float = exports.NearInt64BE = exports.NearInt64 = exports.NearUInt64BE = exports.NearUInt64 = exports.IntBE = exports.Int = exports.UIntBE = exports.UInt = exports.OffsetLayout = exports.GreedyCount = exports.ExternalLayout = exports.bindConstructorLayout = exports.nameWithProperty = exports.Layout = exports.uint8ArrayToBuffer = exports.checkUint8Array = void 0;\nexports.constant = exports.utf8 = exports.cstr = exports.blob = exports.unionLayoutDiscriminator = exports.union = exports.seq = exports.bits = exports.struct = exports.f64be = exports.f64 = exports.f32be = exports.f32 = exports.ns64be = exports.s48be = exports.s40be = exports.s32be = exports.s24be = exports.s16be = exports.ns64 = exports.s48 = exports.s40 = exports.s32 = exports.s24 = void 0;\nconst buffer_1 = __webpack_require__(8764);\n/* Check if a value is a Uint8Array.\n *\n * @ignore */\nfunction checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError('b must be a Uint8Array');\n }\n}\nexports.checkUint8Array = checkUint8Array;\n/* Create a Buffer instance from a Uint8Array.\n *\n * @ignore */\nfunction uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n}\nexports.uint8ArrayToBuffer = uint8ArrayToBuffer;\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nexports.Layout = Layout;\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nexports.nameWithProperty = nameWithProperty;\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\n// `Class` must be a constructor Function, but the assignment of a `layout_` property to it makes it difficult to type\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Object.prototype.hasOwnProperty.call(Class, 'layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (Object.prototype.hasOwnProperty.call(layout, 'boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nexports.bindConstructorLayout = bindConstructorLayout;\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\nexports.ExternalLayout = ExternalLayout;\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\nexports.GreedyCount = GreedyCount;\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n super(layout.span, property || layout.property);\n /** The subordinated layout. */\n this.layout = layout;\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Uint8Array\n * being accessed. */\n this.offset = offset;\n }\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n /** @override */\n decode(b, offset = 0) {\n return this.layout.decode(b, offset + this.offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\nexports.OffsetLayout = OffsetLayout;\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UInt = UInt;\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UIntBE = UIntBE;\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.Int = Int;\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.IntBE = IntBE;\nconst V2E32 = Math.pow(2, 32);\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return { hi32, lo32 };\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64 = NearUInt64;\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64BE = NearUInt64BE;\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64 = NearInt64;\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64BE = NearInt64BE;\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset);\n return 4;\n }\n}\nexports.Float = Float;\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset);\n return 4;\n }\n}\nexports.FloatBE = FloatBE;\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset);\n return 8;\n }\n}\nexports.Double = Double;\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset);\n return 8;\n }\n}\nexports.DoubleBE = DoubleBE;\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n super(span, property);\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n }\n else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\nexports.Sequence = Sequence;\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n }\n catch (e) {\n // ignore error\n }\n super(span, property);\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n }\n catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset = 0) {\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n }\n else if (0 <= offset) {\n offset += fd.span;\n }\n }\n return undefined;\n }\n}\nexports.Structure = Structure;\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\nexports.UnionDiscriminator = UnionDiscriminator;\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n super(property || layout.property || 'variant');\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\nexports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if ((discr instanceof UInt)\n || (discr instanceof UIntBE)) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n }\n else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n }\n else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n else {\n discriminator = discr;\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && ((discr instanceof UInt)\n || (discr instanceof UIntBE))) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discriminator;\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = (discr instanceof UInt)\n || (discr instanceof UIntBE);\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function (src) {\n return boundGetSourceVariant(src);\n };\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function (gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property\n && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)))) {\n return vlo;\n }\n }\n else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n const clo = this.registry[discr];\n if (undefined === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n // defaultLayout.property can be undefined, but this is allowed by buffer-layout\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n dest[defaultLayout.property] = defaultLayout.decode(b, offset + contentOffset);\n }\n else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset = 0) {\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n // this.defaultLayout is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n // clo.property is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return contentOffset + clo.encode(src[clo.property], b, offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset);\n }\n else {\n variant = vb;\n }\n return this.registry[variant];\n }\n}\nexports.Union = Union;\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n }\n else if (this.property) {\n dest[this.property] = true;\n }\n else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!Object.prototype.hasOwnProperty.call(src, this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return undefined;\n }\n}\nexports.VariantLayout = VariantLayout;\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function (v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function () {\n return value;\n };\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset = 0) {\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n}\nexports.BitStructure = BitStructure;\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n /** The span of this value in bits. */\n this.bits = bits;\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ('number' !== typeof value\n || !Number.isInteger(value)\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n }\n}\nexports.BitField = BitField;\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!super.decode(b, offset);\n }\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n super.encode(value);\n }\n}\nexports.Boolean = Boolean;\n/* eslint-enable no-extend-native */\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Uint8Array.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Uint8Array as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Uint8Array');\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\nexports.Blob = Blob;\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n return uint8ArrayToBuffer(b).slice(offset, offset + span - 1).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset);\n buffer[offset + span] = 0;\n return span + 1;\n }\n}\nexports.CString = CString;\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan) && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n }\n else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n super(-1, property);\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n return b.length - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(uint8ArrayToBuffer(b), offset);\n return span;\n }\n}\nexports.UTF8 = UTF8;\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n /** @override */\n decode(b, offset) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\nexports.Constant = Constant;\n/** Factory for {@link GreedyCount}. */\nexports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n/** Factory for {@link OffsetLayout}. */\nexports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nexports.u8 = ((property) => new UInt(1, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16 = ((property) => new UInt(2, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24 = ((property) => new UInt(3, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32 = ((property) => new UInt(4, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40 = ((property) => new UInt(5, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48 = ((property) => new UInt(6, property));\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64 = ((property) => new NearUInt64(property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16be = ((property) => new UIntBE(2, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24be = ((property) => new UIntBE(3, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32be = ((property) => new UIntBE(4, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40be = ((property) => new UIntBE(5, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48be = ((property) => new UIntBE(6, property));\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64be = ((property) => new NearUInt64BE(property));\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nexports.s8 = ((property) => new Int(1, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nexports.s16 = ((property) => new Int(2, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nexports.s24 = ((property) => new Int(3, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nexports.s32 = ((property) => new Int(4, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nexports.s40 = ((property) => new Int(5, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nexports.s48 = ((property) => new Int(6, property));\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64 = ((property) => new NearInt64(property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nexports.s16be = ((property) => new IntBE(2, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nexports.s24be = ((property) => new IntBE(3, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nexports.s32be = ((property) => new IntBE(4, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nexports.s40be = ((property) => new IntBE(5, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nexports.s48be = ((property) => new IntBE(6, property));\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64be = ((property) => new NearInt64BE(property));\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nexports.f32 = ((property) => new Float(property));\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nexports.f32be = ((property) => new FloatBE(property));\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nexports.f64 = ((property) => new Double(property));\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nexports.f64be = ((property) => new DoubleBE(property));\n/** Factory for {@link Structure} values. */\nexports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n/** Factory for {@link BitStructure} values. */\nexports.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n/** Factory for {@link Sequence} values. */\nexports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n/** Factory for {@link Union} values. */\nexports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nexports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n/** Factory for {@link Blob} values. */\nexports.blob = ((length, property) => new Blob(length, property));\n/** Factory for {@link CString} values. */\nexports.cstr = ((property) => new CString(property));\n/** Factory for {@link UTF8} values. */\nexports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n/** Factory for {@link Constant} values. */\nexports.constant = ((value, property) => new Constant(value, property));\n//# sourceMappingURL=Layout.js.map\n\n/***/ }),\n\n/***/ 4945:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"ASSOCIATED_TOKEN_PROGRAM_ID\": function() { return /* binding */ ASSOCIATED_TOKEN_PROGRAM_ID; },\n \"AccountLayout\": function() { return /* binding */ AccountLayout; },\n \"MintLayout\": function() { return /* binding */ MintLayout; },\n \"NATIVE_MINT\": function() { return /* binding */ NATIVE_MINT; },\n \"TOKEN_PROGRAM_ID\": function() { return /* binding */ TOKEN_PROGRAM_ID; },\n \"Token\": function() { return /* binding */ Token; },\n \"u64\": function() { return /* binding */ u64; }\n});\n\n;// CONCATENATED MODULE: ./node_modules/@solana/spl-token/node_modules/@babel/runtime/helpers/esm/typeof.js\nfunction _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\n\n;// CONCATENATED MODULE: ./node_modules/@solana/spl-token/node_modules/@babel/runtime/helpers/esm/toPrimitive.js\n\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\n\n;// CONCATENATED MODULE: ./node_modules/@solana/spl-token/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js\n\n\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\n\n;// CONCATENATED MODULE: ./node_modules/@solana/spl-token/node_modules/@babel/runtime/helpers/esm/defineProperty.js\n\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\n\n// EXTERNAL MODULE: ./node_modules/bn.js/lib/bn.js\nvar bn = __webpack_require__(3550);\nvar bn_default = /*#__PURE__*/__webpack_require__.n(bn);\n// EXTERNAL MODULE: ./node_modules/@solana/web3.js/lib/index.browser.esm.js + 15 modules\nvar index_browser_esm = __webpack_require__(6737);\n;// CONCATENATED MODULE: ./node_modules/@solana/spl-token/lib/index.browser.esm.js\n\n\n\n\nvar buffer = {};\n\nvar base64Js = {};\n\nbase64Js.byteLength = byteLength;\nbase64Js.toByteArray = toByteArray;\nbase64Js.fromByteArray = fromByteArray;\n\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62;\nrevLookup['_'.charCodeAt(0)] = 63;\n\nfunction getLens (b64) {\n var len = b64.length;\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=');\n if (validLen === -1) validLen = len;\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4);\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n\n var curByte = 0;\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen;\n\n var i;\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)];\n arr[curByte++] = (tmp >> 16) & 0xFF;\n arr[curByte++] = (tmp >> 8) & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4);\n arr[curByte++] = tmp & 0xFF;\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2);\n arr[curByte++] = (tmp >> 8) & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp;\n var output = [];\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF);\n output.push(tripletToBase64(tmp));\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n var parts = [];\n var maxChunkLength = 16383; // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n );\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n );\n }\n\n return parts.join('')\n}\n\nvar ieee754 = {};\n\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\n\nieee754.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? (nBytes - 1) : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n\n i += d;\n\n e = s & ((1 << (-nBits)) - 1);\n s >>= (-nBits);\n nBits += eLen;\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1);\n e >>= (-nBits);\n nBits += mLen;\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n};\n\nieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = (nBytes * 8) - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);\n var i = isLE ? 0 : (nBytes - 1);\n var d = isLE ? 1 : -1;\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n};\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n(function (exports) {\n\nconst base64 = base64Js;\nconst ieee754$1 = ieee754;\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null;\n\nexports.Buffer = Buffer;\nexports.SlowBuffer = SlowBuffer;\nexports.INSPECT_MAX_BYTES = 50;\n\nconst K_MAX_LENGTH = 0x7fffffff;\nexports.kMaxLength = K_MAX_LENGTH;\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport();\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n );\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1);\n const proto = { foo: function () { return 42 } };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n});\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n});\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, Buffer.prototype);\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192; // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value);\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n};\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);\nObject.setPrototypeOf(Buffer, Uint8Array);\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n};\n\nfunction allocUnsafe (size) {\n assertSize(size);\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n};\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0;\n let buf = createBuffer(length);\n\n const actual = buf.write(string, encoding);\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual);\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0;\n const buf = createBuffer(length);\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255;\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView);\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf;\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array);\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset);\n } else {\n buf = new Uint8Array(array, byteOffset, length);\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype);\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0;\n const buf = createBuffer(len);\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len);\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0;\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n};\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length;\n let y = b.length;\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n};\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n};\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i;\n if (length === undefined) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n\n const buffer = Buffer.allocUnsafe(length);\n let pos = 0;\n for (i = 0; i < list.length; ++i) {\n let buf = list[i];\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);\n buf.copy(buffer, pos);\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n );\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos);\n }\n pos += buf.length;\n }\n return buffer\n};\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length;\n const mustMatch = (arguments.length > 2 && arguments[2] === true);\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n}\nBuffer.byteLength = byteLength;\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false;\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0;\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length;\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0;\n start >>>= 0;\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8';\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true;\n\nfunction swap (b, n, m) {\n const i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this\n};\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this\n};\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this\n};\n\nBuffer.prototype.toString = function toString () {\n const length = this.length;\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n};\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString;\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n};\n\nBuffer.prototype.inspect = function inspect () {\n let str = '';\n const max = exports.INSPECT_MAX_BYTES;\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();\n if (this.length > max) str += ' ... ';\n return ''\n};\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength);\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0;\n }\n if (end === undefined) {\n end = target ? target.length : 0;\n }\n if (thisStart === undefined) {\n thisStart = 0;\n }\n if (thisEnd === undefined) {\n thisEnd = this.length;\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart;\n let y = end - start;\n const len = Math.min(x, y);\n\n const thisCopy = this.slice(thisStart, thisEnd);\n const targetCopy = target.slice(start, end);\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n};\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1;\n let arrLength = arr.length;\n let valLength = val.length;\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i;\n if (dir) {\n let foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n let found = true;\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n};\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n};\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n};\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0;\n const remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n\n const strLen = string.length;\n\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n let i;\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16);\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed;\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0;\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0;\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8';\n\n let loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n};\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n};\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end);\n const res = [];\n\n let i = start;\n while (i < end) {\n const firstByte = buf[i];\n let codePoint = null;\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1;\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint;\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte;\n }\n break\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n\n res.push(codePoint);\n i += bytesPerSequence;\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000;\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = '';\n let i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n );\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = '';\n end = Math.min(buf.length, end);\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = '';\n end = Math.min(buf.length, end);\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length;\n\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n\n let out = '';\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]];\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end);\n let res = '';\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256));\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) {\n start = len;\n }\n\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n\n if (end < start) end = start;\n\n const newBuf = this.subarray(start, end);\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype);\n\n return newBuf\n};\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n let val = this[offset];\n let mul = 1;\n let i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n\n return val\n};\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length);\n }\n\n let val = this[offset + --byteLength];\n let mul = 1;\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n\n return val\n};\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset]\n};\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | (this[offset + 1] << 8)\n};\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 2, this.length);\n return (this[offset] << 8) | this[offset + 1]\n};\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n};\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n};\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0;\n validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8);\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24;\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24;\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n});\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0;\n validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8);\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset];\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last;\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n});\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n let val = this[offset];\n let mul = 1;\n let i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n};\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n let i = byteLength;\n let mul = 1;\n let val = this[offset + --i];\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n};\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n};\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 2, this.length);\n const val = this[offset] | (this[offset + 1] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 2, this.length);\n const val = this[offset + 1] | (this[offset] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n};\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n};\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0;\n validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8);\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24); // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n});\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0;\n validateNumber(offset, 'offset');\n const first = this[offset];\n const last = this[offset + 7];\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8);\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset];\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n});\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754$1.read(this, offset, true, 23, 4)\n};\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754$1.read(this, offset, false, 23, 4)\n};\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754$1.read(this, offset, true, 52, 8)\n};\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754$1.read(this, offset, false, 52, 8)\n};\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n let mul = 1;\n let i = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength = byteLength >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n let i = byteLength - 1;\n let mul = 1;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n this[offset] = (value & 0xff);\n return offset + 1\n};\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n return offset + 2\n};\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n return offset + 2\n};\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n this[offset + 3] = (value >>> 24);\n this[offset + 2] = (value >>> 16);\n this[offset + 1] = (value >>> 8);\n this[offset] = (value & 0xff);\n return offset + 4\n};\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n return offset + 4\n};\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n\n let lo = Number(value & BigInt(0xffffffff));\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n\n let lo = Number(value & BigInt(0xffffffff));\n buf[offset + 7] = lo;\n lo = lo >> 8;\n buf[offset + 6] = lo;\n lo = lo >> 8;\n buf[offset + 5] = lo;\n lo = lo >> 8;\n buf[offset + 4] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff));\n buf[offset + 3] = hi;\n hi = hi >> 8;\n buf[offset + 2] = hi;\n hi = hi >> 8;\n buf[offset + 1] = hi;\n hi = hi >> 8;\n buf[offset] = hi;\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n});\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n});\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n let i = 0;\n let mul = 1;\n let sub = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n let i = byteLength - 1;\n let mul = 1;\n let sub = 0;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = (value & 0xff);\n return offset + 1\n};\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n return offset + 2\n};\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n return offset + 2\n};\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n this[offset + 2] = (value >>> 16);\n this[offset + 3] = (value >>> 24);\n return offset + 4\n};\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (value < 0) value = 0xffffffff + value + 1;\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n return offset + 4\n};\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n});\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n});\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4);\n }\n ieee754$1.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n};\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8);\n }\n ieee754$1.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n};\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start;\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n\n const len = end - start;\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end);\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n );\n }\n\n return len\n};\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0);\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code;\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255;\n } else if (typeof val === 'boolean') {\n val = Number(val);\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n\n if (!val) val = 0;\n\n let i;\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding);\n const len = bytes.length;\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n\n return this\n};\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {};\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super();\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n });\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`;\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack; // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name;\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n });\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n };\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError);\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError);\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`;\n let received = input;\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input));\n } else if (typeof input === 'bigint') {\n received = String(input);\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received);\n }\n received += 'n';\n }\n msg += ` It must be ${range}. Received ${received}`;\n return msg\n }, RangeError);\n\nfunction addNumericalSeparator (val) {\n let res = '';\n let i = val.length;\n const start = val[0] === '-' ? 1 : 0;\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`;\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset');\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1));\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : '';\n let range;\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`;\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`;\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength);\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type);\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0];\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '');\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '=';\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity;\n let codePoint;\n const length = string.length;\n let leadSurrogate = null;\n const bytes = [];\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i);\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint;\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n\n leadSurrogate = null;\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo;\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i;\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i];\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef';\n const table = new Array(256);\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16;\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j];\n }\n }\n return table\n})();\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n}(buffer));\n\nvar global$1 = (typeof __webpack_require__.g !== \"undefined\" ? __webpack_require__.g :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n\nvar inherits;\nif (typeof Object.create === 'function'){\n inherits = function inherits(ctor, superCtor) {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n inherits = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n };\n}\nvar inherits$1 = inherits;\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect$1(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n _extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect$1.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect$1.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect$1.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect$1.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect$1.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== inspect$1 &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (index_browser_esm_hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!index_browser_esm_hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var length = output.reduce(function(prev, cur) {\n if (cur.indexOf('\\n') >= 0) ;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\n\nfunction isNull(arg) {\n return arg === null;\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\nfunction _extend(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n}\nfunction index_browser_esm_hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n if (hasOwn.call(obj, key)) keys.push(key);\n }\n return keys;\n};\nvar pSlice = Array.prototype.slice;\nvar _functionsHaveNames;\nfunction functionsHaveNames() {\n if (typeof _functionsHaveNames !== 'undefined') {\n return _functionsHaveNames;\n }\n return _functionsHaveNames = (function () {\n return function foo() {}.name === 'foo';\n }());\n}\nfunction pToString (obj) {\n return Object.prototype.toString.call(obj);\n}\nfunction isView(arrbuf) {\n if (buffer.isBuffer(arrbuf)) {\n return false;\n }\n if (typeof global$1.ArrayBuffer !== 'function') {\n return false;\n }\n if (typeof ArrayBuffer.isView === 'function') {\n return ArrayBuffer.isView(arrbuf);\n }\n if (!arrbuf) {\n return false;\n }\n if (arrbuf instanceof DataView) {\n return true;\n }\n if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {\n return true;\n }\n return false;\n}\n// 1. The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nfunction assert(value, message) {\n if (!value) fail(value, true, message, '==', ok);\n}\n\n// 2. The AssertionError is defined in assert.\n// new assert.AssertionError({ message: message,\n// actual: actual,\n// expected: expected })\n\nvar regex = /\\s*function\\s+([^\\(\\s]*)\\s*/;\n// based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js\nfunction getName(func) {\n if (!isFunction(func)) {\n return;\n }\n if (functionsHaveNames()) {\n return func.name;\n }\n var str = func.toString();\n var match = str.match(regex);\n return match && match[1];\n}\nassert.AssertionError = AssertionError;\nfunction AssertionError(options) {\n this.name = 'AssertionError';\n this.actual = options.actual;\n this.expected = options.expected;\n this.operator = options.operator;\n if (options.message) {\n this.message = options.message;\n this.generatedMessage = false;\n } else {\n this.message = getMessage(this);\n this.generatedMessage = true;\n }\n var stackStartFunction = options.stackStartFunction || fail;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, stackStartFunction);\n } else {\n // non v8 browsers so we can have a stacktrace\n var err = new Error();\n if (err.stack) {\n var out = err.stack;\n\n // try to strip useless frames\n var fn_name = getName(stackStartFunction);\n var idx = out.indexOf('\\n' + fn_name);\n if (idx >= 0) {\n // once we have located the function frame\n // we need to strip out everything before it (and its line)\n var next_line = out.indexOf('\\n', idx + 1);\n out = out.substring(next_line + 1);\n }\n\n this.stack = out;\n }\n }\n}\n\n// assert.AssertionError instanceof Error\ninherits$1(AssertionError, Error);\n\nfunction truncate(s, n) {\n if (typeof s === 'string') {\n return s.length < n ? s : s.slice(0, n);\n } else {\n return s;\n }\n}\nfunction inspect(something) {\n if (functionsHaveNames() || !isFunction(something)) {\n return inspect$1(something);\n }\n var rawname = getName(something);\n var name = rawname ? ': ' + rawname : '';\n return '[Function' + name + ']';\n}\nfunction getMessage(self) {\n return truncate(inspect(self.actual), 128) + ' ' +\n self.operator + ' ' +\n truncate(inspect(self.expected), 128);\n}\n\n// At present only the three keys mentioned above are used and\n// understood by the spec. Implementations or sub modules can pass\n// other keys to the AssertionError's constructor - they will be\n// ignored.\n\n// 3. All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction fail(actual, expected, message, operator, stackStartFunction) {\n throw new AssertionError({\n message: message,\n actual: actual,\n expected: expected,\n operator: operator,\n stackStartFunction: stackStartFunction\n });\n}\n\n// EXTENSION! allows for well behaved errors defined elsewhere.\nassert.fail = fail;\n\n// 4. Pure assertion tests whether a value is truthy, as determined\n// by !!guard.\n// assert.ok(guard, message_opt);\n// This statement is equivalent to assert.equal(true, !!guard,\n// message_opt);. To test strictly for the value true, use\n// assert.strictEqual(true, guard, message_opt);.\n\nfunction ok(value, message) {\n if (!value) fail(value, true, message, '==', ok);\n}\nassert.ok = ok;\n\n// 5. The equality assertion tests shallow, coercive equality with\n// ==.\n// assert.equal(actual, expected, message_opt);\nassert.equal = equal;\nfunction equal(actual, expected, message) {\n if (actual != expected) fail(actual, expected, message, '==', equal);\n}\n\n// 6. The non-equality assertion tests for whether two objects are not equal\n// with != assert.notEqual(actual, expected, message_opt);\nassert.notEqual = notEqual;\nfunction notEqual(actual, expected, message) {\n if (actual == expected) {\n fail(actual, expected, message, '!=', notEqual);\n }\n}\n\n// 7. The equivalence assertion tests a deep equality relation.\n// assert.deepEqual(actual, expected, message_opt);\nassert.deepEqual = deepEqual;\nfunction deepEqual(actual, expected, message) {\n if (!_deepEqual(actual, expected, false)) {\n fail(actual, expected, message, 'deepEqual', deepEqual);\n }\n}\nassert.deepStrictEqual = deepStrictEqual;\nfunction deepStrictEqual(actual, expected, message) {\n if (!_deepEqual(actual, expected, true)) {\n fail(actual, expected, message, 'deepStrictEqual', deepStrictEqual);\n }\n}\n\nfunction _deepEqual(actual, expected, strict, memos) {\n // 7.1. All identical values are equivalent, as determined by ===.\n if (actual === expected) {\n return true;\n } else if (buffer.isBuffer(actual) && buffer.isBuffer(expected)) {\n return compare(actual, expected) === 0;\n\n // 7.2. If the expected value is a Date object, the actual value is\n // equivalent if it is also a Date object that refers to the same time.\n } else if (isDate(actual) && isDate(expected)) {\n return actual.getTime() === expected.getTime();\n\n // 7.3 If the expected value is a RegExp object, the actual value is\n // equivalent if it is also a RegExp object with the same source and\n // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).\n } else if (isRegExp(actual) && isRegExp(expected)) {\n return actual.source === expected.source &&\n actual.global === expected.global &&\n actual.multiline === expected.multiline &&\n actual.lastIndex === expected.lastIndex &&\n actual.ignoreCase === expected.ignoreCase;\n\n // 7.4. Other pairs that do not both pass typeof value == 'object',\n // equivalence is determined by ==.\n } else if ((actual === null || typeof actual !== 'object') &&\n (expected === null || typeof expected !== 'object')) {\n return strict ? actual === expected : actual == expected;\n\n // If both values are instances of typed arrays, wrap their underlying\n // ArrayBuffers in a Buffer each to increase performance\n // This optimization requires the arrays to have the same type as checked by\n // Object.prototype.toString (aka pToString). Never perform binary\n // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their\n // bit patterns are not identical.\n } else if (isView(actual) && isView(expected) &&\n pToString(actual) === pToString(expected) &&\n !(actual instanceof Float32Array ||\n actual instanceof Float64Array)) {\n return compare(new Uint8Array(actual.buffer),\n new Uint8Array(expected.buffer)) === 0;\n\n // 7.5 For all other Object pairs, including Array objects, equivalence is\n // determined by having the same number of owned properties (as verified\n // with Object.prototype.hasOwnProperty.call), the same set of keys\n // (although not necessarily the same order), equivalent values for every\n // corresponding key, and an identical 'prototype' property. Note: this\n // accounts for both named and indexed properties on Arrays.\n } else if (buffer.isBuffer(actual) !== buffer.isBuffer(expected)) {\n return false;\n } else {\n memos = memos || {actual: [], expected: []};\n\n var actualIndex = memos.actual.indexOf(actual);\n if (actualIndex !== -1) {\n if (actualIndex === memos.expected.indexOf(expected)) {\n return true;\n }\n }\n\n memos.actual.push(actual);\n memos.expected.push(expected);\n\n return objEquiv(actual, expected, strict, memos);\n }\n}\n\nfunction isArguments(object) {\n return Object.prototype.toString.call(object) == '[object Arguments]';\n}\n\nfunction objEquiv(a, b, strict, actualVisitedObjects) {\n if (a === null || a === undefined || b === null || b === undefined)\n return false;\n // if one is a primitive, the other must be same\n if (isPrimitive(a) || isPrimitive(b))\n return a === b;\n if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))\n return false;\n var aIsArgs = isArguments(a);\n var bIsArgs = isArguments(b);\n if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))\n return false;\n if (aIsArgs) {\n a = pSlice.call(a);\n b = pSlice.call(b);\n return _deepEqual(a, b, strict);\n }\n var ka = objectKeys(a);\n var kb = objectKeys(b);\n var key, i;\n // having the same number of owned properties (keys incorporates\n // hasOwnProperty)\n if (ka.length !== kb.length)\n return false;\n //the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n //~~~cheap key test\n for (i = ka.length - 1; i >= 0; i--) {\n if (ka[i] !== kb[i])\n return false;\n }\n //equivalent values for every corresponding key, and\n //~~~possibly expensive deep test\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects))\n return false;\n }\n return true;\n}\n\n// 8. The non-equivalence assertion tests for any deep inequality.\n// assert.notDeepEqual(actual, expected, message_opt);\nassert.notDeepEqual = notDeepEqual;\nfunction notDeepEqual(actual, expected, message) {\n if (_deepEqual(actual, expected, false)) {\n fail(actual, expected, message, 'notDeepEqual', notDeepEqual);\n }\n}\n\nassert.notDeepStrictEqual = notDeepStrictEqual;\nfunction notDeepStrictEqual(actual, expected, message) {\n if (_deepEqual(actual, expected, true)) {\n fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);\n }\n}\n\n\n// 9. The strict equality assertion tests strict equality, as determined by ===.\n// assert.strictEqual(actual, expected, message_opt);\nassert.strictEqual = strictEqual;\nfunction strictEqual(actual, expected, message) {\n if (actual !== expected) {\n fail(actual, expected, message, '===', strictEqual);\n }\n}\n\n// 10. The strict non-equality assertion tests for strict inequality, as\n// determined by !==. assert.notStrictEqual(actual, expected, message_opt);\nassert.notStrictEqual = notStrictEqual;\nfunction notStrictEqual(actual, expected, message) {\n if (actual === expected) {\n fail(actual, expected, message, '!==', notStrictEqual);\n }\n}\n\nfunction expectedException(actual, expected) {\n if (!actual || !expected) {\n return false;\n }\n\n if (Object.prototype.toString.call(expected) == '[object RegExp]') {\n return expected.test(actual);\n }\n\n try {\n if (actual instanceof expected) {\n return true;\n }\n } catch (e) {\n // Ignore. The instanceof check doesn't work for arrow functions.\n }\n\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n\n return expected.call({}, actual) === true;\n}\n\nfunction _tryBlock(block) {\n var error;\n try {\n block();\n } catch (e) {\n error = e;\n }\n return error;\n}\n\nfunction _throws(shouldThrow, block, expected, message) {\n var actual;\n\n if (typeof block !== 'function') {\n throw new TypeError('\"block\" argument must be a function');\n }\n\n if (typeof expected === 'string') {\n message = expected;\n expected = null;\n }\n\n actual = _tryBlock(block);\n\n message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +\n (message ? ' ' + message : '.');\n\n if (shouldThrow && !actual) {\n fail(actual, expected, 'Missing expected exception' + message);\n }\n\n var userProvidedMessage = typeof message === 'string';\n var isUnwantedException = !shouldThrow && isError(actual);\n var isUnexpectedException = !shouldThrow && actual && !expected;\n\n if ((isUnwantedException &&\n userProvidedMessage &&\n expectedException(actual, expected)) ||\n isUnexpectedException) {\n fail(actual, expected, 'Got unwanted exception' + message);\n }\n\n if ((shouldThrow && actual && expected &&\n !expectedException(actual, expected)) || (!shouldThrow && actual)) {\n throw actual;\n }\n}\n\n// 11. Expected to throw an error:\n// assert.throws(block, Error_opt, message_opt);\nassert.throws = index_browser_esm_throws;\nfunction index_browser_esm_throws(block, /*optional*/error, /*optional*/message) {\n _throws(true, block, error, message);\n}\n\n// EXTENSION! This is annoying to write outside this module.\nassert.doesNotThrow = doesNotThrow;\nfunction doesNotThrow(block, /*optional*/error, /*optional*/message) {\n _throws(false, block, error, message);\n}\n\nassert.ifError = ifError;\nfunction ifError(err) {\n if (err) throw err;\n}\n\nvar Layout$1 = {};\n\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n\n /**\n * Decode from a Buffer into an JavaScript value.\n *\n * @param {Buffer} b - the buffer from which encoded data is read.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {(Number|Array|Object)} - the value of the decoded data.\n *\n * @abstract\n */\n decode(b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Encode a JavaScript value into a Buffer.\n *\n * @param {(Number|Array|Object)} src - the value to be encoded into\n * the buffer. The type accepted depends on the (sub-)type of {@link\n * Layout}.\n *\n * @param {Buffer} b - the buffer into which encoded data will be\n * written.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {Number} - the number of bytes encoded, including the\n * space skipped for internal padding, but excluding data such as\n * {@link Sequence#count|lengths} when stored {@link\n * ExternalLayout|externally}. This is the adjustment to `offset`\n * producing the offset where data for the next layout would be\n * written.\n *\n * @abstract\n */\n encode(src, b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Buffer} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nLayout$1.Layout = Layout;\n\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nLayout$1.nameWithProperty = nameWithProperty;\n\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Class.hasOwnProperty('layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (layout.hasOwnProperty('boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value: function(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value: function(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nLayout$1.bindConstructorLayout = bindConstructorLayout;\n\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\n\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan, property) {\n if (undefined === elementSpan) {\n elementSpan = 1;\n }\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n\n /** @override */\n isCount() {\n return true;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\n\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n\n if (undefined === offset) {\n offset = 0;\n } else if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n\n super(layout.span, property || layout.property);\n\n /** The subordinated layout. */\n this.layout = layout;\n\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Buffer\n * being accessed. */\n this.offset = offset;\n }\n\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.decode(b, offset + this.offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\n\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super( span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\nconst V2E32 = Math.pow(2, 32);\n\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return {hi32, lo32};\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const hi32 = b.readUInt32BE(offset);\n const lo32 = b.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32BE(split.hi32, offset);\n b.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const hi32 = b.readInt32BE(offset);\n const lo32 = b.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeInt32BE(split.hi32, offset);\n b.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readFloatLE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeFloatLE(src, offset);\n return 4;\n }\n}\n\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readFloatBE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeFloatBE(src, offset);\n return 4;\n }\n}\n\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readDoubleLE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeDoubleLE(src, offset);\n return 8;\n }\n}\n\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readDoubleBE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeDoubleBE(src, offset);\n return 8;\n }\n}\n\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n\n super(span, property);\n\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n } else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\n\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n } else if (0 <= offset) {\n offset += fd.span;\n }\n }\n }\n}\n\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\n\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n\n super(property || layout.property || 'variant');\n\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\n\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n const upv = ((discr instanceof UInt)\n || (discr instanceof UIntBE));\n if (upv) {\n discr = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discr = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && upv) {\n span += discr.layout.span;\n }\n }\n super(span, property);\n\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discr;\n\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = upv;\n\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisified rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (src.hasOwnProperty(this.discriminator.property)) {\n if (this.defaultLayout\n && src.hasOwnProperty(this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || src.hasOwnProperty(vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (src.hasOwnProperty(vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n let clo = this.registry[discr];\n if (undefined === clo) {\n let contentOffset = 0;\n clo = this.defaultLayout;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[clo.property] = this.defaultLayout.decode(b, offset + contentOffset);\n } else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n return contentOffset + clo.encode(src[clo.property], b,\n offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Buffer)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Buffer}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset) {\n let variant = vb;\n if (buffer.Buffer.isBuffer(vb)) {\n if (undefined === offset) {\n offset = 0;\n }\n variant = this.discriminator.decode(vb, offset);\n }\n return this.registry[variant];\n }\n}\n\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n return contentOffset + this.layout.getSpan(b, offset + contentOffset);\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!src.hasOwnProperty(this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n }\n}\n\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = undefined;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function(v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function() {\n return value;\n };\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(value);\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n // eslint-disable-next-line no-new-wrappers\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n}\n\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n\n /** The span of this value in bits. */\n this.bits = bits;\n\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode() {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ((!Number.isInteger(value))\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n };\n}\n\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!BitField.prototype.decode.call(this, b, offset);\n }\n\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n return BitField.prototype.encode.call(this, value);\n }\n}\n/* eslint-enable no-extend-native */\n\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Buffer.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return b.slice(offset, offset + span);\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(buffer.Buffer.isBuffer(src)\n && (span === src.length))) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Buffer as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n b.write(src.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\n\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n\n /** @override */\n getSpan(b, offset) {\n if (!buffer.Buffer.isBuffer(b)) {\n throw new TypeError('b must be a Buffer');\n }\n if (undefined === offset) {\n offset = 0;\n }\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n\n /** @override */\n decode(b, offset, dest) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.getSpan(b, offset);\n return b.slice(offset, offset + span - 1).toString('utf-8');\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = src.toString();\n }\n const srcb = new buffer.Buffer(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(b, offset);\n b[offset + span] = 0;\n return span + 1;\n }\n}\n\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan)\n && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n } else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n\n super(-1, property);\n\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (!buffer.Buffer.isBuffer(b)) {\n throw new TypeError('b must be a Buffer');\n }\n if (undefined === offset) {\n offset = 0;\n }\n return b.length - offset;\n }\n\n /** @override */\n decode(b, offset, dest) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return b.slice(offset, offset + span).toString('utf-8');\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = src.toString();\n }\n const srcb = new buffer.Buffer(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(b, offset);\n return span;\n }\n}\n\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n\n /** @override */\n decode(b, offset, dest) {\n return this.value;\n }\n\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\n\nLayout$1.ExternalLayout = ExternalLayout;\nLayout$1.GreedyCount = GreedyCount;\nLayout$1.OffsetLayout = OffsetLayout;\nLayout$1.UInt = UInt;\nLayout$1.UIntBE = UIntBE;\nLayout$1.Int = Int;\nLayout$1.IntBE = IntBE;\nLayout$1.Float = Float;\nLayout$1.FloatBE = FloatBE;\nLayout$1.Double = Double;\nLayout$1.DoubleBE = DoubleBE;\nLayout$1.Sequence = Sequence;\nLayout$1.Structure = Structure;\nLayout$1.UnionDiscriminator = UnionDiscriminator;\nLayout$1.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\nLayout$1.Union = Union;\nLayout$1.VariantLayout = VariantLayout;\nLayout$1.BitStructure = BitStructure;\nLayout$1.BitField = BitField;\nLayout$1.Boolean = Boolean;\nLayout$1.Blob = Blob;\nLayout$1.CString = CString;\nLayout$1.UTF8 = UTF8;\nLayout$1.Constant = Constant;\n\n/** Factory for {@link GreedyCount}. */\nLayout$1.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n\n/** Factory for {@link OffsetLayout}. */\nLayout$1.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nvar u8 = Layout$1.u8 = (property => new UInt(1, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nLayout$1.u16 = (property => new UInt(2, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nLayout$1.u24 = (property => new UInt(3, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nvar u32 = Layout$1.u32 = (property => new UInt(4, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nLayout$1.u40 = (property => new UInt(5, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nLayout$1.u48 = (property => new UInt(6, property));\n\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nLayout$1.nu64 = (property => new NearUInt64(property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nLayout$1.u16be = (property => new UIntBE(2, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nLayout$1.u24be = (property => new UIntBE(3, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nLayout$1.u32be = (property => new UIntBE(4, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nLayout$1.u40be = (property => new UIntBE(5, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nLayout$1.u48be = (property => new UIntBE(6, property));\n\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nLayout$1.nu64be = (property => new NearUInt64BE(property));\n\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nLayout$1.s8 = (property => new Int(1, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nLayout$1.s16 = (property => new Int(2, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nLayout$1.s24 = (property => new Int(3, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nLayout$1.s32 = (property => new Int(4, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nLayout$1.s40 = (property => new Int(5, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nLayout$1.s48 = (property => new Int(6, property));\n\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nLayout$1.ns64 = (property => new NearInt64(property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nLayout$1.s16be = (property => new IntBE(2, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nLayout$1.s24be = (property => new IntBE(3, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nLayout$1.s32be = (property => new IntBE(4, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nLayout$1.s40be = (property => new IntBE(5, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nLayout$1.s48be = (property => new IntBE(6, property));\n\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nLayout$1.ns64be = (property => new NearInt64BE(property));\n\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nLayout$1.f32 = (property => new Float(property));\n\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nLayout$1.f32be = (property => new FloatBE(property));\n\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nLayout$1.f64 = (property => new Double(property));\n\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nLayout$1.f64be = (property => new DoubleBE(property));\n\n/** Factory for {@link Structure} values. */\nvar struct = Layout$1.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n\n/** Factory for {@link BitStructure} values. */\nLayout$1.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n\n/** Factory for {@link Sequence} values. */\nLayout$1.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n\n/** Factory for {@link Union} values. */\nLayout$1.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nLayout$1.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n\n/** Factory for {@link Blob} values. */\nvar blob = Layout$1.blob = ((length, property) => new Blob(length, property));\n\n/** Factory for {@link CString} values. */\nLayout$1.cstr = (property => new CString(property));\n\n/** Factory for {@link UTF8} values. */\nLayout$1.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n\n/** Factory for {@link Constant} values. */\nLayout$1.const = ((value, property) => new Constant(value, property));\n\n// \n/**\n * Layout for a public key\n */\n\nconst publicKey = (property = 'publicKey') => {\n return blob(32, property);\n};\n/**\n * Layout for a 64bit unsigned value\n */\n\nconst uint64 = (property = 'uint64') => {\n return blob(8, property);\n};\n\n// \nfunction sendAndConfirmTransaction(title, connection, transaction, ...signers) {\n return (0,index_browser_esm.sendAndConfirmTransaction)(connection, transaction, signers, {\n skipPreflight: false\n });\n}\n\nconst TOKEN_PROGRAM_ID = new index_browser_esm.PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');\nconst ASSOCIATED_TOKEN_PROGRAM_ID = new index_browser_esm.PublicKey('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL');\nconst FAILED_TO_FIND_ACCOUNT = 'Failed to find account';\nconst INVALID_ACCOUNT_OWNER = 'Invalid account owner';\n/**\n * Unfortunately, BufferLayout.encode uses an `instanceof` check for `Buffer`\n * which fails when using `publicKey.toBuffer()` directly because the bundled `Buffer`\n * class in `@solana/web3.js` is different from the bundled `Buffer` class in this package\n */\n\nfunction pubkeyToBuffer(publicKey) {\n return buffer.Buffer.from(publicKey.toBuffer());\n}\n/**\n * 64-bit value\n */\n\n\nclass u64 extends (bn_default()) {\n /**\n * Convert to Buffer representation\n */\n toBuffer() {\n const a = super.toArray().reverse();\n const b = buffer.Buffer.from(a);\n\n if (b.length === 8) {\n return b;\n }\n\n assert(b.length < 8, 'u64 too large');\n const zeroPad = buffer.Buffer.alloc(8);\n b.copy(zeroPad);\n return zeroPad;\n }\n /**\n * Construct a u64 from Buffer representation\n */\n\n\n static fromBuffer(buffer) {\n assert(buffer.length === 8, `Invalid buffer length: ${buffer.length}`);\n return new u64([...buffer].reverse().map(i => `00${i.toString(16)}`.slice(-2)).join(''), 16);\n }\n\n}\n\nfunction isAccount(accountOrPublicKey) {\n return 'publicKey' in accountOrPublicKey;\n}\n\nconst AuthorityTypeCodes = {\n MintTokens: 0,\n FreezeAccount: 1,\n AccountOwner: 2,\n CloseAccount: 3\n}; // The address of the special mint for wrapped native token.\n\nconst NATIVE_MINT = new index_browser_esm.PublicKey('So11111111111111111111111111111111111111112');\n/**\n * Information about the mint\n */\n\nconst MintLayout = struct([u32('mintAuthorityOption'), publicKey('mintAuthority'), uint64('supply'), u8('decimals'), u8('isInitialized'), u32('freezeAuthorityOption'), publicKey('freezeAuthority')]);\n/**\n * Information about an account\n */\n\n/**\n * @private\n */\n\nconst AccountLayout = struct([publicKey('mint'), publicKey('owner'), uint64('amount'), u32('delegateOption'), publicKey('delegate'), u8('state'), u32('isNativeOption'), uint64('isNative'), uint64('delegatedAmount'), u32('closeAuthorityOption'), publicKey('closeAuthority')]);\n/**\n * Information about an multisig\n */\n\n/**\n * @private\n */\n\nconst MultisigLayout = struct([u8('m'), u8('n'), u8('is_initialized'), publicKey('signer1'), publicKey('signer2'), publicKey('signer3'), publicKey('signer4'), publicKey('signer5'), publicKey('signer6'), publicKey('signer7'), publicKey('signer8'), publicKey('signer9'), publicKey('signer10'), publicKey('signer11')]);\n/**\n * An ERC20-like Token\n */\n\nclass Token {\n /**\n * @private\n */\n\n /**\n * The public key identifying this mint\n */\n\n /**\n * Program Identifier for the Token program\n */\n\n /**\n * Program Identifier for the Associated Token program\n */\n\n /**\n * Fee payer\n */\n\n /**\n * Create a Token object attached to the specific mint\n *\n * @param connection The connection to use\n * @param token Public key of the mint\n * @param programId token programId\n * @param payer Payer of fees\n */\n constructor(connection, publicKey, programId, payer) {\n _defineProperty(this, \"connection\", void 0);\n\n _defineProperty(this, \"publicKey\", void 0);\n\n _defineProperty(this, \"programId\", void 0);\n\n _defineProperty(this, \"associatedProgramId\", void 0);\n\n _defineProperty(this, \"payer\", void 0);\n\n Object.assign(this, {\n connection,\n publicKey,\n programId,\n payer,\n // Hard code is ok; Overriding is needed only for tests\n associatedProgramId: ASSOCIATED_TOKEN_PROGRAM_ID\n });\n }\n /**\n * Get the minimum balance for the mint to be rent exempt\n *\n * @return Number of lamports required\n */\n\n\n static async getMinBalanceRentForExemptMint(connection) {\n return await connection.getMinimumBalanceForRentExemption(MintLayout.span);\n }\n /**\n * Get the minimum balance for the account to be rent exempt\n *\n * @return Number of lamports required\n */\n\n\n static async getMinBalanceRentForExemptAccount(connection) {\n return await connection.getMinimumBalanceForRentExemption(AccountLayout.span);\n }\n /**\n * Get the minimum balance for the multsig to be rent exempt\n *\n * @return Number of lamports required\n */\n\n\n static async getMinBalanceRentForExemptMultisig(connection) {\n return await connection.getMinimumBalanceForRentExemption(MultisigLayout.span);\n }\n /**\n * Create and initialize a token.\n *\n * @param connection The connection to use\n * @param payer Fee payer for transaction\n * @param mintAuthority Account or multisig that will control minting\n * @param freezeAuthority Optional account or multisig that can freeze token accounts\n * @param decimals Location of the decimal place\n * @param programId Optional token programId, uses the system programId by default\n * @return Token object for the newly minted token\n */\n\n\n static async createMint(connection, payer, mintAuthority, freezeAuthority, decimals, programId) {\n const mintAccount = index_browser_esm.Keypair.generate();\n const token = new Token(connection, mintAccount.publicKey, programId, payer); // Allocate memory for the account\n\n const balanceNeeded = await Token.getMinBalanceRentForExemptMint(connection);\n const transaction = new index_browser_esm.Transaction();\n transaction.add(index_browser_esm.SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: mintAccount.publicKey,\n lamports: balanceNeeded,\n space: MintLayout.span,\n programId\n }));\n transaction.add(Token.createInitMintInstruction(programId, mintAccount.publicKey, decimals, mintAuthority, freezeAuthority)); // Send the two instructions\n\n await sendAndConfirmTransaction('createAccount and InitializeMint', connection, transaction, payer, mintAccount);\n return token;\n }\n /**\n * Create and initialize a new account.\n *\n * This account may then be used as a `transfer()` or `approve()` destination\n *\n * @param owner User account that will own the new account\n * @return Public key of the new empty account\n */\n\n\n async createAccount(owner) {\n // Allocate memory for the account\n const balanceNeeded = await Token.getMinBalanceRentForExemptAccount(this.connection);\n const newAccount = index_browser_esm.Keypair.generate();\n const transaction = new index_browser_esm.Transaction();\n transaction.add(index_browser_esm.SystemProgram.createAccount({\n fromPubkey: this.payer.publicKey,\n newAccountPubkey: newAccount.publicKey,\n lamports: balanceNeeded,\n space: AccountLayout.span,\n programId: this.programId\n }));\n const mintPublicKey = this.publicKey;\n transaction.add(Token.createInitAccountInstruction(this.programId, mintPublicKey, newAccount.publicKey, owner)); // Send the two instructions\n\n await sendAndConfirmTransaction('createAccount and InitializeAccount', this.connection, transaction, this.payer, newAccount);\n return newAccount.publicKey;\n }\n /**\n * Create and initialize the associated account.\n *\n * This account may then be used as a `transfer()` or `approve()` destination\n *\n * @param owner User account that will own the new account\n * @return Public key of the new associated account\n */\n\n\n async createAssociatedTokenAccount(owner) {\n const associatedAddress = await Token.getAssociatedTokenAddress(this.associatedProgramId, this.programId, this.publicKey, owner);\n return this.createAssociatedTokenAccountInternal(owner, associatedAddress);\n }\n\n async createAssociatedTokenAccountInternal(owner, associatedAddress) {\n await sendAndConfirmTransaction('CreateAssociatedTokenAccount', this.connection, new index_browser_esm.Transaction().add(Token.createAssociatedTokenAccountInstruction(this.associatedProgramId, this.programId, this.publicKey, associatedAddress, owner, this.payer.publicKey)), this.payer);\n return associatedAddress;\n }\n /**\n * Retrieve the associated account or create one if not found.\n *\n * This account may then be used as a `transfer()` or `approve()` destination\n *\n * @param owner User account that will own the new account\n * @return The new associated account\n */\n\n\n async getOrCreateAssociatedAccountInfo(owner) {\n const associatedAddress = await Token.getAssociatedTokenAddress(this.associatedProgramId, this.programId, this.publicKey, owner); // This is the optimum logic, considering TX fee, client-side computation,\n // RPC roundtrips and guaranteed idempotent.\n // Sadly we can't do this atomically;\n\n try {\n return await this.getAccountInfo(associatedAddress);\n } catch (err) {\n // INVALID_ACCOUNT_OWNER can be possible if the associatedAddress has\n // already been received some lamports (= became system accounts).\n // Assuming program derived addressing is safe, this is the only case\n // for the INVALID_ACCOUNT_OWNER in this code-path\n if (err.message === FAILED_TO_FIND_ACCOUNT || err.message === INVALID_ACCOUNT_OWNER) {\n // as this isn't atomic, it's possible others can create associated\n // accounts meanwhile\n try {\n await this.createAssociatedTokenAccountInternal(owner, associatedAddress);\n } catch (err) {// ignore all errors; for now there is no API compatible way to\n // selectively ignore the expected instruction error if the\n // associated account is existing already.\n } // Now this should always succeed\n\n\n return await this.getAccountInfo(associatedAddress);\n } else {\n throw err;\n }\n }\n }\n /**\n * Create and initialize a new account on the special native token mint.\n *\n * In order to be wrapped, the account must have a balance of native tokens\n * when it is initialized with the token program.\n *\n * This function sends lamports to the new account before initializing it.\n *\n * @param connection A solana web3 connection\n * @param programId The token program ID\n * @param owner The owner of the new token account\n * @param payer The source of the lamports to initialize, and payer of the initialization fees.\n * @param amount The amount of lamports to wrap\n * @return {Promise} The new token account\n */\n\n\n static async createWrappedNativeAccount(connection, programId, owner, payer, amount) {\n // Allocate memory for the account\n const balanceNeeded = await Token.getMinBalanceRentForExemptAccount(connection); // Create a new account\n\n const newAccount = index_browser_esm.Keypair.generate();\n const transaction = new index_browser_esm.Transaction();\n transaction.add(index_browser_esm.SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: newAccount.publicKey,\n lamports: balanceNeeded,\n space: AccountLayout.span,\n programId\n })); // Send lamports to it (these will be wrapped into native tokens by the token program)\n\n transaction.add(index_browser_esm.SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: newAccount.publicKey,\n lamports: amount\n })); // Assign the new account to the native token mint.\n // the account will be initialized with a balance equal to the native token balance.\n // (i.e. amount)\n\n transaction.add(Token.createInitAccountInstruction(programId, NATIVE_MINT, newAccount.publicKey, owner)); // Send the three instructions\n\n await sendAndConfirmTransaction('createAccount, transfer, and initializeAccount', connection, transaction, payer, newAccount);\n return newAccount.publicKey;\n }\n /**\n * Create and initialize a new multisig.\n *\n * This account may then be used for multisignature verification\n *\n * @param m Number of required signatures\n * @param signers Full set of signers\n * @return Public key of the new multisig account\n */\n\n\n async createMultisig(m, signers) {\n const multisigAccount = index_browser_esm.Keypair.generate(); // Allocate memory for the account\n\n const balanceNeeded = await Token.getMinBalanceRentForExemptMultisig(this.connection);\n const transaction = new index_browser_esm.Transaction();\n transaction.add(index_browser_esm.SystemProgram.createAccount({\n fromPubkey: this.payer.publicKey,\n newAccountPubkey: multisigAccount.publicKey,\n lamports: balanceNeeded,\n space: MultisigLayout.span,\n programId: this.programId\n })); // create the new account\n\n let keys = [{\n pubkey: multisigAccount.publicKey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: index_browser_esm.SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n signers.forEach(signer => keys.push({\n pubkey: signer,\n isSigner: false,\n isWritable: false\n }));\n const dataLayout = struct([u8('instruction'), u8('m')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 2,\n // InitializeMultisig instruction\n m\n }, data);\n transaction.add({\n keys,\n programId: this.programId,\n data\n }); // Send the two instructions\n\n await sendAndConfirmTransaction('createAccount and InitializeMultisig', this.connection, transaction, this.payer, multisigAccount);\n return multisigAccount.publicKey;\n }\n /**\n * Retrieve mint information\n */\n\n\n async getMintInfo() {\n const info = await this.connection.getAccountInfo(this.publicKey);\n\n if (info === null) {\n throw new Error('Failed to find mint account');\n }\n\n if (!info.owner.equals(this.programId)) {\n throw new Error(`Invalid mint owner: ${JSON.stringify(info.owner)}`);\n }\n\n if (info.data.length != MintLayout.span) {\n throw new Error(`Invalid mint size`);\n }\n\n const data = buffer.Buffer.from(info.data);\n const mintInfo = MintLayout.decode(data);\n\n if (mintInfo.mintAuthorityOption === 0) {\n mintInfo.mintAuthority = null;\n } else {\n mintInfo.mintAuthority = new index_browser_esm.PublicKey(mintInfo.mintAuthority);\n }\n\n mintInfo.supply = u64.fromBuffer(mintInfo.supply);\n mintInfo.isInitialized = mintInfo.isInitialized != 0;\n\n if (mintInfo.freezeAuthorityOption === 0) {\n mintInfo.freezeAuthority = null;\n } else {\n mintInfo.freezeAuthority = new index_browser_esm.PublicKey(mintInfo.freezeAuthority);\n }\n\n return mintInfo;\n }\n /**\n * Retrieve account information\n *\n * @param account Public key of the account\n */\n\n\n async getAccountInfo(account, commitment) {\n const info = await this.connection.getAccountInfo(account, commitment);\n\n if (info === null) {\n throw new Error(FAILED_TO_FIND_ACCOUNT);\n }\n\n if (!info.owner.equals(this.programId)) {\n throw new Error(INVALID_ACCOUNT_OWNER);\n }\n\n if (info.data.length != AccountLayout.span) {\n throw new Error(`Invalid account size`);\n }\n\n const data = buffer.Buffer.from(info.data);\n const accountInfo = AccountLayout.decode(data);\n accountInfo.address = account;\n accountInfo.mint = new index_browser_esm.PublicKey(accountInfo.mint);\n accountInfo.owner = new index_browser_esm.PublicKey(accountInfo.owner);\n accountInfo.amount = u64.fromBuffer(accountInfo.amount);\n\n if (accountInfo.delegateOption === 0) {\n accountInfo.delegate = null;\n accountInfo.delegatedAmount = new u64();\n } else {\n accountInfo.delegate = new index_browser_esm.PublicKey(accountInfo.delegate);\n accountInfo.delegatedAmount = u64.fromBuffer(accountInfo.delegatedAmount);\n }\n\n accountInfo.isInitialized = accountInfo.state !== 0;\n accountInfo.isFrozen = accountInfo.state === 2;\n\n if (accountInfo.isNativeOption === 1) {\n accountInfo.rentExemptReserve = u64.fromBuffer(accountInfo.isNative);\n accountInfo.isNative = true;\n } else {\n accountInfo.rentExemptReserve = null;\n accountInfo.isNative = false;\n }\n\n if (accountInfo.closeAuthorityOption === 0) {\n accountInfo.closeAuthority = null;\n } else {\n accountInfo.closeAuthority = new index_browser_esm.PublicKey(accountInfo.closeAuthority);\n }\n\n if (!accountInfo.mint.equals(this.publicKey)) {\n throw new Error(`Invalid account mint: ${JSON.stringify(accountInfo.mint)} !== ${JSON.stringify(this.publicKey)}`);\n }\n\n return accountInfo;\n }\n /**\n * Retrieve Multisig information\n *\n * @param multisig Public key of the account\n */\n\n\n async getMultisigInfo(multisig) {\n const info = await this.connection.getAccountInfo(multisig);\n\n if (info === null) {\n throw new Error('Failed to find multisig');\n }\n\n if (!info.owner.equals(this.programId)) {\n throw new Error(`Invalid multisig owner`);\n }\n\n if (info.data.length != MultisigLayout.span) {\n throw new Error(`Invalid multisig size`);\n }\n\n const data = buffer.Buffer.from(info.data);\n const multisigInfo = MultisigLayout.decode(data);\n multisigInfo.signer1 = new index_browser_esm.PublicKey(multisigInfo.signer1);\n multisigInfo.signer2 = new index_browser_esm.PublicKey(multisigInfo.signer2);\n multisigInfo.signer3 = new index_browser_esm.PublicKey(multisigInfo.signer3);\n multisigInfo.signer4 = new index_browser_esm.PublicKey(multisigInfo.signer4);\n multisigInfo.signer5 = new index_browser_esm.PublicKey(multisigInfo.signer5);\n multisigInfo.signer6 = new index_browser_esm.PublicKey(multisigInfo.signer6);\n multisigInfo.signer7 = new index_browser_esm.PublicKey(multisigInfo.signer7);\n multisigInfo.signer8 = new index_browser_esm.PublicKey(multisigInfo.signer8);\n multisigInfo.signer9 = new index_browser_esm.PublicKey(multisigInfo.signer9);\n multisigInfo.signer10 = new index_browser_esm.PublicKey(multisigInfo.signer10);\n multisigInfo.signer11 = new index_browser_esm.PublicKey(multisigInfo.signer11);\n return multisigInfo;\n }\n /**\n * Transfer tokens to another account\n *\n * @param source Source account\n * @param destination Destination account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Number of tokens to transfer\n */\n\n\n async transfer(source, destination, owner, multiSigners, amount) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n return await sendAndConfirmTransaction('Transfer', this.connection, new index_browser_esm.Transaction().add(Token.createTransferInstruction(this.programId, source, destination, ownerPublicKey, multiSigners, amount)), this.payer, ...signers);\n }\n /**\n * Grant a third-party permission to transfer up the specified number of tokens from an account\n *\n * @param account Public key of the account\n * @param delegate Account authorized to perform a transfer tokens from the source account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Maximum number of tokens the delegate may transfer\n */\n\n\n async approve(account, delegate, owner, multiSigners, amount) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('Approve', this.connection, new index_browser_esm.Transaction().add(Token.createApproveInstruction(this.programId, account, delegate, ownerPublicKey, multiSigners, amount)), this.payer, ...signers);\n }\n /**\n * Remove approval for the transfer of any remaining tokens\n *\n * @param account Public key of the account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n */\n\n\n async revoke(account, owner, multiSigners) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('Revoke', this.connection, new index_browser_esm.Transaction().add(Token.createRevokeInstruction(this.programId, account, ownerPublicKey, multiSigners)), this.payer, ...signers);\n }\n /**\n * Assign a new authority to the account\n *\n * @param account Public key of the account\n * @param newAuthority New authority of the account\n * @param authorityType Type of authority to set\n * @param currentAuthority Current authority of the account\n * @param multiSigners Signing accounts if `currentAuthority` is a multiSig\n */\n\n\n async setAuthority(account, newAuthority, authorityType, currentAuthority, multiSigners) {\n let currentAuthorityPublicKey;\n let signers;\n\n if (isAccount(currentAuthority)) {\n currentAuthorityPublicKey = currentAuthority.publicKey;\n signers = [currentAuthority];\n } else {\n currentAuthorityPublicKey = currentAuthority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('SetAuthority', this.connection, new index_browser_esm.Transaction().add(Token.createSetAuthorityInstruction(this.programId, account, newAuthority, authorityType, currentAuthorityPublicKey, multiSigners)), this.payer, ...signers);\n }\n /**\n * Mint new tokens\n *\n * @param dest Public key of the account to mint to\n * @param authority Minting authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Amount to mint\n */\n\n\n async mintTo(dest, authority, multiSigners, amount) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(authority)) {\n ownerPublicKey = authority.publicKey;\n signers = [authority];\n } else {\n ownerPublicKey = authority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('MintTo', this.connection, new index_browser_esm.Transaction().add(Token.createMintToInstruction(this.programId, this.publicKey, dest, ownerPublicKey, multiSigners, amount)), this.payer, ...signers);\n }\n /**\n * Burn tokens\n *\n * @param account Account to burn tokens from\n * @param owner Account owner\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Amount to burn\n */\n\n\n async burn(account, owner, multiSigners, amount) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('Burn', this.connection, new index_browser_esm.Transaction().add(Token.createBurnInstruction(this.programId, this.publicKey, account, ownerPublicKey, multiSigners, amount)), this.payer, ...signers);\n }\n /**\n * Close account\n *\n * @param account Account to close\n * @param dest Account to receive the remaining balance of the closed account\n * @param authority Authority which is allowed to close the account\n * @param multiSigners Signing accounts if `authority` is a multiSig\n */\n\n\n async closeAccount(account, dest, authority, multiSigners) {\n let authorityPublicKey;\n let signers;\n\n if (isAccount(authority)) {\n authorityPublicKey = authority.publicKey;\n signers = [authority];\n } else {\n authorityPublicKey = authority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('CloseAccount', this.connection, new index_browser_esm.Transaction().add(Token.createCloseAccountInstruction(this.programId, account, dest, authorityPublicKey, multiSigners)), this.payer, ...signers);\n }\n /**\n * Freeze account\n *\n * @param account Account to freeze\n * @param authority The mint freeze authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n */\n\n\n async freezeAccount(account, authority, multiSigners) {\n let authorityPublicKey;\n let signers;\n\n if (isAccount(authority)) {\n authorityPublicKey = authority.publicKey;\n signers = [authority];\n } else {\n authorityPublicKey = authority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('FreezeAccount', this.connection, new index_browser_esm.Transaction().add(Token.createFreezeAccountInstruction(this.programId, account, this.publicKey, authorityPublicKey, multiSigners)), this.payer, ...signers);\n }\n /**\n * Thaw account\n *\n * @param account Account to thaw\n * @param authority The mint freeze authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n */\n\n\n async thawAccount(account, authority, multiSigners) {\n let authorityPublicKey;\n let signers;\n\n if (isAccount(authority)) {\n authorityPublicKey = authority.publicKey;\n signers = [authority];\n } else {\n authorityPublicKey = authority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('ThawAccount', this.connection, new index_browser_esm.Transaction().add(Token.createThawAccountInstruction(this.programId, account, this.publicKey, authorityPublicKey, multiSigners)), this.payer, ...signers);\n }\n /**\n * Transfer tokens to another account, asserting the token mint and decimals\n *\n * @param source Source account\n * @param destination Destination account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Number of tokens to transfer\n * @param decimals Number of decimals in transfer amount\n */\n\n\n async transferChecked(source, destination, owner, multiSigners, amount, decimals) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n return await sendAndConfirmTransaction('TransferChecked', this.connection, new index_browser_esm.Transaction().add(Token.createTransferCheckedInstruction(this.programId, source, this.publicKey, destination, ownerPublicKey, multiSigners, amount, decimals)), this.payer, ...signers);\n }\n /**\n * Grant a third-party permission to transfer up the specified number of tokens from an account,\n * asserting the token mint and decimals\n *\n * @param account Public key of the account\n * @param delegate Account authorized to perform a transfer tokens from the source account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Maximum number of tokens the delegate may transfer\n * @param decimals Number of decimals in approve amount\n */\n\n\n async approveChecked(account, delegate, owner, multiSigners, amount, decimals) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('ApproveChecked', this.connection, new index_browser_esm.Transaction().add(Token.createApproveCheckedInstruction(this.programId, account, this.publicKey, delegate, ownerPublicKey, multiSigners, amount, decimals)), this.payer, ...signers);\n }\n /**\n * Mint new tokens, asserting the token mint and decimals\n *\n * @param dest Public key of the account to mint to\n * @param authority Minting authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Amount to mint\n * @param decimals Number of decimals in amount to mint\n */\n\n\n async mintToChecked(dest, authority, multiSigners, amount, decimals) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(authority)) {\n ownerPublicKey = authority.publicKey;\n signers = [authority];\n } else {\n ownerPublicKey = authority;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('MintToChecked', this.connection, new index_browser_esm.Transaction().add(Token.createMintToCheckedInstruction(this.programId, this.publicKey, dest, ownerPublicKey, multiSigners, amount, decimals)), this.payer, ...signers);\n }\n /**\n * Burn tokens, asserting the token mint and decimals\n *\n * @param account Account to burn tokens from\n * @param owner Account owner\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Amount to burn\n * @param decimals Number of decimals in amount to burn\n */\n\n\n async burnChecked(account, owner, multiSigners, amount, decimals) {\n let ownerPublicKey;\n let signers;\n\n if (isAccount(owner)) {\n ownerPublicKey = owner.publicKey;\n signers = [owner];\n } else {\n ownerPublicKey = owner;\n signers = multiSigners;\n }\n\n await sendAndConfirmTransaction('BurnChecked', this.connection, new index_browser_esm.Transaction().add(Token.createBurnCheckedInstruction(this.programId, this.publicKey, account, ownerPublicKey, multiSigners, amount, decimals)), this.payer, ...signers);\n }\n /**\n * Sync amount in native SPL token account to underlying lamports\n *\n * @param nativeAccount Account to sync\n */\n\n\n async syncNative(nativeAccount) {\n await sendAndConfirmTransaction('SyncNative', this.connection, new index_browser_esm.Transaction().add(Token.createSyncNativeInstruction(this.programId, nativeAccount)), this.payer);\n }\n /**\n * Construct an InitializeMint instruction\n *\n * @param programId SPL Token program account\n * @param mint Token mint account\n * @param decimals Number of decimals in token account amounts\n * @param mintAuthority Minting authority\n * @param freezeAuthority Optional authority that can freeze token accounts\n */\n\n\n static createInitMintInstruction(programId, mint, decimals, mintAuthority, freezeAuthority) {\n let keys = [{\n pubkey: mint,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: index_browser_esm.SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n const commandDataLayout = struct([u8('instruction'), u8('decimals'), publicKey('mintAuthority'), u8('option'), publicKey('freezeAuthority')]);\n let data = buffer.Buffer.alloc(1024);\n {\n const encodeLength = commandDataLayout.encode({\n instruction: 0,\n // InitializeMint instruction\n decimals,\n mintAuthority: pubkeyToBuffer(mintAuthority),\n option: freezeAuthority === null ? 0 : 1,\n freezeAuthority: pubkeyToBuffer(freezeAuthority || new index_browser_esm.PublicKey(0))\n }, data);\n data = data.slice(0, encodeLength);\n }\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId,\n data\n });\n }\n /**\n * Construct an InitializeAccount instruction\n *\n * @param programId SPL Token program account\n * @param mint Token mint account\n * @param account New account\n * @param owner Owner of the new account\n */\n\n\n static createInitAccountInstruction(programId, mint, account, owner) {\n const keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: owner,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: index_browser_esm.SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 1 // InitializeAccount instruction\n\n }, data);\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId,\n data\n });\n }\n /**\n * Construct a Transfer instruction\n *\n * @param programId SPL Token program account\n * @param source Source account\n * @param destination Destination account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Number of tokens to transfer\n */\n\n\n static createTransferInstruction(programId, source, destination, owner, multiSigners, amount) {\n const dataLayout = struct([u8('instruction'), uint64('amount')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 3,\n // Transfer instruction\n amount: new u64(amount).toBuffer()\n }, data);\n let keys = [{\n pubkey: source,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: destination,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct an Approve instruction\n *\n * @param programId SPL Token program account\n * @param account Public key of the account\n * @param delegate Account authorized to perform a transfer of tokens from the source account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Maximum number of tokens the delegate may transfer\n */\n\n\n static createApproveInstruction(programId, account, delegate, owner, multiSigners, amount) {\n const dataLayout = struct([u8('instruction'), uint64('amount')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 4,\n // Approve instruction\n amount: new u64(amount).toBuffer()\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: delegate,\n isSigner: false,\n isWritable: false\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a Revoke instruction\n *\n * @param programId SPL Token program account\n * @param account Public key of the account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n */\n\n\n static createRevokeInstruction(programId, account, owner, multiSigners) {\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 5 // Approve instruction\n\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a SetAuthority instruction\n *\n * @param programId SPL Token program account\n * @param account Public key of the account\n * @param newAuthority New authority of the account\n * @param authorityType Type of authority to set\n * @param currentAuthority Current authority of the specified type\n * @param multiSigners Signing accounts if `currentAuthority` is a multiSig\n */\n\n\n static createSetAuthorityInstruction(programId, account, newAuthority, authorityType, currentAuthority, multiSigners) {\n const commandDataLayout = struct([u8('instruction'), u8('authorityType'), u8('option'), publicKey('newAuthority')]);\n let data = buffer.Buffer.alloc(1024);\n {\n const encodeLength = commandDataLayout.encode({\n instruction: 6,\n // SetAuthority instruction\n authorityType: AuthorityTypeCodes[authorityType],\n option: newAuthority === null ? 0 : 1,\n newAuthority: pubkeyToBuffer(newAuthority || new index_browser_esm.PublicKey(0))\n }, data);\n data = data.slice(0, encodeLength);\n }\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: currentAuthority,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: currentAuthority,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a MintTo instruction\n *\n * @param programId SPL Token program account\n * @param mint Public key of the mint\n * @param dest Public key of the account to mint to\n * @param authority The mint authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Amount to mint\n */\n\n\n static createMintToInstruction(programId, mint, dest, authority, multiSigners, amount) {\n const dataLayout = struct([u8('instruction'), uint64('amount')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 7,\n // MintTo instruction\n amount: new u64(amount).toBuffer()\n }, data);\n let keys = [{\n pubkey: mint,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: dest,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: authority,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: authority,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a Burn instruction\n *\n * @param programId SPL Token program account\n * @param mint Mint for the account\n * @param account Account to burn tokens from\n * @param owner Owner of the account\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount amount to burn\n */\n\n\n static createBurnInstruction(programId, mint, account, owner, multiSigners, amount) {\n const dataLayout = struct([u8('instruction'), uint64('amount')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 8,\n // Burn instruction\n amount: new u64(amount).toBuffer()\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a Close instruction\n *\n * @param programId SPL Token program account\n * @param account Account to close\n * @param dest Account to receive the remaining balance of the closed account\n * @param authority Account Close authority\n * @param multiSigners Signing accounts if `owner` is a multiSig\n */\n\n\n static createCloseAccountInstruction(programId, account, dest, owner, multiSigners) {\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 9 // CloseAccount instruction\n\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: dest,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a Freeze instruction\n *\n * @param programId SPL Token program account\n * @param account Account to freeze\n * @param mint Mint account\n * @param authority Mint freeze authority\n * @param multiSigners Signing accounts if `owner` is a multiSig\n */\n\n\n static createFreezeAccountInstruction(programId, account, mint, authority, multiSigners) {\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 10 // FreezeAccount instruction\n\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: authority,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: authority,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a Thaw instruction\n *\n * @param programId SPL Token program account\n * @param account Account to thaw\n * @param mint Mint account\n * @param authority Mint freeze authority\n * @param multiSigners Signing accounts if `owner` is a multiSig\n */\n\n\n static createThawAccountInstruction(programId, account, mint, authority, multiSigners) {\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 11 // ThawAccount instruction\n\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: authority,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: authority,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a TransferChecked instruction\n *\n * @param programId SPL Token program account\n * @param source Source account\n * @param mint Mint account\n * @param destination Destination account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Number of tokens to transfer\n * @param decimals Number of decimals in transfer amount\n */\n\n\n static createTransferCheckedInstruction(programId, source, mint, destination, owner, multiSigners, amount, decimals) {\n const dataLayout = struct([u8('instruction'), uint64('amount'), u8('decimals')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 12,\n // TransferChecked instruction\n amount: new u64(amount).toBuffer(),\n decimals\n }, data);\n let keys = [{\n pubkey: source,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: destination,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct an ApproveChecked instruction\n *\n * @param programId SPL Token program account\n * @param account Public key of the account\n * @param mint Mint account\n * @param delegate Account authorized to perform a transfer of tokens from the source account\n * @param owner Owner of the source account\n * @param multiSigners Signing accounts if `owner` is a multiSig\n * @param amount Maximum number of tokens the delegate may transfer\n * @param decimals Number of decimals in approve amount\n */\n\n\n static createApproveCheckedInstruction(programId, account, mint, delegate, owner, multiSigners, amount, decimals) {\n const dataLayout = struct([u8('instruction'), uint64('amount'), u8('decimals')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 13,\n // ApproveChecked instruction\n amount: new u64(amount).toBuffer(),\n decimals\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: delegate,\n isSigner: false,\n isWritable: false\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a MintToChecked instruction\n *\n * @param programId SPL Token program account\n * @param mint Public key of the mint\n * @param dest Public key of the account to mint to\n * @param authority The mint authority\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount Amount to mint\n * @param decimals Number of decimals in amount to mint\n */\n\n\n static createMintToCheckedInstruction(programId, mint, dest, authority, multiSigners, amount, decimals) {\n const dataLayout = struct([u8('instruction'), uint64('amount'), u8('decimals')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 14,\n // MintToChecked instruction\n amount: new u64(amount).toBuffer(),\n decimals\n }, data);\n let keys = [{\n pubkey: mint,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: dest,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: authority,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: authority,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a BurnChecked instruction\n *\n * @param programId SPL Token program account\n * @param mint Mint for the account\n * @param account Account to burn tokens from\n * @param owner Owner of the account\n * @param multiSigners Signing accounts if `authority` is a multiSig\n * @param amount amount to burn\n */\n\n\n static createBurnCheckedInstruction(programId, mint, account, owner, multiSigners, amount, decimals) {\n const dataLayout = struct([u8('instruction'), uint64('amount'), u8('decimals')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 15,\n // BurnChecked instruction\n amount: new u64(amount).toBuffer(),\n decimals\n }, data);\n let keys = [{\n pubkey: account,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: true\n }];\n\n if (multiSigners.length === 0) {\n keys.push({\n pubkey: owner,\n isSigner: true,\n isWritable: false\n });\n } else {\n keys.push({\n pubkey: owner,\n isSigner: false,\n isWritable: false\n });\n multiSigners.forEach(signer => keys.push({\n pubkey: signer.publicKey,\n isSigner: true,\n isWritable: false\n }));\n }\n\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Construct a SyncNative instruction\n *\n * @param programId SPL Token program account\n * @param nativeAccount Account to sync lamports from\n */\n\n\n static createSyncNativeInstruction(programId, nativeAccount) {\n const dataLayout = struct([u8('instruction')]);\n const data = buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 17 // SyncNative instruction\n\n }, data);\n let keys = [{\n pubkey: nativeAccount,\n isSigner: false,\n isWritable: true\n }];\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: programId,\n data\n });\n }\n /**\n * Get the address for the associated token account\n *\n * @param associatedProgramId SPL Associated Token program account\n * @param programId SPL Token program account\n * @param mint Token mint account\n * @param owner Owner of the new account\n * @return Public key of the associated token account\n */\n\n\n static async getAssociatedTokenAddress(associatedProgramId, programId, mint, owner, allowOwnerOffCurve = false) {\n if (!allowOwnerOffCurve && !index_browser_esm.PublicKey.isOnCurve(owner.toBuffer())) {\n throw new Error(`Owner cannot sign: ${owner.toString()}`);\n }\n\n return (await index_browser_esm.PublicKey.findProgramAddress([owner.toBuffer(), programId.toBuffer(), mint.toBuffer()], associatedProgramId))[0];\n }\n /**\n * Construct the AssociatedTokenProgram instruction to create the associated\n * token account\n *\n * @param associatedProgramId SPL Associated Token program account\n * @param programId SPL Token program account\n * @param mint Token mint account\n * @param associatedAccount New associated account\n * @param owner Owner of the new account\n * @param payer Payer of fees\n */\n\n\n static createAssociatedTokenAccountInstruction(associatedProgramId, programId, mint, associatedAccount, owner, payer) {\n const data = buffer.Buffer.alloc(0);\n let keys = [{\n pubkey: payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: associatedAccount,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: owner,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: mint,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: index_browser_esm.SystemProgram.programId,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: programId,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: index_browser_esm.SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n return new index_browser_esm.TransactionInstruction({\n keys,\n programId: associatedProgramId,\n data\n });\n }\n\n}\n\n\n//# sourceMappingURL=index.browser.esm.js.map\n\n\n/***/ }),\n\n/***/ 6737:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"Account\": function() { return /* binding */ Account; },\n \"AddressLookupTableAccount\": function() { return /* binding */ AddressLookupTableAccount; },\n \"AddressLookupTableInstruction\": function() { return /* binding */ AddressLookupTableInstruction; },\n \"AddressLookupTableProgram\": function() { return /* binding */ AddressLookupTableProgram; },\n \"Authorized\": function() { return /* binding */ Authorized; },\n \"BLOCKHASH_CACHE_TIMEOUT_MS\": function() { return /* binding */ BLOCKHASH_CACHE_TIMEOUT_MS; },\n \"BPF_LOADER_DEPRECATED_PROGRAM_ID\": function() { return /* binding */ BPF_LOADER_DEPRECATED_PROGRAM_ID; },\n \"BPF_LOADER_PROGRAM_ID\": function() { return /* binding */ BPF_LOADER_PROGRAM_ID; },\n \"BpfLoader\": function() { return /* binding */ BpfLoader; },\n \"COMPUTE_BUDGET_INSTRUCTION_LAYOUTS\": function() { return /* binding */ COMPUTE_BUDGET_INSTRUCTION_LAYOUTS; },\n \"ComputeBudgetInstruction\": function() { return /* binding */ ComputeBudgetInstruction; },\n \"ComputeBudgetProgram\": function() { return /* binding */ ComputeBudgetProgram; },\n \"Connection\": function() { return /* binding */ Connection; },\n \"Ed25519Program\": function() { return /* binding */ Ed25519Program; },\n \"Enum\": function() { return /* binding */ Enum; },\n \"EpochSchedule\": function() { return /* binding */ EpochSchedule; },\n \"FeeCalculatorLayout\": function() { return /* binding */ FeeCalculatorLayout; },\n \"Keypair\": function() { return /* binding */ Keypair; },\n \"LAMPORTS_PER_SOL\": function() { return /* binding */ LAMPORTS_PER_SOL; },\n \"LOOKUP_TABLE_INSTRUCTION_LAYOUTS\": function() { return /* binding */ LOOKUP_TABLE_INSTRUCTION_LAYOUTS; },\n \"Loader\": function() { return /* binding */ Loader; },\n \"Lockup\": function() { return /* binding */ Lockup; },\n \"MAX_SEED_LENGTH\": function() { return /* binding */ MAX_SEED_LENGTH; },\n \"Message\": function() { return /* binding */ Message; },\n \"MessageAccountKeys\": function() { return /* binding */ MessageAccountKeys; },\n \"MessageV0\": function() { return /* binding */ MessageV0; },\n \"NONCE_ACCOUNT_LENGTH\": function() { return /* binding */ NONCE_ACCOUNT_LENGTH; },\n \"NonceAccount\": function() { return /* binding */ NonceAccount; },\n \"PACKET_DATA_SIZE\": function() { return /* binding */ PACKET_DATA_SIZE; },\n \"PUBLIC_KEY_LENGTH\": function() { return /* binding */ PUBLIC_KEY_LENGTH; },\n \"PublicKey\": function() { return /* binding */ PublicKey; },\n \"SIGNATURE_LENGTH_IN_BYTES\": function() { return /* binding */ SIGNATURE_LENGTH_IN_BYTES; },\n \"SOLANA_SCHEMA\": function() { return /* binding */ SOLANA_SCHEMA; },\n \"STAKE_CONFIG_ID\": function() { return /* binding */ STAKE_CONFIG_ID; },\n \"STAKE_INSTRUCTION_LAYOUTS\": function() { return /* binding */ STAKE_INSTRUCTION_LAYOUTS; },\n \"SYSTEM_INSTRUCTION_LAYOUTS\": function() { return /* binding */ SYSTEM_INSTRUCTION_LAYOUTS; },\n \"SYSVAR_CLOCK_PUBKEY\": function() { return /* binding */ SYSVAR_CLOCK_PUBKEY; },\n \"SYSVAR_EPOCH_SCHEDULE_PUBKEY\": function() { return /* binding */ SYSVAR_EPOCH_SCHEDULE_PUBKEY; },\n \"SYSVAR_INSTRUCTIONS_PUBKEY\": function() { return /* binding */ SYSVAR_INSTRUCTIONS_PUBKEY; },\n \"SYSVAR_RECENT_BLOCKHASHES_PUBKEY\": function() { return /* binding */ SYSVAR_RECENT_BLOCKHASHES_PUBKEY; },\n \"SYSVAR_RENT_PUBKEY\": function() { return /* binding */ SYSVAR_RENT_PUBKEY; },\n \"SYSVAR_REWARDS_PUBKEY\": function() { return /* binding */ SYSVAR_REWARDS_PUBKEY; },\n \"SYSVAR_SLOT_HASHES_PUBKEY\": function() { return /* binding */ SYSVAR_SLOT_HASHES_PUBKEY; },\n \"SYSVAR_SLOT_HISTORY_PUBKEY\": function() { return /* binding */ SYSVAR_SLOT_HISTORY_PUBKEY; },\n \"SYSVAR_STAKE_HISTORY_PUBKEY\": function() { return /* binding */ SYSVAR_STAKE_HISTORY_PUBKEY; },\n \"Secp256k1Program\": function() { return /* binding */ Secp256k1Program; },\n \"SendTransactionError\": function() { return /* binding */ SendTransactionError; },\n \"SolanaJSONRPCError\": function() { return /* binding */ SolanaJSONRPCError; },\n \"SolanaJSONRPCErrorCode\": function() { return /* binding */ SolanaJSONRPCErrorCode; },\n \"StakeAuthorizationLayout\": function() { return /* binding */ StakeAuthorizationLayout; },\n \"StakeInstruction\": function() { return /* binding */ StakeInstruction; },\n \"StakeProgram\": function() { return /* binding */ StakeProgram; },\n \"Struct\": function() { return /* binding */ index_browser_esm_Struct; },\n \"SystemInstruction\": function() { return /* binding */ SystemInstruction; },\n \"SystemProgram\": function() { return /* binding */ SystemProgram; },\n \"Transaction\": function() { return /* binding */ Transaction; },\n \"TransactionExpiredBlockheightExceededError\": function() { return /* binding */ TransactionExpiredBlockheightExceededError; },\n \"TransactionExpiredNonceInvalidError\": function() { return /* binding */ TransactionExpiredNonceInvalidError; },\n \"TransactionExpiredTimeoutError\": function() { return /* binding */ TransactionExpiredTimeoutError; },\n \"TransactionInstruction\": function() { return /* binding */ TransactionInstruction; },\n \"TransactionMessage\": function() { return /* binding */ TransactionMessage; },\n \"TransactionStatus\": function() { return /* binding */ TransactionStatus; },\n \"VALIDATOR_INFO_KEY\": function() { return /* binding */ VALIDATOR_INFO_KEY; },\n \"VERSION_PREFIX_MASK\": function() { return /* binding */ VERSION_PREFIX_MASK; },\n \"VOTE_PROGRAM_ID\": function() { return /* binding */ VOTE_PROGRAM_ID; },\n \"ValidatorInfo\": function() { return /* binding */ ValidatorInfo; },\n \"VersionedMessage\": function() { return /* binding */ VersionedMessage; },\n \"VersionedTransaction\": function() { return /* binding */ VersionedTransaction; },\n \"VoteAccount\": function() { return /* binding */ VoteAccount; },\n \"VoteAuthorizationLayout\": function() { return /* binding */ VoteAuthorizationLayout; },\n \"VoteInit\": function() { return /* binding */ VoteInit; },\n \"VoteInstruction\": function() { return /* binding */ VoteInstruction; },\n \"VoteProgram\": function() { return /* binding */ VoteProgram; },\n \"clusterApiUrl\": function() { return /* binding */ clusterApiUrl; },\n \"sendAndConfirmRawTransaction\": function() { return /* binding */ sendAndConfirmRawTransaction; },\n \"sendAndConfirmTransaction\": function() { return /* binding */ sendAndConfirmTransaction; }\n});\n\n// NAMESPACE OBJECT: ./node_modules/@noble/curves/esm/abstract/utils.js\nvar utils_namespaceObject = {};\n__webpack_require__.r(utils_namespaceObject);\n__webpack_require__.d(utils_namespaceObject, {\n \"abytes\": function() { return abytes; },\n \"bitGet\": function() { return bitGet; },\n \"bitLen\": function() { return bitLen; },\n \"bitMask\": function() { return bitMask; },\n \"bitSet\": function() { return bitSet; },\n \"bytesToHex\": function() { return utils_bytesToHex; },\n \"bytesToNumberBE\": function() { return utils_bytesToNumberBE; },\n \"bytesToNumberLE\": function() { return utils_bytesToNumberLE; },\n \"concatBytes\": function() { return utils_concatBytes; },\n \"createHmacDrbg\": function() { return createHmacDrbg; },\n \"ensureBytes\": function() { return utils_ensureBytes; },\n \"equalBytes\": function() { return utils_equalBytes; },\n \"hexToBytes\": function() { return hexToBytes; },\n \"hexToNumber\": function() { return hexToNumber; },\n \"isBytes\": function() { return isBytes; },\n \"numberToBytesBE\": function() { return utils_numberToBytesBE; },\n \"numberToBytesLE\": function() { return utils_numberToBytesLE; },\n \"numberToHexUnpadded\": function() { return numberToHexUnpadded; },\n \"numberToVarBytesBE\": function() { return numberToVarBytesBE; },\n \"utf8ToBytes\": function() { return utils_utf8ToBytes; },\n \"validateObject\": function() { return validateObject; }\n});\n\n// EXTERNAL MODULE: ./node_modules/buffer/index.js\nvar node_modules_buffer = __webpack_require__(8764);\n// EXTERNAL MODULE: ./node_modules/@noble/hashes/esm/_md.js\nvar _md = __webpack_require__(4359);\n;// CONCATENATED MODULE: ./node_modules/@noble/hashes/esm/_u64.js\nconst U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\n\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\n/* harmony default export */ var _u64 = (u64);\n//# sourceMappingURL=_u64.js.map\n// EXTERNAL MODULE: ./node_modules/@noble/hashes/esm/utils.js + 1 modules\nvar utils = __webpack_require__(6409);\n;// CONCATENATED MODULE: ./node_modules/@noble/hashes/esm/sha512.js\n\n\n\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => _u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n))))();\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\nconst SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\nclass SHA512 extends _md/* HashMD */.VR {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x1f83d9ab | 0;\n this.Gl = 0xfb41bd6b | 0;\n this.Hh = 0x5be0cd19 | 0;\n this.Hl = 0x137e2179 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = _u64.rotrSH(W15h, W15l, 1) ^ _u64.rotrSH(W15h, W15l, 8) ^ _u64.shrSH(W15h, W15l, 7);\n const s0l = _u64.rotrSL(W15h, W15l, 1) ^ _u64.rotrSL(W15h, W15l, 8) ^ _u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = _u64.rotrSH(W2h, W2l, 19) ^ _u64.rotrBH(W2h, W2l, 61) ^ _u64.shrSH(W2h, W2l, 6);\n const s1l = _u64.rotrSL(W2h, W2l, 19) ^ _u64.rotrBL(W2h, W2l, 61) ^ _u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = _u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = _u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = _u64.rotrSH(Eh, El, 14) ^ _u64.rotrSH(Eh, El, 18) ^ _u64.rotrBH(Eh, El, 41);\n const sigma1l = _u64.rotrSL(Eh, El, 14) ^ _u64.rotrSL(Eh, El, 18) ^ _u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = _u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = _u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = _u64.rotrSH(Ah, Al, 28) ^ _u64.rotrBH(Ah, Al, 34) ^ _u64.rotrBH(Ah, Al, 39);\n const sigma0l = _u64.rotrSL(Ah, Al, 28) ^ _u64.rotrBL(Ah, Al, 34) ^ _u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = _u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = _u64.add3L(T1l, sigma0l, MAJl);\n Ah = _u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = _u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = _u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = _u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = _u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = _u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = _u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = _u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = _u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H.fill(0);\n SHA512_W_L.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\nclass SHA512_224 extends (/* unused pure expression or super */ null && (SHA512)) {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x8c3d37c8 | 0;\n this.Al = 0x19544da2 | 0;\n this.Bh = 0x73e19966 | 0;\n this.Bl = 0x89dcd4d6 | 0;\n this.Ch = 0x1dfab7ae | 0;\n this.Cl = 0x32ff9c82 | 0;\n this.Dh = 0x679dd514 | 0;\n this.Dl = 0x582f9fcf | 0;\n this.Eh = 0x0f6d2b69 | 0;\n this.El = 0x7bd44da8 | 0;\n this.Fh = 0x77e36f73 | 0;\n this.Fl = 0x04c48942 | 0;\n this.Gh = 0x3f9d85a8 | 0;\n this.Gl = 0x6a1d36c8 | 0;\n this.Hh = 0x1112e6ad | 0;\n this.Hl = 0x91d692a1 | 0;\n this.outputLen = 28;\n }\n}\nclass SHA512_256 extends (/* unused pure expression or super */ null && (SHA512)) {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x22312194 | 0;\n this.Al = 0xfc2bf72c | 0;\n this.Bh = 0x9f555fa3 | 0;\n this.Bl = 0xc84c64c2 | 0;\n this.Ch = 0x2393b86b | 0;\n this.Cl = 0x6f53b151 | 0;\n this.Dh = 0x96387719 | 0;\n this.Dl = 0x5940eabd | 0;\n this.Eh = 0x96283ee2 | 0;\n this.El = 0xa88effe3 | 0;\n this.Fh = 0xbe5e1e25 | 0;\n this.Fl = 0x53863992 | 0;\n this.Gh = 0x2b0199fc | 0;\n this.Gl = 0x2c85b8aa | 0;\n this.Hh = 0x0eb72ddc | 0;\n this.Hl = 0x81c52ca2 | 0;\n this.outputLen = 32;\n }\n}\nclass SHA384 extends (/* unused pure expression or super */ null && (SHA512)) {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0xcbbb9d5d | 0;\n this.Al = 0xc1059ed8 | 0;\n this.Bh = 0x629a292a | 0;\n this.Bl = 0x367cd507 | 0;\n this.Ch = 0x9159015a | 0;\n this.Cl = 0x3070dd17 | 0;\n this.Dh = 0x152fecd8 | 0;\n this.Dl = 0xf70e5939 | 0;\n this.Eh = 0x67332667 | 0;\n this.El = 0xffc00b31 | 0;\n this.Fh = 0x8eb44a87 | 0;\n this.Fl = 0x68581511 | 0;\n this.Gh = 0xdb0c2e0d | 0;\n this.Gl = 0x64f98fa7 | 0;\n this.Hh = 0x47b5481d | 0;\n this.Hl = 0xbefa4fa4 | 0;\n this.outputLen = 48;\n }\n}\nconst sha512_sha512 = /* @__PURE__ */ (0,utils/* wrapConstructor */.hE)(() => new SHA512());\nconst sha512_224 = /* @__PURE__ */ (/* unused pure expression or super */ null && (wrapConstructor(() => new SHA512_224())));\nconst sha512_256 = /* @__PURE__ */ (/* unused pure expression or super */ null && (wrapConstructor(() => new SHA512_256())));\nconst sha384 = /* @__PURE__ */ (/* unused pure expression or super */ null && (wrapConstructor(() => new SHA384())));\n//# sourceMappingURL=sha512.js.map\n;// CONCATENATED MODULE: ./node_modules/@noble/curves/esm/abstract/utils.js\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// 100 lines of code in the file are duplicated from noble-hashes (utils).\n// This is OK: `abstract` directory does not use noble-hashes.\n// User may opt-in into using different hashing library. This way, noble-hashes\n// won't be included into their bundle.\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nfunction isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nfunction abytes(item) {\n if (!isBytes(item))\n throw new Error('Uint8Array expected');\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nfunction utils_bytesToHex(bytes) {\n abytes(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\nfunction numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nfunction hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // Big Endian\n return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nfunction hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// BE: Big Endian, LE: Little Endian\nfunction utils_bytesToNumberBE(bytes) {\n return hexToNumber(utils_bytesToHex(bytes));\n}\nfunction utils_bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber(utils_bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nfunction utils_numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\nfunction utils_numberToBytesLE(n, len) {\n return utils_numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nfunction numberToVarBytesBE(n) {\n return hexToBytes(numberToHexUnpadded(n));\n}\n/**\n * Takes hex string or Uint8Array, converts to Uint8Array.\n * Validates output length.\n * Will throw error for other types.\n * @param title descriptive title for an error e.g. 'private key'\n * @param hex hex string or Uint8Array\n * @param expectedLength optional, will compare to result array's length\n * @returns\n */\nfunction utils_ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n }\n }\n else if (isBytes(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(`${title} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n return res;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nfunction utils_concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// Compares 2 u8a-s in kinda constant time\nfunction utils_equalBytes(a, b) {\n if (a.length !== b.length)\n return false;\n let diff = 0;\n for (let i = 0; i < a.length; i++)\n diff |= a[i] ^ b[i];\n return diff === 0;\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nfunction utils_utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n// Bit operations\n/**\n * Calculates amount of bits in a bigint.\n * Same as `n.toString(2).length`\n */\nfunction bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n/**\n * Gets single bit at position.\n * NOTE: first bit position is 0 (same as arrays)\n * Same as `!!+Array.from(n.toString(2)).reverse()[pos]`\n */\nfunction bitGet(n, pos) {\n return (n >> BigInt(pos)) & _1n;\n}\n/**\n * Sets single bit at position.\n */\nfunction bitSet(n, pos, value) {\n return n | ((value ? _1n : _0n) << BigInt(pos));\n}\n/**\n * Calculate mask for N bits. Not using ** operator with bigints because of old engines.\n * Same as BigInt(`0b${Array(i).fill('1').join('')}`)\n */\nconst bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nfunction createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n()) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return utils_concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n stringOrUint8Array: (val) => typeof val === 'string' || isBytes(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record = { [P in K]: T; }\nfunction validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map\n;// CONCATENATED MODULE: ./node_modules/@noble/curves/esm/abstract/modular.js\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\n\n// prettier-ignore\nconst modular_0n = BigInt(0), modular_1n = BigInt(1), modular_2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nfunction modular_mod(a, b) {\n const result = a % b;\n return result >= modular_0n ? result : b + result;\n}\n/**\n * Efficiently raise num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * pow(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nfunction pow(num, power, modulo) {\n if (modulo <= modular_0n || power < modular_0n)\n throw new Error('Expected power/modulo > 0');\n if (modulo === modular_1n)\n return modular_0n;\n let res = modular_1n;\n while (power > modular_0n) {\n if (power & modular_1n)\n res = (res * num) % modulo;\n num = (num * num) % modulo;\n power >>= modular_1n;\n }\n return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nfunction modular_pow2(x, power, modulo) {\n let res = x;\n while (power-- > modular_0n) {\n res *= res;\n res %= modulo;\n }\n return res;\n}\n// Inverses number over modulo\nfunction invert(number, modulo) {\n if (number === modular_0n || modulo <= modular_0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n // Euclidean GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n let a = modular_mod(number, modulo);\n let b = modulo;\n // prettier-ignore\n let x = modular_0n, y = modular_1n, u = modular_1n, v = modular_0n;\n while (a !== modular_0n) {\n // JIT applies optimization if those two lines follow each other\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n // prettier-ignore\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== modular_1n)\n throw new Error('invert: does not exist');\n return modular_mod(x, modulo);\n}\n/**\n * Tonelli-Shanks square root search algorithm.\n * 1. https://eprint.iacr.org/2012/685.pdf (page 12)\n * 2. Square Roots from 1; 24, 51, 10 to Dan Shanks\n * Will start an infinite loop if field order P is not prime.\n * @param P field order\n * @returns function that takes field Fp (created from P) and number n\n */\nfunction tonelliShanks(P) {\n // Legendre constant: used to calculate Legendre symbol (a | p),\n // which denotes the value of a^((p-1)/2) (mod p).\n // (a | p) ≡ 1 if a is a square (mod p)\n // (a | p) ≡ -1 if a is not a square (mod p)\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreC = (P - modular_1n) / modular_2n;\n let Q, S, Z;\n // Step 1: By factoring out powers of 2 from p - 1,\n // find q and s such that p - 1 = q*(2^s) with q odd\n for (Q = P - modular_1n, S = 0; Q % modular_2n === modular_0n; Q /= modular_2n, S++)\n ;\n // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n for (Z = modular_2n; Z < P && pow(Z, legendreC, P) !== P - modular_1n; Z++)\n ;\n // Fast-path\n if (S === 1) {\n const p1div4 = (P + modular_1n) / _4n;\n return function tonelliFast(Fp, n) {\n const root = Fp.pow(n, p1div4);\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Slow-path\n const Q1div2 = (Q + modular_1n) / modular_2n;\n return function tonelliSlow(Fp, n) {\n // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n throw new Error('Cannot find square root');\n let r = S;\n // TODO: will fail at Fp2/etc\n let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n let x = Fp.pow(n, Q1div2); // first guess at the square root\n let b = Fp.pow(n, Q); // first guess at the fudge factor\n while (!Fp.eql(b, Fp.ONE)) {\n if (Fp.eql(b, Fp.ZERO))\n return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n // Find m such b^(2^m)==1\n let m = 1;\n for (let t2 = Fp.sqr(b); m < r; m++) {\n if (Fp.eql(t2, Fp.ONE))\n break;\n t2 = Fp.sqr(t2); // t2 *= t2\n }\n // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n const ge = Fp.pow(g, modular_1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n g = Fp.sqr(ge); // g = ge * ge\n x = Fp.mul(x, ge); // x *= ge\n b = Fp.mul(b, g); // b *= g\n r = m;\n }\n return x;\n };\n}\nfunction FpSqrt(P) {\n // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n // P ≡ 3 (mod 4)\n // √n = n^((P+1)/4)\n if (P % _4n === _3n) {\n // Not all roots possible!\n // const ORDER =\n // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n // const NUM = 72057594037927816n;\n const p1div4 = (P + modular_1n) / _4n;\n return function sqrt3mod4(Fp, n) {\n const root = Fp.pow(n, p1div4);\n // Throw if root**2 != n\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n if (P % _8n === _5n) {\n const c1 = (P - _5n) / _8n;\n return function sqrt5mod8(Fp, n) {\n const n2 = Fp.mul(n, modular_2n);\n const v = Fp.pow(n2, c1);\n const nv = Fp.mul(n, v);\n const i = Fp.mul(Fp.mul(nv, modular_2n), v);\n const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // P ≡ 9 (mod 16)\n if (P % _16n === _9n) {\n // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n // Means we cannot use sqrt for constants at all!\n //\n // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n // const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n // const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n // const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic\n // sqrt = (x) => {\n // let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4\n // let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1\n // const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1\n // let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1\n // const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x\n // const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x\n // tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x\n // tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x\n // const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x\n // return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2\n // }\n }\n // Other cases: Tonelli-Shanks algorithm\n return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nconst modular_isNegativeLE = (num, modulo) => (modular_mod(num, modulo) & modular_1n) === modular_1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n 'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n 'eql', 'add', 'sub', 'mul', 'pow', 'div',\n 'addN', 'subN', 'mulN', 'sqrN'\n];\nfunction validateField(field) {\n const initial = {\n ORDER: 'bigint',\n MASK: 'bigint',\n BYTES: 'isSafeInteger',\n BITS: 'isSafeInteger',\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = 'function';\n return map;\n }, initial);\n return validateObject(field, opts);\n}\n// Generic field functions\n/**\n * Same as `pow` but for Fp: non-constant-time.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n */\nfunction FpPow(f, num, power) {\n // Should have same speed as pow for bigints\n // TODO: benchmark!\n if (power < modular_0n)\n throw new Error('Expected power > 0');\n if (power === modular_0n)\n return f.ONE;\n if (power === modular_1n)\n return num;\n let p = f.ONE;\n let d = num;\n while (power > modular_0n) {\n if (power & modular_1n)\n p = f.mul(p, d);\n d = f.sqr(d);\n power >>= modular_1n;\n }\n return p;\n}\n/**\n * Efficiently invert an array of Field elements.\n * `inv(0)` will return `undefined` here: make sure to throw an error.\n */\nfunction FpInvertBatch(f, nums) {\n const tmp = new Array(nums.length);\n // Walk from first to last, multiply them by each other MOD p\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = acc;\n return f.mul(acc, num);\n }, f.ONE);\n // Invert last element\n const inverted = f.inv(lastMultiplied);\n // Walk from last to first, multiply them by inverted each other MOD p\n nums.reduceRight((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = f.mul(acc, tmp[i]);\n return f.mul(acc, num);\n }, inverted);\n return tmp;\n}\nfunction FpDiv(f, lhs, rhs) {\n return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nfunction FpIsSquare(f) {\n const legendreConst = (f.ORDER - modular_1n) / modular_2n; // Integer arithmetic\n return (x) => {\n const p = f.pow(x, legendreConst);\n return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n };\n}\n// CURVE.n lengths\nfunction nLength(n, nBitLength) {\n // Bit size, byte size of CURVE.n\n const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a finite field over prime. **Non-primes are not supported.**\n * Do not init in loop: slow. Very fragile: always run a benchmark on a change.\n * Major performance optimizations:\n * * a) denormalized operations like mulN instead of mul\n * * b) same object shape: never add or remove keys\n * * c) Object.freeze\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nfunction Field(ORDER, bitLen, isLE = false, redef = {}) {\n if (ORDER <= modular_0n)\n throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('Field lengths over 2048 bytes are not supported');\n const sqrtP = FpSqrt(ORDER);\n const f = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: modular_0n,\n ONE: modular_1n,\n create: (num) => modular_mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== 'bigint')\n throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n return modular_0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n },\n is0: (num) => num === modular_0n,\n isOdd: (num) => (num & modular_1n) === modular_1n,\n neg: (num) => modular_mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => modular_mod(num * num, ORDER),\n add: (lhs, rhs) => modular_mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => modular_mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => modular_mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f, num, power),\n div: (lhs, rhs) => modular_mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n invertBatch: (lst) => FpInvertBatch(f, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a, b, c) => (c ? b : a),\n toBytes: (num) => (isLE ? utils_numberToBytesLE(num, BYTES) : utils_numberToBytesBE(num, BYTES)),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE ? utils_bytesToNumberLE(bytes) : utils_bytesToNumberBE(bytes);\n },\n });\n return Object.freeze(f);\n}\nfunction FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nfunction modular_FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Same as mapKeyToField, but accepts less bytes (40 instead of 48 for 32-byte field).\n * Which makes it slightly more biased, less secure.\n * @deprecated use mapKeyToField instead\n */\nfunction hashToPrivateScalar(hash, groupOrder, isLE = false) {\n hash = ensureBytes('privateHash', hash);\n const hashLen = hash.length;\n const minLen = nLength(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n return modular_mod(num, groupOrder - modular_1n) + modular_1n;\n}\n/**\n * Returns total number of bytes consumed by the field element.\n * For example, 32 bytes for usual 256-bit weierstrass curve.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of field\n */\nfunction getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== 'bigint')\n throw new Error('field order must be bigint');\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n}\n/**\n * Returns minimal amount of bytes that can be safely reduced\n * by field order.\n * Should be 2^-128 for 128-bit curve such as P256.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of target hash\n */\nfunction getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Can take (n + n/2) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being negligible.\n * Needs at least 48 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * FIPS 186-5, A.2 https://csrc.nist.gov/publications/detail/fips/186/5/final\n * RFC 9380, https://www.rfc-editor.org/rfc/rfc9380#section-5\n * @param hash hash output from SHA3 or a similar function\n * @param groupOrder size of subgroup - (e.g. secp256k1.CURVE.n)\n * @param isLE interpret hash bytes as LE num\n * @returns valid private scalar\n */\nfunction mapHashToField(key, fieldOrder, isLE = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n // No small numbers: need to understand bias story. No huge numbers: easier to detect JS timings.\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);\n const num = isLE ? utils_bytesToNumberBE(key) : utils_bytesToNumberLE(key);\n // `mod(x, 11)` can sometimes produce 0. `mod(x, 10) + 1` is the same, but no 0\n const reduced = modular_mod(num, fieldOrder - modular_1n) + modular_1n;\n return isLE ? utils_numberToBytesLE(reduced, fieldLen) : utils_numberToBytesBE(reduced, fieldLen);\n}\n//# sourceMappingURL=modular.js.map\n;// CONCATENATED MODULE: ./node_modules/@noble/curves/esm/abstract/curve.js\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\n\n\nconst curve_0n = BigInt(0);\nconst curve_1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nfunction wNAF(c, bits) {\n const constTimeNegate = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1; // +1, because\n const windowSize = 2 ** (W - 1); // -1 because we skip zero\n return { windows, windowSize };\n };\n return {\n constTimeNegate,\n // non-const time multiplication ladder\n unsafeLadder(elm, n) {\n let p = c.ZERO;\n let d = elm;\n while (n > curve_0n) {\n if (n & curve_1n)\n p = p.add(d);\n d = d.double();\n n >>= curve_1n;\n }\n return p;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p = elm;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n // =1, because we skip zero\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n // But need to carefully remove other checks before wNAF. ORDER == bits here\n const { windows, windowSize } = opts(W);\n let p = c.ZERO;\n let f = c.BASE;\n const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n // Extract W bits.\n let wbits = Number(n & mask);\n // Shift number by W bits.\n n >>= shiftBy;\n // If the bits are bigger than max size, we'll split those.\n // +224 => 256 - 32\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += curve_1n;\n }\n // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n // there is negate now: it is possible that negated element from low value\n // would be the same as high element, which will create carry into next window.\n // It's not obvious how this can fail, but still worth investigating later.\n // Check if we're onto Zero point.\n // Add random point inside current window to f.\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n // The most important part for const-time getPublicKey\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n // Even if the variable is still unused, there are some checks which will\n // throw an exception, so compiler needs to prove they won't happen, which is hard.\n // At this point there is a way to F be infinity-point even if p is not,\n // which makes it less const-time: around 1 bigint multiply.\n return { p, f };\n },\n wNAFCached(P, precomputesMap, n, transform) {\n // @ts-ignore\n const W = P._WINDOW_SIZE || 1;\n // Calculate precomputes on a first run, reuse them after\n let comp = precomputesMap.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1) {\n precomputesMap.set(P, transform(comp));\n }\n }\n return this.wNAF(W, comp, n);\n },\n };\n}\nfunction validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: 'bigint',\n h: 'bigint',\n Gx: 'field',\n Gy: 'field',\n }, {\n nBitLength: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n });\n // Set defaults\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER },\n });\n}\n//# sourceMappingURL=curve.js.map\n;// CONCATENATED MODULE: ./node_modules/@noble/curves/esm/abstract/edwards.js\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y²\n\n\n\n\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst edwards_0n = BigInt(0), edwards_1n = BigInt(1), edwards_2n = BigInt(2), edwards_8n = BigInt(8);\n// verification rule is either zip215 or rfc8032 / nist186-5. Consult fromHex:\nconst VERIFY_DEFAULT = { zip215: true };\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n validateObject(curve, {\n hash: 'function',\n a: 'bigint',\n d: 'bigint',\n randomBytes: 'function',\n }, {\n adjustScalarBytes: 'function',\n domain: 'function',\n uvRatio: 'function',\n mapToCurve: 'function',\n });\n // Set defaults\n return Object.freeze({ ...opts });\n}\n// It is not generic twisted curve for now, but ed25519/ed448 generic implementation\nfunction edwards_twistedEdwards(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, prehash: prehash, hash: cHash, randomBytes, nByteLength, h: cofactor, } = CURVE;\n const MASK = edwards_2n << (BigInt(nByteLength * 8) - edwards_1n);\n const modP = Fp.create; // Function overrides\n // sqrt(u/v)\n const uvRatio = CURVE.uvRatio ||\n ((u, v) => {\n try {\n return { isValid: true, value: Fp.sqrt(u * Fp.inv(v)) };\n }\n catch (e) {\n return { isValid: false, value: edwards_0n };\n }\n });\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes); // NOOP\n const domain = CURVE.domain ||\n ((data, ctx, phflag) => {\n if (ctx.length || phflag)\n throw new Error('Contexts/pre-hash are not supported');\n return data;\n }); // NOOP\n const inBig = (n) => typeof n === 'bigint' && edwards_0n < n; // n in [1..]\n const inRange = (n, max) => inBig(n) && inBig(max) && n < max; // n in [1..max-1]\n const in0MaskRange = (n) => n === edwards_0n || inRange(n, MASK); // n in [0..MASK-1]\n function assertInRange(n, max) {\n // n in [1..max-1]\n if (inRange(n, max))\n return n;\n throw new Error(`Expected valid scalar < ${max}, got ${typeof n} ${n}`);\n }\n function assertGE0(n) {\n // n in [0..CURVE_ORDER-1]\n return n === edwards_0n ? n : assertInRange(n, CURVE_ORDER); // GE = prime subgroup, not full group\n }\n const pointPrecomputes = new Map();\n function isPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ExtendedPoint expected');\n }\n // Extended Point works in extended coordinates: (x, y, z, t) ∋ (x=x/z, y=y/z, t=xy).\n // https://en.wikipedia.org/wiki/Twisted_Edwards_curve#Extended_coordinates\n class Point {\n constructor(ex, ey, ez, et) {\n this.ex = ex;\n this.ey = ey;\n this.ez = ez;\n this.et = et;\n if (!in0MaskRange(ex))\n throw new Error('x required');\n if (!in0MaskRange(ey))\n throw new Error('y required');\n if (!in0MaskRange(ez))\n throw new Error('z required');\n if (!in0MaskRange(et))\n throw new Error('t required');\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error('extended point not allowed');\n const { x, y } = p || {};\n if (!in0MaskRange(x) || !in0MaskRange(y))\n throw new Error('invalid affine point');\n return new Point(x, y, edwards_1n, modP(x * y));\n }\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.ez));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // Not required for fromHex(), which always creates valid points.\n // Could be useful for fromAffine().\n assertValidity() {\n const { a, d } = CURVE;\n if (this.is0())\n throw new Error('bad point: ZERO'); // TODO: optimize, with vars below?\n // Equation in affine coordinates: ax² + y² = 1 + dx²y²\n // Equation in projective coordinates (X/Z, Y/Z, Z): (aX² + Y²)Z² = Z⁴ + dX²Y²\n const { ex: X, ey: Y, ez: Z, et: T } = this;\n const X2 = modP(X * X); // X²\n const Y2 = modP(Y * Y); // Y²\n const Z2 = modP(Z * Z); // Z²\n const Z4 = modP(Z2 * Z2); // Z⁴\n const aX2 = modP(X2 * a); // aX²\n const left = modP(Z2 * modP(aX2 + Y2)); // (aX² + Y²)Z²\n const right = modP(Z4 + modP(d * modP(X2 * Y2))); // Z⁴ + dX²Y²\n if (left !== right)\n throw new Error('bad point: equation left != right (1)');\n // In Extended coordinates we also have T, which is x*y=T/Z: check X*Y == Z*T\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error('bad point: equation left != right (2)');\n }\n // Compare one point to another.\n equals(other) {\n isPoint(other);\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const { ex: X2, ey: Y2, ez: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n // Flips point sign to a negative one (-x, y in affine coords)\n return new Point(modP(-this.ex), this.ey, this.ez, modP(-this.et));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const A = modP(X1 * X1); // A = X12\n const B = modP(Y1 * Y1); // B = Y12\n const C = modP(edwards_2n * modP(Z1 * Z1)); // C = 2*Z12\n const D = modP(a * A); // D = a*A\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B); // E = (X1+Y1)2-A-B\n const G = D + B; // G = D+B\n const F = G - C; // F = G-C\n const H = D - B; // H = D-B\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n isPoint(other);\n const { a, d } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1, et: T1 } = this;\n const { ex: X2, ey: Y2, ez: Z2, et: T2 } = other;\n // Faster algo for adding 2 Extended Points when curve's a=-1.\n // http://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html#addition-add-2008-hwcd-4\n // Cost: 8M + 8add + 2*2.\n // Note: It does not check whether the `other` point is valid.\n if (a === BigInt(-1)) {\n const A = modP((Y1 - X1) * (Y2 + X2));\n const B = modP((Y1 + X1) * (Y2 - X2));\n const F = modP(B - A);\n if (F === edwards_0n)\n return this.double(); // Same point. Tests say it doesn't affect timing\n const C = modP(Z1 * edwards_2n * T2);\n const D = modP(T1 * edwards_2n * Z2);\n const E = D + C;\n const G = B + A;\n const H = D - C;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n const A = modP(X1 * X2); // A = X1*X2\n const B = modP(Y1 * Y2); // B = Y1*Y2\n const C = modP(T1 * d * T2); // C = T1*d*T2\n const D = modP(Z1 * Z2); // D = Z1*Z2\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B); // E = (X1+Y1)*(X2+Y2)-A-B\n const F = D - C; // F = D-C\n const G = D + C; // G = D+C\n const H = modP(B - a * A); // H = B-a*A\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, Point.normalizeZ);\n }\n // Constant-time multiplication.\n multiply(scalar) {\n const { p, f } = this.wNAF(assertInRange(scalar, CURVE_ORDER));\n return Point.normalizeZ([p, f])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n multiplyUnsafe(scalar) {\n let n = assertGE0(scalar); // 0 <= scalar < CURVE.n\n if (n === edwards_0n)\n return I;\n if (this.equals(I) || n === edwards_1n)\n return this;\n if (this.equals(G))\n return this.wNAF(n).p;\n return wnaf.unsafeLadder(this, n);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafeLadder(this, CURVE_ORDER).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(iz) {\n const { ex: x, ey: y, ez: z } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? edwards_8n : Fp.inv(z); // 8 was chosen arbitrarily\n const ax = modP(x * iz);\n const ay = modP(y * iz);\n const zz = modP(z * iz);\n if (is0)\n return { x: edwards_0n, y: edwards_1n };\n if (zz !== edwards_1n)\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n clearCofactor() {\n const { h: cofactor } = CURVE;\n if (cofactor === edwards_1n)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n // Converts hash string or Uint8Array to Point.\n // Uses algo from RFC8032 5.1.3.\n static fromHex(hex, zip215 = false) {\n const { d, a } = CURVE;\n const len = Fp.BYTES;\n hex = utils_ensureBytes('pointHex', hex, len); // copy hex to a new array\n const normed = hex.slice(); // copy again, we'll manipulate it\n const lastByte = hex[len - 1]; // select last byte\n normed[len - 1] = lastByte & ~0x80; // clear last bit\n const y = utils_bytesToNumberLE(normed);\n if (y === edwards_0n) {\n // y=0 is allowed\n }\n else {\n // RFC8032 prohibits >= p, but ZIP215 doesn't\n if (zip215)\n assertInRange(y, MASK); // zip215=true [1..P-1] (2^255-19-1 for ed25519)\n else\n assertInRange(y, Fp.ORDER); // zip215=false [1..MASK-1] (2^256-1 for ed25519)\n }\n // Ed25519: x² = (y²-1)/(dy²+1) mod p. Ed448: x² = (y²-1)/(dy²-1) mod p. Generic case:\n // ax²+y²=1+dx²y² => y²-1=dx²y²-ax² => y²-1=x²(dy²-a) => x²=(y²-1)/(dy²-a)\n const y2 = modP(y * y); // denominator is always non-0 mod p.\n const u = modP(y2 - edwards_1n); // u = y² - 1\n const v = modP(d * y2 - a); // v = d y² + 1.\n let { isValid, value: x } = uvRatio(u, v); // √(u/v)\n if (!isValid)\n throw new Error('Point.fromHex: invalid y coordinate');\n const isXOdd = (x & edwards_1n) === edwards_1n; // There are 2 square roots. Use x_0 bit to select proper\n const isLastByteOdd = (lastByte & 0x80) !== 0; // x_0, last bit\n if (!zip215 && x === edwards_0n && isLastByteOdd)\n // if x=0 and x_0 = 1, fail\n throw new Error('Point.fromHex: x=0 and x_0=1');\n if (isLastByteOdd !== isXOdd)\n x = modP(-x); // if x_0 != x mod 2, set x = p-x\n return Point.fromAffine({ x, y });\n }\n static fromPrivateKey(privKey) {\n return getExtendedPublicKey(privKey).point;\n }\n toRawBytes() {\n const { x, y } = this.toAffine();\n const bytes = utils_numberToBytesLE(y, Fp.BYTES); // each y has 2 x values (x, -y)\n bytes[bytes.length - 1] |= x & edwards_1n ? 0x80 : 0; // when compressing, it's enough to store y\n return bytes; // and use the last byte to encode sign of x\n }\n toHex() {\n return utils_bytesToHex(this.toRawBytes()); // Same as toRawBytes, but returns string.\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, edwards_1n, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(edwards_0n, edwards_1n, edwards_1n, edwards_0n); // 0, 1, 1, 0\n const { BASE: G, ZERO: I } = Point;\n const wnaf = wNAF(Point, nByteLength * 8);\n function modN(a) {\n return modular_mod(a, CURVE_ORDER);\n }\n // Little-endian SHA512 with modulo n\n function modN_LE(hash) {\n return modN(utils_bytesToNumberLE(hash));\n }\n /** Convenience method that creates public key and other stuff. RFC8032 5.1.5 */\n function getExtendedPublicKey(key) {\n const len = nByteLength;\n key = utils_ensureBytes('private key', key, len);\n // Hash private key with curve's hash function to produce uniformingly random input\n // Check byte lengths: ensure(64, h(ensure(32, key)))\n const hashed = utils_ensureBytes('hashed private key', cHash(key), 2 * len);\n const head = adjustScalarBytes(hashed.slice(0, len)); // clear first half bits, produce FE\n const prefix = hashed.slice(len, 2 * len); // second half is called key prefix (5.1.6)\n const scalar = modN_LE(head); // The actual private scalar\n const point = G.multiply(scalar); // Point on Edwards curve aka public key\n const pointBytes = point.toRawBytes(); // Uint8Array representation\n return { head, prefix, scalar, point, pointBytes };\n }\n // Calculates EdDSA pub key. RFC8032 5.1.5. Privkey is hashed. Use first half with 3 bits cleared\n function getPublicKey(privKey) {\n return getExtendedPublicKey(privKey).pointBytes;\n }\n // int('LE', SHA512(dom2(F, C) || msgs)) mod N\n function hashDomainToScalar(context = new Uint8Array(), ...msgs) {\n const msg = utils_concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, utils_ensureBytes('context', context), !!prehash)));\n }\n /** Signs message with privateKey. RFC8032 5.1.6 */\n function sign(msg, privKey, options = {}) {\n msg = utils_ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph etc.\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(privKey);\n const r = hashDomainToScalar(options.context, prefix, msg); // r = dom2(F, C) || prefix || PH(M)\n const R = G.multiply(r).toRawBytes(); // R = rG\n const k = hashDomainToScalar(options.context, R, pointBytes, msg); // R || A || PH(M)\n const s = modN(r + k * scalar); // S = (r + k * s) mod L\n assertGE0(s); // 0 <= s < l\n const res = utils_concatBytes(R, utils_numberToBytesLE(s, Fp.BYTES));\n return utils_ensureBytes('result', res, nByteLength * 2); // 64-byte signature\n }\n const verifyOpts = VERIFY_DEFAULT;\n function verify(sig, msg, publicKey, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = Fp.BYTES; // Verifies EdDSA signature against message and public key. RFC8032 5.1.7.\n sig = utils_ensureBytes('signature', sig, 2 * len); // An extended group equation is checked.\n msg = utils_ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph, etc\n const s = utils_bytesToNumberLE(sig.slice(len, 2 * len));\n // zip215: true is good for consensus-critical apps and allows points < 2^256\n // zip215: false follows RFC8032 / NIST186-5 and restricts points to CURVE.p\n let A, R, SB;\n try {\n A = Point.fromHex(publicKey, zip215);\n R = Point.fromHex(sig.slice(0, len), zip215);\n SB = G.multiplyUnsafe(s); // 0 <= s < l is done inside\n }\n catch (error) {\n return false;\n }\n if (!zip215 && A.isSmallOrder())\n return false;\n const k = hashDomainToScalar(context, R.toRawBytes(), A.toRawBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n // [8][S]B = [8]R + [8][k]A'\n return RkA.subtract(SB).clearCofactor().equals(Point.ZERO);\n }\n G._setWindowSize(8); // Enable precomputes. Slows down first publicKey computation by 20ms.\n const utils = {\n getExtendedPublicKey,\n // ed25519 private keys are uniform 32b. No need to check for modulo bias, like in secp256k1.\n randomPrivateKey: () => randomBytes(Fp.BYTES),\n /**\n * We're doing scalar multiplication (used in getPublicKey etc) with precomputed BASE_POINT\n * values. This slows down first getPublicKey() by milliseconds (see Speed section),\n * but allows to speed-up subsequent getPublicKey() calls up to 20x.\n * @param windowSize 2, 4, 8, 16\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n },\n };\n return {\n CURVE,\n getPublicKey,\n sign,\n verify,\n ExtendedPoint: Point,\n utils,\n };\n}\n//# sourceMappingURL=edwards.js.map\n;// CONCATENATED MODULE: ./node_modules/@noble/curves/esm/ed25519.js\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\n\n\n\n\n\n\n/**\n * ed25519 Twisted Edwards curve with following addons:\n * - X25519 ECDH\n * - Ristretto cofactor elimination\n * - Elligator hash-to-group / point indistinguishability\n */\nconst ED25519_P = BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819949');\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst ED25519_SQRT_M1 = /* @__PURE__ */ BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// prettier-ignore\nconst ed25519_0n = BigInt(0), ed25519_1n = BigInt(1), ed25519_2n = BigInt(2), ed25519_3n = BigInt(3);\n// prettier-ignore\nconst ed25519_5n = BigInt(5), ed25519_8n = BigInt(8);\nfunction ed25519_pow_2_252_3(x) {\n // prettier-ignore\n const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\n const P = ED25519_P;\n const x2 = (x * x) % P;\n const b2 = (x2 * x) % P; // x^3, 11\n const b4 = (modular_pow2(b2, ed25519_2n, P) * b2) % P; // x^15, 1111\n const b5 = (modular_pow2(b4, ed25519_1n, P) * x) % P; // x^31\n const b10 = (modular_pow2(b5, ed25519_5n, P) * b5) % P;\n const b20 = (modular_pow2(b10, _10n, P) * b10) % P;\n const b40 = (modular_pow2(b20, _20n, P) * b20) % P;\n const b80 = (modular_pow2(b40, _40n, P) * b40) % P;\n const b160 = (modular_pow2(b80, _80n, P) * b80) % P;\n const b240 = (modular_pow2(b160, _80n, P) * b80) % P;\n const b250 = (modular_pow2(b240, _10n, P) * b10) % P;\n const pow_p_5_8 = (modular_pow2(b250, ed25519_2n, P) * x) % P;\n // ^ To pow to (p+3)/8, multiply it by x.\n return { pow_p_5_8, b2 };\n}\nfunction adjustScalarBytes(bytes) {\n // Section 5: For X25519, in order to decode 32 random bytes as an integer scalar,\n // set the three least significant bits of the first byte\n bytes[0] &= 248; // 0b1111_1000\n // and the most significant bit of the last to zero,\n bytes[31] &= 127; // 0b0111_1111\n // set the second most significant bit of the last byte to 1\n bytes[31] |= 64; // 0b0100_0000\n return bytes;\n}\n// sqrt(u/v)\nfunction uvRatio(u, v) {\n const P = ED25519_P;\n const v3 = modular_mod(v * v * v, P); // v³\n const v7 = modular_mod(v3 * v3 * v, P); // v⁷\n // (p+3)/8 and (p-5)/8\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = modular_mod(u * v3 * pow, P); // (uv³)(uv⁷)^(p-5)/8\n const vx2 = modular_mod(v * x * x, P); // vx²\n const root1 = x; // First root candidate\n const root2 = modular_mod(x * ED25519_SQRT_M1, P); // Second root candidate\n const useRoot1 = vx2 === u; // If vx² = u (mod p), x is a square root\n const useRoot2 = vx2 === modular_mod(-u, P); // If vx² = -u, set x <-- x * 2^((p-1)/4)\n const noRoot = vx2 === modular_mod(-u * ED25519_SQRT_M1, P); // There is no valid root, vx² = -u√(-1)\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2; // We return root2 anyway, for const-time\n if (modular_isNegativeLE(x, P))\n x = modular_mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n}\n// Just in case\nconst ED25519_TORSION_SUBGROUP = (/* unused pure expression or super */ null && ([\n '0100000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a',\n '0000000000000000000000000000000000000000000000000000000000000080',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05',\n 'ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85',\n '0000000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa',\n]));\nconst Fp = /* @__PURE__ */ (() => Field(ED25519_P, undefined, true))();\nconst ed25519Defaults = /* @__PURE__ */ (() => ({\n // Param: a\n a: BigInt(-1), // Fp.create(-1) is proper; our way still works and is faster\n // d is equal to -121665/121666 over finite field.\n // Negative number is P - number, and division is invert(number, P)\n d: BigInt('37095705934669439343138083508754565189542113879843219016388785533085940283555'),\n // Finite field 𝔽p over which we'll do calculations; 2n**255n - 19n\n Fp,\n // Subgroup order: how many points curve has\n // 2n**252n + 27742317777372353535851937790883648493n;\n n: BigInt('7237005577332262213973186563042994240857116359379907606001950938285454250989'),\n // Cofactor\n h: ed25519_8n,\n // Base point (x, y) aka generator point\n Gx: BigInt('15112221349535400772501151409588531511454012693041857206046113283949847762202'),\n Gy: BigInt('46316835694926478169428394003475163141307993866256225615783033603165251855960'),\n hash: sha512_sha512,\n randomBytes: utils/* randomBytes */.O6,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio,\n}))();\nconst ed25519 = /* @__PURE__ */ (() => edwards_twistedEdwards(ed25519Defaults))();\nfunction ed25519_domain(data, ctx, phflag) {\n if (ctx.length > 255)\n throw new Error('Context is too big');\n return concatBytes(utf8ToBytes('SigEd25519 no Ed25519 collisions'), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);\n}\nconst ed25519ctx = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => twistedEdwards({\n ...ed25519Defaults,\n domain: ed25519_domain,\n}))()));\nconst ed25519ph = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => twistedEdwards(Object.assign({}, ed25519Defaults, {\n domain: ed25519_domain,\n prehash: sha512,\n})))()));\nconst x25519 = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => montgomery({\n P: ED25519_P,\n a: BigInt(486662),\n montgomeryBits: 255, // n is 253 bits\n nByteLength: 32,\n Gu: BigInt(9),\n powPminus2: (x) => {\n const P = ED25519_P;\n // x^(p-2) aka x^(2^255-21)\n const { pow_p_5_8, b2 } = ed25519_pow_2_252_3(x);\n return mod(pow2(pow_p_5_8, ed25519_3n, P) * b2, P);\n },\n adjustScalarBytes,\n randomBytes,\n}))()));\n/**\n * Converts ed25519 public key to x25519 public key. Uses formula:\n * * `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * * `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * @example\n * const someonesPub = ed25519.getPublicKey(ed25519.utils.randomPrivateKey());\n * const aPriv = x25519.utils.randomPrivateKey();\n * x25519.getSharedSecret(aPriv, edwardsToMontgomeryPub(someonesPub))\n */\nfunction edwardsToMontgomeryPub(edwardsPub) {\n const { y } = ed25519.ExtendedPoint.fromHex(edwardsPub);\n const _1n = BigInt(1);\n return Fp.toBytes(Fp.create((_1n + y) * Fp.inv(_1n - y)));\n}\nconst edwardsToMontgomery = (/* unused pure expression or super */ null && (edwardsToMontgomeryPub)); // deprecated\n/**\n * Converts ed25519 secret key to x25519 secret key.\n * @example\n * const someonesPub = x25519.getPublicKey(x25519.utils.randomPrivateKey());\n * const aPriv = ed25519.utils.randomPrivateKey();\n * x25519.getSharedSecret(edwardsToMontgomeryPriv(aPriv), someonesPub)\n */\nfunction edwardsToMontgomeryPriv(edwardsPriv) {\n const hashed = ed25519Defaults.hash(edwardsPriv.subarray(0, 32));\n return ed25519Defaults.adjustScalarBytes(hashed).subarray(0, 32);\n}\n// Hash To Curve Elligator2 Map (NOTE: different from ristretto255 elligator)\n// NOTE: very important part is usage of FpSqrtEven for ELL2_C1_EDWARDS, since\n// SageMath returns different root first and everything falls apart\nconst ELL2_C1 = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => (Fp.ORDER + ed25519_3n) / ed25519_8n)())); // 1. c1 = (q + 3) / 8 # Integer arithmetic\nconst ELL2_C2 = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => Fp.pow(ed25519_2n, ELL2_C1))())); // 2. c2 = 2^c1\nconst ELL2_C3 = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => Fp.sqrt(Fp.neg(Fp.ONE)))())); // 3. c3 = sqrt(-1)\n// prettier-ignore\nfunction map_to_curve_elligator2_curve25519(u) {\n const ELL2_C4 = (Fp.ORDER - ed25519_5n) / ed25519_8n; // 4. c4 = (q - 5) / 8 # Integer arithmetic\n const ELL2_J = BigInt(486662);\n let tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, ed25519_2n); // 2. tv1 = 2 * tv1\n let xd = Fp.add(tv1, Fp.ONE); // 3. xd = tv1 + 1 # Nonzero: -1 is square (mod p), tv1 is not\n let x1n = Fp.neg(ELL2_J); // 4. x1n = -J # x1 = x1n / xd = -J / (1 + 2 * u^2)\n let tv2 = Fp.sqr(xd); // 5. tv2 = xd^2\n let gxd = Fp.mul(tv2, xd); // 6. gxd = tv2 * xd # gxd = xd^3\n let gx1 = Fp.mul(tv1, ELL2_J); // 7. gx1 = J * tv1 # x1n + J * xd\n gx1 = Fp.mul(gx1, x1n); // 8. gx1 = gx1 * x1n # x1n^2 + J * x1n * xd\n gx1 = Fp.add(gx1, tv2); // 9. gx1 = gx1 + tv2 # x1n^2 + J * x1n * xd + xd^2\n gx1 = Fp.mul(gx1, x1n); // 10. gx1 = gx1 * x1n # x1n^3 + J * x1n^2 * xd + x1n * xd^2\n let tv3 = Fp.sqr(gxd); // 11. tv3 = gxd^2\n tv2 = Fp.sqr(tv3); // 12. tv2 = tv3^2 # gxd^4\n tv3 = Fp.mul(tv3, gxd); // 13. tv3 = tv3 * gxd # gxd^3\n tv3 = Fp.mul(tv3, gx1); // 14. tv3 = tv3 * gx1 # gx1 * gxd^3\n tv2 = Fp.mul(tv2, tv3); // 15. tv2 = tv2 * tv3 # gx1 * gxd^7\n let y11 = Fp.pow(tv2, ELL2_C4); // 16. y11 = tv2^c4 # (gx1 * gxd^7)^((p - 5) / 8)\n y11 = Fp.mul(y11, tv3); // 17. y11 = y11 * tv3 # gx1*gxd^3*(gx1*gxd^7)^((p-5)/8)\n let y12 = Fp.mul(y11, ELL2_C3); // 18. y12 = y11 * c3\n tv2 = Fp.sqr(y11); // 19. tv2 = y11^2\n tv2 = Fp.mul(tv2, gxd); // 20. tv2 = tv2 * gxd\n let e1 = Fp.eql(tv2, gx1); // 21. e1 = tv2 == gx1\n let y1 = Fp.cmov(y12, y11, e1); // 22. y1 = CMOV(y12, y11, e1) # If g(x1) is square, this is its sqrt\n let x2n = Fp.mul(x1n, tv1); // 23. x2n = x1n * tv1 # x2 = x2n / xd = 2 * u^2 * x1n / xd\n let y21 = Fp.mul(y11, u); // 24. y21 = y11 * u\n y21 = Fp.mul(y21, ELL2_C2); // 25. y21 = y21 * c2\n let y22 = Fp.mul(y21, ELL2_C3); // 26. y22 = y21 * c3\n let gx2 = Fp.mul(gx1, tv1); // 27. gx2 = gx1 * tv1 # g(x2) = gx2 / gxd = 2 * u^2 * g(x1)\n tv2 = Fp.sqr(y21); // 28. tv2 = y21^2\n tv2 = Fp.mul(tv2, gxd); // 29. tv2 = tv2 * gxd\n let e2 = Fp.eql(tv2, gx2); // 30. e2 = tv2 == gx2\n let y2 = Fp.cmov(y22, y21, e2); // 31. y2 = CMOV(y22, y21, e2) # If g(x2) is square, this is its sqrt\n tv2 = Fp.sqr(y1); // 32. tv2 = y1^2\n tv2 = Fp.mul(tv2, gxd); // 33. tv2 = tv2 * gxd\n let e3 = Fp.eql(tv2, gx1); // 34. e3 = tv2 == gx1\n let xn = Fp.cmov(x2n, x1n, e3); // 35. xn = CMOV(x2n, x1n, e3) # If e3, x = x1, else x = x2\n let y = Fp.cmov(y2, y1, e3); // 36. y = CMOV(y2, y1, e3) # If e3, y = y1, else y = y2\n let e4 = Fp.isOdd(y); // 37. e4 = sgn0(y) == 1 # Fix sign of y\n y = Fp.cmov(y, Fp.neg(y), e3 !== e4); // 38. y = CMOV(y, -y, e3 XOR e4)\n return { xMn: xn, xMd: xd, yMn: y, yMd: ed25519_1n }; // 39. return (xn, xd, y, 1)\n}\nconst ELL2_C1_EDWARDS = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => FpSqrtEven(Fp, Fp.neg(BigInt(486664))))())); // sgn0(c1) MUST equal 0\nfunction map_to_curve_elligator2_edwards25519(u) {\n const { xMn, xMd, yMn, yMd } = map_to_curve_elligator2_curve25519(u); // 1. (xMn, xMd, yMn, yMd) =\n // map_to_curve_elligator2_curve25519(u)\n let xn = Fp.mul(xMn, yMd); // 2. xn = xMn * yMd\n xn = Fp.mul(xn, ELL2_C1_EDWARDS); // 3. xn = xn * c1\n let xd = Fp.mul(xMd, yMn); // 4. xd = xMd * yMn # xn / xd = c1 * xM / yM\n let yn = Fp.sub(xMn, xMd); // 5. yn = xMn - xMd\n let yd = Fp.add(xMn, xMd); // 6. yd = xMn + xMd # (n / d - 1) / (n / d + 1) = (n - d) / (n + d)\n let tv1 = Fp.mul(xd, yd); // 7. tv1 = xd * yd\n let e = Fp.eql(tv1, Fp.ZERO); // 8. e = tv1 == 0\n xn = Fp.cmov(xn, Fp.ZERO, e); // 9. xn = CMOV(xn, 0, e)\n xd = Fp.cmov(xd, Fp.ONE, e); // 10. xd = CMOV(xd, 1, e)\n yn = Fp.cmov(yn, Fp.ONE, e); // 11. yn = CMOV(yn, 1, e)\n yd = Fp.cmov(yd, Fp.ONE, e); // 12. yd = CMOV(yd, 1, e)\n const inv = Fp.invertBatch([xd, yd]); // batch division\n return { x: Fp.mul(xn, inv[0]), y: Fp.mul(yn, inv[1]) }; // 13. return (xn, xd, yn, yd)\n}\nconst htf = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => createHasher(ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {\n DST: 'edwards25519_XMD:SHA-512_ELL2_RO_',\n encodeDST: 'edwards25519_XMD:SHA-512_ELL2_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha512,\n}))()));\nconst hashToCurve = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => htf.hashToCurve)()));\nconst encodeToCurve = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => htf.encodeToCurve)()));\nfunction assertRstPoint(other) {\n if (!(other instanceof RistPoint))\n throw new Error('RistrettoPoint expected');\n}\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst SQRT_M1 = (/* unused pure expression or super */ null && (ED25519_SQRT_M1));\n// √(ad - 1)\nconst SQRT_AD_MINUS_ONE = /* @__PURE__ */ (/* unused pure expression or super */ null && (BigInt('25063068953384623474111414158702152701244531502492656460079210482610430750235')));\n// 1 / √(a-d)\nconst INVSQRT_A_MINUS_D = /* @__PURE__ */ (/* unused pure expression or super */ null && (BigInt('54469307008909316920995813868745141605393597292927456921205312896311721017578')));\n// 1-d²\nconst ONE_MINUS_D_SQ = /* @__PURE__ */ (/* unused pure expression or super */ null && (BigInt('1159843021668779879193775521855586647937357759715417654439879720876111806838')));\n// (d-1)²\nconst D_MINUS_ONE_SQ = /* @__PURE__ */ (/* unused pure expression or super */ null && (BigInt('40440834346308536858101042469323190826248399146238708352240133220865137265952')));\n// Calculates 1/√(number)\nconst invertSqrt = (number) => uvRatio(ed25519_1n, number);\nconst MAX_255B = /* @__PURE__ */ (/* unused pure expression or super */ null && (BigInt('0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff')));\nconst bytes255ToNumberLE = (bytes) => ed25519.CURVE.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n// Computes Elligator map for Ristretto\n// https://ristretto.group/formulas/elligator.html\nfunction calcElligatorRistrettoMap(r0) {\n const { d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const r = mod(SQRT_M1 * r0 * r0); // 1\n const Ns = mod((r + ed25519_1n) * ONE_MINUS_D_SQ); // 2\n let c = BigInt(-1); // 3\n const D = mod((c - d * r) * mod(r + d)); // 4\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D); // 5\n let s_ = mod(s * r0); // 6\n if (!isNegativeLE(s_, P))\n s_ = mod(-s_);\n if (!Ns_D_is_sq)\n s = s_; // 7\n if (!Ns_D_is_sq)\n c = r; // 8\n const Nt = mod(c * (r - ed25519_1n) * D_MINUS_ONE_SQ - D); // 9\n const s2 = s * s;\n const W0 = mod((s + s) * D); // 10\n const W1 = mod(Nt * SQRT_AD_MINUS_ONE); // 11\n const W2 = mod(ed25519_1n - s2); // 12\n const W3 = mod(ed25519_1n + s2); // 13\n return new ed25519.ExtendedPoint(mod(W0 * W3), mod(W2 * W1), mod(W1 * W3), mod(W0 * W2));\n}\n/**\n * Each ed25519/ExtendedPoint has 8 different equivalent points. This can be\n * a source of bugs for protocols like ring signatures. Ristretto was created to solve this.\n * Ristretto point operates in X:Y:Z:T extended coordinates like ExtendedPoint,\n * but it should work in its own namespace: do not combine those two.\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-ristretto255-decaf448\n */\nclass RistPoint {\n // Private property to discourage combining ExtendedPoint + RistrettoPoint\n // Always use Ristretto encoding/decoding instead.\n constructor(ep) {\n this.ep = ep;\n }\n static fromAffine(ap) {\n return new RistPoint(ed25519.ExtendedPoint.fromAffine(ap));\n }\n /**\n * Takes uniform output of 64-byte hash function like sha512 and converts it to `RistrettoPoint`.\n * The hash-to-group operation applies Elligator twice and adds the results.\n * **Note:** this is one-way map, there is no conversion from point to hash.\n * https://ristretto.group/formulas/elligator.html\n * @param hex 64-byte output of a hash function\n */\n static hashToCurve(hex) {\n hex = ensureBytes('ristrettoHash', hex, 64);\n const r1 = bytes255ToNumberLE(hex.slice(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(hex.slice(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new RistPoint(R1.add(R2));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * https://ristretto.group/formulas/decoding.html\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n hex = ensureBytes('ristrettoHex', hex, 32);\n const { a, d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const emsg = 'RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint';\n const s = bytes255ToNumberLE(hex);\n // 1. Check that s_bytes is the canonical encoding of a field element, or else abort.\n // 3. Check that s is non-negative, or else abort\n if (!equalBytes(numberToBytesLE(s, 32), hex) || isNegativeLE(s, P))\n throw new Error(emsg);\n const s2 = mod(s * s);\n const u1 = mod(ed25519_1n + a * s2); // 4 (a is -1)\n const u2 = mod(ed25519_1n - a * s2); // 5\n const u1_2 = mod(u1 * u1);\n const u2_2 = mod(u2 * u2);\n const v = mod(a * d * u1_2 - u2_2); // 6\n const { isValid, value: I } = invertSqrt(mod(v * u2_2)); // 7\n const Dx = mod(I * u2); // 8\n const Dy = mod(I * Dx * v); // 9\n let x = mod((s + s) * Dx); // 10\n if (isNegativeLE(x, P))\n x = mod(-x); // 10\n const y = mod(u1 * Dy); // 11\n const t = mod(x * y); // 12\n if (!isValid || isNegativeLE(t, P) || y === ed25519_0n)\n throw new Error(emsg);\n return new RistPoint(new ed25519.ExtendedPoint(x, y, ed25519_1n, t));\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * https://ristretto.group/formulas/encoding.html\n */\n toRawBytes() {\n let { ex: x, ey: y, ez: z, et: t } = this.ep;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const u1 = mod(mod(z + y) * mod(z - y)); // 1\n const u2 = mod(x * y); // 2\n // Square root always exists\n const u2sq = mod(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod(u1 * u2sq)); // 3\n const D1 = mod(invsqrt * u1); // 4\n const D2 = mod(invsqrt * u2); // 5\n const zInv = mod(D1 * D2 * t); // 6\n let D; // 7\n if (isNegativeLE(t * zInv, P)) {\n let _x = mod(y * SQRT_M1);\n let _y = mod(x * SQRT_M1);\n x = _x;\n y = _y;\n D = mod(D1 * INVSQRT_A_MINUS_D);\n }\n else {\n D = D2; // 8\n }\n if (isNegativeLE(x * zInv, P))\n y = mod(-y); // 9\n let s = mod((z - y) * D); // 10 (check footer's note, no sqrt(-a))\n if (isNegativeLE(s, P))\n s = mod(-s);\n return numberToBytesLE(s, 32); // 11\n }\n toHex() {\n return bytesToHex(this.toRawBytes());\n }\n toString() {\n return this.toHex();\n }\n // Compare one point to another.\n equals(other) {\n assertRstPoint(other);\n const { ex: X1, ey: Y1 } = this.ep;\n const { ex: X2, ey: Y2 } = other.ep;\n const mod = ed25519.CURVE.Fp.create;\n // (x1 * y2 == y1 * x2) | (y1 * y2 == x1 * x2)\n const one = mod(X1 * Y2) === mod(Y1 * X2);\n const two = mod(Y1 * Y2) === mod(X1 * X2);\n return one || two;\n }\n add(other) {\n assertRstPoint(other);\n return new RistPoint(this.ep.add(other.ep));\n }\n subtract(other) {\n assertRstPoint(other);\n return new RistPoint(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return new RistPoint(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return new RistPoint(this.ep.multiplyUnsafe(scalar));\n }\n double() {\n return new RistPoint(this.ep.double());\n }\n negate() {\n return new RistPoint(this.ep.negate());\n }\n}\nconst RistrettoPoint = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => {\n if (!RistPoint.BASE)\n RistPoint.BASE = new RistPoint(ed25519.ExtendedPoint.BASE);\n if (!RistPoint.ZERO)\n RistPoint.ZERO = new RistPoint(ed25519.ExtendedPoint.ZERO);\n return RistPoint;\n})()));\n// Hashing to ristretto255. https://www.rfc-editor.org/rfc/rfc9380#appendix-B\nconst hashToRistretto255 = (msg, options) => {\n const d = options.DST;\n const DST = typeof d === 'string' ? utf8ToBytes(d) : d;\n const uniform_bytes = expand_message_xmd(msg, DST, 64, sha512);\n const P = RistPoint.hashToCurve(uniform_bytes);\n return P;\n};\nconst hash_to_ristretto255 = (/* unused pure expression or super */ null && (hashToRistretto255)); // legacy\n//# sourceMappingURL=ed25519.js.map\n// EXTERNAL MODULE: ./node_modules/bn.js/lib/bn.js\nvar bn = __webpack_require__(3550);\nvar bn_default = /*#__PURE__*/__webpack_require__.n(bn);\n// EXTERNAL MODULE: ./node_modules/@solana/web3.js/node_modules/bs58/index.js\nvar bs58 = __webpack_require__(11);\nvar bs58_default = /*#__PURE__*/__webpack_require__.n(bs58);\n// EXTERNAL MODULE: ./node_modules/@noble/hashes/esm/sha256.js\nvar esm_sha256 = __webpack_require__(7748);\n// EXTERNAL MODULE: ./node_modules/borsh/lib/index.js\nvar lib = __webpack_require__(5532);\n// EXTERNAL MODULE: ./node_modules/@solana/buffer-layout/lib/Layout.js\nvar Layout = __webpack_require__(9386);\n// EXTERNAL MODULE: ./node_modules/bigint-buffer/dist/browser.js\nvar browser = __webpack_require__(475);\n;// CONCATENATED MODULE: ./node_modules/@solana/web3.js/node_modules/superstruct/dist/index.mjs\n/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message, explanation, ...rest } = failure;\n const { path } = failure;\n const msg = path.length === 0 ? message : `At path: ${path.join('.')} -- ${message}`;\n super(explanation ?? msg);\n if (explanation != null)\n this.cause = msg;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return (cached ?? (cached = [failure, ...failures()]));\n };\n }\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a non-array object.\n */\nfunction isNonArrayObject(x) {\n return isObject(x) && !Array.isArray(x);\n}\n/**\n * Check if a value is a plain object.\n */\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\nfunction print(value) {\n if (typeof value === 'symbol') {\n return value.toString();\n }\n return typeof value === 'string' ? JSON.stringify(value) : `${value}`;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\nfunction shiftIterator(input) {\n const { done, value } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n }\n else if (result === false) {\n result = {};\n }\n else if (typeof result === 'string') {\n result = { message: result };\n }\n const { path, branch } = context;\n const { type } = struct;\n const { refinement, message = `Expected a value of type \\`${type}\\`${refinement ? ` with refinement \\`${refinement}\\`` : ''}, but received: \\`${print(value)}\\``, } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message,\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\nfunction* run(value, struct, options = {}) {\n const { path = [], branch = [value], coerce = false, mask = false } = options;\n const ctx = { path, branch, mask };\n if (coerce) {\n value = struct.coercer(value, ctx);\n }\n let status = 'valid';\n for (const failure of struct.validator(value, ctx)) {\n failure.explanation = options.message;\n status = 'not_valid';\n yield [failure, undefined];\n }\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask,\n message: options.message,\n });\n for (const t of ts) {\n if (t[0]) {\n status = t[0].refinement != null ? 'not_refined' : 'not_valid';\n yield [t[0], undefined];\n }\n else if (coerce) {\n v = t[1];\n if (k === undefined) {\n value = v;\n }\n else if (value instanceof Map) {\n value.set(k, v);\n }\n else if (value instanceof Set) {\n value.add(v);\n }\n else if (isObject(value)) {\n if (v !== undefined || k in value)\n value[k] = v;\n }\n }\n }\n }\n if (status !== 'not_valid') {\n for (const failure of struct.refiner(value, ctx)) {\n failure.explanation = options.message;\n status = 'not_refined';\n yield [failure, undefined];\n }\n }\n if (status === 'valid') {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\nclass Struct {\n constructor(props) {\n const { type, schema, validator, refiner, coercer = (value) => value, entries = function* () { }, } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message) {\n return assert(value, this, message);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message) {\n return create(value, this, message);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema. Masking applies recursively to\n * props of `object` structs only.\n */\n mask(value, message) {\n return mask(value, this, message);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `coerce` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful. Also, `mask` will turn on\n * masking of the unknown `object` props recursively if passed.\n */\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\nfunction assert(value, struct, message) {\n const result = validate(value, struct, { message });\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\nfunction create(value, struct, message) {\n const result = validate(value, struct, { coerce: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\nfunction mask(value, struct, message) {\n const result = validate(value, struct, { coerce: true, mask: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n }\n else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction dist_assign(...Structs) {\n const isType = Structs[0].type === 'type';\n const schemas = Structs.map((s) => s.schema);\n const schema = Object.assign({}, ...schemas);\n return isType ? type(schema) : object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\nfunction dist_define(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\nfunction deprecated(struct, log) {\n return new Struct({\n ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n }\n else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n },\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n const struct = fn(value, ctx);\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n *entries(value, ctx) {\n struct ?? (struct = fn());\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n struct ?? (struct = fn());\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n struct ?? (struct = fn());\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n struct ?? (struct = fn());\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\nfunction omit(struct, keys) {\n const { schema } = struct;\n const subschema = { ...schema };\n for (const key of keys) {\n delete subschema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\nfunction partial(struct) {\n const isStruct = struct instanceof Struct;\n const schema = isStruct ? { ...struct.schema } : { ...struct };\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n if (isStruct && struct.type === 'type') {\n return type(schema);\n }\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\nfunction pick(struct, keys) {\n const { schema } = struct;\n const subschema = {};\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return dist_define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\nfunction any() {\n return dist_define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array value, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a bigint.\n */\nfunction bigint() {\n return dist_define('bigint', (value) => {\n return typeof value === 'bigint';\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\nfunction dist_boolean() {\n return dist_define('boolean', (value) => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\nfunction date() {\n return dist_define('date', (value) => {\n return ((value instanceof Date && !isNaN(value.getTime())) ||\n `Expected a valid \\`Date\\` object, but received: ${print(value)}`);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map((v) => print(v)).join();\n for (const key of values) {\n schema[key] = key;\n }\n return new Struct({\n type: 'enums',\n schema,\n validator(value) {\n return (values.includes(value) ||\n `Expected one of \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a function.\n */\nfunction func() {\n return dist_define('func', (value) => {\n return (typeof value === 'function' ||\n `Expected a function, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\nfunction instance(Class) {\n return dist_define('instance', (value) => {\n return (value instanceof Class ||\n `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\nfunction integer() {\n return dist_define('integer', (value) => {\n return ((typeof value === 'number' && !isNaN(value) && Number.isInteger(value)) ||\n `Expected an integer, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value matches all of a set of types.\n */\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n },\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n validator(value) {\n return (value === constant ||\n `Expected the literal \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n validator(value) {\n return (value instanceof Map ||\n `Expected a \\`Map\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\nfunction never() {\n return dist_define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\nfunction nullable(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx),\n });\n}\n/**\n * Ensure that a value is a number.\n */\nfunction number() {\n return dist_define('number', (value) => {\n return ((typeof value === 'number' && !isNaN(value)) ||\n `Expected a number, but received: ${print(value)}`);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n validator(value) {\n return (isNonArrayObject(value) ||\n `Expected an object, but received: ${print(value)}`);\n },\n coercer(value, ctx) {\n if (!isNonArrayObject(value)) {\n return value;\n }\n const coerced = { ...value };\n // The `object` struct has special behaviour enabled by the mask flag.\n // When masking, properties that are not in the schema are deleted from\n // the coerced object instead of eventually failing validaiton.\n if (ctx.mask && schema) {\n for (const key in coerced) {\n if (schema[key] === undefined) {\n delete coerced[key];\n }\n }\n }\n return coerced;\n },\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\nfunction optional(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n validator(value) {\n return (isNonArrayObject(value) ||\n `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n },\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\nfunction regexp() {\n return dist_define('regexp', (value) => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n validator(value) {\n return (value instanceof Set ||\n `Expected a \\`Set\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a string.\n */\nfunction string() {\n return dist_define('string', (value) => {\n return (typeof value === 'string' ||\n `Expected a string, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is a tuple of a specific length, and that each of its\n * elements is of a specific type.\n */\nfunction tuple(Structs) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Structs[i] || Never];\n }\n }\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array, but received: ${print(value)}`);\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n validator(value) {\n return (isNonArrayObject(value) ||\n `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n },\n });\n}\n/**\n * Ensure that a value matches one of a set of types.\n */\nfunction union(Structs) {\n const description = Structs.map((s) => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n coercer(value, ctx) {\n for (const S of Structs) {\n const [error, coerced] = S.validate(value, {\n coerce: true,\n mask: ctx.mask,\n });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n if (!first[0]) {\n return [];\n }\n else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures,\n ];\n },\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\nfunction unknown() {\n return dist_define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction coerce(struct, condition, coercer) {\n return new Struct({\n ...struct,\n coercer: (value, ctx) => {\n return is(value, condition)\n ? struct.coercer(coercer(value, ctx), ctx)\n : struct.coercer(value, ctx);\n },\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), (x) => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n if (x === undefined) {\n return f;\n }\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x };\n let changed = false;\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n if (changed) {\n return ret;\n }\n }\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction trimmed(struct) {\n return coerce(struct, string(), (x) => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\nfunction empty(struct) {\n return refine(struct, 'empty', (value) => {\n const size = getSize(value);\n return (size === 0 ||\n `Expected an empty ${struct.type} but received one with a size of \\`${size}\\``);\n });\n}\nfunction getSize(value) {\n if (value instanceof Map || value instanceof Set) {\n return value.size;\n }\n else {\n return value.length;\n }\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\nfunction max(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'max', (value) => {\n return exclusive\n ? value < threshold\n : value <= threshold ||\n `Expected a ${struct.type} less than ${exclusive ? '' : 'or equal to '}${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\nfunction min(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'min', (value) => {\n return exclusive\n ? value > threshold\n : value >= threshold ||\n `Expected a ${struct.type} greater than ${exclusive ? '' : 'or equal to '}${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a string, array, map or set is not empty.\n */\nfunction nonempty(struct) {\n return refine(struct, 'nonempty', (value) => {\n const size = getSize(value);\n return (size > 0 || `Expected a nonempty ${struct.type} but received an empty one`);\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', (value) => {\n return (regexp.test(value) ||\n `Expected a ${struct.type} matching \\`/${regexp.source}/\\` but received \"${value}\"`);\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\nfunction size(struct, min, max = min) {\n const expected = `Expected a ${struct.type}`;\n const of = min === max ? `of \\`${min}\\`` : `between \\`${min}\\` and \\`${max}\\``;\n return refine(struct, 'size', (value) => {\n if (typeof value === 'number' || value instanceof Date) {\n return ((min <= value && value <= max) ||\n `${expected} ${of} but received \\`${value}\\``);\n }\n else if (value instanceof Map || value instanceof Set) {\n const { size } = value;\n return ((min <= size && size <= max) ||\n `${expected} with a size ${of} but received one with a size of \\`${size}\\``);\n }\n else {\n const { length } = value;\n return ((min <= length && length <= max) ||\n `${expected} with a length ${of} but received one with a length of \\`${length}\\``);\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\nfunction refine(struct, name, refiner) {\n return new Struct({\n ...struct,\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n for (const failure of failures) {\n yield { ...failure, refinement: name };\n }\n },\n });\n}\n\n\n//# sourceMappingURL=index.mjs.map\n\n// EXTERNAL MODULE: ./node_modules/jayson/lib/client/browser/index.js\nvar client_browser = __webpack_require__(1198);\nvar browser_default = /*#__PURE__*/__webpack_require__.n(client_browser);\n// EXTERNAL MODULE: ./node_modules/rpc-websockets/node_modules/eventemitter3/index.js\nvar eventemitter3 = __webpack_require__(4790);\n;// CONCATENATED MODULE: ./node_modules/rpc-websockets/node_modules/eventemitter3/index.mjs\n\n\n\n/* harmony default export */ var node_modules_eventemitter3 = ((/* unused pure expression or super */ null && (EventEmitter)));\n\n;// CONCATENATED MODULE: ./node_modules/rpc-websockets/dist/index.browser.mjs\n\n\n\n// node_modules/esbuild-plugin-polyfill-node/polyfills/buffer.js\nvar WebSocketBrowserImpl = class extends eventemitter3 {\n socket;\n /** Instantiate a WebSocket class\n * @constructor\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @param {(String|Array)} protocols - a list of protocols\n * @return {WebSocketBrowserImpl} - returns a WebSocket instance\n */\n constructor(address, options, protocols) {\n super();\n this.socket = new window.WebSocket(address, protocols);\n this.socket.onopen = () => this.emit(\"open\");\n this.socket.onmessage = (event) => this.emit(\"message\", event.data);\n this.socket.onerror = (error) => this.emit(\"error\", error);\n this.socket.onclose = (event) => {\n this.emit(\"close\", event.code, event.reason);\n };\n }\n /**\n * Sends data through a websocket connection\n * @method\n * @param {(String|Object)} data - data to be sent via websocket\n * @param {Object} optionsOrCallback - ws options\n * @param {Function} callback - a callback called once the data is sent\n * @return {Undefined}\n */\n send(data, optionsOrCallback, callback) {\n const cb = callback || optionsOrCallback;\n try {\n this.socket.send(data);\n cb();\n } catch (error) {\n cb(error);\n }\n }\n /**\n * Closes an underlying socket\n * @method\n * @param {Number} code - status code explaining why the connection is being closed\n * @param {String} reason - a description why the connection is closing\n * @return {Undefined}\n * @throws {Error}\n */\n close(code, reason) {\n this.socket.close(code, reason);\n }\n addEventListener(type, listener, options) {\n this.socket.addEventListener(type, listener, options);\n }\n};\nfunction WebSocket(address, options) {\n return new WebSocketBrowserImpl(address, options);\n}\n\n// src/lib/utils.ts\nvar DefaultDataPack = class {\n encode(value) {\n return JSON.stringify(value);\n }\n decode(value) {\n return JSON.parse(value);\n }\n};\n\n// src/lib/client.ts\nvar CommonClient = class extends eventemitter3 {\n address;\n rpc_id;\n queue;\n options;\n autoconnect;\n ready;\n reconnect;\n reconnect_timer_id;\n reconnect_interval;\n max_reconnects;\n rest_options;\n current_reconnects;\n generate_request_id;\n socket;\n webSocketFactory;\n dataPack;\n /**\n * Instantiate a Client class.\n * @constructor\n * @param {webSocketFactory} webSocketFactory - factory method for WebSocket\n * @param {String} address - url to a websocket server\n * @param {Object} options - ws options object with reconnect parameters\n * @param {Function} generate_request_id - custom generation request Id\n * @param {DataPack} dataPack - data pack contains encoder and decoder\n * @return {CommonClient}\n */\n constructor(webSocketFactory, address = \"ws://localhost:8080\", {\n autoconnect = true,\n reconnect = true,\n reconnect_interval = 1e3,\n max_reconnects = 5,\n ...rest_options\n } = {}, generate_request_id, dataPack) {\n super();\n this.webSocketFactory = webSocketFactory;\n this.queue = {};\n this.rpc_id = 0;\n this.address = address;\n this.autoconnect = autoconnect;\n this.ready = false;\n this.reconnect = reconnect;\n this.reconnect_timer_id = void 0;\n this.reconnect_interval = reconnect_interval;\n this.max_reconnects = max_reconnects;\n this.rest_options = rest_options;\n this.current_reconnects = 0;\n this.generate_request_id = generate_request_id || (() => ++this.rpc_id);\n if (!dataPack) this.dataPack = new DefaultDataPack();\n else this.dataPack = dataPack;\n if (this.autoconnect)\n this._connect(this.address, {\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects,\n ...this.rest_options\n });\n }\n /**\n * Connects to a defined server if not connected already.\n * @method\n * @return {Undefined}\n */\n connect() {\n if (this.socket) return;\n this._connect(this.address, {\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects,\n ...this.rest_options\n });\n }\n /**\n * Calls a registered RPC method on server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object|Array} params - optional method parameters\n * @param {Number} timeout - RPC reply timeout value\n * @param {Object} ws_opts - options passed to ws\n * @return {Promise}\n */\n call(method, params, timeout, ws_opts) {\n if (!ws_opts && \"object\" === typeof timeout) {\n ws_opts = timeout;\n timeout = null;\n }\n return new Promise((resolve, reject) => {\n if (!this.ready) return reject(new Error(\"socket not ready\"));\n const rpc_id = this.generate_request_id(method, params);\n const message = {\n jsonrpc: \"2.0\",\n method,\n params: params || void 0,\n id: rpc_id\n };\n this.socket.send(this.dataPack.encode(message), ws_opts, (error) => {\n if (error) return reject(error);\n this.queue[rpc_id] = { promise: [resolve, reject] };\n if (timeout) {\n this.queue[rpc_id].timeout = setTimeout(() => {\n delete this.queue[rpc_id];\n reject(new Error(\"reply timeout\"));\n }, timeout);\n }\n });\n });\n }\n /**\n * Logins with the other side of the connection.\n * @method\n * @param {Object} params - Login credentials object\n * @return {Promise}\n */\n async login(params) {\n const resp = await this.call(\"rpc.login\", params);\n if (!resp) throw new Error(\"authentication failed\");\n return resp;\n }\n /**\n * Fetches a list of client's methods registered on server.\n * @method\n * @return {Array}\n */\n async listMethods() {\n return await this.call(\"__listMethods\");\n }\n /**\n * Sends a JSON-RPC 2.0 notification to server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object} params - optional method parameters\n * @return {Promise}\n */\n notify(method, params) {\n return new Promise((resolve, reject) => {\n if (!this.ready) return reject(new Error(\"socket not ready\"));\n const message = {\n jsonrpc: \"2.0\",\n method,\n params\n };\n this.socket.send(this.dataPack.encode(message), (error) => {\n if (error) return reject(error);\n resolve();\n });\n });\n }\n /**\n * Subscribes for a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n async subscribe(event) {\n if (typeof event === \"string\") event = [event];\n const result = await this.call(\"rpc.on\", event);\n if (typeof event === \"string\" && result[event] !== \"ok\")\n throw new Error(\n \"Failed subscribing to an event '\" + event + \"' with: \" + result[event]\n );\n return result;\n }\n /**\n * Unsubscribes from a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n async unsubscribe(event) {\n if (typeof event === \"string\") event = [event];\n const result = await this.call(\"rpc.off\", event);\n if (typeof event === \"string\" && result[event] !== \"ok\")\n throw new Error(\"Failed unsubscribing from an event with: \" + result);\n return result;\n }\n /**\n * Closes a WebSocket connection gracefully.\n * @method\n * @param {Number} code - socket close code\n * @param {String} data - optional data to be sent before closing\n * @return {Undefined}\n */\n close(code, data) {\n this.socket.close(code || 1e3, data);\n }\n /**\n * Enable / disable automatic reconnection.\n * @method\n * @param {Boolean} reconnect - enable / disable reconnection\n * @return {Undefined}\n */\n setAutoReconnect(reconnect) {\n this.reconnect = reconnect;\n }\n /**\n * Set the interval between reconnection attempts.\n * @method\n * @param {Number} interval - reconnection interval in milliseconds\n * @return {Undefined}\n */\n setReconnectInterval(interval) {\n this.reconnect_interval = interval;\n }\n /**\n * Set the maximum number of reconnection attempts.\n * @method\n * @param {Number} max_reconnects - maximum reconnection attempts\n * @return {Undefined}\n */\n setMaxReconnects(max_reconnects) {\n this.max_reconnects = max_reconnects;\n }\n /**\n * Connection/Message handler.\n * @method\n * @private\n * @param {String} address - WebSocket API address\n * @param {Object} options - ws options object\n * @return {Undefined}\n */\n _connect(address, options) {\n clearTimeout(this.reconnect_timer_id);\n this.socket = this.webSocketFactory(address, options);\n this.socket.addEventListener(\"open\", () => {\n this.ready = true;\n this.emit(\"open\");\n this.current_reconnects = 0;\n });\n this.socket.addEventListener(\"message\", ({ data: message }) => {\n if (message instanceof ArrayBuffer)\n message = node_modules_buffer.Buffer.from(message).toString();\n try {\n message = this.dataPack.decode(message);\n } catch (error) {\n return;\n }\n if (message.notification && this.listeners(message.notification).length) {\n if (!Object.keys(message.params).length)\n return this.emit(message.notification);\n const args = [message.notification];\n if (message.params.constructor === Object) args.push(message.params);\n else\n for (let i = 0; i < message.params.length; i++)\n args.push(message.params[i]);\n return Promise.resolve().then(() => {\n this.emit.apply(this, args);\n });\n }\n if (!this.queue[message.id]) {\n if (message.method) {\n return Promise.resolve().then(() => {\n this.emit(message.method, message?.params);\n });\n }\n return;\n }\n if (\"error\" in message === \"result\" in message)\n this.queue[message.id].promise[1](\n new Error(\n 'Server response malformed. Response must include either \"result\" or \"error\", but not both.'\n )\n );\n if (this.queue[message.id].timeout)\n clearTimeout(this.queue[message.id].timeout);\n if (message.error) this.queue[message.id].promise[1](message.error);\n else this.queue[message.id].promise[0](message.result);\n delete this.queue[message.id];\n });\n this.socket.addEventListener(\"error\", (error) => this.emit(\"error\", error));\n this.socket.addEventListener(\"close\", ({ code, reason }) => {\n if (this.ready)\n setTimeout(() => this.emit(\"close\", code, reason), 0);\n this.ready = false;\n this.socket = void 0;\n if (code === 1e3) return;\n this.current_reconnects++;\n if (this.reconnect && (this.max_reconnects > this.current_reconnects || this.max_reconnects === 0))\n this.reconnect_timer_id = setTimeout(\n () => this._connect(address, options),\n this.reconnect_interval\n );\n });\n }\n};\n\n// src/index.browser.ts\nvar Client = class extends (/* unused pure expression or super */ null && (CommonClient)) {\n constructor(address = \"ws://localhost:8080\", {\n autoconnect = true,\n reconnect = true,\n reconnect_interval = 1e3,\n max_reconnects = 5\n } = {}, generate_request_id) {\n super(\n WebSocket,\n address,\n {\n autoconnect,\n reconnect,\n reconnect_interval,\n max_reconnects\n },\n generate_request_id\n );\n }\n};\n\n\n//# sourceMappingURL=out.js.map\n//# sourceMappingURL=index.browser.mjs.map\n// EXTERNAL MODULE: ./node_modules/@noble/hashes/esm/_assert.js\nvar _assert = __webpack_require__(3527);\n;// CONCATENATED MODULE: ./node_modules/@noble/hashes/esm/sha3.js\n\n\n\n// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.\n// It's called a sponge function.\n// Various per round constants calculations\nconst SHA3_PI = [];\nconst SHA3_ROTL = [];\nconst _SHA3_IOTA = [];\nconst sha3_0n = /* @__PURE__ */ BigInt(0);\nconst sha3_1n = /* @__PURE__ */ BigInt(1);\nconst sha3_2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = sha3_1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = sha3_0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << sha3_1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & sha3_2n)\n t ^= sha3_1n << ((sha3_1n << /* @__PURE__ */ BigInt(j)) - sha3_1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n// Same as keccakf1600, but allows to skip some rounds\nfunction keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nclass Keccak extends utils/* Hash */.kb {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n (0,_assert/* number */.Rx)(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = (0,utils/* u32 */.Jq)(this.state);\n }\n keccak() {\n if (!utils/* isLE */.iA)\n (0,utils/* byteSwap32 */.l1)(this.state32);\n keccakP(this.state32, this.rounds);\n if (!utils/* isLE */.iA)\n (0,utils/* byteSwap32 */.l1)(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n (0,_assert/* exists */.Gg)(this);\n const { blockLen, state } = this;\n data = (0,utils/* toBytes */.O0)(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n (0,_assert/* exists */.Gg)(this, false);\n (0,_assert/* bytes */.aI)(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n (0,_assert/* number */.Rx)(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n (0,_assert/* output */.J8)(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => (0,utils/* wrapConstructor */.hE)(() => new Keccak(blockLen, suffix, outputLen));\nconst sha3_224 = /* @__PURE__ */ (/* unused pure expression or super */ null && (gen(0x06, 144, 224 / 8)));\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nconst sha3_256 = /* @__PURE__ */ (/* unused pure expression or super */ null && (gen(0x06, 136, 256 / 8)));\nconst sha3_384 = /* @__PURE__ */ (/* unused pure expression or super */ null && (gen(0x06, 104, 384 / 8)));\nconst sha3_512 = /* @__PURE__ */ (/* unused pure expression or super */ null && (gen(0x06, 72, 512 / 8)));\nconst keccak_224 = /* @__PURE__ */ (/* unused pure expression or super */ null && (gen(0x01, 144, 224 / 8)));\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nconst keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\nconst keccak_384 = /* @__PURE__ */ (/* unused pure expression or super */ null && (gen(0x01, 104, 384 / 8)));\nconst keccak_512 = /* @__PURE__ */ (/* unused pure expression or super */ null && (gen(0x01, 72, 512 / 8)));\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nconst shake128 = /* @__PURE__ */ (/* unused pure expression or super */ null && (genShake(0x1f, 168, 128 / 8)));\nconst shake256 = /* @__PURE__ */ (/* unused pure expression or super */ null && (genShake(0x1f, 136, 256 / 8)));\n//# sourceMappingURL=sha3.js.map\n;// CONCATENATED MODULE: ./node_modules/@noble/hashes/esm/hmac.js\n\n\n// HMAC (RFC 2104)\nclass HMAC extends utils/* Hash */.kb {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n (0,_assert/* hash */.vp)(hash);\n const key = (0,utils/* toBytes */.O0)(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new Error('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n (0,_assert/* exists */.Gg)(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n (0,_assert/* exists */.Gg)(this);\n (0,_assert/* bytes */.aI)(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nconst hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map\n;// CONCATENATED MODULE: ./node_modules/@noble/curves/esm/abstract/weierstrass.js\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\n\n\n\n\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = utils_namespaceObject;\nconst DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n abytes(data);\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst weierstrass_0n = BigInt(0), weierstrass_1n = BigInt(1), weierstrass_2n = BigInt(2), weierstrass_3n = BigInt(3), weierstrass_4n = BigInt(4);\nfunction weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((_c, point, _isCompressed) => {\n const a = point.toAffine();\n return utils_concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && weierstrass_0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (isBytes(key))\n key = utils_bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : utils_bytesToNumberBE(utils_ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = modular_mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(utils_ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n if (this.is0()) {\n // (0, 1, 0) aka ZERO is invalid in most contexts.\n // In BLS, ZERO can be serialized, so we allow it.\n // (0, 0, 0) is wrong representation of ZERO and is always invalid.\n if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, weierstrass_3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, weierstrass_3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === weierstrass_0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === weierstrass_1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > weierstrass_0n || k2 > weierstrass_0n) {\n if (k1 & weierstrass_1n)\n k1p = k1p.add(d);\n if (k2 & weierstrass_1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= weierstrass_1n;\n k2 >>= weierstrass_1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === weierstrass_0n || a === weierstrass_1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === weierstrass_1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === weierstrass_1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return utils_bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction weierstrass_validateOpts(curve) {\n const opts = validateBasic(curve);\n validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nfunction weierstrass(curveDef) {\n const CURVE = weierstrass_validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return weierstrass_0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return modular_mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = utils_concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = utils_bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y;\n try {\n y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n }\n catch (sqrtError) {\n const suffix = sqrtError instanceof Error ? ': ' + sqrtError.message : '';\n throw new Error('Point is not on curve' + suffix);\n }\n const isYOdd = (y & weierstrass_1n) === weierstrass_1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => utils_bytesToHex(utils_numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> weierstrass_1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => utils_bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = utils_ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(utils_ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(utils_ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = getMinHashLength(CURVE.n);\n return mapHashToField(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = isBytes(item);\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = utils_bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(weierstrass_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return utils_numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = utils_ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = utils_ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null && ent !== false) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(utils_ensureBytes('extraEntropy', e)); // check for being bytes\n }\n const seed = utils_concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === weierstrass_0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === weierstrass_0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & weierstrass_1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash with a private key.\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param msgHash NOT message. msg needs to be hashed to `msgHash`, or use `prehash`.\n * @param privKey private key\n * @param opts lowS for non-malleable sigs. extraEntropy for mixing randomness into k. prehash will hash first arg.\n * @returns signature with recovery param\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const C = CURVE;\n const drbg = createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = utils_ensureBytes('msgHash', msgHash);\n publicKey = utils_ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || isBytes(sg)) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n/**\n * Implementation of the Shallue and van de Woestijne method for any weierstrass curve.\n * TODO: check if there is a way to merge this with uvRatio in Edwards; move to modular.\n * b = True and y = sqrt(u / v) if (u / v) is square in F, and\n * b = False and y = sqrt(Z * (u / v)) otherwise.\n * @param Fp\n * @param Z\n * @returns\n */\nfunction SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = weierstrass_0n;\n for (let o = q - weierstrass_1n; o % weierstrass_2n === weierstrass_0n; o /= weierstrass_2n)\n l += weierstrass_1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n // We need 2n ** c1 and 2n ** (c1-1). We can't use **; but we can use <<.\n // 2n ** c1 == 2n << (c1-1)\n const _2n_pow_c1_1 = weierstrass_2n << (c1 - weierstrass_1n - weierstrass_1n);\n const _2n_pow_c1 = _2n_pow_c1_1 * weierstrass_2n;\n const c2 = (q - weierstrass_1n) / _2n_pow_c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - weierstrass_1n) / weierstrass_2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n_pow_c1 - weierstrass_1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n_pow_c1_1; // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + weierstrass_1n) / weierstrass_2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > weierstrass_1n; i--) {\n let tv5 = i - weierstrass_2n; // 18. tv5 = i - 2\n tv5 = weierstrass_2n << (tv5 - weierstrass_1n); // 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % weierstrass_4n === weierstrass_3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - weierstrass_3n) / weierstrass_4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n/**\n * Simplified Shallue-van de Woestijne-Ulas Method\n * https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2\n */\nfunction weierstrass_mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map\n;// CONCATENATED MODULE: ./node_modules/@noble/curves/esm/_shortw_utils.js\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\n\n\n// connects noble-curves to noble-hashes\nfunction getHash(hash) {\n return {\n hash,\n hmac: (key, ...msgs) => hmac(hash, key, (0,utils/* concatBytes */.eV)(...msgs)),\n randomBytes: utils/* randomBytes */.O6,\n };\n}\nfunction createCurve(curveDef, defHash) {\n const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map\n;// CONCATENATED MODULE: ./node_modules/@noble/curves/esm/secp256k1.js\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\n\n\n\n\n\n\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst secp256k1_1n = BigInt(1);\nconst secp256k1_2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / secp256k1_2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (modular_pow2(b3, _3n, P) * b3) % P;\n const b9 = (modular_pow2(b6, _3n, P) * b3) % P;\n const b11 = (modular_pow2(b9, secp256k1_2n, P) * b2) % P;\n const b22 = (modular_pow2(b11, _11n, P) * b11) % P;\n const b44 = (modular_pow2(b22, _22n, P) * b22) % P;\n const b88 = (modular_pow2(b44, _44n, P) * b44) % P;\n const b176 = (modular_pow2(b88, _88n, P) * b88) % P;\n const b220 = (modular_pow2(b176, _44n, P) * b44) % P;\n const b223 = (modular_pow2(b220, _3n, P) * b3) % P;\n const t1 = (modular_pow2(b223, _23n, P) * b22) % P;\n const t2 = (modular_pow2(t1, _6n, P) * b2) % P;\n const root = modular_pow2(t2, secp256k1_2n, P);\n if (!secp256k1_Fp.eql(secp256k1_Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst secp256k1_Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nconst secp256k1 = createCurve({\n a: BigInt(0), // equation params: a, b\n b: BigInt(7), // Seem to be rigid: bitcointalk.org/index.php?topic=289795.msg3183975#msg3183975\n Fp: secp256k1_Fp, // Field's prime: 2n**256n - 2n**32n - 2n**9n - 2n**8n - 2n**7n - 2n**6n - 2n**4n - 1n\n n: secp256k1N, // Curve order, total count of valid points in the field\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1), // Cofactor\n lowS: true, // Allow only low-S signatures by default in sign() and verify()\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -secp256k1_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = modular_mod(k - c1 * a1 - c2 * a2, n);\n let k2 = modular_mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, esm_sha256/* sha256 */.J);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst secp256k1_0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && secp256k1_0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && secp256k1_0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % secp256k1_2n !== secp256k1_0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, secp256k1_1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === secp256k1_0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nconst schnorr = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n}))()));\nconst isoMap = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => isogenyMap(secp256k1_Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j)))))()));\nconst mapSWU = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => mapToCurveSimpleSWU(secp256k1_Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: secp256k1_Fp.create(BigInt('-11')),\n}))()));\nconst secp256k1_htf = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(secp256k1_Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: secp256k1_Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n}))()));\nconst secp256k1_hashToCurve = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => secp256k1_htf.hashToCurve)()));\nconst secp256k1_encodeToCurve = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => secp256k1_htf.encodeToCurve)()));\n//# sourceMappingURL=secp256k1.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/web3.js/lib/index.browser.esm.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n\n/**\n * Ed25519 Keypair\n */\n\nconst generatePrivateKey = ed25519.utils.randomPrivateKey;\nconst generateKeypair = () => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey\n };\n};\nconst getPublicKey = ed25519.getPublicKey;\nfunction isOnCurve(publicKey) {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nconst sign = (message, secretKey) => ed25519.sign(message, secretKey.slice(0, 32));\nconst verify = ed25519.verify;\n\nconst toBuffer = arr => {\n if (node_modules_buffer.Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return node_modules_buffer.Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return node_modules_buffer.Buffer.from(arr);\n }\n};\n\n// Class wrapping a plain object\nclass index_browser_esm_Struct {\n constructor(properties) {\n Object.assign(this, properties);\n }\n encode() {\n return node_modules_buffer.Buffer.from((0,lib.serialize)(SOLANA_SCHEMA, this));\n }\n static decode(data) {\n return (0,lib.deserialize)(SOLANA_SCHEMA, this, data);\n }\n static decodeUnchecked(data) {\n return (0,lib.deserializeUnchecked)(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nclass Enum extends index_browser_esm_Struct {\n constructor(properties) {\n super(properties);\n this.enum = '';\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\nconst SOLANA_SCHEMA = new Map();\n\nvar _PublicKey;\n\n/**\n * Maximum length of derived pubkey seed\n */\nconst MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nconst PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\n\n/**\n * JSON object representation of PublicKey class\n */\n\nfunction isPublicKeyData(value) {\n return value._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nclass PublicKey extends index_browser_esm_Struct {\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value) {\n super({});\n /** @internal */\n this._bn = void 0;\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58_default().decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new (bn_default())(decoded);\n } else {\n this._bn = new (bn_default())(value);\n }\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique() {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey) {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58() {\n return bs58_default().encode(this.toBytes());\n }\n toJSON() {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes() {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer() {\n const b = this._bn.toArrayLike(node_modules_buffer.Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n const zeroPad = node_modules_buffer.Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n get [Symbol.toStringTag]() {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString() {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(fromPublicKey, seed, programId) {\n const buffer = node_modules_buffer.Buffer.concat([fromPublicKey.toBuffer(), node_modules_buffer.Buffer.from(seed), programId.toBuffer()]);\n const publicKeyBytes = (0,esm_sha256/* sha256 */.J)(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(seeds, programId) {\n let buffer = node_modules_buffer.Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = node_modules_buffer.Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = node_modules_buffer.Buffer.concat([buffer, programId.toBuffer(), node_modules_buffer.Buffer.from('ProgramDerivedAddress')]);\n const publicKeyBytes = (0,esm_sha256/* sha256 */.J)(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(seeds, programId) {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(seeds, programId) {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(node_modules_buffer.Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(seeds, programId) {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData) {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n_PublicKey = PublicKey;\nPublicKey.default = new _PublicKey('11111111111111111111111111111111');\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']]\n});\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nclass Account {\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey) {\n /** @internal */\n this._publicKey = void 0;\n /** @internal */\n this._secretKey = void 0;\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey() {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey() {\n return node_modules_buffer.Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n\nconst BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey('BPFLoader1111111111111111111111111111111111');\n\n/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nconst PACKET_DATA_SIZE = 1280 - 40 - 8;\nconst VERSION_PREFIX_MASK = 0x7f;\nconst SIGNATURE_LENGTH_IN_BYTES = 64;\n\nclass TransactionExpiredBlockheightExceededError extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = void 0;\n this.signature = signature;\n }\n}\nObject.defineProperty(TransactionExpiredBlockheightExceededError.prototype, 'name', {\n value: 'TransactionExpiredBlockheightExceededError'\n});\nclass TransactionExpiredTimeoutError extends Error {\n constructor(signature, timeoutSeconds) {\n super(`Transaction was not confirmed in ${timeoutSeconds.toFixed(2)} seconds. It is ` + 'unknown if it succeeded or failed. Check signature ' + `${signature} using the Solana Explorer or CLI tools.`);\n this.signature = void 0;\n this.signature = signature;\n }\n}\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError'\n});\nclass TransactionExpiredNonceInvalidError extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = void 0;\n this.signature = signature;\n }\n}\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError'\n});\n\nclass MessageAccountKeys {\n constructor(staticAccountKeys, accountKeysFromLookups) {\n this.staticAccountKeys = void 0;\n this.accountKeysFromLookups = void 0;\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n keySegments() {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n get(index) {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n get length() {\n return this.keySegments().flat().length;\n }\n compileInstructions(instructions) {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n const keyIndexMap = new Map();\n this.keySegments().flat().forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n const findKeyIndex = key => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined) throw new Error('Encountered an unknown instruction account key during compilation');\n return keyIndex;\n };\n return instructions.map(instruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta => findKeyIndex(meta.pubkey)),\n data: instruction.data\n };\n });\n }\n}\n\n/**\n * Layout for a public key\n */\nconst publicKey = (property = 'publicKey') => {\n return Layout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nconst signature = (property = 'signature') => {\n return Layout.blob(64, property);\n};\n/**\n * Layout for a Rust String type\n */\nconst rustString = (property = 'string') => {\n const rsl = Layout.struct([Layout.u32('length'), Layout.u32('lengthPadding'), Layout.blob(Layout.offset(Layout.u32(), -8), 'chars')], property);\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n const rslShim = rsl;\n rslShim.decode = (b, offset) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n rslShim.encode = (str, b, offset) => {\n const data = {\n chars: node_modules_buffer.Buffer.from(str, 'utf8')\n };\n return _encode(data, b, offset);\n };\n rslShim.alloc = str => {\n return Layout.u32().span + Layout.u32().span + node_modules_buffer.Buffer.from(str, 'utf8').length;\n };\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nconst authorized = (property = 'authorized') => {\n return Layout.struct([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nconst lockup = (property = 'lockup') => {\n return Layout.struct([Layout.ns64('unixTimestamp'), Layout.ns64('epoch'), publicKey('custodian')], property);\n};\n\n/**\n * Layout for a VoteInit object\n */\nconst voteInit = (property = 'voteInit') => {\n return Layout.struct([publicKey('nodePubkey'), publicKey('authorizedVoter'), publicKey('authorizedWithdrawer'), Layout.u8('commission')], property);\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nconst voteAuthorizeWithSeedArgs = (property = 'voteAuthorizeWithSeedArgs') => {\n return Layout.struct([Layout.u32('voteAuthorizationType'), publicKey('currentAuthorityDerivedKeyOwnerPubkey'), rustString('currentAuthorityDerivedKeySeed'), publicKey('newAuthorized')], property);\n};\nfunction getAlloc(type, fields) {\n const getItemAlloc = item => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({\n layout: item\n }, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n let alloc = 0;\n type.layout.fields.forEach(item => {\n alloc += getItemAlloc(item);\n });\n return alloc;\n}\n\nfunction decodeLength(bytes) {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift();\n len |= (elem & 0x7f) << size * 7;\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\nfunction encodeLength(bytes, len) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n\nfunction index_browser_esm_assert (condition, message) {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n\nclass CompiledKeys {\n constructor(payer, keyMetaMap) {\n this.payer = void 0;\n this.keyMetaMap = void 0;\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n static compile(instructions, payer) {\n const keyMetaMap = new Map();\n const getOrInsertDefault = pubkey => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n return new CompiledKeys(payer, keyMetaMap);\n }\n getMessageComponents() {\n const mapEntries = [...this.keyMetaMap.entries()];\n index_browser_esm_assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n const writableSigners = mapEntries.filter(([, meta]) => meta.isSigner && meta.isWritable);\n const readonlySigners = mapEntries.filter(([, meta]) => meta.isSigner && !meta.isWritable);\n const writableNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && meta.isWritable);\n const readonlyNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && !meta.isWritable);\n const header = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length\n };\n\n // sanity checks\n {\n index_browser_esm_assert(writableSigners.length > 0, 'Expected at least one writable signer key');\n const [payerAddress] = writableSigners[0];\n index_browser_esm_assert(payerAddress === this.payer.toBase58(), 'Expected first writable signer key to be the fee payer');\n }\n const staticAccountKeys = [...writableSigners.map(([address]) => new PublicKey(address)), ...readonlySigners.map(([address]) => new PublicKey(address)), ...writableNonSigners.map(([address]) => new PublicKey(address)), ...readonlyNonSigners.map(([address]) => new PublicKey(address))];\n return [header, staticAccountKeys];\n }\n extractTableLookup(lookupTable) {\n const [writableIndexes, drainedWritableKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, keyMeta => !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable);\n const [readonlyIndexes, drainedReadonlyKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, keyMeta => !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable);\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n return [{\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes\n }, {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys\n }];\n }\n\n /** @internal */\n drainKeysFoundInLookupTable(lookupTableEntries, keyMetaFilter) {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry => entry.equals(key));\n if (lookupTableIndex >= 0) {\n index_browser_esm_assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n return [lookupTableIndexes, drainedKeys];\n }\n}\n\nconst END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';\n\n/**\n * Delegates to `Array#shift`, but throws if the array is zero-length.\n */\nfunction guardedShift(byteArray) {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift();\n}\n\n/**\n * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of\n * the array.\n */\nfunction guardedSplice(byteArray, ...args) {\n const [start] = args;\n if (args.length === 2 // Implies that `deleteCount` was supplied\n ? start + (args[1] ?? 0) > byteArray.length : start >= byteArray.length) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(...args);\n}\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\n\n/**\n * Message constructor arguments\n */\n\n/**\n * List of instructions to be processed atomically\n */\nclass Message {\n constructor(args) {\n this.header = void 0;\n this.accountKeys = void 0;\n this.recentBlockhash = void 0;\n this.instructions = void 0;\n this.indexToProgramIds = new Map();\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix => this.indexToProgramIds.set(ix.programIdIndex, this.accountKeys[ix.programIdIndex]));\n }\n get version() {\n return 'legacy';\n }\n get staticAccountKeys() {\n return this.accountKeys;\n }\n get compiledInstructions() {\n return this.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58_default().decode(ix.data)\n }));\n }\n get addressTableLookups() {\n return [];\n }\n getAccountKeys() {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(ix => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58_default().encode(ix.data)\n }));\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions\n });\n }\n isAccountSigner(index) {\n return index < this.header.numRequiredSignatures;\n }\n isAccountWritable(index) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n isProgramId(index) {\n return this.indexToProgramIds.has(index);\n }\n programIds() {\n return [...this.indexToProgramIds.values()];\n }\n nonProgramIds() {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n serialize() {\n const numKeys = this.accountKeys.length;\n let keyCount = [];\n encodeLength(keyCount, numKeys);\n const instructions = this.instructions.map(instruction => {\n const {\n accounts,\n programIdIndex\n } = instruction;\n const data = Array.from(bs58_default().decode(instruction.data));\n let keyIndicesCount = [];\n encodeLength(keyIndicesCount, accounts.length);\n let dataCount = [];\n encodeLength(dataCount, data.length);\n return {\n programIdIndex,\n keyIndicesCount: node_modules_buffer.Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: node_modules_buffer.Buffer.from(dataCount),\n data\n };\n });\n let instructionCount = [];\n encodeLength(instructionCount, instructions.length);\n let instructionBuffer = node_modules_buffer.Buffer.alloc(PACKET_DATA_SIZE);\n node_modules_buffer.Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n instructions.forEach(instruction => {\n const instructionLayout = Layout.struct([Layout.u8('programIdIndex'), Layout.blob(instruction.keyIndicesCount.length, 'keyIndicesCount'), Layout.seq(Layout.u8('keyIndex'), instruction.keyIndices.length, 'keyIndices'), Layout.blob(instruction.dataLength.length, 'dataLength'), Layout.seq(Layout.u8('userdatum'), instruction.data.length, 'data')]);\n const length = instructionLayout.encode(instruction, instructionBuffer, instructionBufferLength);\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n const signDataLayout = Layout.struct([Layout.blob(1, 'numRequiredSignatures'), Layout.blob(1, 'numReadonlySignedAccounts'), Layout.blob(1, 'numReadonlyUnsignedAccounts'), Layout.blob(keyCount.length, 'keyCount'), Layout.seq(publicKey('key'), numKeys, 'keys'), publicKey('recentBlockhash')]);\n const transaction = {\n numRequiredSignatures: node_modules_buffer.Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: node_modules_buffer.Buffer.from([this.header.numReadonlySignedAccounts]),\n numReadonlyUnsignedAccounts: node_modules_buffer.Buffer.from([this.header.numReadonlyUnsignedAccounts]),\n keyCount: node_modules_buffer.Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58_default().decode(this.recentBlockhash)\n };\n let signData = node_modules_buffer.Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer) {\n // Slice up wire data\n let byteArray = [...buffer];\n const numRequiredSignatures = guardedShift(byteArray);\n if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) {\n throw new Error('Versioned messages must be deserialized with VersionedMessage.deserialize()');\n }\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(node_modules_buffer.Buffer.from(account)));\n }\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n const instructionCount = decodeLength(byteArray);\n let instructions = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount);\n const dataLength = decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58_default().encode(node_modules_buffer.Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data\n });\n }\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n recentBlockhash: bs58_default().encode(node_modules_buffer.Buffer.from(recentBlockhash)),\n accountKeys,\n instructions\n };\n return new Message(messageArgs);\n }\n}\n\n/**\n * Message constructor arguments\n */\n\nclass MessageV0 {\n constructor(args) {\n this.header = void 0;\n this.staticAccountKeys = void 0;\n this.recentBlockhash = void 0;\n this.compiledInstructions = void 0;\n this.addressTableLookups = void 0;\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n get version() {\n return 0;\n }\n get numAccountKeysFromLookups() {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n getAccountKeys(args) {\n let accountKeysFromLookups;\n if (args && 'accountKeysFromLookups' in args && args.accountKeysFromLookups) {\n if (this.numAccountKeysFromLookups != args.accountKeysFromLookups.writable.length + args.accountKeysFromLookups.readonly.length) {\n throw new Error('Failed to get account keys because of a mismatch in the number of account keys from lookups');\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (args && 'addressLookupTableAccounts' in args && args.addressLookupTableAccounts) {\n accountKeysFromLookups = this.resolveAddressTableLookups(args.addressLookupTableAccounts);\n } else if (this.addressTableLookups.length > 0) {\n throw new Error('Failed to get account keys because address table lookups were not resolved');\n }\n return new MessageAccountKeys(this.staticAccountKeys, accountKeysFromLookups);\n }\n isAccountSigner(index) {\n return index < this.header.numRequiredSignatures;\n }\n isAccountWritable(index) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce((count, lookup) => count + lookup.writableIndexes.length, 0);\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n resolveAddressTableLookups(addressLookupTableAccounts) {\n const accountKeysFromLookups = {\n writable: [],\n readonly: []\n };\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account => account.key.equals(tableLookup.accountKey));\n if (!tableAccount) {\n throw new Error(`Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`);\n }\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(tableAccount.state.addresses[index]);\n } else {\n throw new Error(`Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`);\n }\n }\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(tableAccount.state.addresses[index]);\n } else {\n throw new Error(`Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`);\n }\n }\n }\n return accountKeysFromLookups;\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const addressTableLookups = new Array();\n const accountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array()\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {\n writable,\n readonly\n }] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys, accountKeysFromLookups);\n const compiledInstructions = accountKeys.compileInstructions(args.instructions);\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups\n });\n }\n serialize() {\n const encodedStaticAccountKeysLength = Array();\n encodeLength(encodedStaticAccountKeysLength, this.staticAccountKeys.length);\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n encodeLength(encodedInstructionsLength, this.compiledInstructions.length);\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n encodeLength(encodedAddressTableLookupsLength, this.addressTableLookups.length);\n const messageLayout = Layout.struct([Layout.u8('prefix'), Layout.struct([Layout.u8('numRequiredSignatures'), Layout.u8('numReadonlySignedAccounts'), Layout.u8('numReadonlyUnsignedAccounts')], 'header'), Layout.blob(encodedStaticAccountKeysLength.length, 'staticAccountKeysLength'), Layout.seq(publicKey(), this.staticAccountKeys.length, 'staticAccountKeys'), publicKey('recentBlockhash'), Layout.blob(encodedInstructionsLength.length, 'instructionsLength'), Layout.blob(serializedInstructions.length, 'serializedInstructions'), Layout.blob(encodedAddressTableLookupsLength.length, 'addressTableLookupsLength'), Layout.blob(serializedAddressTableLookups.length, 'serializedAddressTableLookups')]);\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode({\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58_default().decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(encodedAddressTableLookupsLength),\n serializedAddressTableLookups\n }, serializedMessage);\n return serializedMessage.slice(0, serializedMessageLength);\n }\n serializeInstructions() {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n encodeLength(encodedAccountKeyIndexesLength, instruction.accountKeyIndexes.length);\n const encodedDataLength = Array();\n encodeLength(encodedDataLength, instruction.data.length);\n const instructionLayout = Layout.struct([Layout.u8('programIdIndex'), Layout.blob(encodedAccountKeyIndexesLength.length, 'encodedAccountKeyIndexesLength'), Layout.seq(Layout.u8(), instruction.accountKeyIndexes.length, 'accountKeyIndexes'), Layout.blob(encodedDataLength.length, 'encodedDataLength'), Layout.blob(instruction.data.length, 'data')]);\n serializedLength += instructionLayout.encode({\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(encodedAccountKeyIndexesLength),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data\n }, serializedInstructions, serializedLength);\n }\n return serializedInstructions.slice(0, serializedLength);\n }\n serializeAddressTableLookups() {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n encodeLength(encodedWritableIndexesLength, lookup.writableIndexes.length);\n const encodedReadonlyIndexesLength = Array();\n encodeLength(encodedReadonlyIndexesLength, lookup.readonlyIndexes.length);\n const addressTableLookupLayout = Layout.struct([publicKey('accountKey'), Layout.blob(encodedWritableIndexesLength.length, 'encodedWritableIndexesLength'), Layout.seq(Layout.u8(), lookup.writableIndexes.length, 'writableIndexes'), Layout.blob(encodedReadonlyIndexesLength.length, 'encodedReadonlyIndexesLength'), Layout.seq(Layout.u8(), lookup.readonlyIndexes.length, 'readonlyIndexes')]);\n serializedLength += addressTableLookupLayout.encode({\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(encodedWritableIndexesLength),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(encodedReadonlyIndexesLength),\n readonlyIndexes: lookup.readonlyIndexes\n }, serializedAddressTableLookups, serializedLength);\n }\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n static deserialize(serializedMessage) {\n let byteArray = [...serializedMessage];\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n index_browser_esm_assert(prefix !== maskedPrefix, `Expected versioned message but received legacy message`);\n const version = maskedPrefix;\n index_browser_esm_assert(version === 0, `Expected versioned message with version 0 but found version ${version}`);\n const header = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray)\n };\n const staticAccountKeys = [];\n const staticAccountKeysLength = decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)));\n }\n const recentBlockhash = bs58_default().encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const instructionCount = decodeLength(byteArray);\n const compiledInstructions = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength);\n const dataLength = decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data\n });\n }\n const addressTableLookupsCount = decodeLength(byteArray);\n const addressTableLookups = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = decodeLength(byteArray);\n const writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength);\n const readonlyIndexesLength = decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes\n });\n }\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups\n });\n }\n}\n\n// eslint-disable-next-line no-redeclare\nconst VersionedMessage = {\n deserializeMessageVersion(serializedMessage) {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n deserialize: serializedMessage => {\n const version = VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(`Transaction message version ${version} deserialization is not supported`);\n }\n }\n};\n\n/** @internal */\n\n/**\n * Transaction signature as base-58 encoded string\n */\n\nlet TransactionStatus = /*#__PURE__*/function (TransactionStatus) {\n TransactionStatus[TransactionStatus[\"BLOCKHEIGHT_EXCEEDED\"] = 0] = \"BLOCKHEIGHT_EXCEEDED\";\n TransactionStatus[TransactionStatus[\"PROCESSED\"] = 1] = \"PROCESSED\";\n TransactionStatus[TransactionStatus[\"TIMED_OUT\"] = 2] = \"TIMED_OUT\";\n TransactionStatus[TransactionStatus[\"NONCE_INVALID\"] = 3] = \"NONCE_INVALID\";\n return TransactionStatus;\n}({});\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = node_modules_buffer.Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\n\n/**\n * Configuration object for Transaction.serialize()\n */\n\n/**\n * @internal\n */\n\n/**\n * Transaction Instruction class\n */\nclass TransactionInstruction {\n constructor(opts) {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n this.keys = void 0;\n /**\n * Program Id to execute\n */\n this.programId = void 0;\n /**\n * Program input\n */\n this.data = node_modules_buffer.Buffer.alloc(0);\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON() {\n return {\n keys: this.keys.map(({\n pubkey,\n isSigner,\n isWritable\n }) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable\n })),\n programId: this.programId.toJSON(),\n data: [...this.data]\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\n\n/**\n * @internal\n */\n\n/**\n * Transaction class\n */\nclass Transaction {\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature() {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n\n // Construct a transaction using a durable nonce\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n\n /**\n * Construct an empty Transaction\n */\n constructor(opts) {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n this.signatures = [];\n this.feePayer = void 0;\n /**\n * The instructions to atomically execute\n */\n this.instructions = [];\n /**\n * A recent transaction id. Must be populated by the caller\n */\n this.recentBlockhash = void 0;\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n this.lastValidBlockHeight = void 0;\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n this.nonceInfo = void 0;\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n this.minNonceContextSlot = void 0;\n /**\n * @internal\n */\n this._message = void 0;\n /**\n * @internal\n */\n this._json = void 0;\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {\n minContextSlot,\n nonceInfo\n } = opts;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')) {\n const {\n blockhash,\n lastValidBlockHeight\n } = opts;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {\n recentBlockhash,\n nonceInfo\n } = opts;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON() {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON()\n } : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({\n publicKey\n }) => {\n return publicKey.toJSON();\n })\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(...items) {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n items.forEach(item => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage() {\n if (this._message && JSON.stringify(this.toJSON()) === JSON.stringify(this._json)) {\n return this._message;\n }\n let recentBlockhash;\n let instructions;\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n let feePayer;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(`Transaction instruction index ${i} has undefined program id`);\n }\n }\n const programIds = [];\n const accountMetas = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({\n ...accountMeta\n });\n });\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower'\n };\n return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn('Transaction references a signature that is unnecessary, ' + 'only the fee payer and instruction signer accounts should sign a transaction. ' + 'This behavior is deprecated and will throw an error in the next major version release.');\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys = [];\n const unsignedKeys = [];\n uniqueMetas.forEach(({\n pubkey,\n isSigner,\n isWritable\n }) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions = instructions.map(instruction => {\n const {\n data,\n programId\n } = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta => accountKeys.indexOf(meta.pubkey.toString())),\n data: bs58_default().encode(data)\n };\n });\n compiledInstructions.forEach(instruction => {\n index_browser_esm_assert(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => index_browser_esm_assert(keyIndex >= 0));\n });\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions\n });\n }\n\n /**\n * @internal\n */\n _compile() {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(0, message.header.numRequiredSignatures);\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n if (valid) return message;\n }\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey\n }));\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage() {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection) {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n const seen = new Set();\n this.signatures = signers.filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n }).map(publicKey => ({\n signature: null,\n publicKey\n }));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey\n }));\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message, ...signers) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey, signature) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey, signature) {\n index_browser_esm_assert(signature.length === 64);\n const index = this.signatures.findIndex(sigpair => pubkey.equals(sigpair.publicKey));\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n this.signatures[index].signature = node_modules_buffer.Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures = true) {\n const signatureErrors = this._getMessageSignednessErrors(this.serializeMessage(), requireAllSignatures);\n return !signatureErrors;\n }\n\n /**\n * @internal\n */\n _getMessageSignednessErrors(message, requireAllSignatures) {\n const errors = {};\n for (const {\n signature,\n publicKey\n } of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n (errors.missing ||= []).push(publicKey);\n }\n } else {\n if (!verify(signature, message, publicKey.toBytes())) {\n (errors.invalid ||= []).push(publicKey);\n }\n }\n }\n return errors.invalid || errors.missing ? errors : undefined;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config) {\n const {\n requireAllSignatures,\n verifySignatures\n } = Object.assign({\n requireAllSignatures: true,\n verifySignatures: true\n }, config);\n const signData = this.serializeMessage();\n if (verifySignatures) {\n const sigErrors = this._getMessageSignednessErrors(signData, requireAllSignatures);\n if (sigErrors) {\n let errorMessage = 'Signature verification failed.';\n if (sigErrors.invalid) {\n errorMessage += `\\nInvalid signature for public key${sigErrors.invalid.length === 1 ? '' : '(s)'} [\\`${sigErrors.invalid.map(p => p.toBase58()).join('`, `')}\\`].`;\n }\n if (sigErrors.missing) {\n errorMessage += `\\nMissing signature for public key${sigErrors.missing.length === 1 ? '' : '(s)'} [\\`${sigErrors.missing.map(p => p.toBase58()).join('`, `')}\\`].`;\n }\n throw new Error(errorMessage);\n }\n }\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData) {\n const {\n signatures\n } = this;\n const signatureCount = [];\n encodeLength(signatureCount, signatures.length);\n const transactionLength = signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = node_modules_buffer.Buffer.alloc(transactionLength);\n index_browser_esm_assert(signatures.length < 256);\n node_modules_buffer.Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({\n signature\n }, index) => {\n if (signature !== null) {\n index_browser_esm_assert(signature.length === 64, `signature has invalid length`);\n node_modules_buffer.Buffer.from(signature).copy(wireTransaction, signatureCount.length + index * 64);\n }\n });\n signData.copy(wireTransaction, signatureCount.length + signatures.length * 64);\n index_browser_esm_assert(wireTransaction.length <= PACKET_DATA_SIZE, `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`);\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys() {\n index_browser_esm_assert(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId() {\n index_browser_esm_assert(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data() {\n index_browser_esm_assert(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer) {\n // Slice up wire data\n let byteArray = [...buffer];\n const signatureCount = decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58_default().encode(node_modules_buffer.Buffer.from(signature)));\n }\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(message, signatures = []) {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature: signature == bs58_default().encode(DEFAULT_SIGNATURE) ? null : bs58_default().decode(signature),\n publicKey: message.accountKeys[index]\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner: transaction.signatures.some(keyObj => keyObj.publicKey.toString() === pubkey.toString()) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account)\n };\n });\n transaction.instructions.push(new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58_default().decode(instruction.data)\n }));\n });\n transaction._message = message;\n transaction._json = transaction.toJSON();\n return transaction;\n }\n}\n\nclass TransactionMessage {\n constructor(args) {\n this.payerKey = void 0;\n this.instructions = void 0;\n this.recentBlockhash = void 0;\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n static decompile(message, args) {\n const {\n header,\n compiledInstructions,\n recentBlockhash\n } = message;\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n } = header;\n const numWritableSignedAccounts = numRequiredSignatures - numReadonlySignedAccounts;\n index_browser_esm_assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n const numWritableUnsignedAccounts = message.staticAccountKeys.length - numRequiredSignatures - numReadonlyUnsignedAccounts;\n index_browser_esm_assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error('Failed to decompile message because no account keys were found');\n }\n const instructions = [];\n for (const compiledIx of compiledInstructions) {\n const keys = [];\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(`Failed to find key for account key index ${keyIndex}`);\n }\n const isSigner = keyIndex < numRequiredSignatures;\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable = keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable = keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups.writable.length;\n }\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable\n });\n }\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(`Failed to find program id for program id index ${compiledIx.programIdIndex}`);\n }\n instructions.push(new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys\n }));\n }\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash\n });\n }\n compileToLegacyMessage() {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions\n });\n }\n compileToV0Message(addressLookupTableAccounts) {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts\n });\n }\n}\n\n/**\n * Versioned transaction class\n */\nclass VersionedTransaction {\n get version() {\n return this.message.version;\n }\n constructor(message, signatures) {\n this.signatures = void 0;\n this.message = void 0;\n if (signatures !== undefined) {\n index_browser_esm_assert(signatures.length === message.header.numRequiredSignatures, 'Expected signatures length to be equal to the number of required signatures');\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n serialize() {\n const serializedMessage = this.message.serialize();\n const encodedSignaturesLength = Array();\n encodeLength(encodedSignaturesLength, this.signatures.length);\n const transactionLayout = Layout.struct([Layout.blob(encodedSignaturesLength.length, 'encodedSignaturesLength'), Layout.seq(signature(), this.signatures.length, 'signatures'), Layout.blob(serializedMessage.length, 'serializedMessage')]);\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode({\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage\n }, serializedTransaction);\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n static deserialize(serializedTransaction) {\n let byteArray = [...serializedTransaction];\n const signatures = [];\n const signaturesLength = decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)));\n }\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n sign(signers) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(0, this.message.header.numRequiredSignatures);\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey => pubkey.equals(signer.publicKey));\n index_browser_esm_assert(signerIndex >= 0, `Cannot sign with non signer key ${signer.publicKey.toBase58()}`);\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n addSignature(publicKey, signature) {\n index_browser_esm_assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(0, this.message.header.numRequiredSignatures);\n const signerIndex = signerPubkeys.findIndex(pubkey => pubkey.equals(publicKey));\n index_browser_esm_assert(signerIndex >= 0, `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`);\n this.signatures[signerIndex] = signature;\n }\n}\n\n// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nconst NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nconst DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nconst NUM_SLOTS_PER_SECOND = NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nconst MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n\nconst SYSVAR_CLOCK_PUBKEY = new PublicKey('SysvarC1ock11111111111111111111111111111111');\nconst SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey('SysvarEpochSchedu1e111111111111111111111111');\nconst SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey('Sysvar1nstructions1111111111111111111111111');\nconst SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey('SysvarRecentB1ockHashes11111111111111111111');\nconst SYSVAR_RENT_PUBKEY = new PublicKey('SysvarRent111111111111111111111111111111111');\nconst SYSVAR_REWARDS_PUBKEY = new PublicKey('SysvarRewards111111111111111111111111111111');\nconst SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey('SysvarS1otHashes111111111111111111111111111');\nconst SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey('SysvarS1otHistory11111111111111111111111111');\nconst SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey('SysvarStakeHistory1111111111111111111111111');\n\nclass SendTransactionError extends Error {\n constructor({\n action,\n signature,\n transactionMessage,\n logs\n }) {\n const maybeLogsOutput = logs ? `Logs: \\n${JSON.stringify(logs.slice(-10), null, 2)}. ` : '';\n const guideText = '\\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.';\n let message;\n switch (action) {\n case 'send':\n message = `Transaction ${signature} resulted in an error. \\n` + `${transactionMessage}. ` + maybeLogsOutput + guideText;\n break;\n case 'simulate':\n message = `Simulation failed. \\nMessage: ${transactionMessage}. \\n` + maybeLogsOutput + guideText;\n break;\n default:\n {\n message = `Unknown action '${(a => a)(action)}'`;\n }\n }\n super(message);\n this.signature = void 0;\n this.transactionMessage = void 0;\n this.transactionLogs = void 0;\n this.signature = signature;\n this.transactionMessage = transactionMessage;\n this.transactionLogs = logs ? logs : undefined;\n }\n get transactionError() {\n return {\n message: this.transactionMessage,\n logs: Array.isArray(this.transactionLogs) ? this.transactionLogs : undefined\n };\n }\n\n /* @deprecated Use `await getLogs()` instead */\n get logs() {\n const cachedLogs = this.transactionLogs;\n if (cachedLogs != null && typeof cachedLogs === 'object' && 'then' in cachedLogs) {\n return undefined;\n }\n return cachedLogs;\n }\n async getLogs(connection) {\n if (!Array.isArray(this.transactionLogs)) {\n this.transactionLogs = new Promise((resolve, reject) => {\n connection.getTransaction(this.signature).then(tx => {\n if (tx && tx.meta && tx.meta.logMessages) {\n const logs = tx.meta.logMessages;\n this.transactionLogs = logs;\n resolve(logs);\n } else {\n reject(new Error('Log messages not found'));\n }\n }).catch(reject);\n });\n }\n return await this.transactionLogs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016\n};\nclass SolanaJSONRPCError extends Error {\n constructor({\n code,\n message,\n data\n }, customMessage) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = void 0;\n this.data = void 0;\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nasync function sendAndConfirmTransaction(connection, transaction, signers, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot\n };\n const signature = await connection.sendTransaction(transaction, signers, sendOptions);\n let status;\n if (transaction.recentBlockhash != null && transaction.lastValidBlockHeight != null) {\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight\n }, options && options.commitment)).value;\n } else if (transaction.minNonceContextSlot != null && transaction.nonceInfo != null) {\n const {\n nonceInstruction\n } = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature\n }, options && options.commitment)).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn('sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' + 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' + 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.');\n }\n status = (await connection.confirmTransaction(signature, options && options.commitment)).value;\n }\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: 'send',\n signature: signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n}\n\n// zzz\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\n/**\n * @internal\n */\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nfunction encodeData(type, fields) {\n const allocLength = type.layout.span >= 0 ? type.layout.span : getAlloc(type, fields);\n const data = node_modules_buffer.Buffer.alloc(allocLength);\n const layoutFields = Object.assign({\n instruction: type.index\n }, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nfunction decodeData$1(type, buffer) {\n let data;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n if (data.instruction !== type.index) {\n throw new Error(`invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`);\n }\n return data;\n}\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nconst FeeCalculatorLayout = Layout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = Layout.struct([Layout.u32('version'), Layout.u32('state'), publicKey('authorizedPubkey'), publicKey('nonce'), Layout.struct([FeeCalculatorLayout], 'feeCalculator')]);\nconst NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\n\n/**\n * NonceAccount class\n */\nclass NonceAccount {\n /**\n * @internal\n */\n constructor(args) {\n this.authorizedPubkey = void 0;\n this.nonce = void 0;\n this.feeCalculator = void 0;\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(buffer) {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator\n });\n }\n}\n\nconst encodeDecode = layout => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return {\n decode,\n encode\n };\n};\nconst bigInt = length => property => {\n const layout = (0,Layout.blob)(length, property);\n const {\n encode,\n decode\n } = encodeDecode(layout);\n const bigIntLayout = layout;\n bigIntLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset);\n return (0,browser.toBigIntLE)(node_modules_buffer.Buffer.from(src));\n };\n bigIntLayout.encode = (bigInt, buffer, offset) => {\n const src = (0,browser.toBufferLE)(bigInt, length);\n return encode(src, buffer, offset);\n };\n return bigIntLayout;\n};\nconst index_browser_esm_u64 = bigInt(8);\n\n/**\n * Create account system transaction params\n */\n\n/**\n * Transfer system transaction params\n */\n\n/**\n * Assign system transaction params\n */\n\n/**\n * Create account with seed system transaction params\n */\n\n/**\n * Create nonce account system transaction params\n */\n\n/**\n * Create nonce account with seed system transaction params\n */\n\n/**\n * Initialize nonce account system instruction params\n */\n\n/**\n * Advance nonce account system instruction params\n */\n\n/**\n * Withdraw nonce account system transaction params\n */\n\n/**\n * Authorize nonce account system transaction params\n */\n\n/**\n * Allocate account system transaction params\n */\n\n/**\n * Allocate account with seed system transaction params\n */\n\n/**\n * Assign account with seed system transaction params\n */\n\n/**\n * Transfer with seed system transaction params\n */\n\n/** Decoded transfer system transaction instruction */\n\n/** Decoded transferWithSeed system transaction instruction */\n\n/**\n * System Instruction class\n */\nclass SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = Layout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n lamports,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Create, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n lamports\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Transfer, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports,\n seed,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n space\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Allocate, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n base,\n seed,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Assign, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n base,\n seed,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n base,\n seed,\n lamports,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId)\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n authorized\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized)\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {\n lamports\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n authorized\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized)\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nconst SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze({\n Create: {\n index: 0,\n layout: Layout.struct([Layout.u32('instruction'), Layout.ns64('lamports'), Layout.ns64('space'), publicKey('programId')])\n },\n Assign: {\n index: 1,\n layout: Layout.struct([Layout.u32('instruction'), publicKey('programId')])\n },\n Transfer: {\n index: 2,\n layout: Layout.struct([Layout.u32('instruction'), index_browser_esm_u64('lamports')])\n },\n CreateWithSeed: {\n index: 3,\n layout: Layout.struct([Layout.u32('instruction'), publicKey('base'), rustString('seed'), Layout.ns64('lamports'), Layout.ns64('space'), publicKey('programId')])\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: Layout.struct([Layout.u32('instruction')])\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: Layout.struct([Layout.u32('instruction'), Layout.ns64('lamports')])\n },\n InitializeNonceAccount: {\n index: 6,\n layout: Layout.struct([Layout.u32('instruction'), publicKey('authorized')])\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: Layout.struct([Layout.u32('instruction'), publicKey('authorized')])\n },\n Allocate: {\n index: 8,\n layout: Layout.struct([Layout.u32('instruction'), Layout.ns64('space')])\n },\n AllocateWithSeed: {\n index: 9,\n layout: Layout.struct([Layout.u32('instruction'), publicKey('base'), rustString('seed'), Layout.ns64('space'), publicKey('programId')])\n },\n AssignWithSeed: {\n index: 10,\n layout: Layout.struct([Layout.u32('instruction'), publicKey('base'), rustString('seed'), publicKey('programId')])\n },\n TransferWithSeed: {\n index: 11,\n layout: Layout.struct([Layout.u32('instruction'), index_browser_esm_u64('lamports'), rustString('seed'), publicKey('programId')])\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: Layout.struct([Layout.u32('instruction')])\n }\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nclass SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: true,\n isWritable: true\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(params) {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {\n lamports: BigInt(params.lamports)\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(params) {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n let keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: false,\n isWritable: true\n }];\n if (params.basePubkey != params.fromPubkey) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(params) {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n } else {\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n }\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey\n };\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer())\n });\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {\n lamports: params.lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(params) {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n}\nSystemProgram.programId = new PublicKey('11111111111111111111111111111111');\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nclass Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return 2 * (\n // Every transaction requires two signatures (payer + program)\n Math.ceil(dataLength / Loader.chunkSize) + 1 +\n // Add one for Create transaction\n 1) // Add one for Finalize transaction\n ;\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(connection, payer, program, programId, data) {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(data.length);\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(program.publicKey, 'confirmed');\n let transaction = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length\n }));\n }\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId\n }));\n }\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports\n }));\n }\n } else {\n transaction = new Transaction().add(SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId\n }));\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed'\n });\n }\n }\n const dataLayout = Layout.struct([Layout.u32('instruction'), Layout.u32('offset'), Layout.u32('bytesLength'), Layout.u32('bytesLengthPadding'), Layout.seq(Layout.u8('byte'), Layout.offset(Layout.u32(), -8), 'bytes')]);\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = node_modules_buffer.Buffer.alloc(chunkSize + 16);\n dataLayout.encode({\n instruction: 0,\n // Load instruction\n offset,\n bytes: bytes,\n bytesLength: 0,\n bytesLengthPadding: 0\n }, data);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }],\n programId,\n data\n });\n transactions.push(sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed'\n }));\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = Layout.struct([Layout.u32('instruction')]);\n const data = node_modules_buffer.Buffer.alloc(dataLayout.span);\n dataLayout.encode({\n instruction: 1 // Finalize instruction\n }, data);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId,\n data\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(transaction, [payer, program], {\n preflightCommitment: deployCommitment\n });\n const {\n context,\n value\n } = await connection.confirmTransaction({\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n blockhash: transaction.recentBlockhash\n }, deployCommitment);\n if (value.err) {\n throw new Error(`Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`);\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve => setTimeout(resolve, Math.round(MS_PER_SLOT / 2)));\n }\n }\n\n // success\n return true;\n }\n}\nLoader.chunkSize = CHUNK_SIZE;\n\n/**\n * @deprecated Deprecated since Solana v1.17.20.\n */\nconst BPF_LOADER_PROGRAM_ID = new PublicKey('BPFLoader2111111111111111111111111111111111');\n\n/**\n * Factory class for transactions to interact with a program loader\n *\n * @deprecated Deprecated since Solana v1.17.20.\n */\nclass BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(connection, payer, program, elf, loaderProgramId) {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nvar fastStableStringify = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n\nvar fastStableStringify$1 = /*@__PURE__*/getDefaultExportFromCjs(fastStableStringify);\n\nconst MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nclass EpochSchedule {\n constructor(slotsPerEpoch, leaderScheduleSlotOffset, warmup, firstNormalEpoch, firstNormalSlot) {\n /** The maximum number of slots in each epoch */\n this.slotsPerEpoch = void 0;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n this.leaderScheduleSlotOffset = void 0;\n /** Indicates whether epochs start short and grow */\n this.warmup = void 0;\n /** The first epoch with `slotsPerEpoch` slots */\n this.firstNormalEpoch = void 0;\n /** The first slot of `firstNormalEpoch` */\n this.firstNormalSlot = void 0;\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n getEpoch(slot) {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n getEpochAndSlotIndex(slot) {\n if (slot < this.firstNormalSlot) {\n const epoch = trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) - trailingZeros(MINIMUM_SLOT_PER_EPOCH) - 1;\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n getFirstSlotInEpoch(epoch) {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (epoch - this.firstNormalEpoch) * this.slotsPerEpoch + this.firstNormalSlot;\n }\n }\n getLastSlotInEpoch(epoch) {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n getSlotsInEpoch(epoch) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n\nvar fetchImpl = globalThis.fetch;\n\nclass RpcWebSocketClient extends CommonClient {\n constructor(address, options, generate_request_id) {\n const webSocketFactory = url => {\n const rpc = WebSocket(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options\n });\n if ('socket' in rpc) {\n this.underlyingSocket = rpc.socket;\n } else {\n this.underlyingSocket = rpc;\n }\n return rpc;\n };\n super(webSocketFactory, address, options, generate_request_id);\n this.underlyingSocket = void 0;\n }\n call(...args) {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(new Error('Tried to call a JSON-RPC method `' + args[0] + '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' + readyState + ')'));\n }\n notify(...args) {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(new Error('Tried to send a JSON-RPC notification `' + args[0] + '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' + readyState + ')'));\n }\n}\n\n/**\n * @internal\n */\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nfunction decodeData(type, data) {\n let decoded;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n if (decoded.typeIndex !== type.index) {\n throw new Error(`invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`);\n }\n return decoded;\n}\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\nclass AddressLookupTableAccount {\n constructor(args) {\n this.key = void 0;\n this.state = void 0;\n this.key = args.key;\n this.state = args.state;\n }\n isActive() {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n static deserialize(accountData) {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n index_browser_esm_assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n index_browser_esm_assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {\n addresses\n } = Layout.struct([Layout.seq(publicKey(), numSerializedAddresses, 'addresses')]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority: meta.authority.length !== 0 ? new PublicKey(meta.authority[0]) : undefined,\n addresses: addresses.map(address => new PublicKey(address))\n };\n }\n}\nconst LookupTableMetaLayout = {\n index: 1,\n layout: Layout.struct([Layout.u32('typeIndex'), index_browser_esm_u64('deactivationSlot'), Layout.nu64('lastExtendedSlot'), Layout.u8('lastExtendedStartIndex'), Layout.u8(),\n // option\n Layout.seq(publicKey(), Layout.offset(Layout.u8(), -1), 'authority')])\n};\n\nconst URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\nfunction makeWebsocketUrl(endpoint) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [_,\n // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish, portWithColon, rest] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort = portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explicitly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to agave-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n\nconst PublicKeyFromString = coerce(instance(PublicKey), string(), value => new PublicKey(value));\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\nconst BufferFromRawAccountData = coerce(instance(node_modules_buffer.Buffer), RawAccountDataResult, value => node_modules_buffer.Buffer.from(value[0], 'base64'));\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nconst BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\n\n/** @internal */\n/** @internal */\n/** @internal */\n/** @internal */\n\n/** @internal */\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\n\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\n\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\n\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\n\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\n\n/**\n * @internal\n */\n\n/**\n * Extra contextual information for RPC responses\n */\n\n/**\n * Options for sending transactions\n */\n\n/**\n * Options for confirming transactions\n */\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\n\n/**\n * Options for getSignaturesForAddress\n */\n\n/**\n * RPC Response with extra contextual information\n */\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\n\n/**\n * This type represents all transaction confirmation strategies\n */\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(commitmentOrConfig) {\n let commitment;\n let config;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {\n commitment: specifiedCommitment,\n ...specifiedConfig\n } = commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {\n commitment,\n config\n };\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result) {\n return union([type({\n jsonrpc: literal('2.0'),\n id: string(),\n result\n }), type({\n jsonrpc: literal('2.0'),\n id: string(),\n error: type({\n code: unknown(),\n message: string(),\n data: optional(any())\n })\n })]);\n}\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema)\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value) {\n return jsonRpcResult(type({\n context: type({\n slot: number()\n }),\n value\n }));\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value) {\n return type({\n context: type({\n slot: number()\n }),\n value\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(version, response) {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(accountKey => new PublicKey(accountKey)),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58_default().decode(ix.data)\n })),\n addressTableLookups: response.addressTableLookups\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\n\n// Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\n\n/**\n * Configuration object for changing query behavior\n */\n\n/**\n * Information describing a cluster node\n */\n\n/**\n * Information describing a vote account\n */\n\n/**\n * A collection of cluster vote accounts\n */\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\n\nconst GetInflationGovernorResult = type({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number()\n});\n\n/**\n * The inflation reward for an epoch\n */\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(array(nullable(type({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number()))\n}))));\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(type({\n slot: number(),\n prioritizationFee: number()\n}));\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = type({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number()\n});\n\n/**\n * Information about the current epoch\n */\n\nconst GetEpochInfoResult = type({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number())\n});\nconst GetEpochScheduleResult = type({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: dist_boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number()\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([type({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = type({\n err: TransactionErrorResult\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\n\nconst VersionResult = type({\n 'solana-core': string(),\n 'feature-set': optional(number())\n});\nconst ParsedInstructionStruct = type({\n program: string(),\n programId: PublicKeyFromString,\n parsed: unknown()\n});\nconst PartiallyDecodedInstructionStruct = type({\n programId: PublicKeyFromString,\n accounts: array(PublicKeyFromString),\n data: string()\n});\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({\n err: nullable(union([type({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(nullable(array(nullable(type({\n executable: dist_boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number())\n }))))),\n unitsConsumed: optional(number()),\n returnData: optional(nullable(type({\n programId: string(),\n data: tuple([string(), literal('base64')])\n }))),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(union([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))\n }))))\n}));\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\n\n/**\n * A processed transaction from the RPC API\n */\n\n/**\n * A processed transaction from the RPC API\n */\n\n/**\n * A processed transaction message from the RPC API\n */\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0.\n */\n\n/**\n * A partially decoded transaction instruction\n */\n\n/**\n * A parsed transaction message account\n */\n\n/**\n * A parsed transaction instruction\n */\n\n/**\n * A parsed address table lookup\n */\n\n/**\n * A parsed transaction message\n */\n\n/**\n * A parsed transaction\n */\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\n\n/**\n * A parsed transaction on the ledger with meta\n */\n\n/**\n * A processed block fetched from the RPC API\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\n\n/**\n * A block with parsed transactions\n */\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\n\n/**\n * A processed block fetched from the RPC API\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0.\n */\n\n/**\n * A Block on the ledger with signatures only\n */\n\n/**\n * recent block production information\n */\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(type({\n byIdentity: record(string(), array(number())),\n range: type({\n firstSlot: number(),\n lastSlot: number()\n })\n}));\n\n/**\n * A performance sample\n */\n\nfunction createRpcClient(url, httpHeaders, customFetch, fetchMiddleware, disableRetryOnRateLimit, httpAgent) {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent;\n {\n if (httpAgent != null) {\n console.warn('You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' + 'It has been ignored; `httpAgent` is only used in Node environments.');\n }\n }\n let fetchWithMiddleware;\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise((resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) => resolve([modifiedInfo, modifiedInit]));\n } catch (error) {\n reject(error);\n }\n });\n return await fetch(...modifiedFetchArgs);\n };\n }\n const clientBrowser = new (browser_default())(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign({\n 'Content-Type': 'application/json'\n }, httpHeaders || {}, COMMON_HTTP_HEADERS)\n };\n try {\n let too_many_requests_retries = 5;\n let res;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.error(`Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`);\n await sleep(waitTime);\n waitTime *= 2;\n }\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n return clientBrowser;\n}\nfunction createRpcRequest(client) {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err, response) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\nfunction createRpcBatchRequest(client) {\n return requests => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n const batch = requests.map(params => {\n return client.request(params.methodName, params.args);\n });\n client.request(batch, (err, response) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(type({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString)\n}));\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = type({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n});\n\n/**\n * Token address and balance.\n */\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(array(type({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n})));\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: dist_boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n })\n})));\nconst ParsedAccountDataResult = type({\n program: string(),\n parsed: unknown(),\n space: number()\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: dist_boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number()\n })\n})));\n\n/**\n * Pair of an account address and its balance\n */\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(array(type({\n lamports: number(),\n address: PublicKeyFromString\n})));\n\n/**\n * @internal\n */\nconst AccountInfoResult = type({\n executable: dist_boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n});\nconst ParsedOrRawAccountData = coerce(union([instance(node_modules_buffer.Buffer), ParsedAccountDataResult]), union([RawAccountDataResult, ParsedAccountDataResult]), value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n});\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = type({\n executable: dist_boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number()\n});\nconst KeyedParsedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = type({\n state: union([literal('active'), literal('inactive'), literal('activating'), literal('deactivating')]),\n active: number(),\n inactive: number()\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n})));\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n})));\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult)\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult)\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = type({\n parent: number(),\n slot: number(),\n root: number()\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = type({\n subscription: number(),\n result: SlotInfoResult\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([type({\n type: union([literal('firstShredReceived'), literal('completed'), literal('optimisticConfirmation'), literal('root')]),\n slot: number(),\n timestamp: number()\n}), type({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number()\n}), type({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: type({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number()\n })\n}), type({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string()\n})]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = type({\n subscription: number(),\n result: SlotUpdateResult\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(union([SignatureStatusResult, SignatureReceivedResult]))\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = type({\n subscription: number(),\n result: number()\n});\nconst ContactInfoResult = type({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string())\n});\nconst VoteAccountInfoResult = type({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: dist_boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number())\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(type({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult)\n}));\nconst ConfirmationStatus = union([literal('processed'), literal('confirmed'), literal('finalized')]);\nconst SignatureStatusResponse = type({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus)\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(array(nullable(SignatureStatusResponse)));\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\nconst AddressTableLookupStruct = type({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number())\n});\nconst ConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(string()),\n header: type({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number()\n }),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n })),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct))\n })\n});\nconst AnnotatedAccountKey = type({\n pubkey: PublicKeyFromString,\n signer: dist_boolean(),\n writable: dist_boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')]))\n});\nconst ConfirmedTransactionAccountsModeResult = type({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string())\n});\nconst ParsedInstructionResult = type({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString\n});\nconst RawInstructionResult = type({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString\n});\nconst InstructionResult = union([RawInstructionResult, ParsedInstructionResult]);\nconst UnknownInstructionResult = union([type({\n parsed: unknown(),\n program: string(),\n programId: string()\n}), type({\n accounts: array(string()),\n data: string(),\n programId: string()\n})]);\nconst ParsedOrRawInstruction = coerce(InstructionResult, UnknownInstructionResult, value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct)))\n })\n});\nconst TokenBalanceResult = type({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n uiTokenAmount: TokenAmountResult\n});\nconst LoadedAddressesResult = type({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString)\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n }))\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number())\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(ParsedOrRawInstruction)\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number())\n});\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = type({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number()))\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n})));\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number())\n})));\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number())\n})));\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n meta: nullable(ConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct)\n})));\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct)\n})));\n\n/**\n * Expected JSON RPC response for the \"getRecentBlockhash\" message\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.\n */\nconst GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(type({\n blockhash: string(),\n feeCalculator: type({\n lamportsPerSignature: number()\n })\n}));\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(type({\n blockhash: string(),\n lastValidBlockHeight: number()\n}));\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(dist_boolean());\nconst PerfSampleResult = type({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number()\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(array(PerfSampleResult));\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(nullable(type({\n feeCalculator: type({\n lamportsPerSignature: number()\n })\n})));\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\n\n/**\n * Parsed account data\n */\n\n/**\n * Stake Activation data\n */\n\n/**\n * Data slice argument for getProgramAccounts\n */\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\n\n/**\n * A filter object for getProgramAccounts\n */\n\n/**\n * Configuration object for getProgramAccounts requests\n */\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\n\n/**\n * Configuration object for getMultipleAccounts\n */\n\n/**\n * Configuration object for `getStakeActivation`\n */\n\n/**\n * Configuration object for `getStakeActivation`\n */\n\n/**\n * Configuration object for `getStakeActivation`\n */\n\n/**\n * Configuration object for `getNonce`\n */\n\n/**\n * Configuration object for `getNonceAndContext`\n */\n\n/**\n * Information describing an account\n */\n\n/**\n * Account information identified by pubkey\n */\n\n/**\n * Callback function for account change notifications\n */\n\n/**\n * Callback function for program account change notifications\n */\n\n/**\n * Callback function for slot change notifications\n */\n\n/**\n * Callback function for slot update notifications\n */\n\n/**\n * Callback function for signature status notifications\n */\n\n/**\n * Signature status notification with transaction result\n */\n\n/**\n * Signature received notification\n */\n\n/**\n * Callback function for signature notifications\n */\n\n/**\n * Signature subscription options\n */\n\n/**\n * Callback function for root change notifications\n */\n\n/**\n * @internal\n */\nconst LogsResult = type({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string()\n});\n\n/**\n * Logs result.\n */\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = type({\n result: notificationResultAndContext(LogsResult),\n subscription: number()\n});\n\n/**\n * Filter for log subscriptions.\n */\n\n/**\n * Callback function for log notifications.\n */\n\n/**\n * Signature result\n */\n\n/**\n * Transaction error\n */\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\n\n/**\n * Signature status\n */\n\n/**\n * A confirmed signature with its status\n */\n\n/**\n * An object defining headers to be passed to the RPC server\n */\n\n/**\n * The type of the JavaScript `fetch()` API\n */\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\n\n/**\n * Configuration for instantiating a Connection\n */\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${\"0.0.0-development\" }`\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nclass Connection {\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(endpoint, _commitmentOrConfig) {\n /** @internal */\n this._commitment = void 0;\n /** @internal */\n this._confirmTransactionInitialTimeout = void 0;\n /** @internal */\n this._rpcEndpoint = void 0;\n /** @internal */\n this._rpcWsEndpoint = void 0;\n /** @internal */\n this._rpcClient = void 0;\n /** @internal */\n this._rpcRequest = void 0;\n /** @internal */\n this._rpcBatchRequest = void 0;\n /** @internal */\n this._rpcWebSocket = void 0;\n /** @internal */\n this._rpcWebSocketConnected = false;\n /** @internal */\n this._rpcWebSocketHeartbeat = null;\n /** @internal */\n this._rpcWebSocketIdleTimeout = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */\n this._rpcWebSocketGeneration = 0;\n /** @internal */\n this._disableBlockhashCaching = false;\n /** @internal */\n this._pollingBlockhash = false;\n /** @internal */\n this._blockhashInfo = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: []\n };\n /** @internal */\n this._nextClientSubscriptionId = 0;\n /** @internal */\n this._subscriptionDisposeFunctionsByClientSubscriptionId = {};\n /** @internal */\n this._subscriptionHashByClientSubscriptionId = {};\n /** @internal */\n this._subscriptionStateChangeCallbacksByHash = {};\n /** @internal */\n this._subscriptionCallbacksByServerSubscriptionId = {};\n /** @internal */\n this._subscriptionsByHash = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */\n this._subscriptionsAutoDisposedByRpc = new Set();\n /*\n * Returns the current block height of the node\n */\n this.getBlockHeight = (() => {\n const requestPromises = {};\n return async commitmentOrConfig => {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const requestHash = fastStableStringify$1(args);\n requestPromises[requestHash] = requestPromises[requestHash] ?? (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block height information');\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (_commitmentOrConfig && typeof _commitmentOrConfig === 'string') {\n this._commitment = _commitmentOrConfig;\n } else if (_commitmentOrConfig) {\n this._commitment = _commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout = _commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = _commitmentOrConfig.wsEndpoint;\n httpHeaders = _commitmentOrConfig.httpHeaders;\n fetch = _commitmentOrConfig.fetch;\n fetchMiddleware = _commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = _commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = _commitmentOrConfig.httpAgent;\n }\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n this._rpcClient = createRpcClient(endpoint, httpHeaders, fetch, fetchMiddleware, disableRetryOnRateLimit, httpAgent);\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on('accountNotification', this._wsOnAccountNotification.bind(this));\n this._rpcWebSocket.on('programNotification', this._wsOnProgramAccountNotification.bind(this));\n this._rpcWebSocket.on('slotNotification', this._wsOnSlotNotification.bind(this));\n this._rpcWebSocket.on('slotsUpdatesNotification', this._wsOnSlotUpdatesNotification.bind(this));\n this._rpcWebSocket.on('signatureNotification', this._wsOnSignatureNotification.bind(this));\n this._rpcWebSocket.on('rootNotification', this._wsOnRootNotification.bind(this));\n this._rpcWebSocket.on('logsNotification', this._wsOnLogsNotification.bind(this));\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment() {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint() {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(publicKey, commitmentOrConfig) {\n /** @internal */\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get balance for ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(publicKey, commitmentOrConfig) {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig).then(x => x.value).catch(e => {\n throw new Error('failed to get balance of account ' + publicKey.toBase58() + ': ' + e);\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot) {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get block time for slot ${slot}`);\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot() {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get minimum ledger slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock() {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get first available block');\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(config) {\n let configArg = {};\n if (typeof config === 'string') {\n configArg = {\n commitment: config\n };\n } else if (config) {\n configArg = {\n ...config,\n commitment: config && config.commitment || this.commitment\n };\n } else {\n configArg = {\n commitment: this.commitment\n };\n }\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(tokenMintAddress, commitment) {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(tokenAddress, commitment) {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token account balance');\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(ownerAddress, filter, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n let _args = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({\n mint: filter.mint.toBase58()\n });\n } else {\n _args.push({\n programId: filter.programId.toBase58()\n });\n }\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(ownerAddress, filter, commitment) {\n let _args = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({\n mint: filter.mint.toBase58()\n });\n } else {\n _args.push({\n programId: filter.programId.toBase58()\n });\n }\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(config) {\n const arg = {\n ...config,\n commitment: config && config.commitment || this.commitment\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(mintAddress, commitment) {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(publicKey, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(AccountInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(publicKey, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(publicKey, commitmentOrConfig) {\n try {\n const res = await this.getAccountInfoAndContext(publicKey, commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get info about account ' + publicKey.toBase58() + ': ' + e);\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(publicKeys, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(AccountInfoResult))));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(publicKeys, commitmentOrConfig) {\n const res = await this.getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig);\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n *\n * @deprecated Deprecated since RPC v1.18; will be removed in a future version.\n */\n async getStakeActivation(publicKey, commitmentOrConfig, epoch) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment, undefined /* encoding */, {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch\n });\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get Stake Activation ${publicKey.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(programId, configOrCommitment) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(configOrCommitment);\n const {\n encoding,\n ...configWithoutEncoding\n } = config || {};\n const args = this._buildArgs([programId.toBase58()], commitment, encoding || 'base64', configWithoutEncoding);\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res = configWithoutEncoding.withContext === true ? create(unsafeRes, jsonRpcResultAndContext(baseSchema)) : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(programId, configOrCommitment) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs([programId.toBase58()], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(unsafeRes, jsonRpcResult(array(KeyedParsedAccountInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);\n }\n return res.result;\n }\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(strategy, commitment) {\n let rawSignature;\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy;\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n let decodedSignature;\n try {\n decodedSignature = bs58_default().decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n index_browser_esm_assert(decodedSignature.length === 64, 'signature has invalid length');\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy\n });\n }\n }\n getCancellationPromise(signal) {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n getTransactionConfirmationPromise({\n commitment,\n signature\n }) {\n let signatureSubscriptionId;\n let disposeSignatureSubscriptionStateChangeObserver;\n let done = false;\n const confirmationPromise = new Promise((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(signature, (result, context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result\n };\n resolve({\n __type: TransactionStatus.PROCESSED,\n response\n });\n }, commitment);\n const subscriptionSetupPromise = new Promise(resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver = this._onSubscriptionStateChange(signatureSubscriptionId, nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n });\n }\n });\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {\n context,\n value\n } = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root':\n {\n if (value.confirmationStatus === 'processed' || value.confirmationStatus === 'confirmed') {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value\n }\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {\n abortConfirmation,\n confirmationPromise\n };\n }\n async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {\n abortSignal,\n lastValidBlockHeight,\n signature\n }\n }) {\n let done = false;\n const expiryPromise = new Promise(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED\n });\n })();\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature\n });\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result;\n try {\n const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature\n }\n }) {\n let done = false;\n const expiryPromise = new Promise(resolve => {\n let currentNonceValue = nonceValue;\n let lastCheckedSlot = null;\n const getCurrentNonceValue = async () => {\n try {\n const {\n context,\n value: nonceAccount\n } = await this.getNonceAndContext(nonceAccountPubkey, {\n commitment,\n minContextSlot\n });\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature\n });\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result;\n try {\n const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus;\n while (true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (status.context.slot < (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {\n confirmationStatus\n } = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (confirmationStatus !== 'processed' && confirmationStatus !== 'confirmed' && confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (confirmationStatus !== 'confirmed' && confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n (_ => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {\n err: signatureStatus.value.err\n }\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature\n }) {\n let timeoutId;\n const expiryPromise = new Promise(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip':\n {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n }\n timeoutId = setTimeout(() => resolve({\n __type: TransactionStatus.TIMED_OUT,\n timeoutMs\n }), timeoutMs);\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature\n });\n let result;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(signature, outcome.timeoutMs / 1000);\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes() {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(startSlot, limit) {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(signature, config) {\n const {\n context,\n value: values\n } = await this.getSignatureStatuses([signature], config);\n index_browser_esm_assert(values.length === 1);\n const value = values[0];\n return {\n context,\n value\n };\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(signatures, config) {\n const params = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction count');\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since RPC v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment) {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(addresses, epoch, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([addresses.map(pubkey => pubkey.toBase58())], commitment, undefined /* encoding */, {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch\n });\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate() {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule() {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(epochSchedule.slotsPerEpoch, epochSchedule.leaderScheduleSlotOffset, epochSchedule.warmup, epochSchedule.firstNormalEpoch, epochSchedule.firstNormalSlot);\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule() {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(dataLength, commitment) {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest('getMinimumBalanceForRentExemption', args);\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getRecentBlockhash', args);\n const res = create(unsafeRes, GetRecentBlockhashAndContextRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(limit) {\n const unsafeRes = await this._rpcRequest('getRecentPerformanceSamples', limit ? [limit] : []);\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent performance samples');\n }\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(blockhash, commitment) {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest('getFeeCalculatorForBlockhash', args);\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {\n context,\n value\n } = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(message, commitment) {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(config) {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest('getRecentPrioritizationFees', args);\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get recent prioritization fees');\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(commitment) {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(commitmentOrConfig) {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(blockhash, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs([blockhash], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to determine if the blockhash `' + blockhash + '`is valid');\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion() {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash() {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(slot, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts':\n {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none':\n {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default:\n {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {\n result\n } = res;\n return result ? {\n ...result,\n transactions: result.transactions.map(({\n transaction,\n meta,\n version\n }) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(version, transaction.message)\n },\n version\n }))\n } : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e, 'failed to get confirmed block');\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(slot, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts':\n {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none':\n {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default:\n {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e, 'failed to get block');\n }\n }\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(configOrCommitment) {\n let extra;\n let commitment;\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {\n commitment: c,\n ...rest\n } = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block production information');\n }\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(signature, rawConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, undefined /* encoding */, config);\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n const result = res.result;\n if (!result) return result;\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(result.version, result.transaction.message)\n }\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(signature, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(signatures, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed', config);\n return {\n methodName: 'getTransaction',\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map(unsafeRes => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(signatures, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, undefined /* encoding */, config);\n return {\n methodName: 'getTransaction',\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map(unsafeRes => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(result.version, result.transaction.message)\n }\n };\n });\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n const block = {\n ...result,\n transactions: result.transactions.map(({\n transaction,\n meta\n }) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message\n }\n };\n })\n };\n return {\n ...block,\n transactions: block.transactions.map(({\n transaction,\n meta\n }) => {\n return {\n meta,\n transaction: Transaction.populate(transaction.message, transaction.signatures)\n };\n })\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(startSlot, endSlot, commitment) {\n const args = this._buildArgsAtLeastConfirmed(endSlot !== undefined ? [startSlot, endSlot] : [startSlot], commitment);\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined, {\n transactionDetails: 'signatures',\n rewards: false\n });\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined, {\n transactionDetails: 'signatures',\n rewards: false\n });\n const unsafeRes = await this._rpcRequest('getConfirmedBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(signature, commitment) {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n const result = res.result;\n if (!result) return result;\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures)\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(signature, commitment) {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getConfirmedTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(signatures, commitment) {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed');\n return {\n methodName: 'getConfirmedTransaction',\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map(unsafeRes => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed transactions');\n }\n return res.result;\n });\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since RPC v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(address, startSlot, endSlot) {\n let options = {};\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n try {\n const block = await this.getConfirmedBlockSignatures(startSlot, 'finalized');\n if (block.signatures.length > 0) {\n options.until = block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before = block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(address, options);\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getSignaturesForAddress} instead.\n */\n async getConfirmedSignaturesForAddress2(address, options, commitment) {\n const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);\n const unsafeRes = await this._rpcRequest('getConfirmedSignaturesForAddress2', args);\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed signatures for address');\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(address, options, commitment) {\n const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signatures for address');\n }\n return res.result;\n }\n async getAddressLookupTable(accountKey, config) {\n const {\n context,\n value: accountInfo\n } = await this.getAccountInfoAndContext(accountKey, config);\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data)\n });\n }\n return {\n context,\n value\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(nonceAccount, commitmentOrConfig) {\n const {\n context,\n value: accountInfo\n } = await this.getAccountInfoAndContext(nonceAccount, commitmentOrConfig);\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n return {\n context,\n value\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(nonceAccount, commitmentOrConfig) {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig).then(x => x.value).catch(e => {\n throw new Error('failed to get nonce for account ' + nonceAccount.toBase58() + ': ' + e);\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(to, lamports) {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [to.toBase58(), lamports]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `airdrop to ${to.toBase58()} failed`);\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(disableCache) {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash() {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash ? cachedLatestBlockhash.blockhash : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: []\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n throw new Error(`Unable to obtain a new blockhash after ${Date.now() - startTime}ms`);\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(config) {\n const {\n commitment,\n config: configArg\n } = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get stake minimum delegation`);\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(transactionOrMessage, configOrSigners, includeAccounts) {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction = node_modules_buffer.Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n const config = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n if (configOrSigners && typeof configOrSigners === 'object' && 'innerInstructions' in configOrSigners) {\n config.innerInstructions = configOrSigners.innerInstructions;\n }\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n if (!signers) break;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.simulatedSignatures.includes(signature) && !this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config = {\n encoding: 'base64',\n commitment: this.commitment\n };\n if (includeAccounts) {\n const addresses = (Array.isArray(includeAccounts) ? includeAccounts : message.nonProgramIds()).map(key => key.toBase58());\n config['accounts'] = {\n encoding: 'base64',\n addresses\n };\n }\n if (signers) {\n config.sigVerify = true;\n }\n if (configOrSigners && typeof configOrSigners === 'object' && 'innerInstructions' in configOrSigners) {\n config.innerInstructions = configOrSigners.innerInstructions;\n }\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError({\n action: 'simulate',\n signature: '',\n transactionMessage: res.error.message,\n logs: logs\n });\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(transaction, signersOrOptions, options) {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(rawTransaction, options) {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(encodedTransaction, options);\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(encodedTransaction, options) {\n const config = {\n encoding: 'base64'\n };\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment = skipPreflight === true ? 'processed' // FIXME Remove when https://github.com/anza-xyz/agave/pull/483 is deployed.\n : options && options.preflightCommitment || this.commitment;\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs = undefined;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError({\n action: skipPreflight ? 'send' : 'simulate',\n signature: '',\n transactionMessage: res.error.message,\n logs: logs\n });\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration = (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(this._subscriptionsByHash).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending'\n });\n });\n }\n\n /**\n * @internal\n */\n _setSubscription(hash, nextSubscription) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n _onSubscriptionStateChange(clientSubscriptionId, callback) {\n const hash = this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash] ||= new Set();\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(`Error when closing socket connection: ${err.message}`);\n }\n }\n }, 500);\n }\n return;\n }\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[subscription.serverSubscriptionId];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {\n args,\n method\n } = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing'\n });\n const serverSubscriptionId = await this._rpcWebSocket.call(method, args);\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed'\n });\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${method} error for argument`, args, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending'\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {\n serverSubscriptionId,\n unsubscribeMethod\n } = subscription;\n if (this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(serverSubscriptionId);\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing'\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing'\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [serverSubscriptionId]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed'\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed'\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n }\n }));\n }\n\n /**\n * @internal\n */\n _handleServerNotification(serverSubscriptionId, callbackArgs) {\n const callbacks = this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs);\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, AccountNotificationResult);\n this._handleServerNotification(subscription, [result.value, result.context]);\n }\n\n /**\n * @internal\n */\n _makeSubscription(subscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args) {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify$1([subscriptionConfig.method, args]);\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending'\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n index_browser_esm_assert(subscription !== undefined, `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`);\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n\n /** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n onAccountChange(publicKey, callback, commitmentOrConfig) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey.toBase58()], commitment || this._commitment || 'finalized',\n // Apply connection/server default.\n 'base64', config);\n return this._makeSubscription({\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe'\n }, args);\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeAccountChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'account change');\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, ProgramAccountNotificationResult);\n this._handleServerNotification(subscription, [{\n accountId: result.value.pubkey,\n accountInfo: result.value.account\n }, result.context]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n\n /** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n\n // eslint-disable-next-line no-dupe-class-members\n onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {\n const {\n commitment,\n config\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',\n // Apply connection/server default.\n 'base64' /* encoding */, config ? config : maybeFilters ? {\n filters: maybeFilters\n } : undefined /* extra */);\n return this._makeSubscription({\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe'\n }, args);\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeProgramAccountChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'program account change');\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(filter, callback, commitment) {\n const args = this._buildArgs([typeof filter === 'object' ? {\n mentions: [filter.toString()]\n } : filter], commitment || this._commitment || 'finalized' // Apply connection/server default.\n );\n return this._makeSubscription({\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe'\n }, args);\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param clientSubscriptionId client subscription id to deregister.\n */\n async removeOnLogsListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [result.value, result.context]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback) {\n return this._makeSubscription({\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe'\n }, [] /* args */);\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'slot change');\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, SlotUpdateNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback) {\n return this._makeSubscription({\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe'\n }, [] /* args */);\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotUpdateListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'slot update');\n }\n\n /**\n * @internal\n */\n\n async _unsubscribeClientSubscription(clientSubscriptionId, subscriptionName) {\n const dispose = this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];\n if (dispose) {\n await dispose();\n } else {\n console.warn('Ignored unsubscribe request because an active subscription with id ' + `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` + 'could not be found.');\n }\n }\n _buildArgs(args, override, encoding, extra) {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(args, override, encoding, extra) {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error('Using Connection with default commitment: `' + this._commitment + '`, but method requires at least `confirmed`');\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, SignatureNotificationResult);\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(subscription, result.value === 'receivedSignature' ? [{\n type: 'received'\n }, result.context] : [{\n type: 'status',\n result: result.value\n }, result.context]);\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(signature, callback, commitment) {\n const args = this._buildArgs([signature], commitment || this._commitment || 'finalized' // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription({\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe'\n }, args);\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(signature, callback, options) {\n const {\n commitment,\n ...extra\n } = {\n ...options,\n commitment: options && options.commitment || this._commitment || 'finalized' // Apply connection/server default.\n };\n const args = this._buildArgs([signature], commitment, undefined /* encoding */, extra);\n const clientSubscriptionId = this._makeSubscription({\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe'\n }, args);\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSignatureListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'signature result');\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification) {\n const {\n result,\n subscription\n } = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback) {\n return this._makeSubscription({\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe'\n }, [] /* args */);\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeRootChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'root change');\n }\n}\n\n/**\n * Keypair signer interface\n */\n\n/**\n * An account keypair used for signing transactions.\n */\nclass Keypair {\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair) {\n this._keypair = void 0;\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate() {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(secretKey, options) {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({\n publicKey,\n secretKey\n });\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed) {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({\n publicKey,\n secretKey\n });\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey() {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey() {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nconst LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: Layout.struct([Layout.u32('instruction'), index_browser_esm_u64('recentSlot'), Layout.u8('bumpSeed')])\n },\n FreezeLookupTable: {\n index: 1,\n layout: Layout.struct([Layout.u32('instruction')])\n },\n ExtendLookupTable: {\n index: 2,\n layout: Layout.struct([Layout.u32('instruction'), index_browser_esm_u64(), Layout.seq(publicKey(), Layout.offset(Layout.u32(), -8), 'addresses')])\n },\n DeactivateLookupTable: {\n index: 3,\n layout: Layout.struct([Layout.u32('instruction')])\n },\n CloseLookupTable: {\n index: 4,\n layout: Layout.struct([Layout.u32('instruction')])\n }\n});\nclass AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = Layout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [layoutType, layout] of Object.entries(LOOKUP_TABLE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == index) {\n type = layoutType;\n break;\n }\n }\n if (!type) {\n throw new Error('Invalid Instruction. Should be a LookupTable Instruction');\n }\n return type;\n }\n static decodeCreateLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n const {\n recentSlot\n } = decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable, instruction.data);\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot)\n };\n }\n static decodeExtendLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(`invalid instruction; found ${instruction.keys.length} keys, expected at least 2`);\n }\n const {\n addresses\n } = decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable, instruction.data);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer))\n };\n }\n static decodeCloseLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey\n };\n }\n static decodeFreezeLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey\n };\n }\n static decodeDeactivateLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error('invalid instruction; programId is not AddressLookupTable Program');\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\nclass AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n static createLookupTable(params) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), (0,browser.toBufferLE)(BigInt(params.recentSlot), 8)], this.programId);\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed\n });\n const keys = [{\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n }];\n return [new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n }), lookupTableAddress];\n }\n static freezeLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n static extendLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes())\n });\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n if (params.payer) {\n keys.push({\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n static deactivateLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n static closeLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data\n });\n }\n}\nAddressLookupTableProgram.programId = new PublicKey('AddressLookupTab1e1111111111111111111111111');\n\n/**\n * Compute Budget Instruction class\n */\nclass ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = Layout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a ComputeBudgetInstruction');\n }\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n units,\n additionalFee\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits, instruction.data);\n return {\n units,\n additionalFee\n };\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n bytes\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame, instruction.data);\n return {\n bytes\n };\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n units\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit, instruction.data);\n return {\n units\n };\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n microLamports\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice, instruction.data);\n return {\n microLamports\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error('invalid instruction; programId is not ComputeBudgetProgram');\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\n\n/**\n * Request units instruction params\n */\n\n/**\n * Request heap frame instruction params\n */\n\n/**\n * Set compute unit limit instruction params\n */\n\n/**\n * Set compute unit price instruction params\n */\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nconst COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze({\n RequestUnits: {\n index: 0,\n layout: Layout.struct([Layout.u8('instruction'), Layout.u32('units'), Layout.u32('additionalFee')])\n },\n RequestHeapFrame: {\n index: 1,\n layout: Layout.struct([Layout.u8('instruction'), Layout.u32('bytes')])\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: Layout.struct([Layout.u8('instruction'), Layout.u32('units')])\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: Layout.struct([Layout.u8('instruction'), index_browser_esm_u64('microLamports')])\n }\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nclass ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static requestHeapFrame(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitLimit(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitPrice(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports)\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n}\nComputeBudgetProgram.programId = new PublicKey('ComputeBudget111111111111111111111111111111');\n\nconst PRIVATE_KEY_BYTES$1 = 64;\nconst PUBLIC_KEY_BYTES$1 = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\n\nconst ED25519_INSTRUCTION_LAYOUT = Layout.struct([Layout.u8('numSignatures'), Layout.u8('padding'), Layout.u16('signatureOffset'), Layout.u16('signatureInstructionIndex'), Layout.u16('publicKeyOffset'), Layout.u16('publicKeyInstructionIndex'), Layout.u16('messageDataOffset'), Layout.u16('messageDataSize'), Layout.u16('messageInstructionIndex')]);\nclass Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey,\n message,\n signature,\n instructionIndex\n } = params;\n index_browser_esm_assert(publicKey.length === PUBLIC_KEY_BYTES$1, `Public Key must be ${PUBLIC_KEY_BYTES$1} bytes but received ${publicKey.length} bytes`);\n index_browser_esm_assert(signature.length === SIGNATURE_BYTES, `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`);\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n const instructionData = node_modules_buffer.Buffer.alloc(messageDataOffset + message.length);\n const index = instructionIndex == null ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n ED25519_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index\n }, instructionData);\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey,\n message,\n instructionIndex\n } = params;\n index_browser_esm_assert(privateKey.length === PRIVATE_KEY_BYTES$1, `Private key must be ${PRIVATE_KEY_BYTES$1} bytes but received ${privateKey.length} bytes`);\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\nEd25519Program.programId = new PublicKey('Ed25519SigVerify111111111111111111111111111');\n\nconst ecdsaSign = (msgHash, privKey) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery];\n};\nsecp256k1.utils.isValidPrivateKey;\nconst publicKeyCreate = secp256k1.getPublicKey;\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\n\nconst SECP256K1_INSTRUCTION_LAYOUT = Layout.struct([Layout.u8('numSignatures'), Layout.u16('signatureOffset'), Layout.u8('signatureInstructionIndex'), Layout.u16('ethAddressOffset'), Layout.u8('ethAddressInstructionIndex'), Layout.u16('messageDataOffset'), Layout.u16('messageDataSize'), Layout.u8('messageInstructionIndex'), Layout.blob(20, 'ethAddress'), Layout.blob(64, 'signature'), Layout.u8('recoveryId')]);\nclass Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(publicKey) {\n index_browser_esm_assert(publicKey.length === PUBLIC_KEY_BYTES, `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`);\n try {\n return node_modules_buffer.Buffer.from(keccak_256(toBuffer(publicKey))).slice(-ETHEREUM_ADDRESS_BYTES);\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex\n } = params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(params) {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0\n } = params;\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = node_modules_buffer.Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = node_modules_buffer.Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n index_browser_esm_assert(ethAddress.length === ETHEREUM_ADDRESS_BYTES, `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`);\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n const instructionData = node_modules_buffer.Buffer.alloc(SECP256K1_INSTRUCTION_LAYOUT.span + message.length);\n SECP256K1_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId\n }, instructionData);\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey: pkey,\n message,\n instructionIndex\n } = params;\n index_browser_esm_assert(pkey.length === PRIVATE_KEY_BYTES, `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`);\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(privateKey, false /* isCompressed */).slice(1); // throw away leading byte\n const messageHash = node_modules_buffer.Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\nSecp256k1Program.programId = new PublicKey('KeccakSecp256k11111111111111111111111111111');\n\nvar _Lockup;\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nconst STAKE_CONFIG_ID = new PublicKey('StakeConfig11111111111111111111111111111111');\n\n/**\n * Stake account authority info\n */\nclass Authorized {\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker, withdrawer) {\n /** stake authority */\n this.staker = void 0;\n /** withdraw authority */\n this.withdrawer = void 0;\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n/**\n * Stake account lockup info\n */\nclass Lockup {\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp, epoch, custodian) {\n /** Unix timestamp of lockup expiration */\n this.unixTimestamp = void 0;\n /** Epoch of lockup expiration */\n this.epoch = void 0;\n /** Lockup custodian authority */\n this.custodian = void 0;\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n}\n_Lockup = Lockup;\nLockup.default = new _Lockup(0, 0, PublicKey.default);\n/**\n * Create stake account transaction params\n */\n/**\n * Create stake account with seed transaction params\n */\n/**\n * Initialize stake instruction params\n */\n/**\n * Delegate stake instruction params\n */\n/**\n * Authorize stake instruction params\n */\n/**\n * Authorize stake instruction params using a derived key\n */\n/**\n * Split stake instruction params\n */\n/**\n * Split with seed transaction params\n */\n/**\n * Withdraw stake instruction params\n */\n/**\n * Deactivate stake instruction params\n */\n/**\n * Merge stake instruction params\n */\n/**\n * Stake Instruction class\n */\nclass StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = Layout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n authorized,\n lockup\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Initialize, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(new PublicKey(authorized.staker), new PublicKey(authorized.withdrawer)),\n lockup: new Lockup(lockup.unixTimestamp, lockup.epoch, new PublicKey(lockup.custodian))\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n newAuthorized,\n stakeAuthorizationType\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Authorize, instruction.data);\n const o = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType\n }\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed, instruction.data);\n const o = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType\n }\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Split, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {\n lamports\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Withdraw, instruction.data);\n const o = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nconst STAKE_INSTRUCTION_LAYOUTS = Object.freeze({\n Initialize: {\n index: 0,\n layout: Layout.struct([Layout.u32('instruction'), authorized(), lockup()])\n },\n Authorize: {\n index: 1,\n layout: Layout.struct([Layout.u32('instruction'), publicKey('newAuthorized'), Layout.u32('stakeAuthorizationType')])\n },\n Delegate: {\n index: 2,\n layout: Layout.struct([Layout.u32('instruction')])\n },\n Split: {\n index: 3,\n layout: Layout.struct([Layout.u32('instruction'), Layout.ns64('lamports')])\n },\n Withdraw: {\n index: 4,\n layout: Layout.struct([Layout.u32('instruction'), Layout.ns64('lamports')])\n },\n Deactivate: {\n index: 5,\n layout: Layout.struct([Layout.u32('instruction')])\n },\n Merge: {\n index: 7,\n layout: Layout.struct([Layout.u32('instruction')])\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: Layout.struct([Layout.u32('instruction'), publicKey('newAuthorized'), Layout.u32('stakeAuthorizationType'), rustString('authoritySeed'), publicKey('authorityOwner')])\n }\n});\n\n/**\n * Stake authorization type\n */\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nconst StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nclass StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params) {\n const {\n stakePubkey,\n authorized,\n lockup: maybeLockup\n } = params;\n const lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer())\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer())\n }\n });\n const instructionData = {\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized,\n lockup\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized,\n lockup\n }));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized,\n lockup\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized,\n lockup\n }));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n votePubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: votePubkey,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: STAKE_CONFIG_ID,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params) {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer())\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorityBase,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {\n lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: splitStakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params,\n // Compute the cost of allocating the new stake account in lamports\n rentExemptReserve) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: rentExemptReserve,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params,\n // If this stake account is new, compute the cost of allocating it in lamports\n rentExemptReserve) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports\n } = params;\n const transaction = new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId\n }));\n if (rentExemptReserve && rentExemptReserve > 0) {\n transaction.add(SystemProgram.transfer({\n fromPubkey: params.authorizedPubkey,\n toPubkey: splitStakePubkey,\n lamports: rentExemptReserve\n }));\n }\n return transaction.add(this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n }));\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params) {\n const {\n stakePubkey,\n sourceStakePubKey,\n authorizedPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: sourceStakePubKey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n toPubkey,\n lamports,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {\n lamports\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params) {\n const {\n stakePubkey,\n authorizedPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n}\nStakeProgram.programId = new PublicKey('Stake11111111111111111111111111111111111111');\n/**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeStateV2::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeStateV2.html\n */\nStakeProgram.space = 200;\n\n/**\n * Vote account info\n */\nclass VoteInit {\n /** [0, 100] */\n\n constructor(nodePubkey, authorizedVoter, authorizedWithdrawer, commission) {\n this.nodePubkey = void 0;\n this.authorizedVoter = void 0;\n this.authorizedWithdrawer = void 0;\n this.commission = void 0;\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\n\n/**\n * InitializeAccount instruction params\n */\n\n/**\n * Authorize instruction params\n */\n\n/**\n * AuthorizeWithSeed instruction params\n */\n\n/**\n * Withdraw from vote account transaction params\n */\n\n/**\n * Update validator identity (node pubkey) vote account instruction params.\n */\n\n/**\n * Vote Instruction class\n */\nclass VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = Layout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n const {\n voteInit\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.InitializeAccount, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(new PublicKey(voteInit.nodePubkey), new PublicKey(voteInit.authorizedVoter), new PublicKey(voteInit.authorizedWithdrawer), voteInit.commission)\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n newAuthorized,\n voteAuthorizationType\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.Authorize, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType\n }\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType\n }\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed, instruction.data);\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(currentAuthorityDerivedKeyOwnerPubkey),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType\n },\n votePubkey: instruction.keys[0].pubkey\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.Withdraw, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\n\n/** @internal */\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze({\n InitializeAccount: {\n index: 0,\n layout: Layout.struct([Layout.u32('instruction'), voteInit()])\n },\n Authorize: {\n index: 1,\n layout: Layout.struct([Layout.u32('instruction'), publicKey('newAuthorized'), Layout.u32('voteAuthorizationType')])\n },\n Withdraw: {\n index: 3,\n layout: Layout.struct([Layout.u32('instruction'), Layout.ns64('lamports')])\n },\n UpdateValidatorIdentity: {\n index: 4,\n layout: Layout.struct([Layout.u32('instruction')])\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: Layout.struct([Layout.u32('instruction'), voteAuthorizeWithSeedArgs()])\n }\n});\n\n/**\n * VoteAuthorize type\n */\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nconst VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nclass VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(params) {\n const {\n votePubkey,\n nodePubkey,\n voteInit\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(voteInit.authorizedWithdrawer.toBuffer()),\n commission: voteInit.commission\n }\n });\n const instructionData = {\n keys: [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit\n }));\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params) {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params) {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(currentAuthorityDerivedKeyOwnerPubkey.toBuffer()),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n }\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n lamports,\n toPubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {\n lamports\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(params, currentVoteAccountBalance, rentExemptMinimum) {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error('Withdraw will leave vote account with insufficient funds.');\n }\n return VoteProgram.withdraw(params);\n }\n\n /**\n * Generate a transaction to update the validator identity (node pubkey) of a Vote account.\n */\n static updateValidatorIdentity(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n nodePubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.UpdateValidatorIdentity;\n const data = encodeData(type);\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n}\nVoteProgram.programId = new PublicKey('Vote111111111111111111111111111111111111111');\n/**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\nVoteProgram.space = 3762;\n\nconst VALIDATOR_INFO_KEY = new PublicKey('Va1idator1nfo111111111111111111111111111111');\n\n/**\n * @internal\n */\n\n/**\n * Info used to identity validators.\n */\n\nconst InfoString = type({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n iconUrl: optional(string()),\n keybaseUsername: optional(string())\n});\n\n/**\n * ValidatorInfo class\n */\nclass ValidatorInfo {\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key, info) {\n /**\n * validator public key\n */\n this.key = void 0;\n /**\n * validator information\n */\n this.info = void 0;\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(buffer) {\n let byteArray = [...buffer];\n const configKeyCount = decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n const configKeys = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({\n publicKey,\n isSigner\n });\n }\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo = rustString().decode(node_modules_buffer.Buffer.from(byteArray));\n const info = JSON.parse(rawInfo);\n assert(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n return null;\n }\n}\n\nconst VOTE_PROGRAM_ID = new PublicKey('Vote111111111111111111111111111111111111111');\n\n/**\n * History of how many credits earned by the end of each epoch\n */\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = Layout.struct([publicKey('nodePubkey'), publicKey('authorizedWithdrawer'), Layout.u8('commission'), Layout.nu64(),\n// votes.length\nLayout.seq(Layout.struct([Layout.nu64('slot'), Layout.u32('confirmationCount')]), Layout.offset(Layout.u32(), -8), 'votes'), Layout.u8('rootSlotValid'), Layout.nu64('rootSlot'), Layout.nu64(),\n// authorizedVoters.length\nLayout.seq(Layout.struct([Layout.nu64('epoch'), publicKey('authorizedVoter')]), Layout.offset(Layout.u32(), -8), 'authorizedVoters'), Layout.struct([Layout.seq(Layout.struct([publicKey('authorizedPubkey'), Layout.nu64('epochOfLastAuthorizedSwitch'), Layout.nu64('targetEpoch')]), 32, 'buf'), Layout.nu64('idx'), Layout.u8('isEmpty')], 'priorVoters'), Layout.nu64(),\n// epochCredits.length\nLayout.seq(Layout.struct([Layout.nu64('epoch'), Layout.nu64('credits'), Layout.nu64('prevCredits')]), Layout.offset(Layout.u32(), -8), 'epochCredits'), Layout.struct([Layout.nu64('slot'), Layout.nu64('timestamp')], 'lastTimestamp')]);\n/**\n * VoteAccount class\n */\nclass VoteAccount {\n /**\n * @internal\n */\n constructor(args) {\n this.nodePubkey = void 0;\n this.authorizedWithdrawer = void 0;\n this.commission = void 0;\n this.rootSlot = void 0;\n this.votes = void 0;\n this.authorizedVoters = void 0;\n this.priorVoters = void 0;\n this.epochCredits = void 0;\n this.lastTimestamp = void 0;\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(buffer) {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n let rootSlot = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp\n });\n }\n}\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch\n}) {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter)\n };\n}\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch\n}) {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch\n };\n}\nfunction getPriorVoters({\n buf,\n idx,\n isEmpty\n}) {\n if (isEmpty) {\n return [];\n }\n return [...buf.slice(idx + 1).map(parsePriorVoters), ...buf.slice(0, idx).map(parsePriorVoters)];\n}\n\nconst endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/'\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/'\n }\n};\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nfunction clusterApiUrl(cluster, tls) {\n const key = tls === false ? 'http' : 'https';\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\n\n// eslint-disable-next-line no-redeclare\nasync function sendAndConfirmRawTransaction(connection, rawTransaction, confirmationStrategyOrConfirmOptions, maybeConfirmOptions) {\n let confirmationStrategy;\n let options;\n if (confirmationStrategyOrConfirmOptions && Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions, 'lastValidBlockHeight')) {\n confirmationStrategy = confirmationStrategyOrConfirmOptions;\n options = maybeConfirmOptions;\n } else if (confirmationStrategyOrConfirmOptions && Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions, 'nonceValue')) {\n confirmationStrategy = confirmationStrategyOrConfirmOptions;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot\n };\n const signature = await connection.sendRawTransaction(rawTransaction, sendOptions);\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy ? connection.confirmTransaction(confirmationStrategy, commitment) : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: sendOptions?.skipPreflight ? 'send' : 'simulate',\n signature: signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Raw transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n}\n\n/**\n * There are 1-billion lamports in one SOL\n */\nconst LAMPORTS_PER_SOL = 1000000000;\n\n\n//# sourceMappingURL=index.browser.esm.js.map\n\n\n/***/ }),\n\n/***/ 11:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar basex = __webpack_require__(8162)\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n\n\n/***/ }),\n\n/***/ 7658:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MAX_U256 = exports.MAX_U64 = exports.Rounding = exports.TEN = exports.ONE = exports.ZERO = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst jsbi_1 = tslib_1.__importDefault(__webpack_require__(9499));\n/**\n * Zero bigint.\n */\nexports.ZERO = jsbi_1.default.BigInt(0);\n/**\n * One bigint.\n */\nexports.ONE = jsbi_1.default.BigInt(1);\n/**\n * 10 bigint.\n */\nexports.TEN = jsbi_1.default.BigInt(10);\nvar Rounding;\n(function (Rounding) {\n Rounding[Rounding[\"ROUND_DOWN\"] = 0] = \"ROUND_DOWN\";\n Rounding[Rounding[\"ROUND_HALF_UP\"] = 1] = \"ROUND_HALF_UP\";\n Rounding[Rounding[\"ROUND_UP\"] = 2] = \"ROUND_UP\";\n})(Rounding = exports.Rounding || (exports.Rounding = {}));\nexports.MAX_U64 = jsbi_1.default.BigInt(\"0xffffffffffffffff\");\nexports.MAX_U256 = jsbi_1.default.BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n//# sourceMappingURL=constants.js.map\n\n/***/ }),\n\n/***/ 1762:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n/*\n * toFormat v2.0.0\n * Adds a toFormat instance method to big.js or decimal.js\n * Copyright (c) 2017 Michael Mclaughlin\n * MIT Licence\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.formatBig = exports.formatDecimal = exports.DEFAULT_DISPLAY_NUMBER_FORMAT = exports.DEFAULT_NUMBER_FORMAT = exports.toSignificantRounding = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst big_js_1 = tslib_1.__importDefault(__webpack_require__(3302));\nconst decimal_js_light_1 = tslib_1.__importDefault(__webpack_require__(9887));\nconst tiny_invariant_1 = tslib_1.__importDefault(__webpack_require__(6018));\nconst constants_js_1 = __webpack_require__(7658);\nexports.toSignificantRounding = {\n [constants_js_1.Rounding.ROUND_DOWN]: decimal_js_light_1.default.ROUND_DOWN,\n [constants_js_1.Rounding.ROUND_HALF_UP]: decimal_js_light_1.default.ROUND_HALF_UP,\n [constants_js_1.Rounding.ROUND_UP]: decimal_js_light_1.default.ROUND_UP,\n};\nconst toFixedRounding = {\n [constants_js_1.Rounding.ROUND_DOWN]: big_js_1.default.roundDown,\n [constants_js_1.Rounding.ROUND_HALF_UP]: big_js_1.default.roundHalfUp,\n [constants_js_1.Rounding.ROUND_UP]: big_js_1.default.roundUp,\n};\n/**\n * Default number format. (no grouping)\n */\nexports.DEFAULT_NUMBER_FORMAT = {\n decimalSeparator: \".\",\n groupSeparator: \"\",\n groupSize: 3,\n rounding: constants_js_1.Rounding.ROUND_DOWN,\n};\n/**\n * Default number format display.\n */\nexports.DEFAULT_DISPLAY_NUMBER_FORMAT = {\n ...exports.DEFAULT_NUMBER_FORMAT,\n groupSeparator: \",\",\n};\nconst formatNum = (num, isNegative, roundingMethod, decimalPlaces, { decimalSeparator = exports.DEFAULT_NUMBER_FORMAT.decimalSeparator, groupSeparator = exports.DEFAULT_NUMBER_FORMAT.groupSeparator, groupSize = exports.DEFAULT_NUMBER_FORMAT.groupSize, rounding = exports.DEFAULT_NUMBER_FORMAT.rounding, } = exports.DEFAULT_NUMBER_FORMAT) => {\n const decInternal = num;\n if (!decInternal.e && decInternal.e !== 0) {\n return num.toString(); // Infinity/NaN\n }\n const [integerPart, fractionPart] = num\n .toFixed(decimalPlaces, roundingMethod === \"fixed\"\n ? toFixedRounding[rounding]\n : exports.toSignificantRounding[rounding])\n .split(\".\");\n (0, tiny_invariant_1.default)(integerPart);\n let displayIntegerPart = integerPart;\n if (groupSeparator) {\n // integer digits\n const intd = isNegative ? integerPart.slice(1) : integerPart;\n // number of integer digits\n const nd = intd.length;\n if (groupSize > 0 && nd > 0) {\n let i = nd % groupSize || groupSize;\n displayIntegerPart = intd.slice(0, i);\n for (; i < nd; i += groupSize) {\n displayIntegerPart += groupSeparator + intd.slice(i, i + groupSize);\n }\n if (isNegative) {\n displayIntegerPart = \"-\" + displayIntegerPart;\n }\n }\n }\n if (fractionPart) {\n return displayIntegerPart + (decimalSeparator !== null && decimalSeparator !== void 0 ? decimalSeparator : \"\") + fractionPart;\n }\n else {\n return displayIntegerPart;\n }\n};\n/*\n * Returns a string representing the value of this big number in fixed-point notation to `dp`\n * decimal places using rounding mode `rm`, and formatted according to the properties of the\n * `fmt`, `this.format` and `this.constructor.format` objects, in that order of precedence.\n *\n * Example:\n *\n * x = new Decimal('123456789.987654321')\n *\n * // Add a format object to the constructor...\n * Decimal.format = {\n * decimalSeparator: '.',\n * groupSeparator: ',',\n * groupSize: 3,\n * secondaryGroupSize: 0,\n * fractionGroupSeparator: '', // '\\xA0' non-breaking space\n * fractionGroupSize : 0\n * }\n *\n * x.toFormat(); // 123,456,789.987654321\n * x.toFormat(2, 1); // 123,456,789.98\n *\n * // And/or add a format object to the big number itself...\n * x.format = {\n * decimalSeparator: ',',\n * groupSeparator: '',\n * }\n *\n * x.toFormat(); // 123456789,987654321\n *\n * format = {\n * decimalSeparator: '.',\n * groupSeparator: ' ',\n * groupSize: 3,\n * fractionGroupSeparator: ' ', // '\\xA0' non-breaking space\n * fractionGroupSize : 5\n * }\n * // And/or pass a format object to the method call.\n * x.toFormat(format); // 123 456 789.98765 4321\n * x.toFormat(4, format); // 123 456 789.9877\n * x.toFormat(2, 1, format); // 123 456 789.98\n *\n * [dp] {number} Decimal places. Integer.\n * [rm] {number} Rounding mode. Integer, 0 to 8. (Ignored if using big.js.)\n * [fmt] {Object} A format object.\n *\n */\nconst formatDecimal = (dec, decimalPlaces, fmt = exports.DEFAULT_NUMBER_FORMAT) => {\n return formatNum(dec, dec.isNegative(), \"significant\", decimalPlaces, fmt);\n};\nexports.formatDecimal = formatDecimal;\n/*\n * Returns a string representing the value of this big number in fixed-point notation to `dp`\n * decimal places using rounding mode `rm`, and formatted according to the properties of the\n * `fmt`, `this.format` and `this.constructor.format` objects, in that order of precedence.\n *\n * Example:\n *\n * x = new Decimal('123456789.987654321')\n *\n * // Add a format object to the constructor...\n * Decimal.format = {\n * decimalSeparator: '.',\n * groupSeparator: ',',\n * groupSize: 3,\n * secondaryGroupSize: 0,\n * fractionGroupSeparator: '', // '\\xA0' non-breaking space\n * fractionGroupSize : 0\n * }\n *\n * x.toFormat(); // 123,456,789.987654321\n * x.toFormat(2, 1); // 123,456,789.98\n *\n * // And/or add a format object to the big number itself...\n * x.format = {\n * decimalSeparator: ',',\n * groupSeparator: '',\n * }\n *\n * x.toFormat(); // 123456789,987654321\n *\n * format = {\n * decimalSeparator: '.',\n * groupSeparator: ' ',\n * groupSize: 3,\n * fractionGroupSeparator: ' ', // '\\xA0' non-breaking space\n * fractionGroupSize : 5\n * }\n * // And/or pass a format object to the method call.\n * x.toFormat(format); // 123 456 789.98765 4321\n * x.toFormat(4, format); // 123 456 789.9877\n * x.toFormat(2, 1, format); // 123 456 789.98\n *\n * [dp] {number} Decimal places. Integer.\n * [rm] {number} Rounding mode. Integer, 0 to 8. (Ignored if using big.js.)\n * [fmt] {Object} A format object.\n *\n */\nconst formatBig = (big, decimalPlaces, fmt = exports.DEFAULT_NUMBER_FORMAT) => {\n return formatNum(big, big.s === -1, \"fixed\", decimalPlaces, fmt);\n};\nexports.formatBig = formatBig;\n//# sourceMappingURL=format.js.map\n\n/***/ }),\n\n/***/ 7646:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Fraction = exports.fractionFromObject = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst big_js_1 = tslib_1.__importDefault(__webpack_require__(3302));\nconst decimal_js_light_1 = tslib_1.__importDefault(__webpack_require__(9887));\nconst jsbi_1 = tslib_1.__importDefault(__webpack_require__(9499));\nconst tiny_invariant_1 = tslib_1.__importDefault(__webpack_require__(6018));\nconst constants_js_1 = __webpack_require__(7658);\nconst format_js_1 = __webpack_require__(1762);\nconst utils_js_1 = __webpack_require__(8872);\n/**\n * Attempts to parse a {@link Fraction}.\n * @param fractionish Fraction or BigintIsh.\n * @returns\n */\nconst tryParseFraction = (fractionish) => {\n if (Fraction.isFraction(fractionish)) {\n return fractionish;\n }\n try {\n return new Fraction((0, utils_js_1.parseBigintIsh)(fractionish));\n }\n catch (e) {\n if (e instanceof Error) {\n throw new Error(`Could not parse fraction: ${e.message}`);\n }\n throw new Error(`Could not parse fraction`);\n }\n};\n/**\n * Creates a {@link Fraction} from a {@link FractionObject}.\n * @param param0\n * @returns\n */\nconst fractionFromObject = ({ numeratorStr, denominatorStr, }) => {\n return new Fraction(numeratorStr, denominatorStr);\n};\nexports.fractionFromObject = fractionFromObject;\n/**\n * Number with an integer numerator and denominator.\n */\nclass Fraction {\n constructor(numerator, denominator = constants_js_1.ONE) {\n this.isFraction = true;\n this.numerator = (0, utils_js_1.parseBigintIsh)(numerator);\n this.denominator = (0, utils_js_1.parseBigintIsh)(denominator);\n }\n get numeratorStr() {\n return this.numerator.toString();\n }\n get denominatorStr() {\n return this.numerator.toString();\n }\n /**\n * Ensures the other object is of this {@link Fraction} type.\n * @param other\n * @returns\n */\n static fromObject(other) {\n if (other instanceof Fraction) {\n return other;\n }\n return (0, exports.fractionFromObject)(other);\n }\n /**\n * JSON representation of the {@link Fraction}.\n */\n toJSON() {\n return {\n isFraction: true,\n numeratorStr: this.numerator.toString(),\n denominatorStr: this.denominator.toString(),\n };\n }\n /**\n * Returns true if the other object is a {@link Fraction}.\n *\n * @param other\n * @returns\n */\n static isFraction(other) {\n return (typeof other === \"object\" &&\n other !== null &&\n \"numerator\" in other &&\n \"denominator\" in other);\n }\n /**\n * Compares this {@link Fraction} to the other {@link Fraction}.\n */\n compareTo(other) {\n if (this.equalTo(other)) {\n return 0;\n }\n return this.greaterThan(other) ? 1 : -1;\n }\n /**\n * Parses a {@link Fraction} from a float.\n * @param number Number to parse.\n * @param decimals Number of decimals of precision. (default 10)\n * @returns Fraction\n */\n static fromNumber(number, decimals = 10) {\n const multiplier = Math.pow(10, decimals);\n return new Fraction(Math.floor(number * multiplier), multiplier);\n }\n /**\n * Performs floor division.\n */\n get quotient() {\n return jsbi_1.default.divide(this.numerator, this.denominator);\n }\n /**\n * Remainder after floor division.\n */\n get remainder() {\n return new Fraction(jsbi_1.default.remainder(this.numerator, this.denominator), this.denominator);\n }\n /**\n * Swaps the numerator and denominator of the {@link Fraction}.\n * @returns\n */\n invert() {\n return new Fraction(this.denominator, this.numerator);\n }\n add(other) {\n const otherParsed = tryParseFraction(other);\n if (jsbi_1.default.equal(this.denominator, otherParsed.denominator)) {\n return new Fraction(jsbi_1.default.add(this.numerator, otherParsed.numerator), this.denominator);\n }\n return new Fraction(jsbi_1.default.add(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(otherParsed.numerator, this.denominator)), jsbi_1.default.multiply(this.denominator, otherParsed.denominator));\n }\n subtract(other) {\n const otherParsed = tryParseFraction(other);\n if (jsbi_1.default.equal(this.denominator, otherParsed.denominator)) {\n return new Fraction(jsbi_1.default.subtract(this.numerator, otherParsed.numerator), this.denominator);\n }\n return new Fraction(jsbi_1.default.subtract(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(otherParsed.numerator, this.denominator)), jsbi_1.default.multiply(this.denominator, otherParsed.denominator));\n }\n lessThan(other) {\n const otherParsed = tryParseFraction(other);\n return jsbi_1.default.lessThan(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(otherParsed.numerator, this.denominator));\n }\n equalTo(other) {\n const otherParsed = tryParseFraction(other);\n return jsbi_1.default.equal(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(otherParsed.numerator, this.denominator));\n }\n greaterThan(other) {\n const otherParsed = tryParseFraction(other);\n return jsbi_1.default.greaterThan(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(otherParsed.numerator, this.denominator));\n }\n multiply(other) {\n const otherParsed = tryParseFraction(other);\n return new Fraction(jsbi_1.default.multiply(this.numerator, otherParsed.numerator), jsbi_1.default.multiply(this.denominator, otherParsed.denominator));\n }\n /**\n * Divides this {@link Fraction} by another {@link Fraction}.\n */\n divide(other) {\n const otherParsed = tryParseFraction(other);\n return new Fraction(jsbi_1.default.multiply(this.numerator, otherParsed.denominator), jsbi_1.default.multiply(this.denominator, otherParsed.numerator));\n }\n /**\n * Converts this {@link Fraction} to a string with the specified significant digits.\n * @param significantDigits\n * @param format\n * @param rounding\n * @returns\n */\n toSignificant(significantDigits, format = { groupSeparator: \"\" }, rounding = constants_js_1.Rounding.ROUND_HALF_UP) {\n (0, tiny_invariant_1.default)(Number.isInteger(significantDigits), `${significantDigits} is not an integer.`);\n (0, tiny_invariant_1.default)(significantDigits > 0, `${significantDigits} is not positive.`);\n decimal_js_light_1.default.set({\n precision: significantDigits + 1,\n rounding: format_js_1.toSignificantRounding[rounding],\n });\n const quotient = new decimal_js_light_1.default(this.numerator.toString())\n .div(this.denominator.toString())\n .toSignificantDigits(significantDigits);\n return (0, format_js_1.formatDecimal)(quotient, quotient.decimalPlaces(), {\n ...format,\n rounding,\n });\n }\n toFixed(decimalPlaces, format = { groupSeparator: \"\" }, rounding = constants_js_1.Rounding.ROUND_HALF_UP) {\n (0, tiny_invariant_1.default)(Number.isInteger(decimalPlaces), `${decimalPlaces} is not an integer.`);\n (0, tiny_invariant_1.default)(decimalPlaces >= 0, `${decimalPlaces} is negative.`);\n return (0, format_js_1.formatBig)(new big_js_1.default(this.numerator.toString()).div(this.denominator.toString()), decimalPlaces, { ...format, rounding });\n }\n /**\n * Helper method for converting any super class back to a fraction\n */\n get asFraction() {\n return new Fraction(this.numerator, this.denominator);\n }\n /**\n * Gets the value of this {@link Fraction} as a number.\n */\n get asNumber() {\n if (jsbi_1.default.equal(this.denominator, constants_js_1.ZERO)) {\n return jsbi_1.default.greaterThan(this.numerator, constants_js_1.ZERO)\n ? Number.POSITIVE_INFINITY\n : jsbi_1.default.lessThan(this.numerator, constants_js_1.ZERO)\n ? Number.NEGATIVE_INFINITY\n : Number.NaN;\n }\n const result = jsbi_1.default.toNumber(this.numerator) / jsbi_1.default.toNumber(this.denominator);\n if (!Number.isNaN(result)) {\n return result;\n }\n return parseFloat(this.toFixed(10));\n }\n /**\n * Returns true if this number (the numerator) is equal to zero and the denominator is non-zero.\n * @returns\n */\n isZero() {\n return jsbi_1.default.EQ(this.numerator, constants_js_1.ZERO) && jsbi_1.default.NE(this.denominator, constants_js_1.ZERO);\n }\n /**\n * Returns true if this number (the numerator) is not equal to zero.\n * @returns\n */\n isNonZero() {\n return !this.isZero();\n }\n}\nexports.Fraction = Fraction;\nFraction.ZERO = new Fraction(0);\nFraction.ONE = new Fraction(1);\n//# sourceMappingURL=fraction.js.map\n\n/***/ }),\n\n/***/ 7111:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst tslib_1 = __webpack_require__(7582);\ntslib_1.__exportStar(__webpack_require__(7658), exports);\ntslib_1.__exportStar(__webpack_require__(7646), exports);\ntslib_1.__exportStar(__webpack_require__(8476), exports);\ntslib_1.__exportStar(__webpack_require__(3726), exports);\ntslib_1.__exportStar(__webpack_require__(8097), exports);\ntslib_1.__exportStar(__webpack_require__(5998), exports);\ntslib_1.__exportStar(__webpack_require__(8872), exports);\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 8476:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Percent = void 0;\nconst fraction_js_1 = __webpack_require__(7646);\nconst ONE_HUNDRED = new fraction_js_1.Fraction(100);\n/**\n * Converts a fraction to a percent\n * @param fraction the fraction to convert\n */\nfunction toPercent(fraction) {\n return new Percent(fraction.numerator, fraction.denominator);\n}\nclass Percent extends fraction_js_1.Fraction {\n constructor() {\n super(...arguments);\n /**\n * This boolean prevents a fraction from being interpreted as a Percent\n */\n this.isPercent = true;\n }\n /**\n * Parses a {@link Percent} from a float.\n * @param number Number to parse. (100% is 1.00)\n * @param decimals Number of decimals of precision. (default 10)\n * @returns Percent\n */\n static fromNumber(number, decimals = 10) {\n const frac = fraction_js_1.Fraction.fromNumber(number, decimals);\n return new Percent(frac.numerator, frac.denominator);\n }\n /**\n * Constructs an {@link Percent} from a {@link PercentObject}.\n * @param other\n * @returns\n */\n static fromObject(other) {\n if (other instanceof Percent) {\n return other;\n }\n return toPercent(fraction_js_1.Fraction.fromObject(other));\n }\n /**\n * JSON representation of the {@link Percent}.\n */\n toJSON() {\n return {\n ...super.toJSON(),\n isPercent: true,\n };\n }\n /**\n * Creates a {@link Percent} from a {@link Fraction}.\n */\n static fromFraction(fraction) {\n return toPercent(fraction);\n }\n /**\n * Parses a {@link Percent} from a given number of bps.\n * @returns Percent\n */\n static fromBPS(bps) {\n return new Percent(bps, 10000);\n }\n add(other) {\n return toPercent(super.add(other));\n }\n subtract(other) {\n return toPercent(super.subtract(other));\n }\n multiply(other) {\n return toPercent(super.multiply(other));\n }\n divide(other) {\n return toPercent(super.divide(other));\n }\n /**\n * Swaps the numerator and denominator of the {@link Percent}.\n * @returns\n */\n invert() {\n return new Percent(this.denominator, this.numerator);\n }\n toSignificant(significantDigits = 5, format, rounding) {\n return super\n .multiply(ONE_HUNDRED)\n .toSignificant(significantDigits, format, rounding);\n }\n toFixed(decimalPlaces = 2, format, rounding) {\n return super.multiply(ONE_HUNDRED).toFixed(decimalPlaces, format, rounding);\n }\n /**\n * Returns true if the other object is a {@link Percent}.\n *\n * @param other\n * @returns\n */\n static isPercent(other) {\n return (fraction_js_1.Fraction.isFraction(other) &&\n (other === null || other === void 0 ? void 0 : other.isPercent) === true);\n }\n}\nexports.Percent = Percent;\n/**\n * Zero percent.\n */\nPercent.ZERO = new Percent(0);\n/**\n * 1%\n */\nPercent.ONE = new Percent(1, 100);\n/**\n * 100% (1/1)\n */\nPercent.ONE_HUNDRED = new Percent(1);\n//# sourceMappingURL=percent.js.map\n\n/***/ }),\n\n/***/ 3726:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Price = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst tiny_invariant_1 = tslib_1.__importDefault(__webpack_require__(6018));\nconst fraction_js_1 = __webpack_require__(7646);\nconst utils_js_1 = __webpack_require__(8872);\nclass Price extends fraction_js_1.Fraction {\n /**\n * Constructs a Price.\n *\n * denominator and numerator _must_ be raw, i.e. in the native representation\n *\n * @param denominator Units of base currency. E.g. 1 BTC would be 1_00000000\n * @param numerator Units of quote currency. E.g. $30k at 6 decimals would be 30_000_000000\n */\n constructor(baseCurrency, quoteCurrency, denominator, numerator) {\n super((0, utils_js_1.parseBigintIsh)(numerator), (0, utils_js_1.parseBigintIsh)(denominator));\n this.baseCurrency = baseCurrency;\n this.quoteCurrency = quoteCurrency;\n this.scalar = new fraction_js_1.Fraction((0, utils_js_1.makeDecimalMultiplier)(baseCurrency.decimals), (0, utils_js_1.makeDecimalMultiplier)(quoteCurrency.decimals));\n }\n get raw() {\n return new fraction_js_1.Fraction(this.numerator, this.denominator);\n }\n get adjusted() {\n return super.multiply(this.scalar);\n }\n invert() {\n return this.new(this.quoteCurrency, this.baseCurrency, this.numerator, this.denominator);\n }\n multiply(other) {\n (0, tiny_invariant_1.default)(this.quoteCurrency.equals(other.baseCurrency), `multiply token mismatch: ${this.quoteCurrency.toString()} !== ${other.baseCurrency.toString()}`);\n const fraction = super.multiply(other);\n return this.new(this.baseCurrency, other.quoteCurrency, fraction.denominator, fraction.numerator);\n }\n // performs floor division on overflow\n quote(tokenAmount) {\n (0, tiny_invariant_1.default)(tokenAmount.token.equals(this.baseCurrency), `quote token mismatch: ${tokenAmount.token.toString()} !== ${this.baseCurrency.toString()}`);\n return tokenAmount.new(this.quoteCurrency, super.multiply(tokenAmount.raw).quotient);\n }\n toSignificant(significantDigits = 6, format, rounding) {\n return this.adjusted.toSignificant(significantDigits, format, rounding);\n }\n toFixed(decimalPlaces = 4, format, rounding) {\n return this.adjusted.toFixed(decimalPlaces, format, rounding);\n }\n /**\n * Returns the price in terms of the quote currency.\n * @param format\n * @param rounding\n * @returns\n */\n toFixedQuote(format = { groupSeparator: \"\" }, rounding) {\n return this.toFixed(this.quoteCurrency.decimals, format, rounding);\n }\n get asNumber() {\n return this.adjusted.asNumber;\n }\n}\nexports.Price = Price;\n//# sourceMappingURL=price.js.map\n\n/***/ }),\n\n/***/ 8097:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n//# sourceMappingURL=token.js.map\n\n/***/ }),\n\n/***/ 5998:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TokenAmount = exports.stripTrailingZeroes = exports.validateU256 = exports.validateU64 = exports.TokenAmountUnderflow = exports.TokenAmountOverflow = exports.parseAmountFromString = exports.DEFAULT_GROUP_SEPARATOR = exports.DEFAULT_DECIMAL_SEPARATOR = exports.DEFAULT_LOCALE_GROUP_SEPARATOR = exports.DEFAULT_LOCALE_DECIMAL_SEPARATOR = exports.getGroupSeparator = exports.getDecimalSeparator = exports.getSeparator = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst big_js_1 = tslib_1.__importDefault(__webpack_require__(3302));\nconst jsbi_1 = tslib_1.__importDefault(__webpack_require__(9499));\nconst tiny_invariant_1 = tslib_1.__importDefault(__webpack_require__(6018));\nconst constants_js_1 = __webpack_require__(7658);\nconst format_js_1 = __webpack_require__(1762);\nconst fraction_js_1 = __webpack_require__(7646);\nconst percent_js_1 = __webpack_require__(8476);\nconst utils_js_1 = __webpack_require__(8872);\n/**\n * Gets the separator of the provided locale.\n *\n * Source: {@link https://stackoverflow.com/questions/1074660/with-a-browser-how-do-i-know-which-decimal-separator-does-the-operating-system}\n *\n * @param separatorType\n * @param locale\n * @returns\n */\nconst getSeparator = (separatorType, locale) => {\n var _a;\n const numberWithDecimalSeparator = 1000.1;\n return (_a = Intl.NumberFormat(locale)\n .formatToParts(numberWithDecimalSeparator)\n .find((part) => part.type === separatorType)) === null || _a === void 0 ? void 0 : _a.value;\n};\nexports.getSeparator = getSeparator;\n/**\n * Gets the decimal separator of the provided locale.\n *\n * Source: {@link https://stackoverflow.com/questions/1074660/with-a-browser-how-do-i-know-which-decimal-separator-does-the-operating-system}\n *\n * @param locale\n * @returns\n */\nconst getDecimalSeparator = (locale) => {\n return (0, exports.getSeparator)(\"decimal\", locale);\n};\nexports.getDecimalSeparator = getDecimalSeparator;\n/**\n * Gets the group separator of the provided locale.\n *\n * Source: {@link https://stackoverflow.com/questions/1074660/with-a-browser-how-do-i-know-which-decimal-separator-does-the-operating-system}\n *\n * @param locale\n * @returns\n */\nconst getGroupSeparator = (locale) => {\n return (0, exports.getSeparator)(\"group\", locale);\n};\nexports.getGroupSeparator = getGroupSeparator;\n/**\n * The decimal separator of the default locale.\n */\nexports.DEFAULT_LOCALE_DECIMAL_SEPARATOR = (_a = (0, exports.getDecimalSeparator)()) !== null && _a !== void 0 ? _a : \".\";\n/**\n * The group separator of the default locale.\n */\nexports.DEFAULT_LOCALE_GROUP_SEPARATOR = (_b = (0, exports.getGroupSeparator)()) !== null && _b !== void 0 ? _b : \",\";\n/**\n * The default decimal separator.\n */\nexports.DEFAULT_DECIMAL_SEPARATOR = \".\";\n/**\n * The default group separator.\n */\nexports.DEFAULT_GROUP_SEPARATOR = \",\";\n/**\n * Parses a token amount from a decimal representation.\n * @param token\n * @param uiAmount\n * @returns\n */\nconst parseAmountFromString = (token, uiAmount, decimalSeparator = exports.DEFAULT_DECIMAL_SEPARATOR, groupSeparator = exports.DEFAULT_GROUP_SEPARATOR) => {\n const parts = uiAmount.split(decimalSeparator);\n if (parts.length === 0) {\n throw new Error(\"empty number\");\n }\n const [wholeRaw, fractionRaw] = parts;\n const whole = wholeRaw\n ? jsbi_1.default.BigInt(wholeRaw.split(groupSeparator).join(\"\"))\n : constants_js_1.ZERO;\n const fraction = fractionRaw\n ? jsbi_1.default.BigInt(fractionRaw.slice(0, token.decimals) +\n Array(token.decimals).fill(\"0\").slice(fractionRaw.length).join(\"\"))\n : constants_js_1.ZERO;\n const combined = jsbi_1.default.add(jsbi_1.default.multiply(whole, (0, utils_js_1.makeDecimalMultiplier)(token.decimals)), fraction);\n return combined;\n};\nexports.parseAmountFromString = parseAmountFromString;\n/**\n * Thrown when a token amount overflows.\n */\nclass TokenAmountOverflow extends RangeError {\n constructor(type, amount) {\n super(`Token amount overflows ${type}: ${amount.toString()}`);\n }\n}\nexports.TokenAmountOverflow = TokenAmountOverflow;\n/**\n * Thrown when a token amount underflows.\n */\nclass TokenAmountUnderflow extends RangeError {\n constructor(amount) {\n super(`Token amount must be greater than zero: ${amount.toString()}`);\n }\n}\nexports.TokenAmountUnderflow = TokenAmountUnderflow;\n/**\n * Validates that a number falls within the range of u64.\n * @param value\n */\nfunction validateU64(value) {\n if (!jsbi_1.default.greaterThanOrEqual(value, constants_js_1.ZERO)) {\n throw new TokenAmountUnderflow(value);\n }\n if (!jsbi_1.default.lessThanOrEqual(value, constants_js_1.MAX_U64)) {\n throw new TokenAmountOverflow(\"u64\", value);\n }\n}\nexports.validateU64 = validateU64;\n/**\n * Validates that a number falls within the range of u256.\n * @param value\n */\nfunction validateU256(value) {\n if (!jsbi_1.default.greaterThanOrEqual(value, constants_js_1.ZERO)) {\n throw new TokenAmountUnderflow(value);\n }\n if (!jsbi_1.default.lessThanOrEqual(value, constants_js_1.MAX_U256)) {\n throw new TokenAmountOverflow(\"u256\", value);\n }\n}\nexports.validateU256 = validateU256;\nconst stripTrailingZeroes = (num) => {\n const [head, tail, ...rest] = num.split(\".\");\n if (rest.length > 0 || !head) {\n console.warn(`Invalid number passed to stripTrailingZeroes: ${num}`);\n return num;\n }\n if (!tail) {\n return num;\n }\n const newTail = tail.replace(/0+$/, \"\");\n return newTail === \"\" ? head : `${head}.${newTail}`;\n};\nexports.stripTrailingZeroes = stripTrailingZeroes;\n/**\n * Represents a quantity of tokens.\n */\nclass TokenAmount extends fraction_js_1.Fraction {\n /**\n * amount _must_ be raw, i.e. in the native representation\n */\n constructor(token, amount, validate) {\n const parsedAmount = (0, utils_js_1.parseBigintIsh)(amount);\n validate === null || validate === void 0 ? void 0 : validate(parsedAmount);\n super(parsedAmount, (0, utils_js_1.makeDecimalMultiplier)(token.decimals));\n this.token = token;\n this.token = token;\n }\n withAmount(amount) {\n return this.new(this.token, amount);\n }\n get raw() {\n return this.numerator;\n }\n toSignificant(significantDigits = 6, format, rounding = constants_js_1.Rounding.ROUND_DOWN) {\n return super.toSignificant(significantDigits, format, rounding);\n }\n toFixed(decimalPlaces = this.token.decimals, format, rounding = constants_js_1.Rounding.ROUND_DOWN) {\n (0, tiny_invariant_1.default)(decimalPlaces <= this.token.decimals, \"DECIMALS\");\n return super.toFixed(decimalPlaces, format, rounding);\n }\n toExact(format = { groupSeparator: \"\" }) {\n return (0, format_js_1.formatBig)(new big_js_1.default(this.numerator.toString()).div(this.denominator.toString()), this.token.decimals, format);\n }\n add(other) {\n (0, tiny_invariant_1.default)(this.token.equals(other.token), `add token mismatch: ${this.token.toString()} !== ${other.token.toString()}`);\n return this.withAmount(jsbi_1.default.add(this.raw, other.raw));\n }\n subtract(other) {\n (0, tiny_invariant_1.default)(this.token.equals(other.token), `subtract token mismatch: ${this.token.toString()} !== ${other.token.toString()}`);\n return this.withAmount(jsbi_1.default.subtract(this.raw, other.raw));\n }\n /**\n * Gets this TokenAmount as a percentage of the other TokenAmount.\n * @param other\n * @returns\n */\n percentOf(other) {\n (0, tiny_invariant_1.default)(this.token.equals(other.token), `percentOf token mismatch: ${this.token.toString()} !== ${other.token.toString()}`);\n const frac = this.divide(other);\n return new percent_js_1.Percent(frac.numerator, frac.denominator);\n }\n /**\n * Gets this TokenAmount as a percentage of the other TokenAmount.\n * @param other\n * @returns\n */\n divideBy(other) {\n const frac = this.divide(other);\n return new percent_js_1.Percent(frac.numerator, frac.denominator);\n }\n /**\n * Multiplies this token amount by a fraction.\n * WARNING: this loses precision\n * @param percent\n * @returns\n */\n scale(fraction) {\n return this.withAmount(fraction.asFraction.multiply(this.raw).toFixed(0));\n }\n /**\n * Reduces this token amount by a percent.\n * WARNING: this loses precision\n * @param percent\n * @returns\n */\n reduceBy(percent) {\n return this.scale(percent_js_1.Percent.ONE_HUNDRED.subtract(percent));\n }\n /**\n * Formats the token amount quantity with units.\n *\n * This function is not locale-specific: it hardcodes \"en-US\"-like behavior.\n *\n * @returns\n */\n formatUnits() {\n return `${(0, exports.stripTrailingZeroes)(this.toExact({\n groupSeparator: exports.DEFAULT_GROUP_SEPARATOR,\n groupSize: 3,\n decimalSeparator: exports.DEFAULT_DECIMAL_SEPARATOR,\n }))} ${this.token.symbol}`;\n }\n /**\n * Formats this number using Intl.NumberFormatOptions\n * @param param0\n * @returns\n */\n format({ numberFormatOptions, locale } = {}) {\n return `${numberFormatOptions !== undefined\n ? this.asNumber.toLocaleString(locale, numberFormatOptions)\n : (0, exports.stripTrailingZeroes)(this.toFixed(this.token.decimals))}`;\n }\n /**\n * Gets the value of this {@link TokenAmount} as a number.\n */\n get asNumber() {\n return parseFloat(this.toExact());\n }\n /**\n * Returns true if the other object is a {@link TokenAmount}.\n *\n * @param other\n * @returns\n */\n static isTokenAmount(other) {\n return (fraction_js_1.Fraction.isFraction(other) &&\n !!(other === null || other === void 0 ? void 0 : other.token));\n }\n // ----------------------------------------------------------------\n // DEPRECATED FUNCTIONS\n // ----------------------------------------------------------------\n /**\n * Gets this TokenAmount as a percentage of the other TokenAmount.\n * @param other\n * @deprecated use {@link percentOf}\n * @returns\n */\n divideByAmount(other) {\n return this.percentOf(other);\n }\n /**\n * Multiplies this token amount by a fraction.\n * WARNING: this loses precision\n * @param percent\n * @deprecated use {@link scale}\n * @returns\n */\n multiplyBy(fraction) {\n return this.scale(fraction);\n }\n}\nexports.TokenAmount = TokenAmount;\n//# sourceMappingURL=tokenAmount.js.map\n\n/***/ }),\n\n/***/ 8872:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.makeDecimalMultiplier = exports.parseBigintIsh = exports.isBN = void 0;\nconst tslib_1 = __webpack_require__(7582);\nconst jsbi_1 = tslib_1.__importDefault(__webpack_require__(9499));\nconst constants_js_1 = __webpack_require__(7658);\nconst BN_WORD_SIZE = 26;\n/**\n * Checks if an object is a BN.\n */\nconst isBN = (num) => {\n return (num !== null &&\n typeof num === \"object\" &&\n num.constructor.wordSize === BN_WORD_SIZE &&\n Array.isArray(num.words));\n};\nexports.isBN = isBN;\n/**\n * Parses a {@link BigintIsh} into a {@link JSBI}.\n * @param bigintIsh\n * @returns\n */\nfunction parseBigintIsh(bigintIsh) {\n return bigintIsh instanceof jsbi_1.default\n ? bigintIsh\n : typeof bigintIsh === \"string\" || typeof bigintIsh === \"number\"\n ? jsbi_1.default.BigInt(bigintIsh)\n : typeof bigintIsh === \"bigint\" || (0, exports.isBN)(bigintIsh)\n ? jsbi_1.default.BigInt(bigintIsh.toString())\n : jsbi_1.default.BigInt(bigintIsh);\n}\nexports.parseBigintIsh = parseBigintIsh;\nconst decimalMultipliersCache = {};\n/**\n * Creates the multiplier for an amount of decimals.\n * @param decimals\n * @returns\n */\nconst makeDecimalMultiplier = (decimals) => {\n const cached = decimalMultipliersCache[decimals];\n if (cached) {\n return cached;\n }\n if (decimals <= 18) {\n return (decimalMultipliersCache[decimals] = jsbi_1.default.BigInt(10 ** decimals));\n }\n return (decimalMultipliersCache[decimals] = jsbi_1.default.exponentiate(constants_js_1.TEN, jsbi_1.default.BigInt(decimals)));\n};\nexports.makeDecimalMultiplier = makeDecimalMultiplier;\n//# sourceMappingURL=utils.js.map\n\n/***/ }),\n\n/***/ 9282:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var process = __webpack_require__(4155);\n// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a51ae424a513ec9a6aa3466baa0cc1d55dd4f3b\n\n// Originally from narwhal.js (http://narwhaljs.org)\n// Copyright (c) 2009 Thomas Robinson <280north.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nvar _require = __webpack_require__(2136),\n _require$codes = _require.codes,\n ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE,\n ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;\nvar AssertionError = __webpack_require__(5961);\nvar _require2 = __webpack_require__(9539),\n inspect = _require2.inspect;\nvar _require$types = (__webpack_require__(9539).types),\n isPromise = _require$types.isPromise,\n isRegExp = _require$types.isRegExp;\nvar objectAssign = __webpack_require__(8399)();\nvar objectIs = __webpack_require__(5624)();\nvar RegExpPrototypeTest = __webpack_require__(1924)('RegExp.prototype.test');\nvar errorCache = new Map();\nvar isDeepEqual;\nvar isDeepStrictEqual;\nvar parseExpressionAt;\nvar findNodeAround;\nvar decoder;\nfunction lazyLoadComparison() {\n var comparison = __webpack_require__(9158);\n isDeepEqual = comparison.isDeepEqual;\n isDeepStrictEqual = comparison.isDeepStrictEqual;\n}\n\n// Escape control characters but not \\n and \\t to keep the line breaks and\n// indentation intact.\n// eslint-disable-next-line no-control-regex\nvar escapeSequencesRegExp = /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/g;\nvar meta = (/* unused pure expression or super */ null && ([\"\\\\u0000\", \"\\\\u0001\", \"\\\\u0002\", \"\\\\u0003\", \"\\\\u0004\", \"\\\\u0005\", \"\\\\u0006\", \"\\\\u0007\", '\\\\b', '', '', \"\\\\u000b\", '\\\\f', '', \"\\\\u000e\", \"\\\\u000f\", \"\\\\u0010\", \"\\\\u0011\", \"\\\\u0012\", \"\\\\u0013\", \"\\\\u0014\", \"\\\\u0015\", \"\\\\u0016\", \"\\\\u0017\", \"\\\\u0018\", \"\\\\u0019\", \"\\\\u001a\", \"\\\\u001b\", \"\\\\u001c\", \"\\\\u001d\", \"\\\\u001e\", \"\\\\u001f\"]));\nvar escapeFn = function escapeFn(str) {\n return meta[str.charCodeAt(0)];\n};\nvar warned = false;\n\n// The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\nvar NO_EXCEPTION_SENTINEL = {};\n\n// All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction innerFail(obj) {\n if (obj.message instanceof Error) throw obj.message;\n throw new AssertionError(obj);\n}\nfunction fail(actual, expected, message, operator, stackStartFn) {\n var argsLen = arguments.length;\n var internalMessage;\n if (argsLen === 0) {\n internalMessage = 'Failed';\n } else if (argsLen === 1) {\n message = actual;\n actual = undefined;\n } else {\n if (warned === false) {\n warned = true;\n var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);\n warn('assert.fail() with more than one argument is deprecated. ' + 'Please use assert.strictEqual() instead or only pass a message.', 'DeprecationWarning', 'DEP0094');\n }\n if (argsLen === 2) operator = '!=';\n }\n if (message instanceof Error) throw message;\n var errArgs = {\n actual: actual,\n expected: expected,\n operator: operator === undefined ? 'fail' : operator,\n stackStartFn: stackStartFn || fail\n };\n if (message !== undefined) {\n errArgs.message = message;\n }\n var err = new AssertionError(errArgs);\n if (internalMessage) {\n err.message = internalMessage;\n err.generatedMessage = true;\n }\n throw err;\n}\nassert.fail = fail;\n\n// The AssertionError is defined in internal/error.\nassert.AssertionError = AssertionError;\nfunction innerOk(fn, argLen, value, message) {\n if (!value) {\n var generatedMessage = false;\n if (argLen === 0) {\n generatedMessage = true;\n message = 'No value argument passed to `assert.ok()`';\n } else if (message instanceof Error) {\n throw message;\n }\n var err = new AssertionError({\n actual: value,\n expected: true,\n message: message,\n operator: '==',\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n}\n\n// Pure assertion tests whether a value is truthy, as determined\n// by !!value.\nfunction ok() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n innerOk.apply(void 0, [ok, args.length].concat(args));\n}\nassert.ok = ok;\n\n// The equality assertion tests shallow, coercive equality with ==.\n/* eslint-disable no-restricted-properties */\nassert.equal = function equal(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n // eslint-disable-next-line eqeqeq\n if (actual != expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '==',\n stackStartFn: equal\n });\n }\n};\n\n// The non-equality assertion tests for whether two objects are not\n// equal with !=.\nassert.notEqual = function notEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n // eslint-disable-next-line eqeqeq\n if (actual == expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '!=',\n stackStartFn: notEqual\n });\n }\n};\n\n// The equivalence assertion tests a deep equality relation.\nassert.deepEqual = function deepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (!isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepEqual',\n stackStartFn: deepEqual\n });\n }\n};\n\n// The non-equivalence assertion tests for any deep inequality.\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepEqual',\n stackStartFn: notDeepEqual\n });\n }\n};\n/* eslint-enable */\n\nassert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (!isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepStrictEqual',\n stackStartFn: deepStrictEqual\n });\n }\n};\nassert.notDeepStrictEqual = notDeepStrictEqual;\nfunction notDeepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepStrictEqual',\n stackStartFn: notDeepStrictEqual\n });\n }\n}\nassert.strictEqual = function strictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (!objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'strictEqual',\n stackStartFn: strictEqual\n });\n }\n};\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notStrictEqual',\n stackStartFn: notStrictEqual\n });\n }\n};\nvar Comparison = /*#__PURE__*/_createClass(function Comparison(obj, keys, actual) {\n var _this = this;\n _classCallCheck(this, Comparison);\n keys.forEach(function (key) {\n if (key in obj) {\n if (actual !== undefined && typeof actual[key] === 'string' && isRegExp(obj[key]) && RegExpPrototypeTest(obj[key], actual[key])) {\n _this[key] = actual[key];\n } else {\n _this[key] = obj[key];\n }\n }\n });\n});\nfunction compareExceptionKey(actual, expected, key, message, keys, fn) {\n if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {\n if (!message) {\n // Create placeholder objects to create a nice output.\n var a = new Comparison(actual, keys);\n var b = new Comparison(expected, keys, actual);\n var err = new AssertionError({\n actual: a,\n expected: b,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.actual = actual;\n err.expected = expected;\n err.operator = fn.name;\n throw err;\n }\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: fn.name,\n stackStartFn: fn\n });\n }\n}\nfunction expectedException(actual, expected, msg, fn) {\n if (typeof expected !== 'function') {\n if (isRegExp(expected)) return RegExpPrototypeTest(expected, actual);\n // assert.doesNotThrow does not accept objects.\n if (arguments.length === 2) {\n throw new ERR_INVALID_ARG_TYPE('expected', ['Function', 'RegExp'], expected);\n }\n\n // Handle primitives properly.\n if (_typeof(actual) !== 'object' || actual === null) {\n var err = new AssertionError({\n actual: actual,\n expected: expected,\n message: msg,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.operator = fn.name;\n throw err;\n }\n var keys = Object.keys(expected);\n // Special handle errors to make sure the name and the message are compared\n // as well.\n if (expected instanceof Error) {\n keys.push('name', 'message');\n } else if (keys.length === 0) {\n throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n keys.forEach(function (key) {\n if (typeof actual[key] === 'string' && isRegExp(expected[key]) && RegExpPrototypeTest(expected[key], actual[key])) {\n return;\n }\n compareExceptionKey(actual, expected, key, msg, keys, fn);\n });\n return true;\n }\n // Guard instanceof against arrow functions as they don't have a prototype.\n if (expected.prototype !== undefined && actual instanceof expected) {\n return true;\n }\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n return expected.call({}, actual) === true;\n}\nfunction getActual(fn) {\n if (typeof fn !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn);\n }\n try {\n fn();\n } catch (e) {\n return e;\n }\n return NO_EXCEPTION_SENTINEL;\n}\nfunction checkIsPromise(obj) {\n // Accept native ES6 promises and promises that are implemented in a similar\n // way. Do not accept thenables that use a function as `obj` and that have no\n // `catch` handler.\n\n // TODO: thenables are checked up until they have the correct methods,\n // but according to documentation, the `then` method should receive\n // the `fulfill` and `reject` arguments as well or it may be never resolved.\n\n return isPromise(obj) || obj !== null && _typeof(obj) === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function';\n}\nfunction waitForActual(promiseFn) {\n return Promise.resolve().then(function () {\n var resultPromise;\n if (typeof promiseFn === 'function') {\n // Return a rejected promise if `promiseFn` throws synchronously.\n resultPromise = promiseFn();\n // Fail in case no promise is returned.\n if (!checkIsPromise(resultPromise)) {\n throw new ERR_INVALID_RETURN_VALUE('instance of Promise', 'promiseFn', resultPromise);\n }\n } else if (checkIsPromise(promiseFn)) {\n resultPromise = promiseFn;\n } else {\n throw new ERR_INVALID_ARG_TYPE('promiseFn', ['Function', 'Promise'], promiseFn);\n }\n return Promise.resolve().then(function () {\n return resultPromise;\n }).then(function () {\n return NO_EXCEPTION_SENTINEL;\n }).catch(function (e) {\n return e;\n });\n });\n}\nfunction expectsError(stackStartFn, actual, error, message) {\n if (typeof error === 'string') {\n if (arguments.length === 4) {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n if (_typeof(actual) === 'object' && actual !== null) {\n if (actual.message === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error message \\\"\".concat(actual.message, \"\\\" is identical to the message.\"));\n }\n } else if (actual === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error \\\"\".concat(actual, \"\\\" is identical to the message.\"));\n }\n message = error;\n error = undefined;\n } else if (error != null && _typeof(error) !== 'object' && typeof error !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n if (actual === NO_EXCEPTION_SENTINEL) {\n var details = '';\n if (error && error.name) {\n details += \" (\".concat(error.name, \")\");\n }\n details += message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception';\n innerFail({\n actual: undefined,\n expected: error,\n operator: stackStartFn.name,\n message: \"Missing expected \".concat(fnType).concat(details),\n stackStartFn: stackStartFn\n });\n }\n if (error && !expectedException(actual, error, message, stackStartFn)) {\n throw actual;\n }\n}\nfunction expectsNoError(stackStartFn, actual, error, message) {\n if (actual === NO_EXCEPTION_SENTINEL) return;\n if (typeof error === 'string') {\n message = error;\n error = undefined;\n }\n if (!error || expectedException(actual, error)) {\n var details = message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'doesNotReject' ? 'rejection' : 'exception';\n innerFail({\n actual: actual,\n expected: error,\n operator: stackStartFn.name,\n message: \"Got unwanted \".concat(fnType).concat(details, \"\\n\") + \"Actual message: \\\"\".concat(actual && actual.message, \"\\\"\"),\n stackStartFn: stackStartFn\n });\n }\n throw actual;\n}\nassert.throws = function throws(promiseFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));\n};\nassert.rejects = function rejects(promiseFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n return waitForActual(promiseFn).then(function (result) {\n return expectsError.apply(void 0, [rejects, result].concat(args));\n });\n};\nassert.doesNotThrow = function doesNotThrow(fn) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));\n};\nassert.doesNotReject = function doesNotReject(fn) {\n for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n args[_key5 - 1] = arguments[_key5];\n }\n return waitForActual(fn).then(function (result) {\n return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));\n });\n};\nassert.ifError = function ifError(err) {\n if (err !== null && err !== undefined) {\n var message = 'ifError got unwanted exception: ';\n if (_typeof(err) === 'object' && typeof err.message === 'string') {\n if (err.message.length === 0 && err.constructor) {\n message += err.constructor.name;\n } else {\n message += err.message;\n }\n } else {\n message += inspect(err);\n }\n var newErr = new AssertionError({\n actual: err,\n expected: null,\n operator: 'ifError',\n message: message,\n stackStartFn: ifError\n });\n\n // Make sure we actually have a stack trace!\n var origStack = err.stack;\n if (typeof origStack === 'string') {\n // This will remove any duplicated frames from the error frames taken\n // from within `ifError` and add the original error frames to the newly\n // created ones.\n var tmp2 = origStack.split('\\n');\n tmp2.shift();\n // Filter all frames existing in err.stack.\n var tmp1 = newErr.stack.split('\\n');\n for (var i = 0; i < tmp2.length; i++) {\n // Find the first occurrence of the frame.\n var pos = tmp1.indexOf(tmp2[i]);\n if (pos !== -1) {\n // Only keep new frames.\n tmp1 = tmp1.slice(0, pos);\n break;\n }\n }\n newErr.stack = \"\".concat(tmp1.join('\\n'), \"\\n\").concat(tmp2.join('\\n'));\n }\n throw newErr;\n }\n};\n\n// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a871df3dfb8ea663ef5e1f8f62701ec51384ecb\nfunction internalMatch(string, regexp, message, fn, fnName) {\n if (!isRegExp(regexp)) {\n throw new ERR_INVALID_ARG_TYPE('regexp', 'RegExp', regexp);\n }\n var match = fnName === 'match';\n if (typeof string !== 'string' || RegExpPrototypeTest(regexp, string) !== match) {\n if (message instanceof Error) {\n throw message;\n }\n var generatedMessage = !message;\n\n // 'The input was expected to not match the regular expression ' +\n message = message || (typeof string !== 'string' ? 'The \"string\" argument must be of type string. Received type ' + \"\".concat(_typeof(string), \" (\").concat(inspect(string), \")\") : (match ? 'The input did not match the regular expression ' : 'The input was expected to not match the regular expression ') + \"\".concat(inspect(regexp), \". Input:\\n\\n\").concat(inspect(string), \"\\n\"));\n var err = new AssertionError({\n actual: string,\n expected: regexp,\n message: message,\n operator: fnName,\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n}\nassert.match = function match(string, regexp, message) {\n internalMatch(string, regexp, message, match, 'match');\n};\nassert.doesNotMatch = function doesNotMatch(string, regexp, message) {\n internalMatch(string, regexp, message, doesNotMatch, 'doesNotMatch');\n};\n\n// Expose a strict only variant of assert\nfunction strict() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n innerOk.apply(void 0, [strict, args.length].concat(args));\n}\nassert.strict = objectAssign(strict, assert, {\n equal: assert.strictEqual,\n deepEqual: assert.deepStrictEqual,\n notEqual: assert.notStrictEqual,\n notDeepEqual: assert.notDeepStrictEqual\n});\nassert.strict.strict = assert.strict;\n\n/***/ }),\n\n/***/ 5961:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var process = __webpack_require__(4155);\n// Currently in sync with Node.js lib/internal/assert/assertion_error.js\n// https://github.com/nodejs/node/commit/0817840f775032169ddd70c85ac059f18ffcc81c\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _require = __webpack_require__(9539),\n inspect = _require.inspect;\nvar _require2 = __webpack_require__(2136),\n ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE;\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n return str.substring(this_len - search.length, this_len) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat\nfunction repeat(str, count) {\n count = Math.floor(count);\n if (str.length == 0 || count == 0) return '';\n var maxCount = str.length * count;\n count = Math.floor(Math.log(count) / Math.log(2));\n while (count) {\n str += str;\n count--;\n }\n str += str.substring(0, maxCount - str.length);\n return str;\n}\nvar blue = '';\nvar green = '';\nvar red = '';\nvar white = '';\nvar kReadableOperator = {\n deepStrictEqual: 'Expected values to be strictly deep-equal:',\n strictEqual: 'Expected values to be strictly equal:',\n strictEqualObject: 'Expected \"actual\" to be reference-equal to \"expected\":',\n deepEqual: 'Expected values to be loosely deep-equal:',\n equal: 'Expected values to be loosely equal:',\n notDeepStrictEqual: 'Expected \"actual\" not to be strictly deep-equal to:',\n notStrictEqual: 'Expected \"actual\" to be strictly unequal to:',\n notStrictEqualObject: 'Expected \"actual\" not to be reference-equal to \"expected\":',\n notDeepEqual: 'Expected \"actual\" not to be loosely deep-equal to:',\n notEqual: 'Expected \"actual\" to be loosely unequal to:',\n notIdentical: 'Values identical but not reference-equal:'\n};\n\n// Comparing short primitives should just show === / !== instead of using the\n// diff.\nvar kMaxShortLength = 10;\nfunction copyError(source) {\n var keys = Object.keys(source);\n var target = Object.create(Object.getPrototypeOf(source));\n keys.forEach(function (key) {\n target[key] = source[key];\n });\n Object.defineProperty(target, 'message', {\n value: source.message\n });\n return target;\n}\nfunction inspectValue(val) {\n // The util.inspect default values could be changed. This makes sure the\n // error messages contain the necessary information nevertheless.\n return inspect(val, {\n compact: false,\n customInspect: false,\n depth: 1000,\n maxArrayLength: Infinity,\n // Assert compares only enumerable properties (with a few exceptions).\n showHidden: false,\n // Having a long line as error is better than wrapping the line for\n // comparison for now.\n // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we\n // have meta information about the inspected properties (i.e., know where\n // in what line the property starts and ends).\n breakLength: Infinity,\n // Assert does not detect proxies currently.\n showProxy: false,\n sorted: true,\n // Inspect getters as we also check them when comparing entries.\n getters: true\n });\n}\nfunction createErrDiff(actual, expected, operator) {\n var other = '';\n var res = '';\n var lastPos = 0;\n var end = '';\n var skipped = false;\n var actualInspected = inspectValue(actual);\n var actualLines = actualInspected.split('\\n');\n var expectedLines = inspectValue(expected).split('\\n');\n var i = 0;\n var indicator = '';\n\n // In case both values are objects explicitly mark them as not reference equal\n // for the `strictEqual` operator.\n if (operator === 'strictEqual' && _typeof(actual) === 'object' && _typeof(expected) === 'object' && actual !== null && expected !== null) {\n operator = 'strictEqualObject';\n }\n\n // If \"actual\" and \"expected\" fit on a single line and they are not strictly\n // equal, check further special handling.\n if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {\n var inputLength = actualLines[0].length + expectedLines[0].length;\n // If the character length of \"actual\" and \"expected\" together is less than\n // kMaxShortLength and if neither is an object and at least one of them is\n // not `zero`, use the strict equal comparison to visualize the output.\n if (inputLength <= kMaxShortLength) {\n if ((_typeof(actual) !== 'object' || actual === null) && (_typeof(expected) !== 'object' || expected === null) && (actual !== 0 || expected !== 0)) {\n // -0 === +0\n return \"\".concat(kReadableOperator[operator], \"\\n\\n\") + \"\".concat(actualLines[0], \" !== \").concat(expectedLines[0], \"\\n\");\n }\n } else if (operator !== 'strictEqualObject') {\n // If the stderr is a tty and the input length is lower than the current\n // columns per line, add a mismatch indicator below the output. If it is\n // not a tty, use a default value of 80 characters.\n var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;\n if (inputLength < maxLength) {\n while (actualLines[0][i] === expectedLines[0][i]) {\n i++;\n }\n // Ignore the first characters.\n if (i > 2) {\n // Add position indicator for the first mismatch in case it is a\n // single line and the input length is less than the column length.\n indicator = \"\\n \".concat(repeat(' ', i), \"^\");\n i = 0;\n }\n }\n }\n }\n\n // Remove all ending lines that match (this optimizes the output for\n // readability by reducing the number of total changed lines).\n var a = actualLines[actualLines.length - 1];\n var b = expectedLines[expectedLines.length - 1];\n while (a === b) {\n if (i++ < 2) {\n end = \"\\n \".concat(a).concat(end);\n } else {\n other = a;\n }\n actualLines.pop();\n expectedLines.pop();\n if (actualLines.length === 0 || expectedLines.length === 0) break;\n a = actualLines[actualLines.length - 1];\n b = expectedLines[expectedLines.length - 1];\n }\n var maxLines = Math.max(actualLines.length, expectedLines.length);\n // Strict equal with identical objects that are not identical by reference.\n // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() })\n if (maxLines === 0) {\n // We have to get the result again. The lines were all removed before.\n var _actualLines = actualInspected.split('\\n');\n\n // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n if (_actualLines.length > 30) {\n _actualLines[26] = \"\".concat(blue, \"...\").concat(white);\n while (_actualLines.length > 27) {\n _actualLines.pop();\n }\n }\n return \"\".concat(kReadableOperator.notIdentical, \"\\n\\n\").concat(_actualLines.join('\\n'), \"\\n\");\n }\n if (i > 3) {\n end = \"\\n\".concat(blue, \"...\").concat(white).concat(end);\n skipped = true;\n }\n if (other !== '') {\n end = \"\\n \".concat(other).concat(end);\n other = '';\n }\n var printedLines = 0;\n var msg = kReadableOperator[operator] + \"\\n\".concat(green, \"+ actual\").concat(white, \" \").concat(red, \"- expected\").concat(white);\n var skippedMsg = \" \".concat(blue, \"...\").concat(white, \" Lines skipped\");\n for (i = 0; i < maxLines; i++) {\n // Only extra expected lines exist\n var cur = i - lastPos;\n if (actualLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(expectedLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(expectedLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the expected line to the cache.\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLines[i]);\n printedLines++;\n // Only extra actual lines exist\n } else if (expectedLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the actual line to the result.\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLines[i]);\n printedLines++;\n // Lines diverge\n } else {\n var expectedLine = expectedLines[i];\n var actualLine = actualLines[i];\n // If the lines diverge, specifically check for lines that only diverge by\n // a trailing comma. In that case it is actually identical and we should\n // mark it as such.\n var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine);\n // If the expected line has a trailing comma but is otherwise identical,\n // add a comma at the end of the actual line. Otherwise the output could\n // look weird as in:\n //\n // [\n // 1 // No comma at the end!\n // + 2\n // ]\n //\n if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) {\n divergingLines = false;\n actualLine += ',';\n }\n if (divergingLines) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the actual line to the result and cache the expected diverging\n // line so consecutive diverging lines show up as +++--- and not +-+-+-.\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLine);\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLine);\n printedLines += 2;\n // Lines are identical\n } else {\n // Add all cached information to the result before adding other things\n // and reset the cache.\n res += other;\n other = '';\n // If the last diverging line is exactly one line above or if it is the\n // very first line, add the line to the result.\n if (cur === 1 || i === 0) {\n res += \"\\n \".concat(actualLine);\n printedLines++;\n }\n }\n }\n // Inspected object to big (Show ~20 rows max)\n if (printedLines > 20 && i < maxLines - 2) {\n return \"\".concat(msg).concat(skippedMsg, \"\\n\").concat(res, \"\\n\").concat(blue, \"...\").concat(white).concat(other, \"\\n\") + \"\".concat(blue, \"...\").concat(white);\n }\n }\n return \"\".concat(msg).concat(skipped ? skippedMsg : '', \"\\n\").concat(res).concat(other).concat(end).concat(indicator);\n}\nvar AssertionError = /*#__PURE__*/function (_Error, _inspect$custom) {\n _inherits(AssertionError, _Error);\n var _super = _createSuper(AssertionError);\n function AssertionError(options) {\n var _this;\n _classCallCheck(this, AssertionError);\n if (_typeof(options) !== 'object' || options === null) {\n throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);\n }\n var message = options.message,\n operator = options.operator,\n stackStartFn = options.stackStartFn;\n var actual = options.actual,\n expected = options.expected;\n var limit = Error.stackTraceLimit;\n Error.stackTraceLimit = 0;\n if (message != null) {\n _this = _super.call(this, String(message));\n } else {\n if (process.stderr && process.stderr.isTTY) {\n // Reset on each call to make sure we handle dynamically set environment\n // variables correct.\n if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {\n blue = \"\\x1B[34m\";\n green = \"\\x1B[32m\";\n white = \"\\x1B[39m\";\n red = \"\\x1B[31m\";\n } else {\n blue = '';\n green = '';\n white = '';\n red = '';\n }\n }\n // Prevent the error stack from being visible by duplicating the error\n // in a very close way to the original in case both sides are actually\n // instances of Error.\n if (_typeof(actual) === 'object' && actual !== null && _typeof(expected) === 'object' && expected !== null && 'stack' in actual && actual instanceof Error && 'stack' in expected && expected instanceof Error) {\n actual = copyError(actual);\n expected = copyError(expected);\n }\n if (operator === 'deepStrictEqual' || operator === 'strictEqual') {\n _this = _super.call(this, createErrDiff(actual, expected, operator));\n } else if (operator === 'notDeepStrictEqual' || operator === 'notStrictEqual') {\n // In case the objects are equal but the operator requires unequal, show\n // the first object and say A equals B\n var base = kReadableOperator[operator];\n var res = inspectValue(actual).split('\\n');\n\n // In case \"actual\" is an object, it should not be reference equal.\n if (operator === 'notStrictEqual' && _typeof(actual) === 'object' && actual !== null) {\n base = kReadableOperator.notStrictEqualObject;\n }\n\n // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n if (res.length > 30) {\n res[26] = \"\".concat(blue, \"...\").concat(white);\n while (res.length > 27) {\n res.pop();\n }\n }\n\n // Only print a single input.\n if (res.length === 1) {\n _this = _super.call(this, \"\".concat(base, \" \").concat(res[0]));\n } else {\n _this = _super.call(this, \"\".concat(base, \"\\n\\n\").concat(res.join('\\n'), \"\\n\"));\n }\n } else {\n var _res = inspectValue(actual);\n var other = '';\n var knownOperators = kReadableOperator[operator];\n if (operator === 'notDeepEqual' || operator === 'notEqual') {\n _res = \"\".concat(kReadableOperator[operator], \"\\n\\n\").concat(_res);\n if (_res.length > 1024) {\n _res = \"\".concat(_res.slice(0, 1021), \"...\");\n }\n } else {\n other = \"\".concat(inspectValue(expected));\n if (_res.length > 512) {\n _res = \"\".concat(_res.slice(0, 509), \"...\");\n }\n if (other.length > 512) {\n other = \"\".concat(other.slice(0, 509), \"...\");\n }\n if (operator === 'deepEqual' || operator === 'equal') {\n _res = \"\".concat(knownOperators, \"\\n\\n\").concat(_res, \"\\n\\nshould equal\\n\\n\");\n } else {\n other = \" \".concat(operator, \" \").concat(other);\n }\n }\n _this = _super.call(this, \"\".concat(_res).concat(other));\n }\n }\n Error.stackTraceLimit = limit;\n _this.generatedMessage = !message;\n Object.defineProperty(_assertThisInitialized(_this), 'name', {\n value: 'AssertionError [ERR_ASSERTION]',\n enumerable: false,\n writable: true,\n configurable: true\n });\n _this.code = 'ERR_ASSERTION';\n _this.actual = actual;\n _this.expected = expected;\n _this.operator = operator;\n if (Error.captureStackTrace) {\n // eslint-disable-next-line no-restricted-syntax\n Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);\n }\n // Create error message including the error code in the name.\n _this.stack;\n // Reset the name.\n _this.name = 'AssertionError';\n return _possibleConstructorReturn(_this);\n }\n _createClass(AssertionError, [{\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this.name, \" [\").concat(this.code, \"]: \").concat(this.message);\n }\n }, {\n key: _inspect$custom,\n value: function value(recurseTimes, ctx) {\n // This limits the `actual` and `expected` property default inspection to\n // the minimum depth. Otherwise those values would be too verbose compared\n // to the actual error message which contains a combined view of these two\n // input values.\n return inspect(this, _objectSpread(_objectSpread({}, ctx), {}, {\n customInspect: false,\n depth: 0\n }));\n }\n }]);\n return AssertionError;\n}( /*#__PURE__*/_wrapNativeSuper(Error), inspect.custom);\nmodule.exports = AssertionError;\n\n/***/ }),\n\n/***/ 2136:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n// Currently in sync with Node.js lib/internal/errors.js\n// https://github.com/nodejs/node/commit/3b044962c48fe313905877a96b5d0894a5404f6f\n\n/* eslint node-core/documented-errors: \"error\" */\n/* eslint node-core/alphabetize-errors: \"error\" */\n/* eslint node-core/prefer-util-format-errors: \"error\" */\n\n\n\n// The whole point behind this internal module is to allow Node.js to no\n// longer be forced to treat every error message change as a semver-major\n// change. The NodeError classes here all expose a `code` property whose\n// value statically and permanently identifies the error. While the error\n// message may change, the code should not.\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar codes = {};\n\n// Lazy loaded\nvar assert;\nvar util;\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n var NodeError = /*#__PURE__*/function (_Base) {\n _inherits(NodeError, _Base);\n var _super = _createSuper(NodeError);\n function NodeError(arg1, arg2, arg3) {\n var _this;\n _classCallCheck(this, NodeError);\n _this = _super.call(this, getMessage(arg1, arg2, arg3));\n _this.code = code;\n return _this;\n }\n return _createClass(NodeError);\n }(Base);\n codes[code] = NodeError;\n}\n\n// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n return str.substring(this_len - search.length, this_len) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\ncreateErrorType('ERR_AMBIGUOUS_ARGUMENT', 'The \"%s\" argument is ambiguous. %s', TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n if (assert === undefined) assert = __webpack_require__(9282);\n assert(typeof name === 'string', \"'name' must be a string\");\n\n // determiner: 'must be' or 'must not be'\n var determiner;\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n var msg;\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n // TODO(BridgeAR): Improve the output by showing `null` and similar.\n msg += \". Received type \".concat(_typeof(actual));\n return msg;\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_VALUE', function (name, value) {\n var reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'is invalid';\n if (util === undefined) util = __webpack_require__(9539);\n var inspected = util.inspect(value);\n if (inspected.length > 128) {\n inspected = \"\".concat(inspected.slice(0, 128), \"...\");\n }\n return \"The argument '\".concat(name, \"' \").concat(reason, \". Received \").concat(inspected);\n}, TypeError, RangeError);\ncreateErrorType('ERR_INVALID_RETURN_VALUE', function (input, name, value) {\n var type;\n if (value && value.constructor && value.constructor.name) {\n type = \"instance of \".concat(value.constructor.name);\n } else {\n type = \"type \".concat(_typeof(value));\n }\n return \"Expected \".concat(input, \" to be returned from the \\\"\").concat(name, \"\\\"\") + \" function but got \".concat(type, \".\");\n}, TypeError);\ncreateErrorType('ERR_MISSING_ARGS', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (assert === undefined) assert = __webpack_require__(9282);\n assert(args.length > 0, 'At least one arg needs to be specified');\n var msg = 'The ';\n var len = args.length;\n args = args.map(function (a) {\n return \"\\\"\".concat(a, \"\\\"\");\n });\n switch (len) {\n case 1:\n msg += \"\".concat(args[0], \" argument\");\n break;\n case 2:\n msg += \"\".concat(args[0], \" and \").concat(args[1], \" arguments\");\n break;\n default:\n msg += args.slice(0, len - 1).join(', ');\n msg += \", and \".concat(args[len - 1], \" arguments\");\n break;\n }\n return \"\".concat(msg, \" must be specified\");\n}, TypeError);\nmodule.exports.codes = codes;\n\n/***/ }),\n\n/***/ 9158:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n// Currently in sync with Node.js lib/internal/util/comparisons.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar regexFlagsSupported = /a/g.flags !== undefined;\nvar arrayFromSet = function arrayFromSet(set) {\n var array = [];\n set.forEach(function (value) {\n return array.push(value);\n });\n return array;\n};\nvar arrayFromMap = function arrayFromMap(map) {\n var array = [];\n map.forEach(function (value, key) {\n return array.push([key, value]);\n });\n return array;\n};\nvar objectIs = Object.is ? Object.is : __webpack_require__(609);\nvar objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () {\n return [];\n};\nvar numberIsNaN = Number.isNaN ? Number.isNaN : __webpack_require__(360);\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\nvar hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);\nvar propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);\nvar objectToString = uncurryThis(Object.prototype.toString);\nvar _require$types = (__webpack_require__(9539).types),\n isAnyArrayBuffer = _require$types.isAnyArrayBuffer,\n isArrayBufferView = _require$types.isArrayBufferView,\n isDate = _require$types.isDate,\n isMap = _require$types.isMap,\n isRegExp = _require$types.isRegExp,\n isSet = _require$types.isSet,\n isNativeError = _require$types.isNativeError,\n isBoxedPrimitive = _require$types.isBoxedPrimitive,\n isNumberObject = _require$types.isNumberObject,\n isStringObject = _require$types.isStringObject,\n isBooleanObject = _require$types.isBooleanObject,\n isBigIntObject = _require$types.isBigIntObject,\n isSymbolObject = _require$types.isSymbolObject,\n isFloat32Array = _require$types.isFloat32Array,\n isFloat64Array = _require$types.isFloat64Array;\nfunction isNonIndex(key) {\n if (key.length === 0 || key.length > 10) return true;\n for (var i = 0; i < key.length; i++) {\n var code = key.charCodeAt(i);\n if (code < 48 || code > 57) return true;\n }\n // The maximum size for an array is 2 ** 32 -1.\n return key.length === 10 && key >= Math.pow(2, 32);\n}\nfunction getOwnNonIndexProperties(value) {\n return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));\n}\n\n// Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js\n// original notice:\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n var x = a.length;\n var y = b.length;\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}\nvar ONLY_ENUMERABLE = undefined;\nvar kStrict = true;\nvar kLoose = false;\nvar kNoIterator = 0;\nvar kIsArray = 1;\nvar kIsSet = 2;\nvar kIsMap = 3;\n\n// Check if they have the same source and flags\nfunction areSimilarRegExps(a, b) {\n return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);\n}\nfunction areSimilarFloatArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n for (var offset = 0; offset < a.byteLength; offset++) {\n if (a[offset] !== b[offset]) {\n return false;\n }\n }\n return true;\n}\nfunction areSimilarTypedArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;\n}\nfunction areEqualArrayBuffers(buf1, buf2) {\n return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;\n}\nfunction isEqualBoxedPrimitive(val1, val2) {\n if (isNumberObject(val1)) {\n return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));\n }\n if (isStringObject(val1)) {\n return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);\n }\n if (isBooleanObject(val1)) {\n return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);\n }\n if (isBigIntObject(val1)) {\n return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);\n }\n return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);\n}\n\n// Notes: Type tags are historical [[Class]] properties that can be set by\n// FunctionTemplate::SetClassName() in C++ or Symbol.toStringTag in JS\n// and retrieved using Object.prototype.toString.call(obj) in JS\n// See https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n// for a list of tags pre-defined in the spec.\n// There are some unspecified tags in the wild too (e.g. typed array tags).\n// Since tags can be altered, they only serve fast failures\n//\n// Typed arrays and buffers are checked by comparing the content in their\n// underlying ArrayBuffer. This optimization requires that it's\n// reasonable to interpret their underlying memory in the same way,\n// which is checked by comparing their type tags.\n// (e.g. a Uint8Array and a Uint16Array with the same memory content\n// could still be different because they will be interpreted differently).\n//\n// For strict comparison, objects should have\n// a) The same built-in type tags\n// b) The same prototypes.\n\nfunction innerDeepEqual(val1, val2, strict, memos) {\n // All identical values are equivalent, as determined by ===.\n if (val1 === val2) {\n if (val1 !== 0) return true;\n return strict ? objectIs(val1, val2) : true;\n }\n\n // Check more closely if val1 and val2 are equal.\n if (strict) {\n if (_typeof(val1) !== 'object') {\n return typeof val1 === 'number' && numberIsNaN(val1) && numberIsNaN(val2);\n }\n if (_typeof(val2) !== 'object' || val1 === null || val2 === null) {\n return false;\n }\n if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {\n return false;\n }\n } else {\n if (val1 === null || _typeof(val1) !== 'object') {\n if (val2 === null || _typeof(val2) !== 'object') {\n // eslint-disable-next-line eqeqeq\n return val1 == val2;\n }\n return false;\n }\n if (val2 === null || _typeof(val2) !== 'object') {\n return false;\n }\n }\n var val1Tag = objectToString(val1);\n var val2Tag = objectToString(val2);\n if (val1Tag !== val2Tag) {\n return false;\n }\n if (Array.isArray(val1)) {\n // Check for sparse arrays and general fast path\n if (val1.length !== val2.length) {\n return false;\n }\n var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n if (keys1.length !== keys2.length) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsArray, keys1);\n }\n // [browserify] This triggers on certain types in IE (Map/Set) so we don't\n // wan't to early return out of the rest of the checks. However we can check\n // if the second value is one of these values and the first isn't.\n if (val1Tag === '[object Object]') {\n // return keyCheck(val1, val2, strict, memos, kNoIterator);\n if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {\n return false;\n }\n }\n if (isDate(val1)) {\n if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {\n return false;\n }\n } else if (isRegExp(val1)) {\n if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {\n return false;\n }\n } else if (isNativeError(val1) || val1 instanceof Error) {\n // Do not compare the stack as it might differ even though the error itself\n // is otherwise identical.\n if (val1.message !== val2.message || val1.name !== val2.name) {\n return false;\n }\n } else if (isArrayBufferView(val1)) {\n if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {\n if (!areSimilarFloatArrays(val1, val2)) {\n return false;\n }\n } else if (!areSimilarTypedArrays(val1, val2)) {\n return false;\n }\n // Buffer.compare returns true, so val1.length === val2.length. If they both\n // only contain numeric keys, we don't need to exam further than checking\n // the symbols.\n var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n if (_keys.length !== _keys2.length) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);\n } else if (isSet(val1)) {\n if (!isSet(val2) || val1.size !== val2.size) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsSet);\n } else if (isMap(val1)) {\n if (!isMap(val2) || val1.size !== val2.size) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsMap);\n } else if (isAnyArrayBuffer(val1)) {\n if (!areEqualArrayBuffers(val1, val2)) {\n return false;\n }\n } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kNoIterator);\n}\nfunction getEnumerables(val, keys) {\n return keys.filter(function (k) {\n return propertyIsEnumerable(val, k);\n });\n}\nfunction keyCheck(val1, val2, strict, memos, iterationType, aKeys) {\n // For all remaining Object pairs, including Array, objects and Maps,\n // equivalence is determined by having:\n // a) The same number of owned enumerable properties\n // b) The same set of keys/indexes (although not necessarily the same order)\n // c) Equivalent values for every corresponding key/index\n // d) For Sets and Maps, equal contents\n // Note: this accounts for both named and indexed properties on Arrays.\n if (arguments.length === 5) {\n aKeys = Object.keys(val1);\n var bKeys = Object.keys(val2);\n\n // The pair must have the same number of owned properties.\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n }\n\n // Cheap key test\n var i = 0;\n for (; i < aKeys.length; i++) {\n if (!hasOwnProperty(val2, aKeys[i])) {\n return false;\n }\n }\n if (strict && arguments.length === 5) {\n var symbolKeysA = objectGetOwnPropertySymbols(val1);\n if (symbolKeysA.length !== 0) {\n var count = 0;\n for (i = 0; i < symbolKeysA.length; i++) {\n var key = symbolKeysA[i];\n if (propertyIsEnumerable(val1, key)) {\n if (!propertyIsEnumerable(val2, key)) {\n return false;\n }\n aKeys.push(key);\n count++;\n } else if (propertyIsEnumerable(val2, key)) {\n return false;\n }\n }\n var symbolKeysB = objectGetOwnPropertySymbols(val2);\n if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {\n return false;\n }\n } else {\n var _symbolKeysB = objectGetOwnPropertySymbols(val2);\n if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {\n return false;\n }\n }\n }\n if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {\n return true;\n }\n\n // Use memos to handle cycles.\n if (memos === undefined) {\n memos = {\n val1: new Map(),\n val2: new Map(),\n position: 0\n };\n } else {\n // We prevent up to two map.has(x) calls by directly retrieving the value\n // and checking for undefined. The map can only contain numbers, so it is\n // safe to check for undefined only.\n var val2MemoA = memos.val1.get(val1);\n if (val2MemoA !== undefined) {\n var val2MemoB = memos.val2.get(val2);\n if (val2MemoB !== undefined) {\n return val2MemoA === val2MemoB;\n }\n }\n memos.position++;\n }\n memos.val1.set(val1, memos.position);\n memos.val2.set(val2, memos.position);\n var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);\n memos.val1.delete(val1);\n memos.val2.delete(val2);\n return areEq;\n}\nfunction setHasEqualElement(set, val1, strict, memo) {\n // Go looking.\n var setValues = arrayFromSet(set);\n for (var i = 0; i < setValues.length; i++) {\n var val2 = setValues[i];\n if (innerDeepEqual(val1, val2, strict, memo)) {\n // Remove the matching element to make sure we do not check that again.\n set.delete(val2);\n return true;\n }\n }\n return false;\n}\n\n// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using\n// Sadly it is not possible to detect corresponding values properly in case the\n// type is a string, number, bigint or boolean. The reason is that those values\n// can match lots of different string values (e.g., 1n == '+00001').\nfunction findLooseMatchingPrimitives(prim) {\n switch (_typeof(prim)) {\n case 'undefined':\n return null;\n case 'object':\n // Only pass in null as object!\n return undefined;\n case 'symbol':\n return false;\n case 'string':\n prim = +prim;\n // Loose equal entries exist only if the string is possible to convert to\n // a regular number and not NaN.\n // Fall through\n case 'number':\n if (numberIsNaN(prim)) {\n return false;\n }\n }\n return true;\n}\nfunction setMightHaveLoosePrim(a, b, prim) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) return altValue;\n return b.has(altValue) && !a.has(altValue);\n}\nfunction mapMightHaveLoosePrim(a, b, prim, item, memo) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) {\n return altValue;\n }\n var curB = b.get(altValue);\n if (curB === undefined && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {\n return false;\n }\n return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);\n}\nfunction setEquiv(a, b, strict, memo) {\n // This is a lazily initiated Set of entries which have to be compared\n // pairwise.\n var set = null;\n var aValues = arrayFromSet(a);\n for (var i = 0; i < aValues.length; i++) {\n var val = aValues[i];\n // Note: Checking for the objects first improves the performance for object\n // heavy sets but it is a minor slow down for primitives. As they are fast\n // to check this improves the worst case scenario instead.\n if (_typeof(val) === 'object' && val !== null) {\n if (set === null) {\n set = new Set();\n }\n // If the specified value doesn't exist in the second set its an not null\n // object (or non strict only: a not matching primitive) we'll need to go\n // hunting for something thats deep-(strict-)equal to it. To make this\n // O(n log n) complexity we have to copy these values in a new set first.\n set.add(val);\n } else if (!b.has(val)) {\n if (strict) return false;\n\n // Fast path to detect missing string, symbol, undefined and null values.\n if (!setMightHaveLoosePrim(a, b, val)) {\n return false;\n }\n if (set === null) {\n set = new Set();\n }\n set.add(val);\n }\n }\n if (set !== null) {\n var bValues = arrayFromSet(b);\n for (var _i = 0; _i < bValues.length; _i++) {\n var _val = bValues[_i];\n // We have to check if a primitive value is already\n // matching and only if it's not, go hunting for it.\n if (_typeof(_val) === 'object' && _val !== null) {\n if (!setHasEqualElement(set, _val, strict, memo)) return false;\n } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {\n return false;\n }\n }\n return set.size === 0;\n }\n return true;\n}\nfunction mapHasEqualEntry(set, map, key1, item1, strict, memo) {\n // To be able to handle cases like:\n // Map([[{}, 'a'], [{}, 'b']]) vs Map([[{}, 'b'], [{}, 'a']])\n // ... we need to consider *all* matching keys, not just the first we find.\n var setValues = arrayFromSet(set);\n for (var i = 0; i < setValues.length; i++) {\n var key2 = setValues[i];\n if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {\n set.delete(key2);\n return true;\n }\n }\n return false;\n}\nfunction mapEquiv(a, b, strict, memo) {\n var set = null;\n var aEntries = arrayFromMap(a);\n for (var i = 0; i < aEntries.length; i++) {\n var _aEntries$i = _slicedToArray(aEntries[i], 2),\n key = _aEntries$i[0],\n item1 = _aEntries$i[1];\n if (_typeof(key) === 'object' && key !== null) {\n if (set === null) {\n set = new Set();\n }\n set.add(key);\n } else {\n // By directly retrieving the value we prevent another b.has(key) check in\n // almost all possible cases.\n var item2 = b.get(key);\n if (item2 === undefined && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {\n if (strict) return false;\n // Fast path to detect missing string, symbol, undefined and null\n // keys.\n if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;\n if (set === null) {\n set = new Set();\n }\n set.add(key);\n }\n }\n }\n if (set !== null) {\n var bEntries = arrayFromMap(b);\n for (var _i2 = 0; _i2 < bEntries.length; _i2++) {\n var _bEntries$_i = _slicedToArray(bEntries[_i2], 2),\n _key = _bEntries$_i[0],\n item = _bEntries$_i[1];\n if (_typeof(_key) === 'object' && _key !== null) {\n if (!mapHasEqualEntry(set, a, _key, item, strict, memo)) return false;\n } else if (!strict && (!a.has(_key) || !innerDeepEqual(a.get(_key), item, false, memo)) && !mapHasEqualEntry(set, a, _key, item, false, memo)) {\n return false;\n }\n }\n return set.size === 0;\n }\n return true;\n}\nfunction objEquiv(a, b, strict, keys, memos, iterationType) {\n // Sets and maps don't have their entries accessible via normal object\n // properties.\n var i = 0;\n if (iterationType === kIsSet) {\n if (!setEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsMap) {\n if (!mapEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsArray) {\n for (; i < a.length; i++) {\n if (hasOwnProperty(a, i)) {\n if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {\n return false;\n }\n } else if (hasOwnProperty(b, i)) {\n return false;\n } else {\n // Array is sparse.\n var keysA = Object.keys(a);\n for (; i < keysA.length; i++) {\n var key = keysA[i];\n if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {\n return false;\n }\n }\n if (keysA.length !== Object.keys(b).length) {\n return false;\n }\n return true;\n }\n }\n }\n\n // The pair must have equivalent values for every corresponding key.\n // Possibly expensive deep test:\n for (i = 0; i < keys.length; i++) {\n var _key2 = keys[i];\n if (!innerDeepEqual(a[_key2], b[_key2], strict, memos)) {\n return false;\n }\n }\n return true;\n}\nfunction isDeepEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kLoose);\n}\nfunction isDeepStrictEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kStrict);\n}\nmodule.exports = {\n isDeepEqual: isDeepEqual,\n isDeepStrictEqual: isDeepStrictEqual\n};\n\n/***/ }),\n\n/***/ 8162:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\n// @ts-ignore\nvar _Buffer = (__webpack_require__(9509).Buffer)\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source) }\n if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return _Buffer.alloc(0) }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (psz < source.length) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4))\n vch.fill(0x00, 0, zeroes)\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n\n\n/***/ }),\n\n/***/ 9742:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n/***/ }),\n\n/***/ 3302:\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_RESULT__;/*\r\n * big.js v6.2.1\r\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\r\n * Copyright (c) 2022 Michael Mclaughlin\r\n * https://github.com/MikeMcl/big.js/LICENCE.md\r\n */\r\n;(function (GLOBAL) {\r\n 'use strict';\r\n var Big,\r\n\r\n\r\n/************************************** EDITABLE DEFAULTS *****************************************/\r\n\r\n\r\n // The default values below must be integers within the stated ranges.\r\n\r\n /*\r\n * The maximum number of decimal places (DP) of the results of operations involving division:\r\n * div and sqrt, and pow with negative exponents.\r\n */\r\n DP = 20, // 0 to MAX_DP\r\n\r\n /*\r\n * The rounding mode (RM) used when rounding to the above decimal places.\r\n *\r\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\r\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\r\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\r\n * 3 Away from zero. (ROUND_UP)\r\n */\r\n RM = 1, // 0, 1, 2 or 3\r\n\r\n // The maximum value of DP and Big.DP.\r\n MAX_DP = 1E6, // 0 to 1000000\r\n\r\n // The maximum magnitude of the exponent argument to the pow method.\r\n MAX_POWER = 1E6, // 1 to 1000000\r\n\r\n /*\r\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\r\n * (JavaScript numbers: -7)\r\n * -1000000 is the minimum recommended exponent value of a Big.\r\n */\r\n NE = -7, // 0 to -1000000\r\n\r\n /*\r\n * The positive exponent (PE) at and above which toString returns exponential notation.\r\n * (JavaScript numbers: 21)\r\n * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\r\n */\r\n PE = 21, // 0 to 1000000\r\n\r\n /*\r\n * When true, an error will be thrown if a primitive number is passed to the Big constructor,\r\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\r\n * primitive number without a loss of precision.\r\n */\r\n STRICT = false, // true or false\r\n\r\n\r\n/**************************************************************************************************/\r\n\r\n\r\n // Error messages.\r\n NAME = '[big.js] ',\r\n INVALID = NAME + 'Invalid ',\r\n INVALID_DP = INVALID + 'decimal places',\r\n INVALID_RM = INVALID + 'rounding mode',\r\n DIV_BY_ZERO = NAME + 'Division by zero',\r\n\r\n // The shared prototype object.\r\n P = {},\r\n UNDEFINED = void 0,\r\n NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\r\n\r\n\r\n /*\r\n * Create and return a Big constructor.\r\n */\r\n function _Big_() {\r\n\r\n /*\r\n * The Big constructor and exported function.\r\n * Create and return a new instance of a Big number object.\r\n *\r\n * n {number|string|Big} A numeric value.\r\n */\r\n function Big(n) {\r\n var x = this;\r\n\r\n // Enable constructor usage without new.\r\n if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);\r\n\r\n // Duplicate.\r\n if (n instanceof Big) {\r\n x.s = n.s;\r\n x.e = n.e;\r\n x.c = n.c.slice();\r\n } else {\r\n if (typeof n !== 'string') {\r\n if (Big.strict === true && typeof n !== 'bigint') {\r\n throw TypeError(INVALID + 'value');\r\n }\r\n\r\n // Minus zero?\r\n n = n === 0 && 1 / n < 0 ? '-0' : String(n);\r\n }\r\n\r\n parse(x, n);\r\n }\r\n\r\n // Retain a reference to this Big constructor.\r\n // Shadow Big.prototype.constructor which points to Object.\r\n x.constructor = Big;\r\n }\r\n\r\n Big.prototype = P;\r\n Big.DP = DP;\r\n Big.RM = RM;\r\n Big.NE = NE;\r\n Big.PE = PE;\r\n Big.strict = STRICT;\r\n Big.roundDown = 0;\r\n Big.roundHalfUp = 1;\r\n Big.roundHalfEven = 2;\r\n Big.roundUp = 3;\r\n\r\n return Big;\r\n }\r\n\r\n\r\n /*\r\n * Parse the number or string value passed to a Big constructor.\r\n *\r\n * x {Big} A Big number instance.\r\n * n {number|string} A numeric value.\r\n */\r\n function parse(x, n) {\r\n var e, i, nl;\r\n\r\n if (!NUMERIC.test(n)) {\r\n throw Error(INVALID + 'number');\r\n }\r\n\r\n // Determine sign.\r\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\r\n\r\n // Decimal point?\r\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = n.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +n.slice(i + 1);\r\n n = n.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = n.length;\r\n }\r\n\r\n nl = n.length;\r\n\r\n // Determine leading zeros.\r\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\r\n\r\n if (i == nl) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n\r\n // Determine trailing zeros.\r\n for (; nl > 0 && n.charAt(--nl) == '0';);\r\n x.e = e - i - 1;\r\n x.c = [];\r\n\r\n // Convert string to array of digits without leading/trailing zeros.\r\n for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Round Big x to a maximum of sd significant digits using rounding mode rm.\r\n *\r\n * x {Big} The Big to round.\r\n * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\r\n * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n * [more] {boolean} Whether the result of division was truncated.\r\n */\r\n function round(x, sd, rm, more) {\r\n var xc = x.c;\r\n\r\n if (rm === UNDEFINED) rm = x.constructor.RM;\r\n if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\r\n throw Error(INVALID_RM);\r\n }\r\n\r\n if (sd < 1) {\r\n more =\r\n rm === 3 && (more || !!xc[0]) || sd === 0 && (\r\n rm === 1 && xc[0] >= 5 ||\r\n rm === 2 && (xc[0] > 5 || xc[0] === 5 && (more || xc[1] !== UNDEFINED))\r\n );\r\n\r\n xc.length = 1;\r\n\r\n if (more) {\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n x.e = x.e - sd + 1;\r\n xc[0] = 1;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n } else if (sd < xc.length) {\r\n\r\n // xc[sd] is the digit after the digit that may be rounded up.\r\n more =\r\n rm === 1 && xc[sd] >= 5 ||\r\n rm === 2 && (xc[sd] > 5 || xc[sd] === 5 &&\r\n (more || xc[sd + 1] !== UNDEFINED || xc[sd - 1] & 1)) ||\r\n rm === 3 && (more || !!xc[0]);\r\n\r\n // Remove any digits after the required precision.\r\n xc.length = sd;\r\n\r\n // Round up?\r\n if (more) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up.\r\n for (; ++xc[--sd] > 9;) {\r\n xc[sd] = 0;\r\n if (sd === 0) {\r\n ++x.e;\r\n xc.unshift(1);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (sd = xc.length; !xc[--sd];) xc.pop();\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Return a string representing the value of Big x in normal or exponential notation.\r\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\r\n */\r\n function stringify(x, doExponential, isNonzero) {\r\n var e = x.e,\r\n s = x.c.join(''),\r\n n = s.length;\r\n\r\n // Exponential notation?\r\n if (doExponential) {\r\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\r\n\r\n // Normal notation.\r\n } else if (e < 0) {\r\n for (; ++e;) s = '0' + s;\r\n s = '0.' + s;\r\n } else if (e > 0) {\r\n if (++e > n) {\r\n for (e -= n; e--;) s += '0';\r\n } else if (e < n) {\r\n s = s.slice(0, e) + '.' + s.slice(e);\r\n }\r\n } else if (n > 1) {\r\n s = s.charAt(0) + '.' + s.slice(1);\r\n }\r\n\r\n return x.s < 0 && isNonzero ? '-' + s : s;\r\n }\r\n\r\n\r\n // Prototype/instance methods\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the absolute value of this Big.\r\n */\r\n P.abs = function () {\r\n var x = new this.constructor(this);\r\n x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return 1 if the value of this Big is greater than the value of Big y,\r\n * -1 if the value of this Big is less than the value of Big y, or\r\n * 0 if they have the same value.\r\n */\r\n P.cmp = function (y) {\r\n var isneg,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new x.constructor(y)).c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n isneg = i < 0;\r\n\r\n // Compare exponents.\r\n if (k != l) return k > l ^ isneg ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = -1; ++i < j;) {\r\n if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ isneg ? 1 : -1;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\r\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\n P.div = function (y) {\r\n var x = this,\r\n Big = x.constructor,\r\n a = x.c, // dividend\r\n b = (y = new Big(y)).c, // divisor\r\n k = x.s == y.s ? 1 : -1,\r\n dp = Big.DP;\r\n\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n\r\n // Divisor is zero?\r\n if (!b[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n // Dividend is 0? Return +-0.\r\n if (!a[0]) {\r\n y.s = k;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n var bl, bt, n, cmp, ri,\r\n bz = b.slice(),\r\n ai = bl = b.length,\r\n al = a.length,\r\n r = a.slice(0, bl), // remainder\r\n rl = r.length,\r\n q = y, // quotient\r\n qc = q.c = [],\r\n qi = 0,\r\n p = dp + (q.e = x.e - y.e) + 1; // precision of the result\r\n\r\n q.s = k;\r\n k = p < 0 ? 0 : p;\r\n\r\n // Create version of divisor with leading zero.\r\n bz.unshift(0);\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; rl++ < bl;) r.push(0);\r\n\r\n do {\r\n\r\n // n is how many times the divisor goes into current remainder.\r\n for (n = 0; n < 10; n++) {\r\n\r\n // Compare divisor and remainder.\r\n if (bl != (rl = r.length)) {\r\n cmp = bl > rl ? 1 : -1;\r\n } else {\r\n for (ri = -1, cmp = 0; ++ri < bl;) {\r\n if (b[ri] != r[ri]) {\r\n cmp = b[ri] > r[ri] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // If divisor < remainder, subtract divisor from remainder.\r\n if (cmp < 0) {\r\n\r\n // Remainder can't be more than 1 digit longer than divisor.\r\n // Equalise lengths using divisor with extra leading zero?\r\n for (bt = rl == bl ? b : bz; rl;) {\r\n if (r[--rl] < bt[rl]) {\r\n ri = rl;\r\n for (; ri && !r[--ri];) r[ri] = 9;\r\n --r[ri];\r\n r[rl] += 10;\r\n }\r\n r[rl] -= bt[rl];\r\n }\r\n\r\n for (; !r[0];) r.shift();\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n // Add the digit n to the result array.\r\n qc[qi++] = cmp ? n : ++n;\r\n\r\n // Update the remainder.\r\n if (r[0] && cmp) r[rl] = a[ai] || 0;\r\n else r = [a[ai]];\r\n\r\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\r\n\r\n // Leading zero? Do not remove if result is simply zero (qi == 1).\r\n if (!qc[0] && qi != 1) {\r\n\r\n // There can't be more than one zero.\r\n qc.shift();\r\n q.e--;\r\n p--;\r\n }\r\n\r\n // Round?\r\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\r\n\r\n return q;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\r\n */\r\n P.eq = function (y) {\r\n return this.cmp(y) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\r\n * false.\r\n */\r\n P.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\n P.gte = function (y) {\r\n return this.cmp(y) > -1;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\r\n */\r\n P.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\n P.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big minus the value of Big y.\r\n */\r\n P.minus = P.sub = function (y) {\r\n var i, j, t, xlty,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xc = x.c.slice(),\r\n xe = x.e,\r\n yc = y.c,\r\n ye = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (yc[0]) {\r\n y.s = -b;\r\n } else if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = 1;\r\n }\r\n return y;\r\n }\r\n\r\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\r\n if (a = xe - ye) {\r\n\r\n if (xlty = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n for (b = a; b--;) t.push(0);\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n if (xc[b] != yc[b]) {\r\n xlty = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xlty) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n /*\r\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\r\n * needs to start at yc.length.\r\n */\r\n if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0;\r\n\r\n // Subtract yc from xc.\r\n for (b = i; j > a;) {\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i];) xc[i] = 9;\r\n --xc[i];\r\n xc[j] += 10;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--b] === 0;) xc.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] === 0;) {\r\n xc.shift();\r\n --ye;\r\n }\r\n\r\n if (!xc[0]) {\r\n\r\n // n - n = +0\r\n y.s = 1;\r\n\r\n // Result must be zero.\r\n xc = [ye = 0];\r\n }\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\r\n */\r\n P.mod = function (y) {\r\n var ygtx,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n if (!y.c[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n x.s = y.s = 1;\r\n ygtx = y.cmp(x) == 1;\r\n x.s = a;\r\n y.s = b;\r\n\r\n if (ygtx) return new Big(x);\r\n\r\n a = Big.DP;\r\n b = Big.RM;\r\n Big.DP = Big.RM = 0;\r\n x = x.div(y);\r\n Big.DP = a;\r\n Big.RM = b;\r\n\r\n return this.minus(x.times(y));\r\n };\r\n \r\n \r\n /*\r\n * Return a new Big whose value is the value of this Big negated.\r\n */\r\n P.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big plus the value of Big y.\r\n */\r\n P.plus = P.add = function (y) {\r\n var e, k, t,\r\n x = this,\r\n Big = x.constructor;\r\n\r\n y = new Big(y);\r\n\r\n // Signs differ?\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e,\r\n xc = x.c,\r\n ye = y.e,\r\n yc = y.c;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (!yc[0]) {\r\n if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = x.s;\r\n }\r\n }\r\n return y;\r\n }\r\n\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents.\r\n // Note: reverse faster than unshifts.\r\n if (e = xe - ye) {\r\n if (e > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n e = -e;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; e--;) t.push(0);\r\n t.reverse();\r\n }\r\n\r\n // Point xc to the longer array.\r\n if (xc.length - yc.length < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n }\r\n\r\n e = yc.length;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\r\n for (k = 0; e; xc[e] %= 10) k = (xc[--e] = xc[e] + yc[e] + k) / 10 | 0;\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n\r\n if (k) {\r\n xc.unshift(k);\r\n ++ye;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (e = xc.length; xc[--e] === 0;) xc.pop();\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * Return a Big whose value is the value of this Big raised to the power n.\r\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\r\n * mode Big.RM.\r\n *\r\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\r\n */\r\n P.pow = function (n) {\r\n var x = this,\r\n one = new x.constructor('1'),\r\n y = one,\r\n isneg = n < 0;\r\n\r\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\r\n throw Error(INVALID + 'exponent');\r\n }\r\n\r\n if (isneg) n = -n;\r\n\r\n for (;;) {\r\n if (n & 1) y = y.times(x);\r\n n >>= 1;\r\n if (!n) break;\r\n x = x.times(x);\r\n }\r\n\r\n return isneg ? one.div(y) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\r\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\n P.prec = function (sd, rm) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n return round(new this.constructor(this), sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\r\n * using rounding mode rm, or Big.RM if rm is not specified.\r\n * If dp is negative, round to an integer which is a multiple of 10**-dp.\r\n * If dp is not specified, round to 0 decimal places.\r\n *\r\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\n P.round = function (dp, rm) {\r\n if (dp === UNDEFINED) dp = 0;\r\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n return round(new this.constructor(this), dp + this.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\r\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\n P.sqrt = function () {\r\n var r, c, t,\r\n x = this,\r\n Big = x.constructor,\r\n s = x.s,\r\n e = x.e,\r\n half = new Big('0.5');\r\n\r\n // Zero?\r\n if (!x.c[0]) return new Big(x);\r\n\r\n // Negative?\r\n if (s < 0) {\r\n throw Error(NAME + 'No square root');\r\n }\r\n\r\n // Estimate.\r\n s = Math.sqrt(x + '');\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\r\n if (s === 0 || s === 1 / 0) {\r\n c = x.c.join('');\r\n if (!(c.length + e & 1)) c += '0';\r\n s = Math.sqrt(c);\r\n e = ((e + 1) / 2 | 0) - (e < 0 || e & 1);\r\n r = new Big((s == 1 / 0 ? '5e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e);\r\n } else {\r\n r = new Big(s + '');\r\n }\r\n\r\n e = r.e + (Big.DP += 4);\r\n\r\n // Newton-Raphson iteration.\r\n do {\r\n t = r;\r\n r = half.times(t.plus(x.div(t)));\r\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\r\n\r\n return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Big whose value is the value of this Big times the value of Big y.\r\n */\r\n P.times = P.mul = function (y) {\r\n var c,\r\n x = this,\r\n Big = x.constructor,\r\n xc = x.c,\r\n yc = (y = new Big(y)).c,\r\n a = xc.length,\r\n b = yc.length,\r\n i = x.e,\r\n j = y.e;\r\n\r\n // Determine sign of result.\r\n y.s = x.s == y.s ? 1 : -1;\r\n\r\n // Return signed 0 if either 0.\r\n if (!xc[0] || !yc[0]) {\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // Initialise exponent of result as x.e + y.e.\r\n y.e = i + j;\r\n\r\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\r\n if (a < b) {\r\n c = xc;\r\n xc = yc;\r\n yc = c;\r\n j = a;\r\n a = b;\r\n b = j;\r\n }\r\n\r\n // Initialise coefficient array of result with zeros.\r\n for (c = new Array(j = a + b); j--;) c[j] = 0;\r\n\r\n // Multiply.\r\n\r\n // i is initially xc.length.\r\n for (i = b; i--;) {\r\n b = 0;\r\n\r\n // a is yc.length.\r\n for (j = a + i; j > i;) {\r\n\r\n // Current sum of products at this digit position, plus carry.\r\n b = c[j] + yc[i] * xc[j - i - 1] + b;\r\n c[j--] = b % 10;\r\n\r\n // carry\r\n b = b / 10 | 0;\r\n }\r\n\r\n c[j] = b;\r\n }\r\n\r\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\r\n if (b) ++y.e;\r\n else c.shift();\r\n\r\n // Remove trailing zeros.\r\n for (i = c.length; !c[--i];) c.pop();\r\n y.c = c;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Big in exponential notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\n P.toExponential = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), ++dp, rm);\r\n for (; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, true, !!n);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Big in normal notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n */\r\n P.toFixed = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), dp + x.e + 1, rm);\r\n\r\n // x.e may have changed if the value is rounded up.\r\n for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, false, !!n);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Omit the sign for negative zero.\r\n */\r\n P.toJSON = P.toString = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this Big as a primitve number.\r\n */\r\n P.toNumber = function () {\r\n var n = Number(stringify(this, true, true));\r\n if (this.constructor.strict === true && !this.eq(n.toString())) {\r\n throw Error(NAME + 'Imprecise conversion');\r\n }\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Big rounded to sd significant digits using\r\n * rounding mode rm, or Big.RM if rm is not specified.\r\n * Use exponential notation if sd is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n var x = this,\r\n Big = x.constructor,\r\n n = x.c[0];\r\n\r\n if (sd !== UNDEFINED) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n x = round(new Big(x), sd, rm);\r\n for (; x.c.length < sd;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE, !!n);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Include the sign for negative zero.\r\n */\r\n P.valueOf = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n if (Big.strict === true) {\r\n throw Error(NAME + 'valueOf disallowed');\r\n }\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\r\n };\r\n\r\n\r\n // Export\r\n\r\n\r\n Big = _Big_();\r\n\r\n Big['default'] = Big.Big = Big;\r\n\r\n //AMD.\r\n if (true) {\r\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { return Big; }).call(exports, __webpack_require__, exports, module),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\r\n // Node and other CommonJS-like environments that support module.exports.\r\n } else {}\r\n})(this);\r\n\n\n/***/ }),\n\n/***/ 475:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nlet converter;\n/**\n * Convert a little-endian buffer into a BigInt.\n * @param buf The little-endian buffer to convert\n * @returns A BigInt with the little-endian representation of buf.\n */\nfunction toBigIntLE(buf) {\n {\n const reversed = Buffer.from(buf);\n reversed.reverse();\n const hex = reversed.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, false);\n}\nexports.toBigIntLE = toBigIntLE;\n/**\n * Convert a big-endian buffer into a BigInt\n * @param buf The big-endian buffer to convert.\n * @returns A BigInt with the big-endian representation of buf.\n */\nfunction toBigIntBE(buf) {\n {\n const hex = buf.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, true);\n}\nexports.toBigIntBE = toBigIntBE;\n/**\n * Convert a BigInt to a little-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A little-endian buffer representation of num.\n */\nfunction toBufferLE(num, width) {\n {\n const hex = num.toString(16);\n const buffer = Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n buffer.reverse();\n return buffer;\n }\n // Allocation is done here, since it is slower using napi in C\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);\n}\nexports.toBufferLE = toBufferLE;\n/**\n * Convert a BigInt to a big-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A big-endian buffer representation of num.\n */\nfunction toBufferBE(num, width) {\n {\n const hex = num.toString(16);\n return Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n }\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), true);\n}\nexports.toBufferBE = toBufferBE;\n\n\n/***/ }),\n\n/***/ 4431:\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_RESULT__;;(function (globalObject) {\r\n 'use strict';\r\n\r\n/*\r\n * bignumber.js v9.1.2\r\n * A JavaScript library for arbitrary-precision arithmetic.\r\n * https://github.com/MikeMcl/bignumber.js\r\n * Copyright (c) 2022 Michael Mclaughlin \r\n * MIT Licensed.\r\n *\r\n * BigNumber.prototype methods | BigNumber methods\r\n * |\r\n * absoluteValue abs | clone\r\n * comparedTo | config set\r\n * decimalPlaces dp | DECIMAL_PLACES\r\n * dividedBy div | ROUNDING_MODE\r\n * dividedToIntegerBy idiv | EXPONENTIAL_AT\r\n * exponentiatedBy pow | RANGE\r\n * integerValue | CRYPTO\r\n * isEqualTo eq | MODULO_MODE\r\n * isFinite | POW_PRECISION\r\n * isGreaterThan gt | FORMAT\r\n * isGreaterThanOrEqualTo gte | ALPHABET\r\n * isInteger | isBigNumber\r\n * isLessThan lt | maximum max\r\n * isLessThanOrEqualTo lte | minimum min\r\n * isNaN | random\r\n * isNegative | sum\r\n * isPositive |\r\n * isZero |\r\n * minus |\r\n * modulo mod |\r\n * multipliedBy times |\r\n * negated |\r\n * plus |\r\n * precision sd |\r\n * shiftedBy |\r\n * squareRoot sqrt |\r\n * toExponential |\r\n * toFixed |\r\n * toFormat |\r\n * toFraction |\r\n * toJSON |\r\n * toNumber |\r\n * toPrecision |\r\n * toString |\r\n * valueOf |\r\n *\r\n */\r\n\r\n\r\n var BigNumber,\r\n isNumeric = /^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n\r\n bignumberError = '[BigNumber Error] ',\r\n tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',\r\n\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n // EDITABLE\r\n // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n // the arguments to toExponential, toFixed, toFormat, and toPrecision.\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n /*\r\n * Create and return a BigNumber constructor.\r\n */\r\n function clone(configObject) {\r\n var div, convertBase, parseNumeric,\r\n P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },\r\n ONE = new BigNumber(1),\r\n\r\n\r\n //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------\r\n\r\n\r\n // The default values below must be integers within the inclusive ranges stated.\r\n // The values can also be changed at run-time using BigNumber.set.\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n // The rounding mode used when rounding to the above decimal places, and when using\r\n // toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n // UP 0 Away from zero.\r\n // DOWN 1 Towards zero.\r\n // CEIL 2 Towards +Infinity.\r\n // FLOOR 3 Towards -Infinity.\r\n // HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend.\r\n // This modulo mode is commonly known as 'truncated division' and is\r\n // equivalent to (a % n) in JavaScript.\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n // The remainder is always positive.\r\n //\r\n // The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n // modes are commonly used for the modulus operation.\r\n // Although the other rounding modes can also be used, they may not give useful results.\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the exponentiatedBy operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 0, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n prefix: '',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n groupSeparator: ',',\r\n decimalSeparator: '.',\r\n fractionGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n suffix: ''\r\n },\r\n\r\n // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',\r\n // '-', '.', whitespace, or repeated character.\r\n // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz',\r\n alphabetHasNormalDecimalDigits = true;\r\n\r\n\r\n //------------------------------------------------------------------------------------------\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * v {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.\r\n */\r\n function BigNumber(v, b) {\r\n var alphabet, c, caseChanged, e, i, isNum, len, str,\r\n x = this;\r\n\r\n // Enable constructor call without `new`.\r\n if (!(x instanceof BigNumber)) return new BigNumber(v, b);\r\n\r\n if (b == null) {\r\n\r\n if (v && v._isBigNumber === true) {\r\n x.s = v.s;\r\n\r\n if (!v.c || v.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else if (v.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = v.e;\r\n x.c = v.c.slice();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if ((isNum = typeof v == 'number') && v * 0 == 0) {\r\n\r\n // Use `1 / n` to handle minus zero also.\r\n x.s = 1 / v < 0 ? (v = -v, -1) : 1;\r\n\r\n // Fast path for integers, where n < 2147483648 (2**31).\r\n if (v === ~~v) {\r\n for (e = 0, i = v; i >= 10; i /= 10, e++);\r\n\r\n if (e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else {\r\n x.e = e;\r\n x.c = [v];\r\n }\r\n\r\n return;\r\n }\r\n\r\n str = String(v);\r\n } else {\r\n\r\n if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);\r\n\r\n x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n\r\n // Allow exponential notation to be used with base 10 argument, while\r\n // also rounding to DECIMAL_PLACES as with other bases.\r\n if (b == 10 && alphabetHasNormalDecimalDigits) {\r\n x = new BigNumber(v);\r\n return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);\r\n }\r\n\r\n str = String(v);\r\n\r\n if (isNum = typeof v == 'number') {\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n if (v * 0 != 0) return parseNumeric(x, str, isNum, b);\r\n\r\n x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (BigNumber.DEBUG && str.replace(/^0\\.0*|\\./, '').length > 15) {\r\n throw Error\r\n (tooManyDigits + v);\r\n }\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n alphabet = ALPHABET.slice(0, b);\r\n e = i = 0;\r\n\r\n // Check that str is a valid base b number.\r\n // Don't use RegExp, so alphabet can contain special characters.\r\n for (len = str.length; i < len; i++) {\r\n if (alphabet.indexOf(c = str.charAt(i)) < 0) {\r\n if (c == '.') {\r\n\r\n // If '.' is not the first character and it has not be found before.\r\n if (i > e) {\r\n e = len;\r\n continue;\r\n }\r\n } else if (!caseChanged) {\r\n\r\n // Allow e.g. hexadecimal 'FF' as well as 'ff'.\r\n if (str == str.toUpperCase() && (str = str.toLowerCase()) ||\r\n str == str.toLowerCase() && (str = str.toUpperCase())) {\r\n caseChanged = true;\r\n i = -1;\r\n e = 0;\r\n continue;\r\n }\r\n }\r\n\r\n return parseNumeric(x, String(v), isNum, b);\r\n }\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n isNum = false;\r\n str = convertBase(str, b, 10, x.s);\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n else e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(--len) === 48;);\r\n\r\n if (str = str.slice(i, ++len)) {\r\n len -= i;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (isNum && BigNumber.DEBUG &&\r\n len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {\r\n throw Error\r\n (tooManyDigits + (x.s * v));\r\n }\r\n\r\n // Overflow?\r\n if ((e = e - i - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE; // i < 1\r\n\r\n if (i < len) {\r\n if (i) x.c.push(+str.slice(0, i));\r\n\r\n for (len -= LOG_BASE; i < len;) {\r\n x.c.push(+str.slice(i, i += LOG_BASE));\r\n }\r\n\r\n i = LOG_BASE - (str = str.slice(i)).length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--; str += '0');\r\n x.c.push(+str);\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.clone = clone;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object with the following optional properties (if the value of a property is\r\n * a number, it must be an integer within the inclusive range stated):\r\n *\r\n * DECIMAL_PLACES {number} 0 to MAX\r\n * ROUNDING_MODE {number} 0 to 8\r\n * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]\r\n * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]\r\n * CRYPTO {boolean} true or false\r\n * MODULO_MODE {number} 0 to 9\r\n * POW_PRECISION {number} 0 to MAX\r\n * ALPHABET {string} A string of two or more unique characters which does\r\n * not contain '.'.\r\n * FORMAT {object} An object with some of the following properties:\r\n * prefix {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * groupSeparator {string}\r\n * decimalSeparator {string}\r\n * fractionGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * suffix {string}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined, except for ALPHABET.\r\n *\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = BigNumber.set = function (obj) {\r\n var p, v;\r\n\r\n if (obj != null) {\r\n\r\n if (typeof obj == 'object') {\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n DECIMAL_PLACES = v;\r\n }\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 8, p);\r\n ROUNDING_MODE = v;\r\n }\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or\r\n // [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, 0, p);\r\n intCheck(v[1], 0, MAX, p);\r\n TO_EXP_NEG = v[0];\r\n TO_EXP_POS = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);\r\n }\r\n }\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'\r\n if (obj.hasOwnProperty(p = 'RANGE')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, -1, p);\r\n intCheck(v[1], 1, MAX, p);\r\n MIN_EXP = v[0];\r\n MAX_EXP = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n if (v) {\r\n MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' cannot be zero: ' + v);\r\n }\r\n }\r\n }\r\n\r\n // CRYPTO {boolean} true or false.\r\n // '[BigNumber Error] CRYPTO not true or false: {v}'\r\n // '[BigNumber Error] crypto unavailable'\r\n if (obj.hasOwnProperty(p = 'CRYPTO')) {\r\n v = obj[p];\r\n if (v === !!v) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n CRYPTO = v;\r\n } else {\r\n CRYPTO = !v;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n } else {\r\n CRYPTO = v;\r\n }\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' not true or false: ' + v);\r\n }\r\n }\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'MODULO_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 9, p);\r\n MODULO_MODE = v;\r\n }\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'POW_PRECISION')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n POW_PRECISION = v;\r\n }\r\n\r\n // FORMAT {object}\r\n // '[BigNumber Error] FORMAT not an object: {v}'\r\n if (obj.hasOwnProperty(p = 'FORMAT')) {\r\n v = obj[p];\r\n if (typeof v == 'object') FORMAT = v;\r\n else throw Error\r\n (bignumberError + p + ' not an object: ' + v);\r\n }\r\n\r\n // ALPHABET {string}\r\n // '[BigNumber Error] ALPHABET invalid: {v}'\r\n if (obj.hasOwnProperty(p = 'ALPHABET')) {\r\n v = obj[p];\r\n\r\n // Disallow if less than two characters,\r\n // or if it contains '+', '-', '.', whitespace, or a repeated character.\r\n if (typeof v == 'string' && !/^.?$|[+\\-.\\s]|(.).*\\1/.test(v)) {\r\n alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789';\r\n ALPHABET = v;\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' invalid: ' + v);\r\n }\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Object expected: {v}'\r\n throw Error\r\n (bignumberError + 'Object expected: ' + obj);\r\n }\r\n }\r\n\r\n return {\r\n DECIMAL_PLACES: DECIMAL_PLACES,\r\n ROUNDING_MODE: ROUNDING_MODE,\r\n EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],\r\n RANGE: [MIN_EXP, MAX_EXP],\r\n CRYPTO: CRYPTO,\r\n MODULO_MODE: MODULO_MODE,\r\n POW_PRECISION: POW_PRECISION,\r\n FORMAT: FORMAT,\r\n ALPHABET: ALPHABET\r\n };\r\n };\r\n\r\n\r\n /*\r\n * Return true if v is a BigNumber instance, otherwise return false.\r\n *\r\n * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.\r\n *\r\n * v {any}\r\n *\r\n * '[BigNumber Error] Invalid BigNumber: {v}'\r\n */\r\n BigNumber.isBigNumber = function (v) {\r\n if (!v || v._isBigNumber !== true) return false;\r\n if (!BigNumber.DEBUG) return true;\r\n\r\n var i, n,\r\n c = v.c,\r\n e = v.e,\r\n s = v.s;\r\n\r\n out: if ({}.toString.call(c) == '[object Array]') {\r\n\r\n if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {\r\n\r\n // If the first element is zero, the BigNumber value must be zero.\r\n if (c[0] === 0) {\r\n if (e === 0 && c.length === 1) return true;\r\n break out;\r\n }\r\n\r\n // Calculate number of digits that c[0] should have, based on the exponent.\r\n i = (e + 1) % LOG_BASE;\r\n if (i < 1) i += LOG_BASE;\r\n\r\n // Calculate number of digits of c[0].\r\n //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {\r\n if (String(c[0]).length == i) {\r\n\r\n for (i = 0; i < c.length; i++) {\r\n n = c[i];\r\n if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;\r\n }\r\n\r\n // Last element cannot be zero, unless it is the only element.\r\n if (n !== 0) return true;\r\n }\r\n }\r\n\r\n // Infinity/NaN\r\n } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {\r\n return true;\r\n }\r\n\r\n throw Error\r\n (bignumberError + 'Invalid BigNumber: ' + v);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.maximum = BigNumber.max = function () {\r\n return maxOrMin(arguments, -1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.minimum = BigNumber.min = function () {\r\n return maxOrMin(arguments, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'\r\n * '[BigNumber Error] crypto unavailable'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor(Math.random() * pow2_53); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n if (dp == null) dp = DECIMAL_PLACES;\r\n else intCheck(dp, 0, MAX);\r\n\r\n k = mathceil(dp / LOG_BASE);\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if (crypto.getRandomValues) {\r\n\r\n a = crypto.getRandomValues(new Uint32Array(k *= 2));\r\n\r\n for (; i < k;) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if (v >= 9e15) {\r\n b = crypto.getRandomValues(new Uint32Array(2));\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n a = crypto.randomBytes(k *= 7);\r\n\r\n for (; i < k;) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +\r\n (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +\r\n (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];\r\n\r\n if (v >= 9e15) {\r\n crypto.randomBytes(7).copy(a, i);\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else {\r\n CRYPTO = false;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n }\r\n\r\n // Use Math.random.\r\n if (!CRYPTO) {\r\n\r\n for (; i < k;) {\r\n v = random53bitInt();\r\n if (v < 9e15) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if (k && dp) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor(k / v) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for (; c[i] === 0; c.pop(), i--);\r\n\r\n // Zero?\r\n if (i < 0) {\r\n c = [e = 0];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for (i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if (i < LOG_BASE) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the sum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.sum = function () {\r\n var i = 1,\r\n args = arguments,\r\n sum = new BigNumber(args[0]);\r\n for (; i < args.length;) sum = sum.plus(args[i++]);\r\n return sum;\r\n };\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Called by BigNumber and BigNumber.prototype.toString.\r\n convertBase = (function () {\r\n var decimal = '0123456789';\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. toBaseOut('255', 10, 16) returns [15, 15].\r\n * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut(str, baseIn, baseOut, alphabet) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for (; i < len;) {\r\n for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);\r\n\r\n arr[0] += alphabet.indexOf(str.charAt(i++));\r\n\r\n for (j = 0; j < arr.length; j++) {\r\n\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] == null) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n // If the caller is toString, we are converting from base 10 to baseOut.\r\n // If the caller is BigNumber, we are converting from baseIn to base 10.\r\n return function (str, baseIn, baseOut, sign, callerIsToString) {\r\n var alphabet, d, e, k, r, x, xc, y,\r\n i = str.indexOf('.'),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace('.', '');\r\n y = new BigNumber(baseIn);\r\n x = y.pow(str.length - i);\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n\r\n y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),\r\n 10, baseOut, decimal);\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n\r\n xc = toBaseOut(str, baseIn, baseOut, callerIsToString\r\n ? (alphabet = ALPHABET, decimal)\r\n : (alphabet = decimal, ALPHABET));\r\n\r\n // xc now represents str as an integer and converted to baseOut. e is the exponent.\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--k] == 0; xc.pop());\r\n\r\n // Zero?\r\n if (!xc[0]) return alphabet.charAt(0);\r\n\r\n // Does str represent an integer? If so, no need for the division.\r\n if (i < 0) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // The sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div(x, y, dp, rm, baseOut);\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n // xc now represents str converted to baseOut.\r\n\r\n // THe index of the rounding digit.\r\n d = e + dp + 1;\r\n\r\n // The rounding digit: the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n\r\n // Look at the rounding digits and mode to determine whether to round up.\r\n\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n // If the index of the rounding digit is not greater than zero, or xc represents\r\n // zero, then the result of the base conversion is zero or, if rounding up, a value\r\n // such as 0.00001.\r\n if (d < 1 || !xc[0]) {\r\n\r\n // 1^-dp or 0\r\n str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);\r\n } else {\r\n\r\n // Truncate xc to the required number of decimal places.\r\n xc.length = d;\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (--baseOut; ++xc[--d] > baseOut;) {\r\n xc[d] = 0;\r\n\r\n if (!d) {\r\n ++e;\r\n xc = [1].concat(xc);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (k = xc.length; !xc[--k];);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));\r\n\r\n // Add leading zeros, decimal point and trailing zeros as required.\r\n str = toFixedPoint(str, e, alphabet.charAt(0));\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n };\r\n })();\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply(x, k, base) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for (x = x.slice(); i--;) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;\r\n carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x = [carry].concat(x);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, cmp;\r\n\r\n if (aL != bL) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for (i = cmp = 0; i < aL; i++) {\r\n\r\n if (a[i] != b[i]) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1; a.splice(0, 1));\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function (x, y, dp, rm, base) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xc || !xc[0] || !yc || !yc[0]) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if (!base) {\r\n base = BASE;\r\n e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for (i = 0; yc[i] == (xc[i] || 0); i++);\r\n\r\n if (yc[i] > (xc[i] || 0)) e--;\r\n\r\n if (s < 0) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor(base / (yc[0] + 1));\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.\r\n // if (n > 1 || n++ == 1 && yc[0] < base / 2) {\r\n if (n > 1) {\r\n yc = multiply(yc, n, base);\r\n xc = multiply(xc, n, base);\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL; rem[remL++] = 0);\r\n yz = yc.slice();\r\n yz = [0].concat(yz);\r\n yc0 = yc[0];\r\n if (yc[1] >= base / 2) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yc, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor(rem0 / yc0);\r\n\r\n // Algorithm:\r\n // product = divisor multiplied by trial digit (n).\r\n // Compare product and remainder.\r\n // If product is greater than remainder:\r\n // Subtract divisor from product, decrement trial digit.\r\n // Subtract product from remainder.\r\n // If product was less than remainder at the last compare:\r\n // Compare new remainder and divisor.\r\n // If remainder is greater than divisor:\r\n // Subtract divisor from remainder, increment trial digit.\r\n\r\n if (n > 1) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply(yc, n, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder then trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while (compare(prod, rem, prodL, remL) == 1) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yc, prodL, base);\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if (n == 0) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if (prodL < remL) prod = [0].concat(prod);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if (cmp == -1) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while (compare(yc, rem, yL, remL) < 1) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yc, remL, base);\r\n remL = rem.length;\r\n }\r\n }\r\n } else if (cmp === 0) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if (rem[0]) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [xc[xi]];\r\n remL = 1;\r\n }\r\n } while ((xi++ < xL || rem[0] != null) && s--);\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if (!qc[0]) qc.splice(0, 1);\r\n }\r\n\r\n if (base == BASE) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);\r\n\r\n round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n: a BigNumber.\r\n * i: the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm: the rounding mode.\r\n * id: 1 (toExponential) or 2 (toPrecision).\r\n */\r\n function format(n, i, rm, id) {\r\n var c0, e, ne, len, str;\r\n\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n if (!n.c) return n.toString();\r\n\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if (i == null) {\r\n str = coeffToString(n.c);\r\n str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)\r\n ? toExponential(str, ne)\r\n : toFixedPoint(str, ne, '0');\r\n } else {\r\n n = round(new BigNumber(n), i, rm);\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString(n.c);\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {\r\n\r\n // Append zeros?\r\n for (; len < i; str += '0', len++);\r\n str = toExponential(str, e);\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint(str, e, '0');\r\n\r\n // Append zeros?\r\n if (e + 1 > len) {\r\n if (--i > 0) for (str += '.'; i--; str += '0');\r\n } else {\r\n i += e - len;\r\n if (i > 0) {\r\n if (e + 1 == len) str += '.';\r\n for (; i--; str += '0');\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n // If any number is NaN, return NaN.\r\n function maxOrMin(args, n) {\r\n var k, y,\r\n i = 1,\r\n x = new BigNumber(args[0]);\r\n\r\n for (; i < args.length; i++) {\r\n y = new BigNumber(args[i]);\r\n if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {\r\n x = y;\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise(n, c, e) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for (; !c[--j]; c.pop());\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for (j = c[0]; j >= 10; j /= 10, i++);\r\n\r\n // Overflow?\r\n if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n n.c = [n.e = 0];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function (x, str, isNum, b) {\r\n var base,\r\n s = isNum ? str : str.replace(whitespaceOrPlus, '');\r\n\r\n // No exception on ±Infinity or NaN.\r\n if (isInfinityOrNaN.test(s)) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if (!isNum) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace(basePrefix, function (m, p1, p2) {\r\n base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');\r\n }\r\n\r\n if (str != s) return new BigNumber(s, base);\r\n }\r\n\r\n // '[BigNumber Error] Not a number: {n}'\r\n // '[BigNumber Error] Not a base {b} number: {n}'\r\n if (BigNumber.DEBUG) {\r\n throw Error\r\n (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);\r\n }\r\n\r\n // NaN\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n }\r\n })();\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round(x, sd, rm, r) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ni = 0];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = mathfloor(n / pows10[d - j - 1] % 10);\r\n } else {\r\n ni = mathceil((i + 1) / LOG_BASE);\r\n\r\n if (ni >= xc.length) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for (; xc.length <= ni; xc.push(0));\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for (d = 1; k >= 10; k /= 10, d++);\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10);\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[d - j - 1] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);\r\n\r\n r = rm < 4\r\n ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xc[0]) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[LOG_BASE - i];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for (; ;) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if (ni == 0) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);\r\n j = xc[0] += k;\r\n for (k = 1; j >= 10; j /= 10, k++);\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xc[0] == BASE) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if (xc[ni] != BASE) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xc.length; xc[--i] === 0; xc.pop());\r\n }\r\n\r\n // Overflow? Infinity.\r\n if (x.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if (x.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function valueOf(n) {\r\n var str,\r\n e = n.e;\r\n\r\n if (e === null) return n.toString();\r\n\r\n str = coeffToString(n.c);\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(str, e)\r\n : toFixedPoint(str, e, '0');\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if (x.s < 0) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = function (y, b) {\r\n return compare(this, new BigNumber(y, b));\r\n };\r\n\r\n\r\n /*\r\n * If dp is undefined or null or true or false, return the number of decimal places of the\r\n * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n *\r\n * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * [dp] {number} Decimal places: integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.decimalPlaces = P.dp = function (dp, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), dp + x.e + 1, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);\r\n if (n < 0) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function (y, b) {\r\n return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y, b) {\r\n return div(this, new BigNumber(y, b), 0, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.\r\n *\r\n * If m is present, return the result modulo m.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * The modular power operation works efficiently when x, n, and m are integers, otherwise it\r\n * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.\r\n *\r\n * n {number|string|BigNumber} The exponent. An integer.\r\n * [m] {number|string|BigNumber} The modulus.\r\n *\r\n * '[BigNumber Error] Exponent not an integer: {n}'\r\n */\r\n P.exponentiatedBy = P.pow = function (n, m) {\r\n var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,\r\n x = this;\r\n\r\n n = new BigNumber(n);\r\n\r\n // Allow NaN and ±Infinity, but not other non-integers.\r\n if (n.c && !n.isInteger()) {\r\n throw Error\r\n (bignumberError + 'Exponent not an integer: ' + valueOf(n));\r\n }\r\n\r\n if (m != null) m = new BigNumber(m);\r\n\r\n // Exponent of MAX_SAFE_INTEGER is 15.\r\n nIsBig = n.e > 14;\r\n\r\n // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.\r\n if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {\r\n\r\n // The sign of the result of pow when x is negative depends on the evenness of n.\r\n // If +n overflows to ±Infinity, the evenness of n would be not be known.\r\n y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));\r\n return m ? y.mod(m) : y;\r\n }\r\n\r\n nIsNeg = n.s < 0;\r\n\r\n if (m) {\r\n\r\n // x % m returns NaN if abs(m) is zero, or m is NaN.\r\n if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);\r\n\r\n isModExp = !nIsNeg && x.isInteger() && m.isInteger();\r\n\r\n if (isModExp) x = x.mod(m);\r\n\r\n // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.\r\n // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.\r\n } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0\r\n // [1, 240000000]\r\n ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7\r\n // [80000000000000] [99999750000000]\r\n : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {\r\n\r\n // If x is negative and n is odd, k = -0, else k = 0.\r\n k = x.s < 0 && isOdd(n) ? -0 : 0;\r\n\r\n // If x >= 1, k = ±Infinity.\r\n if (x.e > -1) k = 1 / k;\r\n\r\n // If n is negative return ±0, else return ±Infinity.\r\n return new BigNumber(nIsNeg ? 1 / k : k);\r\n\r\n } else if (POW_PRECISION) {\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication\r\n // equates to truncating significant digits to POW_PRECISION + [28, 41],\r\n // i.e. there will be a minimum of 28 guard digits retained.\r\n k = mathceil(POW_PRECISION / LOG_BASE + 2);\r\n }\r\n\r\n if (nIsBig) {\r\n half = new BigNumber(0.5);\r\n if (nIsNeg) n.s = 1;\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = Math.abs(+valueOf(n));\r\n nIsOdd = i % 2;\r\n }\r\n\r\n y = new BigNumber(ONE);\r\n\r\n // Performs 54 loop iterations for n of 9007199254740991.\r\n for (; ;) {\r\n\r\n if (nIsOdd) {\r\n y = y.times(x);\r\n if (!y.c) break;\r\n\r\n if (k) {\r\n if (y.c.length > k) y.c.length = k;\r\n } else if (isModExp) {\r\n y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (i) {\r\n i = mathfloor(i / 2);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n } else {\r\n n = n.times(half);\r\n round(n, n.e + 1, 1);\r\n\r\n if (n.e > 14) {\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = +valueOf(n);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n }\r\n }\r\n\r\n x = x.times(x);\r\n\r\n if (k) {\r\n if (x.c && x.c.length > k) x.c.length = k;\r\n } else if (isModExp) {\r\n x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (isModExp) return y;\r\n if (nIsNeg) y = ONE.div(y);\r\n\r\n return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer\r\n * using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'\r\n */\r\n P.integerValue = function (rm) {\r\n var n = new BigNumber(this);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n return round(n, n.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isEqualTo = P.eq = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise return false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isGreaterThan = P.gt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isGreaterThanOrEqualTo = P.gte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = function () {\r\n return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isLessThan = P.lt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isLessThanOrEqualTo = P.lte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise return false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise return false.\r\n */\r\n P.isNegative = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is positive, otherwise return false.\r\n */\r\n P.isPositive = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise return false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = function (y, b) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0);\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if (a = xe - ye) {\r\n\r\n if (xLTy = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for (b = a; b--; t.push(0));\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n\r\n if (xc[b] != yc[b]) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n b = (j = yc.length) - (i = xc.length);\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if (b > 0) for (; b--; xc[i++] = 0);\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for (; j > a;) {\r\n\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i]; xc[i] = b);\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] == 0; xc.splice(0, 1), --ye);\r\n\r\n // Zero?\r\n if (!xc[0]) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function (y, b) {\r\n var q, s,\r\n x = this;\r\n\r\n y = new BigNumber(y, b);\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if (!x.c || !y.s || y.c && !y.c[0]) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if (!y.c || x.c && !x.c[0]) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if (MODULO_MODE == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div(x, y, 0, 3);\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div(x, y, 0, MODULO_MODE);\r\n }\r\n\r\n y = x.minus(q.times(y));\r\n\r\n // To match JavaScript %, ensure sign of zero is sign of dividend.\r\n if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value\r\n * of BigNumber(y, b).\r\n */\r\n P.multipliedBy = P.times = function (y, b) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new BigNumber(y, b)).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if (!xc || !yc || !xc[0] || !yc[0]) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if (!xc || !yc) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if (xcL < ycL) {\r\n zc = xc;\r\n xc = yc;\r\n yc = zc;\r\n i = xcL;\r\n xcL = ycL;\r\n ycL = i;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n for (i = xcL + ycL, zc = []; i--; zc.push(0));\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for (i = ycL; --i >= 0;) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for (k = xcL, j = i + k; j > i;) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;\r\n c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.splice(0, 1);\r\n }\r\n\r\n return normalise(y, zc, e);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = function (y, b) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if (!xc || !yc) return new BigNumber(a / 0);\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if (a = xe - ye) {\r\n if (a > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; a--; t.push(0));\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if (a - b < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n b = a;\r\n }\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for (a = 0; b;) {\r\n a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;\r\n xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;\r\n }\r\n\r\n if (a) {\r\n xc = [a].concat(xc);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * If sd is undefined or null or true or false, return the number of significant digits of\r\n * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n * If sd is true include integer-part trailing zeros in the count.\r\n *\r\n * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.\r\n * boolean: whether to count integer-part trailing zeros: true or false.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.precision = P.sd = function (sd, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (sd != null && sd !== !!sd) {\r\n intCheck(sd, 1, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), sd, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if (v = c[v]) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for (; v % 10 == 0; v /= 10, n--);\r\n\r\n // Add the number of digits of the first element.\r\n for (v = c[0]; v >= 10; v /= 10, n++);\r\n }\r\n\r\n if (sd && x.e + 1 > n) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'\r\n */\r\n P.shiftedBy = function (k) {\r\n intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\r\n return this.times('1e' + k);\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !c || !c[0]) {\r\n return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+valueOf(x));\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = coeffToString(c);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(+n);\r\n e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber(s + '');\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if (r.c[0]) {\r\n e = r.e;\r\n s = e + dp;\r\n if (s < 3) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for (; ;) {\r\n t = r;\r\n r = half.times(t.plus(div(x, t, dp, 1)));\r\n\r\n if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if (r.e < e) --s;\r\n n = n.slice(s - 3, s + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if (!rep) {\r\n round(t, t.e + DECIMAL_PLACES + 2, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n round(r, r.e + DECIMAL_PLACES + 2, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toExponential = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp++;\r\n }\r\n return format(this, dp, rm, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toFixed = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp = dp + this.e + 1;\r\n }\r\n return format(this, dp, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the format or FORMAT object (see BigNumber.set).\r\n *\r\n * The formatting object may contain some or all of the properties shown below.\r\n *\r\n * FORMAT = {\r\n * prefix: '',\r\n * groupSize: 3,\r\n * secondaryGroupSize: 0,\r\n * groupSeparator: ',',\r\n * decimalSeparator: '.',\r\n * fractionGroupSize: 0,\r\n * fractionGroupSeparator: '\\xA0', // non-breaking space\r\n * suffix: ''\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n * [format] {object} Formatting options. See FORMAT pbject above.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n * '[BigNumber Error] Argument not an object: {format}'\r\n */\r\n P.toFormat = function (dp, rm, format) {\r\n var str,\r\n x = this;\r\n\r\n if (format == null) {\r\n if (dp != null && rm && typeof rm == 'object') {\r\n format = rm;\r\n rm = null;\r\n } else if (dp && typeof dp == 'object') {\r\n format = dp;\r\n dp = rm = null;\r\n } else {\r\n format = FORMAT;\r\n }\r\n } else if (typeof format != 'object') {\r\n throw Error\r\n (bignumberError + 'Argument not an object: ' + format);\r\n }\r\n\r\n str = x.toFixed(dp, rm);\r\n\r\n if (x.c) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +format.groupSize,\r\n g2 = +format.secondaryGroupSize,\r\n groupSeparator = format.groupSeparator || '',\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = x.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) {\r\n i = g1;\r\n g1 = g2;\r\n g2 = i;\r\n len -= i;\r\n }\r\n\r\n if (g1 > 0 && len > 0) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr(0, i);\r\n for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);\r\n if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)\r\n ? fractionPart.replace(new RegExp('\\\\d{' + g2 + '}\\\\B', 'g'),\r\n '$&' + (format.fractionGroupSeparator || ''))\r\n : fractionPart)\r\n : intPart;\r\n }\r\n\r\n return (format.prefix || '') + str + (format.suffix || '');\r\n };\r\n\r\n\r\n /*\r\n * Return an array of two BigNumbers representing the value of this BigNumber as a simple\r\n * fraction with an integer numerator and an integer denominator.\r\n * The denominator will be a positive non-zero value less than or equal to the specified\r\n * maximum denominator. If a maximum denominator is not specified, the denominator will be\r\n * the lowest value necessary to represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.\r\n *\r\n * '[BigNumber Error] Argument {not an integer|out of range} : {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,\r\n x = this,\r\n xc = x.c;\r\n\r\n if (md != null) {\r\n n = new BigNumber(md);\r\n\r\n // Throw if md is less than one or is not an integer, unless it is Infinity.\r\n if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {\r\n throw Error\r\n (bignumberError + 'Argument ' +\r\n (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));\r\n }\r\n }\r\n\r\n if (!xc) return new BigNumber(x);\r\n\r\n d = new BigNumber(ONE);\r\n n1 = d0 = new BigNumber(ONE);\r\n d1 = n0 = new BigNumber(ONE);\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];\r\n md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for (; ;) {\r\n q = div(n, d, 0, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.comparedTo(md) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus(q.times(d2 = n1));\r\n n0 = d2;\r\n d = n.minus(q.times(d2 = d));\r\n n = d2;\r\n }\r\n\r\n d2 = div(md.minus(d0), d1, 0, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n e = e * 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(\r\n div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];\r\n\r\n MAX_EXP = exp;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +valueOf(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n if (sd != null) intCheck(sd, 1, MAX);\r\n return format(this, sd, rm, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to ALPHABET.length inclusive.\r\n *\r\n * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if (e === null) {\r\n if (s) {\r\n str = 'Infinity';\r\n if (s < 0) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n if (b == null) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(coeffToString(n.c), e)\r\n : toFixedPoint(coeffToString(n.c), e, '0');\r\n } else if (b === 10 && alphabetHasNormalDecimalDigits) {\r\n n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);\r\n str = toFixedPoint(coeffToString(n.c), n.e, '0');\r\n } else {\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);\r\n }\r\n\r\n if (s < 0 && n.c[0]) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n return valueOf(this);\r\n };\r\n\r\n\r\n P._isBigNumber = true;\r\n\r\n if (configObject != null) BigNumber.set(configObject);\r\n\r\n return BigNumber;\r\n }\r\n\r\n\r\n // PRIVATE HELPER FUNCTIONS\r\n\r\n // These functions don't need access to variables,\r\n // e.g. DECIMAL_PLACES, in the scope of the `clone` function above.\r\n\r\n\r\n function bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n }\r\n\r\n\r\n // Return a coefficient array as a string of base 10 digits.\r\n function coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for (; i < j;) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for (; z--; s = '0' + s);\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (j = r.length; r.charCodeAt(--j) === 48;);\r\n\r\n return r.slice(0, j + 1 || 1);\r\n }\r\n\r\n\r\n // Compare the value of BigNumbers x and y.\r\n function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }\r\n\r\n\r\n /*\r\n * Check that n is a primitive number, an integer, and in range, otherwise throw.\r\n */\r\n function intCheck(n, min, max, name) {\r\n if (n < min || n > max || n !== mathfloor(n)) {\r\n throw Error\r\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\r\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\r\n : ' not a primitive number: ') + String(n));\r\n }\r\n }\r\n\r\n\r\n // Assumes finite n.\r\n function isOdd(n) {\r\n var k = n.c.length - 1;\r\n return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;\r\n }\r\n\r\n\r\n function toExponential(str, e) {\r\n return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +\r\n (e < 0 ? 'e' : 'e+') + e;\r\n }\r\n\r\n\r\n function toFixedPoint(str, e, z) {\r\n var len, zs;\r\n\r\n // Negative exponent?\r\n if (e < 0) {\r\n\r\n // Prepend zeros.\r\n for (zs = z + '.'; ++e; zs += z);\r\n str = zs + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if (++e > len) {\r\n for (zs = z, e -= len; --e; zs += z);\r\n str += zs;\r\n } else if (e < len) {\r\n str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n // EXPORT\r\n\r\n\r\n BigNumber = clone();\r\n BigNumber['default'] = BigNumber.BigNumber = BigNumber;\r\n\r\n // AMD.\r\n if (true) {\r\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { return BigNumber; }).call(exports, __webpack_require__, exports, module),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\r\n // Node.js and other environments that support module.exports.\r\n } else {}\r\n})(this);\r\n\n\n/***/ }),\n\n/***/ 3550:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/* module decorator */ module = __webpack_require__.nmd(module);\n(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = (__webpack_require__(6601).Buffer);\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})( false || module, this);\n\n\n/***/ }),\n\n/***/ 5532:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.deserializeUnchecked = exports.deserialize = exports.serialize = exports.BinaryReader = exports.BinaryWriter = exports.BorshError = exports.baseDecode = exports.baseEncode = void 0;\nconst bn_js_1 = __importDefault(__webpack_require__(3550));\nconst bs58_1 = __importDefault(__webpack_require__(7304));\n// TODO: Make sure this polyfill not included when not required\nconst encoding = __importStar(__webpack_require__(1127));\nconst ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\nconst textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\nfunction baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer.from(value));\n}\nexports.baseEncode = baseEncode;\nfunction baseDecode(value) {\n return Buffer.from(bs58_1.default.decode(value));\n}\nexports.baseDecode = baseDecode;\nconst INITIAL_LENGTH = 1024;\nclass BorshError extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n // NOTE: Modifying message directly as jest doesn't use .toString()\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n}\nexports.BorshError = BorshError;\n/// Binary encoder.\nclass BinaryWriter {\n constructor() {\n this.buf = Buffer.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer.concat([this.buf, Buffer.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n // Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser\n this.buf = Buffer.concat([\n Buffer.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer.alloc(INITIAL_LENGTH),\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array) {\n this.writeBuffer(Buffer.from(array));\n }\n writeArray(array, fn) {\n this.maybeResize();\n this.writeU32(array.length);\n for (const elem of array) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n}\nexports.BinaryWriter = BinaryWriter;\nfunction handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function (...args) {\n try {\n return originalMethod.apply(this, args);\n }\n catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n}\nclass BinaryReader {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n // NOTE: Using TextDecoder to fail on invalid UTF-8\n return textDecoder.decode(buf);\n }\n catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n}\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU8\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU16\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU32\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU64\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU128\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU256\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU512\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readString\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readFixedArray\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readArray\", null);\nexports.BinaryReader = BinaryReader;\nfunction capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\nfunction serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n // TODO: Handle missing values properly (make sure they never result in just skipped write)\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n }\n else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n }\n else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n }\n else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n }\n else if (fieldType.kind !== undefined) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === undefined) {\n writer.writeU8(0);\n }\n else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n }\n else {\n serializeStruct(schema, value, writer);\n }\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n }\n else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n }\n else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n}\n/// Serialize given object using schema of the form:\n/// { class_name -> [ [field_name, field_type], .. ], .. }\nfunction serialize(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n}\nexports.serialize = serialize;\nfunction deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n }\n else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n }\n else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return undefined;\n }\n if (fieldType.kind === \"map\") {\n let map = new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n}\n/// Deserializes object from bytes using schema.\nfunction deserialize(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n}\nexports.deserialize = deserialize;\n/// Deserializes object from bytes using schema, without checking the length read\nfunction deserializeUnchecked(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n}\nexports.deserializeUnchecked = deserializeUnchecked;\n\n\n/***/ }),\n\n/***/ 7304:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar basex = __webpack_require__(8162)\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n\n\n/***/ }),\n\n/***/ 7191:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nconst basex = __webpack_require__(8247)\nconst ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n\n\n/***/ }),\n\n/***/ 8247:\n/***/ (function(module) {\n\n\"use strict\";\n\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (source instanceof Uint8Array) {\n } else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength)\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source)\n }\n if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return new Uint8Array() }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (source[psz]) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = new Uint8Array(zeroes + (size - it4))\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n\n\n/***/ }),\n\n/***/ 698:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * Support for translating between Buffer instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n */\n\n\n\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n\n /**\n * Decode from a Buffer into an JavaScript value.\n *\n * @param {Buffer} b - the buffer from which encoded data is read.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {(Number|Array|Object)} - the value of the decoded data.\n *\n * @abstract\n */\n decode(b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Encode a JavaScript value into a Buffer.\n *\n * @param {(Number|Array|Object)} src - the value to be encoded into\n * the buffer. The type accepted depends on the (sub-)type of {@link\n * Layout}.\n *\n * @param {Buffer} b - the buffer into which encoded data will be\n * written.\n *\n * @param {Number} [offset] - the offset at which the encoded data\n * starts. If absent a zero offset is inferred.\n *\n * @returns {Number} - the number of bytes encoded, including the\n * space skipped for internal padding, but excluding data such as\n * {@link Sequence#count|lengths} when stored {@link\n * ExternalLayout|externally}. This is the adjustment to `offset`\n * producing the offset where data for the next layout would be\n * written.\n *\n * @abstract\n */\n encode(src, b, offset) {\n throw new Error('Layout is abstract');\n }\n\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Buffer} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nexports.Layout = Layout;\n\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nexports.nameWithProperty = nameWithProperty;\n\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Class.hasOwnProperty('layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (layout.hasOwnProperty('boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value: function(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value: function(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nexports.bindConstructorLayout = bindConstructorLayout;\n\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\n\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan, property) {\n if (undefined === elementSpan) {\n elementSpan = 1;\n }\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n\n /** @override */\n isCount() {\n return true;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\n\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n\n if (undefined === offset) {\n offset = 0;\n } else if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n\n super(layout.span, property || layout.property);\n\n /** The subordinated layout. */\n this.layout = layout;\n\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Buffer\n * being accessed. */\n this.offset = offset;\n }\n\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.decode(b, offset + this.offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\n\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super( span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readUIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readIntLE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\n\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readIntBE(offset, this.span);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\n\nconst V2E32 = Math.pow(2, 32);\n\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return {hi32, lo32};\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const hi32 = b.readUInt32BE(offset);\n const lo32 = b.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32BE(split.hi32, offset);\n b.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const lo32 = b.readUInt32LE(offset);\n const hi32 = b.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeUInt32LE(split.lo32, offset);\n b.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const hi32 = b.readInt32BE(offset);\n const lo32 = b.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const split = divmodInt64(src);\n b.writeInt32BE(split.hi32, offset);\n b.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\n\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readFloatLE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeFloatLE(src, offset);\n return 4;\n }\n}\n\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readFloatBE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeFloatBE(src, offset);\n return 4;\n }\n}\n\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readDoubleLE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeDoubleLE(src, offset);\n return 8;\n }\n}\n\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n return b.readDoubleBE(offset);\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n b.writeDoubleBE(src, offset);\n return 8;\n }\n}\n\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n\n super(span, property);\n\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n } else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\n\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n } else if (0 <= offset) {\n offset += fd.span;\n }\n }\n }\n}\n\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode() {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\n\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n\n super(property || layout.property || 'variant');\n\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\n\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n const upv = ((discr instanceof UInt)\n || (discr instanceof UIntBE));\n if (upv) {\n discr = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discr = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && upv) {\n span += discr.layout.span;\n }\n }\n super(span, property);\n\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discr;\n\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = upv;\n\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisified rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (src.hasOwnProperty(this.discriminator.property)) {\n if (this.defaultLayout\n && src.hasOwnProperty(this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || src.hasOwnProperty(vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (src.hasOwnProperty(vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n let clo = this.registry[discr];\n if (undefined === clo) {\n let contentOffset = 0;\n clo = this.defaultLayout;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[clo.property] = this.defaultLayout.decode(b, offset + contentOffset);\n } else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n return contentOffset + clo.encode(src[clo.property], b,\n offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Buffer)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Buffer}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset) {\n let variant = vb;\n if (Buffer.isBuffer(vb)) {\n if (undefined === offset) {\n offset = 0;\n }\n variant = this.discriminator.decode(vb, offset);\n }\n return this.registry[variant];\n }\n}\n\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n return contentOffset + this.layout.getSpan(b, offset + contentOffset);\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!src.hasOwnProperty(this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n }\n}\n\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = undefined;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function(v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function() {\n return value;\n };\n }\n\n /** @override */\n decode(b, offset) {\n const dest = this.makeDestinationObject();\n if (undefined === offset) {\n offset = 0;\n }\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(value);\n }\n }\n return dest;\n }\n\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n // eslint-disable-next-line no-new-wrappers\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n }\n}\n\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n\n /** The span of this value in bits. */\n this.bits = bits;\n\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode() {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ((!Number.isInteger(value))\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n };\n}\n\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!BitField.prototype.decode.call(this, b, offset);\n }\n\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n return BitField.prototype.encode.call(this, value);\n }\n}\n/* eslint-enable no-extend-native */\n\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Buffer.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n\n /** @override */\n decode(b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return b.slice(offset, offset + span);\n }\n\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(Buffer.isBuffer(src)\n && (span === src.length))) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Buffer as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n b.write(src.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\n\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n\n /** @override */\n getSpan(b, offset) {\n if (!Buffer.isBuffer(b)) {\n throw new TypeError('b must be a Buffer');\n }\n if (undefined === offset) {\n offset = 0;\n }\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n\n /** @override */\n decode(b, offset, dest) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.getSpan(b, offset);\n return b.slice(offset, offset + span - 1).toString('utf-8');\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = src.toString();\n }\n const srcb = new Buffer(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(b, offset);\n b[offset + span] = 0;\n return span + 1;\n }\n}\n\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan)\n && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n } else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n\n super(-1, property);\n\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n\n /** @override */\n getSpan(b, offset) {\n if (!Buffer.isBuffer(b)) {\n throw new TypeError('b must be a Buffer');\n }\n if (undefined === offset) {\n offset = 0;\n }\n return b.length - offset;\n }\n\n /** @override */\n decode(b, offset, dest) {\n if (undefined === offset) {\n offset = 0;\n }\n let span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return b.slice(offset, offset + span).toString('utf-8');\n }\n\n /** @override */\n encode(src, b, offset) {\n if (undefined === offset) {\n offset = 0;\n }\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = src.toString();\n }\n const srcb = new Buffer(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(b, offset);\n return span;\n }\n}\n\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n\n /** @override */\n decode(b, offset, dest) {\n return this.value;\n }\n\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\n\nexports.ExternalLayout = ExternalLayout;\nexports.GreedyCount = GreedyCount;\nexports.OffsetLayout = OffsetLayout;\nexports.UInt = UInt;\nexports.UIntBE = UIntBE;\nexports.Int = Int;\nexports.IntBE = IntBE;\nexports.Float = Float;\nexports.FloatBE = FloatBE;\nexports.Double = Double;\nexports.DoubleBE = DoubleBE;\nexports.Sequence = Sequence;\nexports.Structure = Structure;\nexports.UnionDiscriminator = UnionDiscriminator;\nexports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\nexports.Union = Union;\nexports.VariantLayout = VariantLayout;\nexports.BitStructure = BitStructure;\nexports.BitField = BitField;\nexports.Boolean = Boolean;\nexports.Blob = Blob;\nexports.CString = CString;\nexports.UTF8 = UTF8;\nexports.Constant = Constant;\n\n/** Factory for {@link GreedyCount}. */\nexports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n\n/** Factory for {@link OffsetLayout}. */\nexports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nexports.u8 = (property => new UInt(1, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16 = (property => new UInt(2, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24 = (property => new UInt(3, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32 = (property => new UInt(4, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40 = (property => new UInt(5, property));\n\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48 = (property => new UInt(6, property));\n\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64 = (property => new NearUInt64(property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16be = (property => new UIntBE(2, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24be = (property => new UIntBE(3, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32be = (property => new UIntBE(4, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40be = (property => new UIntBE(5, property));\n\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48be = (property => new UIntBE(6, property));\n\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64be = (property => new NearUInt64BE(property));\n\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nexports.s8 = (property => new Int(1, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nexports.s16 = (property => new Int(2, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nexports.s24 = (property => new Int(3, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nexports.s32 = (property => new Int(4, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nexports.s40 = (property => new Int(5, property));\n\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nexports.s48 = (property => new Int(6, property));\n\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64 = (property => new NearInt64(property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nexports.s16be = (property => new IntBE(2, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nexports.s24be = (property => new IntBE(3, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nexports.s32be = (property => new IntBE(4, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nexports.s40be = (property => new IntBE(5, property));\n\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nexports.s48be = (property => new IntBE(6, property));\n\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64be = (property => new NearInt64BE(property));\n\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nexports.f32 = (property => new Float(property));\n\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nexports.f32be = (property => new FloatBE(property));\n\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nexports.f64 = (property => new Double(property));\n\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nexports.f64be = (property => new DoubleBE(property));\n\n/** Factory for {@link Structure} values. */\nexports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n\n/** Factory for {@link BitStructure} values. */\nexports.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n\n/** Factory for {@link Sequence} values. */\nexports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n\n/** Factory for {@link Union} values. */\nexports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nexports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n\n/** Factory for {@link Blob} values. */\nexports.blob = ((length, property) => new Blob(length, property));\n\n/** Factory for {@link CString} values. */\nexports.cstr = (property => new CString(property));\n\n/** Factory for {@link UTF8} values. */\nexports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n\n/** Factory for {@link Constant} values. */\nexports[\"const\"] = ((value, property) => new Constant(value, property));\n\n\n/***/ }),\n\n/***/ 8764:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nconst base64 = __webpack_require__(9742)\nconst ieee754 = __webpack_require__(645)\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n\n\n/***/ }),\n\n/***/ 1924:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar GetIntrinsic = __webpack_require__(210);\n\nvar callBind = __webpack_require__(5559);\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n\n\n/***/ }),\n\n/***/ 5559:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar bind = __webpack_require__(8612);\nvar GetIntrinsic = __webpack_require__(210);\nvar setFunctionLength = __webpack_require__(7771);\n\nvar $TypeError = __webpack_require__(4453);\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $defineProperty = __webpack_require__(4429);\nvar $max = GetIntrinsic('%Math.max%');\n\nmodule.exports = function callBind(originalFunction) {\n\tif (typeof originalFunction !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\tvar func = $reflectApply(bind, $call, arguments);\n\treturn setFunctionLength(\n\t\tfunc,\n\t\t1 + $max(0, originalFunction.length - (arguments.length - 1)),\n\t\ttrue\n\t);\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n\n\n/***/ }),\n\n/***/ 3204:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nconst preserveCamelCase = string => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\n\tfor (let i = 0; i < string.length; i++) {\n\t\tconst character = string[i];\n\n\t\tif (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) {\n\t\t\tstring = string.slice(0, i) + '-' + string.slice(i);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\ti++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) {\n\t\t\tstring = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst camelCase = (input, options) => {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = Object.assign({\n\t\tpascalCase: false\n\t}, options);\n\n\tconst postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x;\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tif (input.length === 1) {\n\t\treturn options.pascalCase ? input.toUpperCase() : input.toLowerCase();\n\t}\n\n\tconst hasUpperCase = input !== input.toLowerCase();\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input);\n\t}\n\n\tinput = input\n\t\t.replace(/^[_.\\- ]+/, '')\n\t\t.toLowerCase()\n\t\t.replace(/[_.\\- ]+(\\w|$)/g, (_, p1) => p1.toUpperCase())\n\t\t.replace(/\\d+(\\w|$)/g, m => m.toUpperCase());\n\n\treturn postProcess(input);\n};\n\nmodule.exports = camelCase;\n// TODO: Remove this for the next major release\nmodule.exports[\"default\"] = camelCase;\n\n\n/***/ }),\n\n/***/ 9887:\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_RESULT__;/*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */\r\n;(function (globalScope) {\r\n 'use strict';\r\n\r\n\r\n /*\r\n * decimal.js-light v2.5.1\r\n * An arbitrary-precision Decimal type for JavaScript.\r\n * https://github.com/MikeMcl/decimal.js-light\r\n * Copyright (c) 2020 Michael Mclaughlin \r\n * MIT Expat Licence\r\n */\r\n\r\n\r\n // ----------------------------------- EDITABLE DEFAULTS ------------------------------------ //\r\n\r\n\r\n // The limit on the value of `precision`, and on the value of the first argument to\r\n // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`.\r\n var MAX_DIGITS = 1e9, // 0 to 1e9\r\n\r\n\r\n // The initial configuration properties of the Decimal constructor.\r\n Decimal = {\r\n\r\n // These values must be integers within the stated ranges (inclusive).\r\n // Most of these values can be changed during run-time using `Decimal.config`.\r\n\r\n // The maximum number of significant digits of the result of a calculation or base conversion.\r\n // E.g. `Decimal.config({ precision: 20 });`\r\n precision: 20, // 1 to MAX_DIGITS\r\n\r\n // The rounding mode used by default by `toInteger`, `toDecimalPlaces`, `toExponential`,\r\n // `toFixed`, `toPrecision` and `toSignificantDigits`.\r\n //\r\n // ROUND_UP 0 Away from zero.\r\n // ROUND_DOWN 1 Towards zero.\r\n // ROUND_CEIL 2 Towards +Infinity.\r\n // ROUND_FLOOR 3 Towards -Infinity.\r\n // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n //\r\n // E.g.\r\n // `Decimal.rounding = 4;`\r\n // `Decimal.rounding = Decimal.ROUND_HALF_UP;`\r\n rounding: 4, // 0 to 8\r\n\r\n // The exponent value at and beneath which `toString` returns exponential notation.\r\n // JavaScript numbers: -7\r\n toExpNeg: -7, // 0 to -MAX_E\r\n\r\n // The exponent value at and above which `toString` returns exponential notation.\r\n // JavaScript numbers: 21\r\n toExpPos: 21, // 0 to MAX_E\r\n\r\n // The natural logarithm of 10.\r\n // 115 digits\r\n LN10: '2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286'\r\n },\r\n\r\n\r\n // ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- //\r\n\r\n\r\n external = true,\r\n\r\n decimalError = '[DecimalError] ',\r\n invalidArgument = decimalError + 'Invalid argument: ',\r\n exponentOutOfRange = decimalError + 'Exponent out of range: ',\r\n\r\n mathfloor = Math.floor,\r\n mathpow = Math.pow,\r\n\r\n isDecimal = /^(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,\r\n\r\n ONE,\r\n BASE = 1e7,\r\n LOG_BASE = 7,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n MAX_E = mathfloor(MAX_SAFE_INTEGER / LOG_BASE), // 1286742750677284\r\n\r\n // Decimal.prototype object\r\n P = {};\r\n\r\n\r\n // Decimal prototype methods\r\n\r\n\r\n /*\r\n * absoluteValue abs\r\n * comparedTo cmp\r\n * decimalPlaces dp\r\n * dividedBy div\r\n * dividedToIntegerBy idiv\r\n * equals eq\r\n * exponent\r\n * greaterThan gt\r\n * greaterThanOrEqualTo gte\r\n * isInteger isint\r\n * isNegative isneg\r\n * isPositive ispos\r\n * isZero\r\n * lessThan lt\r\n * lessThanOrEqualTo lte\r\n * logarithm log\r\n * minus sub\r\n * modulo mod\r\n * naturalExponential exp\r\n * naturalLogarithm ln\r\n * negated neg\r\n * plus add\r\n * precision sd\r\n * squareRoot sqrt\r\n * times mul\r\n * toDecimalPlaces todp\r\n * toExponential\r\n * toFixed\r\n * toInteger toint\r\n * toNumber\r\n * toPower pow\r\n * toPrecision\r\n * toSignificantDigits tosd\r\n * toString\r\n * valueOf val\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the absolute value of this Decimal.\r\n *\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new this.constructor(this);\r\n if (x.s) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this Decimal is greater than the value of `y`,\r\n * -1 if the value of this Decimal is less than the value of `y`,\r\n * 0 if they have the same value\r\n *\r\n */\r\n P.comparedTo = P.cmp = function (y) {\r\n var i, j, xdL, ydL,\r\n x = this;\r\n\r\n y = new x.constructor(y);\r\n\r\n // Signs differ?\r\n if (x.s !== y.s) return x.s || -y.s;\r\n\r\n // Compare exponents.\r\n if (x.e !== y.e) return x.e > y.e ^ x.s < 0 ? 1 : -1;\r\n\r\n xdL = x.d.length;\r\n ydL = y.d.length;\r\n\r\n // Compare digit by digit.\r\n for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {\r\n if (x.d[i] !== y.d[i]) return x.d[i] > y.d[i] ^ x.s < 0 ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return xdL === ydL ? 0 : xdL > ydL ^ x.s < 0 ? 1 : -1;\r\n };\r\n\r\n\r\n /*\r\n * Return the number of decimal places of the value of this Decimal.\r\n *\r\n */\r\n P.decimalPlaces = P.dp = function () {\r\n var x = this,\r\n w = x.d.length - 1,\r\n dp = (w - x.e) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n w = x.d[w];\r\n if (w) for (; w % 10 == 0; w /= 10) dp--;\r\n\r\n return dp < 0 ? 0 : dp;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal divided by `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\n P.dividedBy = P.div = function (y) {\r\n return divide(this, new this.constructor(y));\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the integer part of dividing the value of this Decimal\r\n * by the value of `y`, truncated to `precision` significant digits.\r\n *\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n return round(divide(x, new Ctor(y), 0, 1), Ctor.precision);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.\r\n *\r\n */\r\n P.equals = P.eq = function (y) {\r\n return !this.cmp(y);\r\n };\r\n\r\n\r\n /*\r\n * Return the (base 10) exponent value of this Decimal (this.e is the base 10000000 exponent).\r\n *\r\n */\r\n P.exponent = function () {\r\n return getBase10Exponent(this);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than the value of `y`, otherwise return\r\n * false.\r\n *\r\n */\r\n P.greaterThan = P.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than or equal to the value of `y`,\r\n * otherwise return false.\r\n *\r\n */\r\n P.greaterThanOrEqualTo = P.gte = function (y) {\r\n return this.cmp(y) >= 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is an integer, otherwise return false.\r\n *\r\n */\r\n P.isInteger = P.isint = function () {\r\n return this.e > this.d.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is negative, otherwise return false.\r\n *\r\n */\r\n P.isNegative = P.isneg = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is positive, otherwise return false.\r\n *\r\n */\r\n P.isPositive = P.ispos = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is 0, otherwise return false.\r\n *\r\n */\r\n P.isZero = function () {\r\n return this.s === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThan = P.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThanOrEqualTo = P.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n };\r\n\r\n\r\n /*\r\n * Return the logarithm of the value of this Decimal to the specified base, truncated to\r\n * `precision` significant digits.\r\n *\r\n * If no base is specified, return log[10](x).\r\n *\r\n * log[base](x) = ln(x) / ln(base)\r\n *\r\n * The maximum error of the result is 1 ulp (unit in the last place).\r\n *\r\n * [base] {number|string|Decimal} The base of the logarithm.\r\n *\r\n */\r\n P.logarithm = P.log = function (base) {\r\n var r,\r\n x = this,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision,\r\n wpr = pr + 5;\r\n\r\n // Default base is 10.\r\n if (base === void 0) {\r\n base = new Ctor(10);\r\n } else {\r\n base = new Ctor(base);\r\n\r\n // log[-b](x) = NaN\r\n // log[0](x) = NaN\r\n // log[1](x) = NaN\r\n if (base.s < 1 || base.eq(ONE)) throw Error(decimalError + 'NaN');\r\n }\r\n\r\n // log[b](-x) = NaN\r\n // log[b](0) = -Infinity\r\n if (x.s < 1) throw Error(decimalError + (x.s ? 'NaN' : '-Infinity'));\r\n\r\n // log[b](1) = 0\r\n if (x.eq(ONE)) return new Ctor(0);\r\n\r\n external = false;\r\n r = divide(ln(x, wpr), ln(base, wpr), wpr);\r\n external = true;\r\n\r\n return round(r, pr);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal minus `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\n P.minus = P.sub = function (y) {\r\n var x = this;\r\n y = new x.constructor(y);\r\n return x.s == y.s ? subtract(x, y) : add(x, (y.s = -y.s, y));\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal modulo `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\n P.modulo = P.mod = function (y) {\r\n var q,\r\n x = this,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n y = new Ctor(y);\r\n\r\n // x % 0 = NaN\r\n if (!y.s) throw Error(decimalError + 'NaN');\r\n\r\n // Return x if x is 0.\r\n if (!x.s) return round(new Ctor(x), pr);\r\n\r\n // Prevent rounding of intermediate calculations.\r\n external = false;\r\n q = divide(x, y, 0, 1).times(y);\r\n external = true;\r\n\r\n return x.minus(q);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of the value of this Decimal,\r\n * i.e. the base e raised to the power the value of this Decimal, truncated to `precision`\r\n * significant digits.\r\n *\r\n */\r\n P.naturalExponential = P.exp = function () {\r\n return exp(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of the value of this Decimal,\r\n * truncated to `precision` significant digits.\r\n *\r\n */\r\n P.naturalLogarithm = P.ln = function () {\r\n return ln(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by\r\n * -1.\r\n *\r\n */\r\n P.negated = P.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s || 0;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal plus `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\n P.plus = P.add = function (y) {\r\n var x = this;\r\n y = new x.constructor(y);\r\n return x.s == y.s ? add(x, y) : subtract(x, (y.s = -y.s, y));\r\n };\r\n\r\n\r\n /*\r\n * Return the number of significant digits of the value of this Decimal.\r\n *\r\n * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.\r\n *\r\n */\r\n P.precision = P.sd = function (z) {\r\n var e, sd, w,\r\n x = this;\r\n\r\n if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z);\r\n\r\n e = getBase10Exponent(x) + 1;\r\n w = x.d.length - 1;\r\n sd = w * LOG_BASE + 1;\r\n w = x.d[w];\r\n\r\n // If non-zero...\r\n if (w) {\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n for (; w % 10 == 0; w /= 10) sd--;\r\n\r\n // Add the number of digits of the first word.\r\n for (w = x.d[0]; w >= 10; w /= 10) sd++;\r\n }\r\n\r\n return z && e > sd ? e : sd;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of this Decimal, truncated to `precision`\r\n * significant digits.\r\n *\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var e, n, pr, r, s, t, wpr,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n // Negative or zero?\r\n if (x.s < 1) {\r\n if (!x.s) return new Ctor(0);\r\n\r\n // sqrt(-x) = NaN\r\n throw Error(decimalError + 'NaN');\r\n }\r\n\r\n e = getBase10Exponent(x);\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+x);\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = digitsToString(x.d);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(n);\r\n e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n pr = Ctor.precision;\r\n s = wpr = pr + 3;\r\n\r\n // Newton-Raphson iteration.\r\n for (;;) {\r\n t = r;\r\n r = t.plus(divide(x, t, wpr + 2)).times(0.5);\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === (n = digitsToString(r.d)).slice(0, wpr)) {\r\n n = n.slice(wpr - 3, wpr + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or\r\n // 4999, i.e. approaching a rounding boundary, continue the iteration.\r\n if (s == wpr && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n round(t, pr + 1, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n } else if (n != '9999') {\r\n break;\r\n }\r\n\r\n wpr += 4;\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return round(r, pr);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal times `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\n P.times = P.mul = function (y) {\r\n var carry, e, i, k, r, rL, t, xdL, ydL,\r\n x = this,\r\n Ctor = x.constructor,\r\n xd = x.d,\r\n yd = (y = new Ctor(y)).d;\r\n\r\n // Return 0 if either is 0.\r\n if (!x.s || !y.s) return new Ctor(0);\r\n\r\n y.s *= x.s;\r\n e = x.e + y.e;\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Ensure xd points to the longer array.\r\n if (xdL < ydL) {\r\n r = xd;\r\n xd = yd;\r\n yd = r;\r\n rL = xdL;\r\n xdL = ydL;\r\n ydL = rL;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n r = [];\r\n rL = xdL + ydL;\r\n for (i = rL; i--;) r.push(0);\r\n\r\n // Multiply!\r\n for (i = ydL; --i >= 0;) {\r\n carry = 0;\r\n for (k = xdL + i; k > i;) {\r\n t = r[k] + yd[i] * xd[k - i - 1] + carry;\r\n r[k--] = t % BASE | 0;\r\n carry = t / BASE | 0;\r\n }\r\n\r\n r[k] = (r[k] + carry) % BASE | 0;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; !r[--rL];) r.pop();\r\n\r\n if (carry) ++e;\r\n else r.shift();\r\n\r\n y.d = r;\r\n y.e = e;\r\n\r\n return external ? round(y, Ctor.precision) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`\r\n * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.\r\n *\r\n * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toDecimalPlaces = P.todp = function (dp, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n if (dp === void 0) return x;\r\n\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n return round(x, dp + getBase10Exponent(x) + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in exponential notation rounded to\r\n * `dp` fixed decimal places using rounding mode `rounding`.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toExponential = function (dp, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = toString(x, true);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = round(new Ctor(x), dp + 1, rm);\r\n str = toString(x, true, dp + 1);\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in normal (fixed-point) notation to\r\n * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is\r\n * omitted.\r\n *\r\n * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n * (-0).toFixed(3) is '0.000'.\r\n * (-0.5).toFixed(0) is '-0'.\r\n *\r\n */\r\n P.toFixed = function (dp, rm) {\r\n var str, y,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) return toString(x);\r\n\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n y = round(new Ctor(x), dp + getBase10Exponent(x) + 1, rm);\r\n str = toString(y.abs(), false, dp + getBase10Exponent(y) + 1);\r\n\r\n // To determine whether to add the minus sign look at the value before it was rounded,\r\n // i.e. look at `x` rather than `y`.\r\n return x.isneg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using\r\n * rounding mode `rounding`.\r\n *\r\n */\r\n P.toInteger = P.toint = function () {\r\n var x = this,\r\n Ctor = x.constructor;\r\n return round(new Ctor(x), getBase10Exponent(x) + 1, Ctor.rounding);\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this Decimal converted to a number primitive.\r\n *\r\n */\r\n P.toNumber = function () {\r\n return +this;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal raised to the power `y`,\r\n * truncated to `precision` significant digits.\r\n *\r\n * For non-integer or very large exponents pow(x, y) is calculated using\r\n *\r\n * x^y = exp(y*ln(x))\r\n *\r\n * The maximum error is 1 ulp (unit in last place).\r\n *\r\n * y {number|string|Decimal} The power to which to raise this Decimal.\r\n *\r\n */\r\n P.toPower = P.pow = function (y) {\r\n var e, k, pr, r, sign, yIsInt,\r\n x = this,\r\n Ctor = x.constructor,\r\n guard = 12,\r\n yn = +(y = new Ctor(y));\r\n\r\n // pow(x, 0) = 1\r\n if (!y.s) return new Ctor(ONE);\r\n\r\n x = new Ctor(x);\r\n\r\n // pow(0, y > 0) = 0\r\n // pow(0, y < 0) = Infinity\r\n if (!x.s) {\r\n if (y.s < 1) throw Error(decimalError + 'Infinity');\r\n return x;\r\n }\r\n\r\n // pow(1, y) = 1\r\n if (x.eq(ONE)) return x;\r\n\r\n pr = Ctor.precision;\r\n\r\n // pow(x, 1) = x\r\n if (y.eq(ONE)) return round(x, pr);\r\n\r\n e = y.e;\r\n k = y.d.length - 1;\r\n yIsInt = e >= k;\r\n sign = x.s;\r\n\r\n if (!yIsInt) {\r\n\r\n // pow(x < 0, y non-integer) = NaN\r\n if (sign < 0) throw Error(decimalError + 'NaN');\r\n\r\n // If y is a small integer use the 'exponentiation by squaring' algorithm.\r\n } else if ((k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {\r\n r = new Ctor(ONE);\r\n\r\n // Max k of 9007199254740991 takes 53 loop iterations.\r\n // Maximum digits array length; leaves [28, 34] guard digits.\r\n e = Math.ceil(pr / LOG_BASE + 4);\r\n\r\n external = false;\r\n\r\n for (;;) {\r\n if (k % 2) {\r\n r = r.times(x);\r\n truncate(r.d, e);\r\n }\r\n\r\n k = mathfloor(k / 2);\r\n if (k === 0) break;\r\n\r\n x = x.times(x);\r\n truncate(x.d, e);\r\n }\r\n\r\n external = true;\r\n\r\n return y.s < 0 ? new Ctor(ONE).div(r) : round(r, pr);\r\n }\r\n\r\n // Result is negative if x is negative and the last digit of integer y is odd.\r\n sign = sign < 0 && y.d[Math.max(e, k)] & 1 ? -1 : 1;\r\n\r\n x.s = 1;\r\n external = false;\r\n r = y.times(ln(x, pr + guard));\r\n external = true;\r\n r = exp(r);\r\n r.s = sign;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal rounded to `sd` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * Return exponential notation if `sd` is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n var e, str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n e = getBase10Exponent(x);\r\n str = toString(x, e <= Ctor.toExpNeg || e >= Ctor.toExpPos);\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = round(new Ctor(x), sd, rm);\r\n e = getBase10Exponent(x);\r\n str = toString(x, sd <= e || e <= Ctor.toExpNeg, sd);\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`\r\n * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if\r\n * omitted.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toSignificantDigits = P.tosd = function (sd, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n }\r\n\r\n return round(new Ctor(x), sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal.\r\n *\r\n * Return exponential notation if this Decimal has a positive exponent equal to or greater than\r\n * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.\r\n *\r\n */\r\n P.toString = P.valueOf = P.val = P.toJSON = function () {\r\n var x = this,\r\n e = getBase10Exponent(x),\r\n Ctor = x.constructor;\r\n\r\n return toString(x, e <= Ctor.toExpNeg || e >= Ctor.toExpPos);\r\n };\r\n\r\n\r\n // Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.\r\n\r\n\r\n /*\r\n * add P.minus, P.plus\r\n * checkInt32 P.todp, P.toExponential, P.toFixed, P.toPrecision, P.tosd\r\n * digitsToString P.log, P.sqrt, P.pow, toString, exp, ln\r\n * divide P.div, P.idiv, P.log, P.mod, P.sqrt, exp, ln\r\n * exp P.exp, P.pow\r\n * getBase10Exponent P.exponent, P.sd, P.toint, P.sqrt, P.todp, P.toFixed, P.toPrecision,\r\n * P.toString, divide, round, toString, exp, ln\r\n * getLn10 P.log, ln\r\n * getZeroString digitsToString, toString\r\n * ln P.log, P.ln, P.pow, exp\r\n * parseDecimal Decimal\r\n * round P.abs, P.idiv, P.log, P.minus, P.mod, P.neg, P.plus, P.toint, P.sqrt,\r\n * P.times, P.todp, P.toExponential, P.toFixed, P.pow, P.toPrecision, P.tosd,\r\n * divide, getLn10, exp, ln\r\n * subtract P.minus, P.plus\r\n * toString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf\r\n * truncate P.pow\r\n *\r\n * Throws: P.log, P.mod, P.sd, P.sqrt, P.pow, checkInt32, divide, round,\r\n * getLn10, exp, ln, parseDecimal, Decimal, config\r\n */\r\n\r\n\r\n function add(x, y) {\r\n var carry, d, e, i, k, len, xd, yd,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n // If either is zero...\r\n if (!x.s || !y.s) {\r\n\r\n // Return x if y is zero.\r\n // Return y if y is non-zero.\r\n if (!y.s) y = new Ctor(x);\r\n return external ? round(y, pr) : y;\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n k = x.e;\r\n e = y.e;\r\n xd = xd.slice();\r\n i = k - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (i) {\r\n if (i < 0) {\r\n d = xd;\r\n i = -i;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = k;\r\n len = xd.length;\r\n }\r\n\r\n // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1.\r\n k = Math.ceil(pr / LOG_BASE);\r\n len = k > len ? k + 1 : len + 1;\r\n\r\n if (i > len) {\r\n i = len;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts.\r\n d.reverse();\r\n for (; i--;) d.push(0);\r\n d.reverse();\r\n }\r\n\r\n len = xd.length;\r\n i = yd.length;\r\n\r\n // If yd is longer than xd, swap xd and yd so xd points to the longer array.\r\n if (len - i < 0) {\r\n i = len;\r\n d = yd;\r\n yd = xd;\r\n xd = d;\r\n }\r\n\r\n // Only start adding at yd.length - 1 as the further digits of xd can be left as they are.\r\n for (carry = 0; i;) {\r\n carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0;\r\n xd[i] %= BASE;\r\n }\r\n\r\n if (carry) {\r\n xd.unshift(carry);\r\n ++e;\r\n }\r\n\r\n // Remove trailing zeros.\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n for (len = xd.length; xd[--len] == 0;) xd.pop();\r\n\r\n y.d = xd;\r\n y.e = e;\r\n\r\n return external ? round(y, pr) : y;\r\n }\r\n\r\n\r\n function checkInt32(i, min, max) {\r\n if (i !== ~~i || i < min || i > max) {\r\n throw Error(invalidArgument + i);\r\n }\r\n }\r\n\r\n\r\n function digitsToString(d) {\r\n var i, k, ws,\r\n indexOfLastWord = d.length - 1,\r\n str = '',\r\n w = d[0];\r\n\r\n if (indexOfLastWord > 0) {\r\n str += w;\r\n for (i = 1; i < indexOfLastWord; i++) {\r\n ws = d[i] + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n str += ws;\r\n }\r\n\r\n w = d[i];\r\n ws = w + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n } else if (w === 0) {\r\n return '0';\r\n }\r\n\r\n // Remove trailing zeros of last w.\r\n for (; w % 10 === 0;) w /= 10;\r\n\r\n return str + w;\r\n }\r\n\r\n\r\n var divide = (function () {\r\n\r\n // Assumes non-zero x and k, and hence non-zero result.\r\n function multiplyInteger(x, k) {\r\n var temp,\r\n carry = 0,\r\n i = x.length;\r\n\r\n for (x = x.slice(); i--;) {\r\n temp = x[i] * k + carry;\r\n x[i] = temp % BASE | 0;\r\n carry = temp / BASE | 0;\r\n }\r\n\r\n if (carry) x.unshift(carry);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, r;\r\n\r\n if (aL != bL) {\r\n r = aL > bL ? 1 : -1;\r\n } else {\r\n for (i = r = 0; i < aL; i++) {\r\n if (a[i] != b[i]) {\r\n r = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n function subtract(a, b, aL) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * BASE + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1;) a.shift();\r\n }\r\n\r\n return function (x, y, pr, dp) {\r\n var cmp, e, i, k, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0, yL, yz,\r\n Ctor = x.constructor,\r\n sign = x.s == y.s ? 1 : -1,\r\n xd = x.d,\r\n yd = y.d;\r\n\r\n // Either 0?\r\n if (!x.s) return new Ctor(x);\r\n if (!y.s) throw Error(decimalError + 'Division by zero');\r\n\r\n e = x.e - y.e;\r\n yL = yd.length;\r\n xL = xd.length;\r\n q = new Ctor(sign);\r\n qd = q.d = [];\r\n\r\n // Result exponent may be one less than e.\r\n for (i = 0; yd[i] == (xd[i] || 0); ) ++i;\r\n if (yd[i] > (xd[i] || 0)) --e;\r\n\r\n if (pr == null) {\r\n sd = pr = Ctor.precision;\r\n } else if (dp) {\r\n sd = pr + (getBase10Exponent(x) - getBase10Exponent(y)) + 1;\r\n } else {\r\n sd = pr;\r\n }\r\n\r\n if (sd < 0) return new Ctor(0);\r\n\r\n // Convert precision in number of base 10 digits to base 1e7 digits.\r\n sd = sd / LOG_BASE + 2 | 0;\r\n i = 0;\r\n\r\n // divisor < 1e7\r\n if (yL == 1) {\r\n k = 0;\r\n yd = yd[0];\r\n sd++;\r\n\r\n // k is the carry.\r\n for (; (i < xL || k) && sd--; i++) {\r\n t = k * BASE + (xd[i] || 0);\r\n qd[i] = t / yd | 0;\r\n k = t % yd | 0;\r\n }\r\n\r\n // divisor >= 1e7\r\n } else {\r\n\r\n // Normalise xd and yd so highest order digit of yd is >= BASE/2\r\n k = BASE / (yd[0] + 1) | 0;\r\n\r\n if (k > 1) {\r\n yd = multiplyInteger(yd, k);\r\n xd = multiplyInteger(xd, k);\r\n yL = yd.length;\r\n xL = xd.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xd.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL;) rem[remL++] = 0;\r\n\r\n yz = yd.slice();\r\n yz.unshift(0);\r\n yd0 = yd[0];\r\n\r\n if (yd[1] >= BASE / 2) ++yd0;\r\n\r\n do {\r\n k = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, k.\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * BASE + (rem[1] || 0);\r\n\r\n // k will be how many times the divisor goes into the current remainder.\r\n k = rem0 / yd0 | 0;\r\n\r\n // Algorithm:\r\n // 1. product = divisor * trial digit (k)\r\n // 2. if product > remainder: product -= divisor, k--\r\n // 3. remainder -= product\r\n // 4. if product was < remainder at 2:\r\n // 5. compare new remainder and divisor\r\n // 6. If remainder > divisor: remainder -= divisor, k++\r\n\r\n if (k > 1) {\r\n if (k >= BASE) k = BASE - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiplyInteger(yd, k);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n cmp = compare(prod, rem, prodL, remL);\r\n\r\n // product > remainder.\r\n if (cmp == 1) {\r\n k--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yd, prodL);\r\n }\r\n } else {\r\n\r\n // cmp is -1.\r\n // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1\r\n // to avoid it. If k is 1 there is a need to compare yd and rem again below.\r\n if (k == 0) cmp = k = 1;\r\n prod = yd.slice();\r\n }\r\n\r\n prodL = prod.length;\r\n if (prodL < remL) prod.unshift(0);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL);\r\n\r\n // If product was < previous remainder.\r\n if (cmp == -1) {\r\n remL = rem.length;\r\n\r\n // Compare divisor and new remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n if (cmp < 1) {\r\n k++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yd, remL);\r\n }\r\n }\r\n\r\n remL = rem.length;\r\n } else if (cmp === 0) {\r\n k++;\r\n rem = [0];\r\n } // if cmp === 1, k will be 0\r\n\r\n // Add the next digit, k, to the result array.\r\n qd[i++] = k;\r\n\r\n // Update the remainder.\r\n if (cmp && rem[0]) {\r\n rem[remL++] = xd[xi] || 0;\r\n } else {\r\n rem = [xd[xi]];\r\n remL = 1;\r\n }\r\n\r\n } while ((xi++ < xL || rem[0] !== void 0) && sd--);\r\n }\r\n\r\n // Leading zero?\r\n if (!qd[0]) qd.shift();\r\n\r\n q.e = e;\r\n\r\n return round(q, dp ? pr + getBase10Exponent(q) + 1 : pr);\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of `x` truncated to `sd`\r\n * significant digits.\r\n *\r\n * Taylor/Maclaurin series.\r\n *\r\n * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...\r\n *\r\n * Argument reduction:\r\n * Repeat x = x / 32, k += 5, until |x| < 0.1\r\n * exp(x) = exp(x / 2^k)^(2^k)\r\n *\r\n * Previously, the argument was initially reduced by\r\n * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10)\r\n * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was\r\n * found to be slower than just dividing repeatedly by 32 as above.\r\n *\r\n * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)\r\n *\r\n * exp(x) is non-terminating for any finite, non-zero x.\r\n *\r\n */\r\n function exp(x, sd) {\r\n var denominator, guard, pow, sum, t, wpr,\r\n i = 0,\r\n k = 0,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n if (getBase10Exponent(x) > 16) throw Error(exponentOutOfRange + getBase10Exponent(x));\r\n\r\n // exp(0) = 1\r\n if (!x.s) return new Ctor(ONE);\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n t = new Ctor(0.03125);\r\n\r\n while (x.abs().gte(0.1)) {\r\n x = x.times(t); // x = x / 2^5\r\n k += 5;\r\n }\r\n\r\n // Estimate the precision increase necessary to ensure the first 4 rounding digits are correct.\r\n guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0;\r\n wpr += guard;\r\n denominator = pow = sum = new Ctor(ONE);\r\n Ctor.precision = wpr;\r\n\r\n for (;;) {\r\n pow = round(pow.times(x), wpr);\r\n denominator = denominator.times(++i);\r\n t = sum.plus(divide(pow, denominator, wpr));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n while (k--) sum = round(sum.times(sum), wpr);\r\n Ctor.precision = pr;\r\n return sd == null ? (external = true, round(sum, pr)) : sum;\r\n }\r\n\r\n sum = t;\r\n }\r\n }\r\n\r\n\r\n // Calculate the base 10 exponent from the base 1e7 exponent.\r\n function getBase10Exponent(x) {\r\n var e = x.e * LOG_BASE,\r\n w = x.d[0];\r\n\r\n // Add the number of digits of the first word of the digits array.\r\n for (; w >= 10; w /= 10) e++;\r\n return e;\r\n }\r\n\r\n\r\n function getLn10(Ctor, sd, pr) {\r\n\r\n if (sd > Ctor.LN10.sd()) {\r\n\r\n\r\n // Reset global state in case the exception is caught.\r\n external = true;\r\n if (pr) Ctor.precision = pr;\r\n throw Error(decimalError + 'LN10 precision limit exceeded');\r\n }\r\n\r\n return round(new Ctor(Ctor.LN10), sd);\r\n }\r\n\r\n\r\n function getZeroString(k) {\r\n var zs = '';\r\n for (; k--;) zs += '0';\r\n return zs;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of `x` truncated to `sd` significant\r\n * digits.\r\n *\r\n * ln(n) is non-terminating (n != 1)\r\n *\r\n */\r\n function ln(y, sd) {\r\n var c, c0, denominator, e, numerator, sum, t, wpr, x2,\r\n n = 1,\r\n guard = 10,\r\n x = y,\r\n xd = x.d,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n // ln(-x) = NaN\r\n // ln(0) = -Infinity\r\n if (x.s < 1) throw Error(decimalError + (x.s ? 'NaN' : '-Infinity'));\r\n\r\n // ln(1) = 0\r\n if (x.eq(ONE)) return new Ctor(0);\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n if (x.eq(10)) {\r\n if (sd == null) external = true;\r\n return getLn10(Ctor, wpr);\r\n }\r\n\r\n wpr += guard;\r\n Ctor.precision = wpr;\r\n c = digitsToString(xd);\r\n c0 = c.charAt(0);\r\n e = getBase10Exponent(x);\r\n\r\n if (Math.abs(e) < 1.5e15) {\r\n\r\n // Argument reduction.\r\n // The series converges faster the closer the argument is to 1, so using\r\n // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b\r\n // multiply the argument by itself until the leading digits of the significand are 7, 8, 9,\r\n // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can\r\n // later be divided by this number, then separate out the power of 10 using\r\n // ln(a*10^b) = ln(a) + b*ln(10).\r\n\r\n // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14).\r\n //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) {\r\n // max n is 6 (gives 0.7 - 1.3)\r\n while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) {\r\n x = x.times(y);\r\n c = digitsToString(x.d);\r\n c0 = c.charAt(0);\r\n n++;\r\n }\r\n\r\n e = getBase10Exponent(x);\r\n\r\n if (c0 > 1) {\r\n x = new Ctor('0.' + c);\r\n e++;\r\n } else {\r\n x = new Ctor(c0 + '.' + c.slice(1));\r\n }\r\n } else {\r\n\r\n // The argument reduction method above may result in overflow if the argument y is a massive\r\n // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this\r\n // function using ln(x*10^e) = ln(x) + e*ln(10).\r\n t = getLn10(Ctor, wpr + 2, pr).times(e + '');\r\n x = ln(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t);\r\n\r\n Ctor.precision = pr;\r\n return sd == null ? (external = true, round(x, pr)) : x;\r\n }\r\n\r\n // x is reduced to a value near 1.\r\n\r\n // Taylor series.\r\n // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...)\r\n // where x = (y - 1)/(y + 1) (|x| < 1)\r\n sum = numerator = x = divide(x.minus(ONE), x.plus(ONE), wpr);\r\n x2 = round(x.times(x), wpr);\r\n denominator = 3;\r\n\r\n for (;;) {\r\n numerator = round(numerator.times(x2), wpr);\r\n t = sum.plus(divide(numerator, new Ctor(denominator), wpr));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n sum = sum.times(2);\r\n\r\n // Reverse the argument reduction.\r\n if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + ''));\r\n sum = divide(sum, new Ctor(n), wpr);\r\n\r\n Ctor.precision = pr;\r\n return sd == null ? (external = true, round(sum, pr)) : sum;\r\n }\r\n\r\n sum = t;\r\n denominator += 2;\r\n }\r\n }\r\n\r\n\r\n /*\r\n * Parse the value of a new Decimal `x` from string `str`.\r\n */\r\n function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48;) ++i;\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48;) --len;\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n e = e - i - 1;\r\n x.e = mathfloor(e / LOG_BASE);\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external && (x.e > MAX_E || x.e < -MAX_E)) throw Error(exponentOutOfRange + e);\r\n } else {\r\n\r\n // Zero.\r\n x.s = 0;\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Round `x` to `sd` significant digits, using rounding mode `rm` if present (truncate otherwise).\r\n */\r\n function round(x, sd, rm) {\r\n var i, j, k, n, rd, doRound, w, xdi,\r\n xd = x.d;\r\n\r\n // rd: the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // w: the word of xd which contains the rounding digit, a base 1e7 number.\r\n // xdi: the index of w within xd.\r\n // n: the number of digits of w.\r\n // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if\r\n // they had leading zeros)\r\n // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero).\r\n\r\n // Get the length of the first word of the digits array xd.\r\n for (n = 1, k = xd[0]; k >= 10; k /= 10) n++;\r\n i = sd - n;\r\n\r\n // Is the rounding digit in the first word of xd?\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n w = xd[xdi = 0];\r\n } else {\r\n xdi = Math.ceil((i + 1) / LOG_BASE);\r\n k = xd.length;\r\n if (xdi >= k) return x;\r\n w = k = xd[xdi];\r\n\r\n // Get the number of digits of w.\r\n for (n = 1; k >= 10; k /= 10) n++;\r\n\r\n // Get the index of rd within w.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within w, adjusted for leading zeros.\r\n // The number of leading zeros of w is given by LOG_BASE - n.\r\n j = i - LOG_BASE + n;\r\n }\r\n\r\n if (rm !== void 0) {\r\n k = mathpow(10, n - j - 1);\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = w / k % 10 | 0;\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n doRound = sd < 0 || xd[xdi + 1] !== void 0 || w % k;\r\n\r\n // The expression `w % mathpow(10, n - j - 1)` returns all the digits of w to the right of the\r\n // digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression will give\r\n // 714.\r\n\r\n doRound = rm < 4\r\n ? (rd || doRound) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || doRound || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? w / mathpow(10, n - j) : 0 : xd[xdi - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n }\r\n\r\n if (sd < 1 || !xd[0]) {\r\n if (doRound) {\r\n k = getBase10Exponent(x);\r\n xd.length = 1;\r\n\r\n // Convert sd to decimal places.\r\n sd = sd - k - 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE);\r\n x.e = mathfloor(-sd / LOG_BASE) || 0;\r\n } else {\r\n xd.length = 1;\r\n\r\n // Zero.\r\n xd[0] = x.e = x.s = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xd.length = xdi;\r\n k = 1;\r\n xdi--;\r\n } else {\r\n xd.length = xdi + 1;\r\n k = mathpow(10, LOG_BASE - i);\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of w.\r\n xd[xdi] = j > 0 ? (w / mathpow(10, n - j) % mathpow(10, j) | 0) * k : 0;\r\n }\r\n\r\n if (doRound) {\r\n for (;;) {\r\n\r\n // Is the digit to be rounded up in the first word of xd?\r\n if (xdi == 0) {\r\n if ((xd[0] += k) == BASE) {\r\n xd[0] = 1;\r\n ++x.e;\r\n }\r\n\r\n break;\r\n } else {\r\n xd[xdi] += k;\r\n if (xd[xdi] != BASE) break;\r\n xd[xdi--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xd.length; xd[--i] === 0;) xd.pop();\r\n\r\n if (external && (x.e > MAX_E || x.e < -MAX_E)) {\r\n throw Error(exponentOutOfRange + getBase10Exponent(x));\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function subtract(x, y) {\r\n var d, e, i, j, k, len, xd, xe, xLTy, yd,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n // Return y negated if x is zero.\r\n // Return x if y is zero and x is non-zero.\r\n if (!x.s || !y.s) {\r\n if (y.s) y.s = -y.s;\r\n else y = new Ctor(x);\r\n return external ? round(y, pr) : y;\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n\r\n // x and y are non-zero numbers with the same sign.\r\n\r\n e = y.e;\r\n xe = x.e;\r\n xd = xd.slice();\r\n k = xe - e;\r\n\r\n // If exponents differ...\r\n if (k) {\r\n xLTy = k < 0;\r\n\r\n if (xLTy) {\r\n d = xd;\r\n k = -k;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = xe;\r\n len = xd.length;\r\n }\r\n\r\n // Numbers with massively different exponents would result in a very high number of zeros\r\n // needing to be prepended, but this can be avoided while still ensuring correct rounding by\r\n // limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`.\r\n i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2;\r\n\r\n if (k > i) {\r\n k = i;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents.\r\n d.reverse();\r\n for (i = k; i--;) d.push(0);\r\n d.reverse();\r\n\r\n // Base 1e7 exponents equal.\r\n } else {\r\n\r\n // Check digits to determine which is the bigger number.\r\n\r\n i = xd.length;\r\n len = yd.length;\r\n xLTy = i < len;\r\n if (xLTy) len = i;\r\n\r\n for (i = 0; i < len; i++) {\r\n if (xd[i] != yd[i]) {\r\n xLTy = xd[i] < yd[i];\r\n break;\r\n }\r\n }\r\n\r\n k = 0;\r\n }\r\n\r\n if (xLTy) {\r\n d = xd;\r\n xd = yd;\r\n yd = d;\r\n y.s = -y.s;\r\n }\r\n\r\n len = xd.length;\r\n\r\n // Append zeros to xd if shorter.\r\n // Don't add zeros to yd if shorter as subtraction only needs to start at yd length.\r\n for (i = yd.length - len; i > 0; --i) xd[len++] = 0;\r\n\r\n // Subtract yd from xd.\r\n for (i = yd.length; i > k;) {\r\n if (xd[--i] < yd[i]) {\r\n for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1;\r\n --xd[j];\r\n xd[i] += BASE;\r\n }\r\n\r\n xd[i] -= yd[i];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] === 0;) xd.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xd[0] === 0; xd.shift()) --e;\r\n\r\n // Zero?\r\n if (!xd[0]) return new Ctor(0);\r\n\r\n y.d = xd;\r\n y.e = e;\r\n\r\n //return external && xd.length >= pr / LOG_BASE ? round(y, pr) : y;\r\n return external ? round(y, pr) : y;\r\n }\r\n\r\n\r\n function toString(x, isExp, sd) {\r\n var k,\r\n e = getBase10Exponent(x),\r\n str = digitsToString(x.d),\r\n len = str.length;\r\n\r\n if (isExp) {\r\n if (sd && (k = sd - len) > 0) {\r\n str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k);\r\n } else if (len > 1) {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n\r\n str = str + (e < 0 ? 'e' : 'e+') + e;\r\n } else if (e < 0) {\r\n str = '0.' + getZeroString(-e - 1) + str;\r\n if (sd && (k = sd - len) > 0) str += getZeroString(k);\r\n } else if (e >= len) {\r\n str += getZeroString(e + 1 - len);\r\n if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k);\r\n } else {\r\n if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k);\r\n if (sd && (k = sd - len) > 0) {\r\n if (e + 1 === len) str += '.';\r\n str += getZeroString(k);\r\n }\r\n }\r\n\r\n return x.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Does not strip trailing zeros.\r\n function truncate(arr, len) {\r\n if (arr.length > len) {\r\n arr.length = len;\r\n return true;\r\n }\r\n }\r\n\r\n\r\n // Decimal methods\r\n\r\n\r\n /*\r\n * clone\r\n * config/set\r\n */\r\n\r\n\r\n /*\r\n * Create and return a Decimal constructor with the same configuration properties as this Decimal\r\n * constructor.\r\n *\r\n */\r\n function clone(obj) {\r\n var i, p, ps;\r\n\r\n /*\r\n * The Decimal constructor and exported function.\r\n * Return a new Decimal instance.\r\n *\r\n * value {number|string|Decimal} A numeric value.\r\n *\r\n */\r\n function Decimal(value) {\r\n var x = this;\r\n\r\n // Decimal called without new.\r\n if (!(x instanceof Decimal)) return new Decimal(value);\r\n\r\n // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor\r\n // which points to Object.\r\n x.constructor = Decimal;\r\n\r\n // Duplicate.\r\n if (value instanceof Decimal) {\r\n x.s = value.s;\r\n x.e = value.e;\r\n x.d = (value = value.d) ? value.slice() : value;\r\n return;\r\n }\r\n\r\n if (typeof value === 'number') {\r\n\r\n // Reject Infinity/NaN.\r\n if (value * 0 !== 0) {\r\n throw Error(invalidArgument + value);\r\n }\r\n\r\n if (value > 0) {\r\n x.s = 1;\r\n } else if (value < 0) {\r\n value = -value;\r\n x.s = -1;\r\n } else {\r\n x.s = 0;\r\n x.e = 0;\r\n x.d = [0];\r\n return;\r\n }\r\n\r\n // Fast path for small integers.\r\n if (value === ~~value && value < 1e7) {\r\n x.e = 0;\r\n x.d = [value];\r\n return;\r\n }\r\n\r\n return parseDecimal(x, value.toString());\r\n } else if (typeof value !== 'string') {\r\n throw Error(invalidArgument + value);\r\n }\r\n\r\n // Minus sign?\r\n if (value.charCodeAt(0) === 45) {\r\n value = value.slice(1);\r\n x.s = -1;\r\n } else {\r\n x.s = 1;\r\n }\r\n\r\n if (isDecimal.test(value)) parseDecimal(x, value);\r\n else throw Error(invalidArgument + value);\r\n }\r\n\r\n Decimal.prototype = P;\r\n\r\n Decimal.ROUND_UP = 0;\r\n Decimal.ROUND_DOWN = 1;\r\n Decimal.ROUND_CEIL = 2;\r\n Decimal.ROUND_FLOOR = 3;\r\n Decimal.ROUND_HALF_UP = 4;\r\n Decimal.ROUND_HALF_DOWN = 5;\r\n Decimal.ROUND_HALF_EVEN = 6;\r\n Decimal.ROUND_HALF_CEIL = 7;\r\n Decimal.ROUND_HALF_FLOOR = 8;\r\n\r\n Decimal.clone = clone;\r\n Decimal.config = Decimal.set = config;\r\n\r\n if (obj === void 0) obj = {};\r\n if (obj) {\r\n ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'LN10'];\r\n for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p];\r\n }\r\n\r\n Decimal.config(obj);\r\n\r\n return Decimal;\r\n }\r\n\r\n\r\n /*\r\n * Configure global settings for a Decimal constructor.\r\n *\r\n * `obj` is an object with one or more of the following properties,\r\n *\r\n * precision {number}\r\n * rounding {number}\r\n * toExpNeg {number}\r\n * toExpPos {number}\r\n *\r\n * E.g. Decimal.config({ precision: 20, rounding: 4 })\r\n *\r\n */\r\n function config(obj) {\r\n if (!obj || typeof obj !== 'object') {\r\n throw Error(decimalError + 'Object expected');\r\n }\r\n var i, p, v,\r\n ps = [\r\n 'precision', 1, MAX_DIGITS,\r\n 'rounding', 0, 8,\r\n 'toExpNeg', -1 / 0, 0,\r\n 'toExpPos', 0, 1 / 0\r\n ];\r\n\r\n for (i = 0; i < ps.length; i += 3) {\r\n if ((v = obj[p = ps[i]]) !== void 0) {\r\n if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v;\r\n else throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n if ((v = obj[p = 'LN10']) !== void 0) {\r\n if (v == Math.LN10) this[p] = new this(v);\r\n else throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n\r\n // Create and configure initial Decimal constructor.\r\n Decimal = clone(Decimal);\r\n\r\n Decimal['default'] = Decimal.Decimal = Decimal;\r\n\r\n // Internal constant.\r\n ONE = new Decimal(1);\r\n\r\n\r\n // Export.\r\n\r\n\r\n // AMD.\r\n if (true) {\r\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\r\n return Decimal;\r\n }).call(exports, __webpack_require__, exports, module),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\r\n // Node and other environments that support module.exports.\r\n } else {}\r\n})(this);\r\n\n\n/***/ }),\n\n/***/ 3776:\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_RESULT__;;(function (globalScope) {\r\n 'use strict';\r\n\r\n\r\n /*!\r\n * decimal.js v10.4.3\r\n * An arbitrary-precision Decimal type for JavaScript.\r\n * https://github.com/MikeMcl/decimal.js\r\n * Copyright (c) 2022 Michael Mclaughlin \r\n * MIT Licence\r\n */\r\n\r\n\r\n // ----------------------------------- EDITABLE DEFAULTS ------------------------------------ //\r\n\r\n\r\n // The maximum exponent magnitude.\r\n // The limit on the value of `toExpNeg`, `toExpPos`, `minE` and `maxE`.\r\n var EXP_LIMIT = 9e15, // 0 to 9e15\r\n\r\n // The limit on the value of `precision`, and on the value of the first argument to\r\n // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`.\r\n MAX_DIGITS = 1e9, // 0 to 1e9\r\n\r\n // Base conversion alphabet.\r\n NUMERALS = '0123456789abcdef',\r\n\r\n // The natural logarithm of 10 (1025 digits).\r\n LN10 = '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058',\r\n\r\n // Pi (1025 digits).\r\n PI = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789',\r\n\r\n\r\n // The initial configuration properties of the Decimal constructor.\r\n DEFAULTS = {\r\n\r\n // These values must be integers within the stated ranges (inclusive).\r\n // Most of these values can be changed at run-time using the `Decimal.config` method.\r\n\r\n // The maximum number of significant digits of the result of a calculation or base conversion.\r\n // E.g. `Decimal.config({ precision: 20 });`\r\n precision: 20, // 1 to MAX_DIGITS\r\n\r\n // The rounding mode used when rounding to `precision`.\r\n //\r\n // ROUND_UP 0 Away from zero.\r\n // ROUND_DOWN 1 Towards zero.\r\n // ROUND_CEIL 2 Towards +Infinity.\r\n // ROUND_FLOOR 3 Towards -Infinity.\r\n // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n //\r\n // E.g.\r\n // `Decimal.rounding = 4;`\r\n // `Decimal.rounding = Decimal.ROUND_HALF_UP;`\r\n rounding: 4, // 0 to 8\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend (JavaScript %).\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 The IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive.\r\n //\r\n // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian\r\n // division (9) are commonly used for the modulus operation. The other rounding modes can also\r\n // be used, but they may not give useful results.\r\n modulo: 1, // 0 to 9\r\n\r\n // The exponent value at and beneath which `toString` returns exponential notation.\r\n // JavaScript numbers: -7\r\n toExpNeg: -7, // 0 to -EXP_LIMIT\r\n\r\n // The exponent value at and above which `toString` returns exponential notation.\r\n // JavaScript numbers: 21\r\n toExpPos: 21, // 0 to EXP_LIMIT\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // JavaScript numbers: -324 (5e-324)\r\n minE: -EXP_LIMIT, // -1 to -EXP_LIMIT\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // JavaScript numbers: 308 (1.7976931348623157e+308)\r\n maxE: EXP_LIMIT, // 1 to EXP_LIMIT\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n crypto: false // true/false\r\n },\r\n\r\n\r\n // ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- //\r\n\r\n\r\n Decimal, inexact, noConflict, quadrant,\r\n external = true,\r\n\r\n decimalError = '[DecimalError] ',\r\n invalidArgument = decimalError + 'Invalid argument: ',\r\n precisionLimitExceeded = decimalError + 'Precision limit exceeded',\r\n cryptoUnavailable = decimalError + 'crypto unavailable',\r\n tag = '[object Decimal]',\r\n\r\n mathfloor = Math.floor,\r\n mathpow = Math.pow,\r\n\r\n isBinary = /^0b([01]+(\\.[01]*)?|\\.[01]+)(p[+-]?\\d+)?$/i,\r\n isHex = /^0x([0-9a-f]+(\\.[0-9a-f]*)?|\\.[0-9a-f]+)(p[+-]?\\d+)?$/i,\r\n isOctal = /^0o([0-7]+(\\.[0-7]*)?|\\.[0-7]+)(p[+-]?\\d+)?$/i,\r\n isDecimal = /^(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,\r\n\r\n BASE = 1e7,\r\n LOG_BASE = 7,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n\r\n LN10_PRECISION = LN10.length - 1,\r\n PI_PRECISION = PI.length - 1,\r\n\r\n // Decimal.prototype object\r\n P = { toStringTag: tag };\r\n\r\n\r\n // Decimal prototype methods\r\n\r\n\r\n /*\r\n * absoluteValue abs\r\n * ceil\r\n * clampedTo clamp\r\n * comparedTo cmp\r\n * cosine cos\r\n * cubeRoot cbrt\r\n * decimalPlaces dp\r\n * dividedBy div\r\n * dividedToIntegerBy divToInt\r\n * equals eq\r\n * floor\r\n * greaterThan gt\r\n * greaterThanOrEqualTo gte\r\n * hyperbolicCosine cosh\r\n * hyperbolicSine sinh\r\n * hyperbolicTangent tanh\r\n * inverseCosine acos\r\n * inverseHyperbolicCosine acosh\r\n * inverseHyperbolicSine asinh\r\n * inverseHyperbolicTangent atanh\r\n * inverseSine asin\r\n * inverseTangent atan\r\n * isFinite\r\n * isInteger isInt\r\n * isNaN\r\n * isNegative isNeg\r\n * isPositive isPos\r\n * isZero\r\n * lessThan lt\r\n * lessThanOrEqualTo lte\r\n * logarithm log\r\n * [maximum] [max]\r\n * [minimum] [min]\r\n * minus sub\r\n * modulo mod\r\n * naturalExponential exp\r\n * naturalLogarithm ln\r\n * negated neg\r\n * plus add\r\n * precision sd\r\n * round\r\n * sine sin\r\n * squareRoot sqrt\r\n * tangent tan\r\n * times mul\r\n * toBinary\r\n * toDecimalPlaces toDP\r\n * toExponential\r\n * toFixed\r\n * toFraction\r\n * toHexadecimal toHex\r\n * toNearest\r\n * toNumber\r\n * toOctal\r\n * toPower pow\r\n * toPrecision\r\n * toSignificantDigits toSD\r\n * toString\r\n * truncated trunc\r\n * valueOf toJSON\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the absolute value of this Decimal.\r\n *\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new this.constructor(this);\r\n if (x.s < 0) x.s = 1;\r\n return finalise(x);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the\r\n * direction of positive Infinity.\r\n *\r\n */\r\n P.ceil = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal clamped to the range\r\n * delineated by `min` and `max`.\r\n *\r\n * min {number|string|Decimal}\r\n * max {number|string|Decimal}\r\n *\r\n */\r\n P.clampedTo = P.clamp = function (min, max) {\r\n var k,\r\n x = this,\r\n Ctor = x.constructor;\r\n min = new Ctor(min);\r\n max = new Ctor(max);\r\n if (!min.s || !max.s) return new Ctor(NaN);\r\n if (min.gt(max)) throw Error(invalidArgument + max);\r\n k = x.cmp(min);\r\n return k < 0 ? min : x.cmp(max) > 0 ? max : new Ctor(x);\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this Decimal is greater than the value of `y`,\r\n * -1 if the value of this Decimal is less than the value of `y`,\r\n * 0 if they have the same value,\r\n * NaN if the value of either Decimal is NaN.\r\n *\r\n */\r\n P.comparedTo = P.cmp = function (y) {\r\n var i, j, xdL, ydL,\r\n x = this,\r\n xd = x.d,\r\n yd = (y = new x.constructor(y)).d,\r\n xs = x.s,\r\n ys = y.s;\r\n\r\n // Either NaN or ±Infinity?\r\n if (!xd || !yd) {\r\n return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1;\r\n }\r\n\r\n // Either zero?\r\n if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0;\r\n\r\n // Signs differ?\r\n if (xs !== ys) return xs;\r\n\r\n // Compare exponents.\r\n if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1;\r\n\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Compare digit by digit.\r\n for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {\r\n if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cosine of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * cos(0) = 1\r\n * cos(-0) = 1\r\n * cos(Infinity) = NaN\r\n * cos(-Infinity) = NaN\r\n * cos(NaN) = NaN\r\n *\r\n */\r\n P.cosine = P.cos = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.d) return new Ctor(NaN);\r\n\r\n // cos(0) = cos(-0) = 1\r\n if (!x.d[0]) return new Ctor(1);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;\r\n Ctor.rounding = 1;\r\n\r\n x = cosine(Ctor, toLessThanHalfPi(Ctor, x));\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n *\r\n * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * cbrt(0) = 0\r\n * cbrt(-0) = -0\r\n * cbrt(1) = 1\r\n * cbrt(-1) = -1\r\n * cbrt(N) = N\r\n * cbrt(-I) = -I\r\n * cbrt(I) = I\r\n *\r\n * Math.cbrt(x) = (x < 0 ? -Math.pow(-x, 1/3) : Math.pow(x, 1/3))\r\n *\r\n */\r\n P.cubeRoot = P.cbrt = function () {\r\n var e, m, n, r, rep, s, sd, t, t3, t3plusx,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = x.s * mathpow(x.s * x, 1 / 3);\r\n\r\n // Math.cbrt underflow/overflow?\r\n // Pass x to Math.pow as integer, then adjust the exponent of the result.\r\n if (!s || Math.abs(s) == 1 / 0) {\r\n n = digitsToString(x.d);\r\n e = x.e;\r\n\r\n // Adjust n exponent so it is a multiple of 3 away from x exponent.\r\n if (s = (e - n.length + 1) % 3) n += (s == 1 || s == -2 ? '0' : '00');\r\n s = mathpow(n, 1 / 3);\r\n\r\n // Rarely, e may be one less than the result exponent value.\r\n e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2));\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n r.s = x.s;\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n sd = (e = Ctor.precision) + 3;\r\n\r\n // Halley's method.\r\n // TODO? Compare Newton's method.\r\n for (;;) {\r\n t = r;\r\n t3 = t.times(t).times(t);\r\n t3plusx = t3.plus(x);\r\n r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1);\r\n\r\n // TODO? Replace with for-loop and checkRoundingDigits.\r\n if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {\r\n n = n.slice(sd - 3, sd + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999\r\n // , i.e. approaching a rounding boundary, continue the iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n if (!rep) {\r\n finalise(t, e + 1, 0);\r\n\r\n if (t.times(t).times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n sd += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.\r\n // If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n finalise(r, e + 1, 1);\r\n m = !r.times(r).times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, e, Ctor.rounding, m);\r\n };\r\n\r\n\r\n /*\r\n * Return the number of decimal places of the value of this Decimal.\r\n *\r\n */\r\n P.decimalPlaces = P.dp = function () {\r\n var w,\r\n d = this.d,\r\n n = NaN;\r\n\r\n if (d) {\r\n w = d.length - 1;\r\n n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n w = d[w];\r\n if (w) for (; w % 10 == 0; w /= 10) n--;\r\n if (n < 0) n = 0;\r\n }\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal divided by `y`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.dividedBy = P.div = function (y) {\r\n return divide(this, new this.constructor(y));\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the integer part of dividing the value of this Decimal\r\n * by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.dividedToIntegerBy = P.divToInt = function (y) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.\r\n *\r\n */\r\n P.equals = P.eq = function (y) {\r\n return this.cmp(y) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the\r\n * direction of negative Infinity.\r\n *\r\n */\r\n P.floor = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 3);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than the value of `y`, otherwise return\r\n * false.\r\n *\r\n */\r\n P.greaterThan = P.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than or equal to the value of `y`,\r\n * otherwise return false.\r\n *\r\n */\r\n P.greaterThanOrEqualTo = P.gte = function (y) {\r\n var k = this.cmp(y);\r\n return k == 1 || k === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [1, Infinity]\r\n *\r\n * cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ...\r\n *\r\n * cosh(0) = 1\r\n * cosh(-0) = 1\r\n * cosh(Infinity) = Infinity\r\n * cosh(-Infinity) = Infinity\r\n * cosh(NaN) = NaN\r\n *\r\n * x time taken (ms) result\r\n * 1000 9 9.8503555700852349694e+433\r\n * 10000 25 4.4034091128314607936e+4342\r\n * 100000 171 1.4033316802130615897e+43429\r\n * 1000000 3817 1.5166076984010437725e+434294\r\n * 10000000 abandoned after 2 minute wait\r\n *\r\n * TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x))\r\n *\r\n */\r\n P.hyperbolicCosine = P.cosh = function () {\r\n var k, n, pr, rm, len,\r\n x = this,\r\n Ctor = x.constructor,\r\n one = new Ctor(1);\r\n\r\n if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN);\r\n if (x.isZero()) return one;\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n len = x.d.length;\r\n\r\n // Argument reduction: cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1\r\n // i.e. cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4))\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n // TODO? Estimation reused from cosine() and may not be optimal here.\r\n if (len < 32) {\r\n k = Math.ceil(len / 3);\r\n n = (1 / tinyPow(4, k)).toString();\r\n } else {\r\n k = 16;\r\n n = '2.3283064365386962890625e-10';\r\n }\r\n\r\n x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true);\r\n\r\n // Reverse argument reduction\r\n var cosh2_x,\r\n i = k,\r\n d8 = new Ctor(8);\r\n for (; i--;) {\r\n cosh2_x = x.times(x);\r\n x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8))));\r\n }\r\n\r\n return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ...\r\n *\r\n * sinh(0) = 0\r\n * sinh(-0) = -0\r\n * sinh(Infinity) = Infinity\r\n * sinh(-Infinity) = -Infinity\r\n * sinh(NaN) = NaN\r\n *\r\n * x time taken (ms)\r\n * 10 2 ms\r\n * 100 5 ms\r\n * 1000 14 ms\r\n * 10000 82 ms\r\n * 100000 886 ms 1.4033316802130615897e+43429\r\n * 200000 2613 ms\r\n * 300000 5407 ms\r\n * 400000 8824 ms\r\n * 500000 13026 ms 8.7080643612718084129e+217146\r\n * 1000000 48543 ms\r\n *\r\n * TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x))\r\n *\r\n */\r\n P.hyperbolicSine = P.sinh = function () {\r\n var k, pr, rm, len,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n len = x.d.length;\r\n\r\n if (len < 3) {\r\n x = taylorSeries(Ctor, 2, x, x, true);\r\n } else {\r\n\r\n // Alternative argument reduction: sinh(3x) = sinh(x)(3 + 4sinh^2(x))\r\n // i.e. sinh(x) = sinh(x/3)(3 + 4sinh^2(x/3))\r\n // 3 multiplications and 1 addition\r\n\r\n // Argument reduction: sinh(5x) = sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x)))\r\n // i.e. sinh(x) = sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5)))\r\n // 4 multiplications and 2 additions\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n k = 1.4 * Math.sqrt(len);\r\n k = k > 16 ? 16 : k | 0;\r\n\r\n x = x.times(1 / tinyPow(5, k));\r\n x = taylorSeries(Ctor, 2, x, x, true);\r\n\r\n // Reverse argument reduction\r\n var sinh2_x,\r\n d5 = new Ctor(5),\r\n d16 = new Ctor(16),\r\n d20 = new Ctor(20);\r\n for (; k--;) {\r\n sinh2_x = x.times(x);\r\n x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20))));\r\n }\r\n }\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * tanh(x) = sinh(x) / cosh(x)\r\n *\r\n * tanh(0) = 0\r\n * tanh(-0) = -0\r\n * tanh(Infinity) = 1\r\n * tanh(-Infinity) = -1\r\n * tanh(NaN) = NaN\r\n *\r\n */\r\n P.hyperbolicTangent = P.tanh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(x.s);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 7;\r\n Ctor.rounding = 1;\r\n\r\n return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of\r\n * this Decimal.\r\n *\r\n * Domain: [-1, 1]\r\n * Range: [0, pi]\r\n *\r\n * acos(x) = pi/2 - asin(x)\r\n *\r\n * acos(0) = pi/2\r\n * acos(-0) = pi/2\r\n * acos(1) = 0\r\n * acos(-1) = pi\r\n * acos(1/2) = pi/3\r\n * acos(-1/2) = 2*pi/3\r\n * acos(|x| > 1) = NaN\r\n * acos(NaN) = NaN\r\n *\r\n */\r\n P.inverseCosine = P.acos = function () {\r\n var halfPi,\r\n x = this,\r\n Ctor = x.constructor,\r\n k = x.abs().cmp(1),\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding;\r\n\r\n if (k !== -1) {\r\n return k === 0\r\n // |x| is 1\r\n ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0)\r\n // |x| > 1 or x is NaN\r\n : new Ctor(NaN);\r\n }\r\n\r\n if (x.isZero()) return getPi(Ctor, pr + 4, rm).times(0.5);\r\n\r\n // TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3\r\n\r\n Ctor.precision = pr + 6;\r\n Ctor.rounding = 1;\r\n\r\n x = x.asin();\r\n halfPi = getPi(Ctor, pr + 4, rm).times(0.5);\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return halfPi.minus(x);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the\r\n * value of this Decimal.\r\n *\r\n * Domain: [1, Infinity]\r\n * Range: [0, Infinity]\r\n *\r\n * acosh(x) = ln(x + sqrt(x^2 - 1))\r\n *\r\n * acosh(x < 1) = NaN\r\n * acosh(NaN) = NaN\r\n * acosh(Infinity) = Infinity\r\n * acosh(-Infinity) = NaN\r\n * acosh(0) = NaN\r\n * acosh(-0) = NaN\r\n * acosh(1) = 0\r\n * acosh(-1) = NaN\r\n *\r\n */\r\n P.inverseHyperbolicCosine = P.acosh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (x.lte(1)) return new Ctor(x.eq(1) ? 0 : NaN);\r\n if (!x.isFinite()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n external = false;\r\n\r\n x = x.times(x).minus(1).sqrt().plus(x);\r\n\r\n external = true;\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.ln();\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value\r\n * of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * asinh(x) = ln(x + sqrt(x^2 + 1))\r\n *\r\n * asinh(NaN) = NaN\r\n * asinh(Infinity) = Infinity\r\n * asinh(-Infinity) = -Infinity\r\n * asinh(0) = 0\r\n * asinh(-0) = -0\r\n *\r\n */\r\n P.inverseHyperbolicSine = P.asinh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6;\r\n Ctor.rounding = 1;\r\n external = false;\r\n\r\n x = x.times(x).plus(1).sqrt().plus(x);\r\n\r\n external = true;\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.ln();\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the\r\n * value of this Decimal.\r\n *\r\n * Domain: [-1, 1]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * atanh(x) = 0.5 * ln((1 + x) / (1 - x))\r\n *\r\n * atanh(|x| > 1) = NaN\r\n * atanh(NaN) = NaN\r\n * atanh(Infinity) = NaN\r\n * atanh(-Infinity) = NaN\r\n * atanh(0) = 0\r\n * atanh(-0) = -0\r\n * atanh(1) = Infinity\r\n * atanh(-1) = -Infinity\r\n *\r\n */\r\n P.inverseHyperbolicTangent = P.atanh = function () {\r\n var pr, rm, wpr, xsd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.e >= 0) return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n xsd = x.sd();\r\n\r\n if (Math.max(xsd, pr) < 2 * -x.e - 1) return finalise(new Ctor(x), pr, rm, true);\r\n\r\n Ctor.precision = wpr = xsd - x.e;\r\n\r\n x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1);\r\n\r\n Ctor.precision = pr + 4;\r\n Ctor.rounding = 1;\r\n\r\n x = x.ln();\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.times(0.5);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi/2, pi/2]\r\n *\r\n * asin(x) = 2*atan(x/(1 + sqrt(1 - x^2)))\r\n *\r\n * asin(0) = 0\r\n * asin(-0) = -0\r\n * asin(1/2) = pi/6\r\n * asin(-1/2) = -pi/6\r\n * asin(1) = pi/2\r\n * asin(-1) = -pi/2\r\n * asin(|x| > 1) = NaN\r\n * asin(NaN) = NaN\r\n *\r\n * TODO? Compare performance of Taylor series.\r\n *\r\n */\r\n P.inverseSine = P.asin = function () {\r\n var halfPi, k,\r\n pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n k = x.abs().cmp(1);\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n if (k !== -1) {\r\n\r\n // |x| is 1\r\n if (k === 0) {\r\n halfPi = getPi(Ctor, pr + 4, rm).times(0.5);\r\n halfPi.s = x.s;\r\n return halfPi;\r\n }\r\n\r\n // |x| > 1 or x is NaN\r\n return new Ctor(NaN);\r\n }\r\n\r\n // TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6\r\n\r\n Ctor.precision = pr + 6;\r\n Ctor.rounding = 1;\r\n\r\n x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan();\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.times(2);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value\r\n * of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi/2, pi/2]\r\n *\r\n * atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...\r\n *\r\n * atan(0) = 0\r\n * atan(-0) = -0\r\n * atan(1) = pi/4\r\n * atan(-1) = -pi/4\r\n * atan(Infinity) = pi/2\r\n * atan(-Infinity) = -pi/2\r\n * atan(NaN) = NaN\r\n *\r\n */\r\n P.inverseTangent = P.atan = function () {\r\n var i, j, k, n, px, t, r, wpr, x2,\r\n x = this,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding;\r\n\r\n if (!x.isFinite()) {\r\n if (!x.s) return new Ctor(NaN);\r\n if (pr + 4 <= PI_PRECISION) {\r\n r = getPi(Ctor, pr + 4, rm).times(0.5);\r\n r.s = x.s;\r\n return r;\r\n }\r\n } else if (x.isZero()) {\r\n return new Ctor(x);\r\n } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) {\r\n r = getPi(Ctor, pr + 4, rm).times(0.25);\r\n r.s = x.s;\r\n return r;\r\n }\r\n\r\n Ctor.precision = wpr = pr + 10;\r\n Ctor.rounding = 1;\r\n\r\n // TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x);\r\n\r\n // Argument reduction\r\n // Ensure |x| < 0.42\r\n // atan(x) = 2 * atan(x / (1 + sqrt(1 + x^2)))\r\n\r\n k = Math.min(28, wpr / LOG_BASE + 2 | 0);\r\n\r\n for (i = k; i; --i) x = x.div(x.times(x).plus(1).sqrt().plus(1));\r\n\r\n external = false;\r\n\r\n j = Math.ceil(wpr / LOG_BASE);\r\n n = 1;\r\n x2 = x.times(x);\r\n r = new Ctor(x);\r\n px = x;\r\n\r\n // atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...\r\n for (; i !== -1;) {\r\n px = px.times(x2);\r\n t = r.minus(px.div(n += 2));\r\n\r\n px = px.times(x2);\r\n r = t.plus(px.div(n += 2));\r\n\r\n if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--;);\r\n }\r\n\r\n if (k) r = r.times(2 << (k - 1));\r\n\r\n external = true;\r\n\r\n return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is a finite number, otherwise return false.\r\n *\r\n */\r\n P.isFinite = function () {\r\n return !!this.d;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is an integer, otherwise return false.\r\n *\r\n */\r\n P.isInteger = P.isInt = function () {\r\n return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is NaN, otherwise return false.\r\n *\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is negative, otherwise return false.\r\n *\r\n */\r\n P.isNegative = P.isNeg = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is positive, otherwise return false.\r\n *\r\n */\r\n P.isPositive = P.isPos = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is 0 or -0, otherwise return false.\r\n *\r\n */\r\n P.isZero = function () {\r\n return !!this.d && this.d[0] === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThan = P.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThanOrEqualTo = P.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n };\r\n\r\n\r\n /*\r\n * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * If no base is specified, return log[10](arg).\r\n *\r\n * log[base](arg) = ln(arg) / ln(base)\r\n *\r\n * The result will always be correctly rounded if the base of the log is 10, and 'almost always'\r\n * otherwise:\r\n *\r\n * Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen\r\n * rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error\r\n * between the result and the correctly rounded result will be one ulp (unit in the last place).\r\n *\r\n * log[-b](a) = NaN\r\n * log[0](a) = NaN\r\n * log[1](a) = NaN\r\n * log[NaN](a) = NaN\r\n * log[Infinity](a) = NaN\r\n * log[b](0) = -Infinity\r\n * log[b](-0) = -Infinity\r\n * log[b](-a) = NaN\r\n * log[b](1) = 0\r\n * log[b](Infinity) = Infinity\r\n * log[b](NaN) = NaN\r\n *\r\n * [base] {number|string|Decimal} The base of the logarithm.\r\n *\r\n */\r\n P.logarithm = P.log = function (base) {\r\n var isBase10, d, denominator, k, inf, num, sd, r,\r\n arg = this,\r\n Ctor = arg.constructor,\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding,\r\n guard = 5;\r\n\r\n // Default base is 10.\r\n if (base == null) {\r\n base = new Ctor(10);\r\n isBase10 = true;\r\n } else {\r\n base = new Ctor(base);\r\n d = base.d;\r\n\r\n // Return NaN if base is negative, or non-finite, or is 0 or 1.\r\n if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN);\r\n\r\n isBase10 = base.eq(10);\r\n }\r\n\r\n d = arg.d;\r\n\r\n // Is arg negative, non-finite, 0 or 1?\r\n if (arg.s < 0 || !d || !d[0] || arg.eq(1)) {\r\n return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0);\r\n }\r\n\r\n // The result will have a non-terminating decimal expansion if base is 10 and arg is not an\r\n // integer power of 10.\r\n if (isBase10) {\r\n if (d.length > 1) {\r\n inf = true;\r\n } else {\r\n for (k = d[0]; k % 10 === 0;) k /= 10;\r\n inf = k !== 1;\r\n }\r\n }\r\n\r\n external = false;\r\n sd = pr + guard;\r\n num = naturalLogarithm(arg, sd);\r\n denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);\r\n\r\n // The result will have 5 rounding digits.\r\n r = divide(num, denominator, sd, 1);\r\n\r\n // If at a rounding boundary, i.e. the result's rounding digits are [49]9999 or [50]0000,\r\n // calculate 10 further digits.\r\n //\r\n // If the result is known to have an infinite decimal expansion, repeat this until it is clear\r\n // that the result is above or below the boundary. Otherwise, if after calculating the 10\r\n // further digits, the last 14 are nines, round up and assume the result is exact.\r\n // Also assume the result is exact if the last 14 are zero.\r\n //\r\n // Example of a result that will be incorrectly rounded:\r\n // log[1048576](4503599627370502) = 2.60000000000000009610279511444746...\r\n // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it\r\n // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so\r\n // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal\r\n // place is still 2.6.\r\n if (checkRoundingDigits(r.d, k = pr, rm)) {\r\n\r\n do {\r\n sd += 10;\r\n num = naturalLogarithm(arg, sd);\r\n denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);\r\n r = divide(num, denominator, sd, 1);\r\n\r\n if (!inf) {\r\n\r\n // Check for 14 nines from the 2nd rounding digit, as the first may be 4.\r\n if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) {\r\n r = finalise(r, pr + 1, 0);\r\n }\r\n\r\n break;\r\n }\r\n } while (checkRoundingDigits(r.d, k += 10, rm));\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, pr, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the maximum of the arguments and the value of this Decimal.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n P.max = function () {\r\n Array.prototype.push.call(arguments, this);\r\n return maxOrMin(this.constructor, arguments, 'lt');\r\n };\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the minimum of the arguments and the value of this Decimal.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n P.min = function () {\r\n Array.prototype.push.call(arguments, this);\r\n return maxOrMin(this.constructor, arguments, 'gt');\r\n };\r\n */\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal minus `y`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.minus = P.sub = function (y) {\r\n var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // If either is not finite...\r\n if (!x.d || !y.d) {\r\n\r\n // Return NaN if either is NaN.\r\n if (!x.s || !y.s) y = new Ctor(NaN);\r\n\r\n // Return y negated if x is finite and y is ±Infinity.\r\n else if (x.d) y.s = -y.s;\r\n\r\n // Return x if y is finite and x is ±Infinity.\r\n // Return x if both are ±Infinity with different signs.\r\n // Return NaN if both are ±Infinity with the same sign.\r\n else y = new Ctor(y.d || x.s !== y.s ? x : NaN);\r\n\r\n return y;\r\n }\r\n\r\n // If signs differ...\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.plus(y);\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n // If either is zero...\r\n if (!xd[0] || !yd[0]) {\r\n\r\n // Return y negated if x is zero and y is non-zero.\r\n if (yd[0]) y.s = -y.s;\r\n\r\n // Return x if y is zero and x is non-zero.\r\n else if (xd[0]) y = new Ctor(x);\r\n\r\n // Return zero if both are zero.\r\n // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity.\r\n else return new Ctor(rm === 3 ? -0 : 0);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n }\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n // Calculate base 1e7 exponents.\r\n e = mathfloor(y.e / LOG_BASE);\r\n xe = mathfloor(x.e / LOG_BASE);\r\n\r\n xd = xd.slice();\r\n k = xe - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (k) {\r\n xLTy = k < 0;\r\n\r\n if (xLTy) {\r\n d = xd;\r\n k = -k;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = xe;\r\n len = xd.length;\r\n }\r\n\r\n // Numbers with massively different exponents would result in a very high number of\r\n // zeros needing to be prepended, but this can be avoided while still ensuring correct\r\n // rounding by limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`.\r\n i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2;\r\n\r\n if (k > i) {\r\n k = i;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents.\r\n d.reverse();\r\n for (i = k; i--;) d.push(0);\r\n d.reverse();\r\n\r\n // Base 1e7 exponents equal.\r\n } else {\r\n\r\n // Check digits to determine which is the bigger number.\r\n\r\n i = xd.length;\r\n len = yd.length;\r\n xLTy = i < len;\r\n if (xLTy) len = i;\r\n\r\n for (i = 0; i < len; i++) {\r\n if (xd[i] != yd[i]) {\r\n xLTy = xd[i] < yd[i];\r\n break;\r\n }\r\n }\r\n\r\n k = 0;\r\n }\r\n\r\n if (xLTy) {\r\n d = xd;\r\n xd = yd;\r\n yd = d;\r\n y.s = -y.s;\r\n }\r\n\r\n len = xd.length;\r\n\r\n // Append zeros to `xd` if shorter.\r\n // Don't add zeros to `yd` if shorter as subtraction only needs to start at `yd` length.\r\n for (i = yd.length - len; i > 0; --i) xd[len++] = 0;\r\n\r\n // Subtract yd from xd.\r\n for (i = yd.length; i > k;) {\r\n\r\n if (xd[--i] < yd[i]) {\r\n for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1;\r\n --xd[j];\r\n xd[i] += BASE;\r\n }\r\n\r\n xd[i] -= yd[i];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] === 0;) xd.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xd[0] === 0; xd.shift()) --e;\r\n\r\n // Zero?\r\n if (!xd[0]) return new Ctor(rm === 3 ? -0 : 0);\r\n\r\n y.d = xd;\r\n y.e = getBase10Exponent(xd, e);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal modulo `y`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * The result depends on the modulo mode.\r\n *\r\n */\r\n P.modulo = P.mod = function (y) {\r\n var q,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // Return NaN if x is ±Infinity or NaN, or y is NaN or ±0.\r\n if (!x.d || !y.s || y.d && !y.d[0]) return new Ctor(NaN);\r\n\r\n // Return x if y is ±Infinity or x is ±0.\r\n if (!y.d || x.d && !x.d[0]) {\r\n return finalise(new Ctor(x), Ctor.precision, Ctor.rounding);\r\n }\r\n\r\n // Prevent rounding of intermediate calculations.\r\n external = false;\r\n\r\n if (Ctor.modulo == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // result = x - q * y where 0 <= result < abs(y)\r\n q = divide(x, y.abs(), 0, 3, 1);\r\n q.s *= y.s;\r\n } else {\r\n q = divide(x, y, 0, Ctor.modulo, 1);\r\n }\r\n\r\n q = q.times(y);\r\n\r\n external = true;\r\n\r\n return x.minus(q);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of the value of this Decimal,\r\n * i.e. the base e raised to the power the value of this Decimal, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.naturalExponential = P.exp = function () {\r\n return naturalExponential(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of the value of this Decimal,\r\n * rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.naturalLogarithm = P.ln = function () {\r\n return naturalLogarithm(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by\r\n * -1.\r\n *\r\n */\r\n P.negated = P.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s;\r\n return finalise(x);\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal plus `y`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.plus = P.add = function (y) {\r\n var carry, d, e, i, k, len, pr, rm, xd, yd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // If either is not finite...\r\n if (!x.d || !y.d) {\r\n\r\n // Return NaN if either is NaN.\r\n if (!x.s || !y.s) y = new Ctor(NaN);\r\n\r\n // Return x if y is finite and x is ±Infinity.\r\n // Return x if both are ±Infinity with the same sign.\r\n // Return NaN if both are ±Infinity with different signs.\r\n // Return y if x is finite and y is ±Infinity.\r\n else if (!x.d) y = new Ctor(y.d || x.s === y.s ? x : NaN);\r\n\r\n return y;\r\n }\r\n\r\n // If signs differ...\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.minus(y);\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n // If either is zero...\r\n if (!xd[0] || !yd[0]) {\r\n\r\n // Return x if y is zero.\r\n // Return y if y is non-zero.\r\n if (!yd[0]) y = new Ctor(x);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n }\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n // Calculate base 1e7 exponents.\r\n k = mathfloor(x.e / LOG_BASE);\r\n e = mathfloor(y.e / LOG_BASE);\r\n\r\n xd = xd.slice();\r\n i = k - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (i) {\r\n\r\n if (i < 0) {\r\n d = xd;\r\n i = -i;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = k;\r\n len = xd.length;\r\n }\r\n\r\n // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1.\r\n k = Math.ceil(pr / LOG_BASE);\r\n len = k > len ? k + 1 : len + 1;\r\n\r\n if (i > len) {\r\n i = len;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts.\r\n d.reverse();\r\n for (; i--;) d.push(0);\r\n d.reverse();\r\n }\r\n\r\n len = xd.length;\r\n i = yd.length;\r\n\r\n // If yd is longer than xd, swap xd and yd so xd points to the longer array.\r\n if (len - i < 0) {\r\n i = len;\r\n d = yd;\r\n yd = xd;\r\n xd = d;\r\n }\r\n\r\n // Only start adding at yd.length - 1 as the further digits of xd can be left as they are.\r\n for (carry = 0; i;) {\r\n carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0;\r\n xd[i] %= BASE;\r\n }\r\n\r\n if (carry) {\r\n xd.unshift(carry);\r\n ++e;\r\n }\r\n\r\n // Remove trailing zeros.\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n for (len = xd.length; xd[--len] == 0;) xd.pop();\r\n\r\n y.d = xd;\r\n y.e = getBase10Exponent(xd, e);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return the number of significant digits of the value of this Decimal.\r\n *\r\n * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.\r\n *\r\n */\r\n P.precision = P.sd = function (z) {\r\n var k,\r\n x = this;\r\n\r\n if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z);\r\n\r\n if (x.d) {\r\n k = getPrecision(x.d);\r\n if (z && x.e + 1 > k) k = x.e + 1;\r\n } else {\r\n k = NaN;\r\n }\r\n\r\n return k;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using\r\n * rounding mode `rounding`.\r\n *\r\n */\r\n P.round = function () {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n return finalise(new Ctor(x), x.e + 1, Ctor.rounding);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sine of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * sin(x) = x - x^3/3! + x^5/5! - ...\r\n *\r\n * sin(0) = 0\r\n * sin(-0) = -0\r\n * sin(Infinity) = NaN\r\n * sin(-Infinity) = NaN\r\n * sin(NaN) = NaN\r\n *\r\n */\r\n P.sine = P.sin = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;\r\n Ctor.rounding = 1;\r\n\r\n x = sine(Ctor, toLessThanHalfPi(Ctor, x));\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, sd, r, rep, t,\r\n x = this,\r\n d = x.d,\r\n e = x.e,\r\n s = x.s,\r\n Ctor = x.constructor;\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !d || !d[0]) {\r\n return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0);\r\n }\r\n\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+x);\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = digitsToString(d);\r\n\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(n);\r\n e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n sd = (e = Ctor.precision) + 3;\r\n\r\n // Newton-Raphson iteration.\r\n for (;;) {\r\n t = r;\r\n r = t.plus(divide(x, t, sd + 2, 1)).times(0.5);\r\n\r\n // TODO? Replace with for-loop and checkRoundingDigits.\r\n if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {\r\n n = n.slice(sd - 3, sd + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or\r\n // 4999, i.e. approaching a rounding boundary, continue the iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n if (!rep) {\r\n finalise(t, e + 1, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n sd += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.\r\n // If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n finalise(r, e + 1, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, e, Ctor.rounding, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the tangent of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * tan(0) = 0\r\n * tan(-0) = -0\r\n * tan(Infinity) = NaN\r\n * tan(-Infinity) = NaN\r\n * tan(NaN) = NaN\r\n *\r\n */\r\n P.tangent = P.tan = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 10;\r\n Ctor.rounding = 1;\r\n\r\n x = x.sin();\r\n x.s = 1;\r\n x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0);\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new Decimal whose value is this Decimal times `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.times = P.mul = function (y) {\r\n var carry, e, i, k, r, rL, t, xdL, ydL,\r\n x = this,\r\n Ctor = x.constructor,\r\n xd = x.d,\r\n yd = (y = new Ctor(y)).d;\r\n\r\n y.s *= x.s;\r\n\r\n // If either is NaN, ±Infinity or ±0...\r\n if (!xd || !xd[0] || !yd || !yd[0]) {\r\n\r\n return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd\r\n\r\n // Return NaN if either is NaN.\r\n // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity.\r\n ? NaN\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n // Return ±0 if either is ±0.\r\n : !xd || !yd ? y.s / 0 : y.s * 0);\r\n }\r\n\r\n e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE);\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Ensure xd points to the longer array.\r\n if (xdL < ydL) {\r\n r = xd;\r\n xd = yd;\r\n yd = r;\r\n rL = xdL;\r\n xdL = ydL;\r\n ydL = rL;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n r = [];\r\n rL = xdL + ydL;\r\n for (i = rL; i--;) r.push(0);\r\n\r\n // Multiply!\r\n for (i = ydL; --i >= 0;) {\r\n carry = 0;\r\n for (k = xdL + i; k > i;) {\r\n t = r[k] + yd[i] * xd[k - i - 1] + carry;\r\n r[k--] = t % BASE | 0;\r\n carry = t / BASE | 0;\r\n }\r\n\r\n r[k] = (r[k] + carry) % BASE | 0;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; !r[--rL];) r.pop();\r\n\r\n if (carry) ++e;\r\n else r.shift();\r\n\r\n y.d = r;\r\n y.e = getBase10Exponent(r, e);\r\n\r\n return external ? finalise(y, Ctor.precision, Ctor.rounding) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 2, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toBinary = function (sd, rm) {\r\n return toStringBinary(this, 2, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`\r\n * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.\r\n *\r\n * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toDecimalPlaces = P.toDP = function (dp, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n if (dp === void 0) return x;\r\n\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n return finalise(x, dp + x.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in exponential notation rounded to\r\n * `dp` fixed decimal places using rounding mode `rounding`.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toExponential = function (dp, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = finiteToString(x, true);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = finalise(new Ctor(x), dp + 1, rm);\r\n str = finiteToString(x, true, dp + 1);\r\n }\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in normal (fixed-point) notation to\r\n * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is\r\n * omitted.\r\n *\r\n * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n * (-0).toFixed(3) is '0.000'.\r\n * (-0.5).toFixed(0) is '-0'.\r\n *\r\n */\r\n P.toFixed = function (dp, rm) {\r\n var str, y,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = finiteToString(x);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n y = finalise(new Ctor(x), dp + x.e + 1, rm);\r\n str = finiteToString(y, false, dp + y.e + 1);\r\n }\r\n\r\n // To determine whether to add the minus sign look at the value before it was rounded,\r\n // i.e. look at `x` rather than `y`.\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return an array representing the value of this Decimal as a simple fraction with an integer\r\n * numerator and an integer denominator.\r\n *\r\n * The denominator will be a positive non-zero value less than or equal to the specified maximum\r\n * denominator. If a maximum denominator is not specified, the denominator will be the lowest\r\n * value necessary to represent the number exactly.\r\n *\r\n * [maxD] {number|string|Decimal} Maximum denominator. Integer >= 1 and < Infinity.\r\n *\r\n */\r\n P.toFraction = function (maxD) {\r\n var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r,\r\n x = this,\r\n xd = x.d,\r\n Ctor = x.constructor;\r\n\r\n if (!xd) return new Ctor(x);\r\n\r\n n1 = d0 = new Ctor(1);\r\n d1 = n0 = new Ctor(0);\r\n\r\n d = new Ctor(d1);\r\n e = d.e = getPrecision(xd) - x.e - 1;\r\n k = e % LOG_BASE;\r\n d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k);\r\n\r\n if (maxD == null) {\r\n\r\n // d is 10**e, the minimum max-denominator needed.\r\n maxD = e > 0 ? d : n1;\r\n } else {\r\n n = new Ctor(maxD);\r\n if (!n.isInt() || n.lt(n1)) throw Error(invalidArgument + n);\r\n maxD = n.gt(d) ? (e > 0 ? d : n1) : n;\r\n }\r\n\r\n external = false;\r\n n = new Ctor(digitsToString(xd));\r\n pr = Ctor.precision;\r\n Ctor.precision = e = xd.length * LOG_BASE * 2;\r\n\r\n for (;;) {\r\n q = divide(n, d, 0, 1, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.cmp(maxD) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n d2 = n1;\r\n n1 = n0.plus(q.times(d2));\r\n n0 = d2;\r\n d2 = d;\r\n d = n.minus(q.times(d2));\r\n n = d2;\r\n }\r\n\r\n d2 = divide(maxD.minus(d0), d1, 0, 1, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1?\r\n r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1\r\n ? [n1, d1] : [n0, d0];\r\n\r\n Ctor.precision = pr;\r\n external = true;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 16, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toHexadecimal = P.toHex = function (sd, rm) {\r\n return toStringBinary(this, 16, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding\r\n * mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal.\r\n *\r\n * The return value will always have the same sign as this Decimal, unless either this Decimal\r\n * or `y` is NaN, in which case the return value will be also be NaN.\r\n *\r\n * The return value is not affected by the value of `precision`.\r\n *\r\n * y {number|string|Decimal} The magnitude to round to a multiple of.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toNearest() rounding mode not an integer: {rm}'\r\n * 'toNearest() rounding mode out of range: {rm}'\r\n *\r\n */\r\n P.toNearest = function (y, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n\r\n if (y == null) {\r\n\r\n // If x is not finite, return x.\r\n if (!x.d) return x;\r\n\r\n y = new Ctor(1);\r\n rm = Ctor.rounding;\r\n } else {\r\n y = new Ctor(y);\r\n if (rm === void 0) {\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(rm, 0, 8);\r\n }\r\n\r\n // If x is not finite, return x if y is not NaN, else NaN.\r\n if (!x.d) return y.s ? x : y;\r\n\r\n // If y is not finite, return Infinity with the sign of x if y is Infinity, else NaN.\r\n if (!y.d) {\r\n if (y.s) y.s = x.s;\r\n return y;\r\n }\r\n }\r\n\r\n // If y is not zero, calculate the nearest multiple of y to x.\r\n if (y.d[0]) {\r\n external = false;\r\n x = divide(x, y, 0, rm, 1).times(y);\r\n external = true;\r\n finalise(x);\r\n\r\n // If y is zero, return zero with the sign of x.\r\n } else {\r\n y.s = x.s;\r\n x = y;\r\n }\r\n\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this Decimal converted to a number primitive.\r\n * Zero keeps its sign.\r\n *\r\n */\r\n P.toNumber = function () {\r\n return +this;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 8, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toOctal = function (sd, rm) {\r\n return toStringBinary(this, 8, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal raised to the power `y`, rounded\r\n * to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * ECMAScript compliant.\r\n *\r\n * pow(x, NaN) = NaN\r\n * pow(x, ±0) = 1\r\n\r\n * pow(NaN, non-zero) = NaN\r\n * pow(abs(x) > 1, +Infinity) = +Infinity\r\n * pow(abs(x) > 1, -Infinity) = +0\r\n * pow(abs(x) == 1, ±Infinity) = NaN\r\n * pow(abs(x) < 1, +Infinity) = +0\r\n * pow(abs(x) < 1, -Infinity) = +Infinity\r\n * pow(+Infinity, y > 0) = +Infinity\r\n * pow(+Infinity, y < 0) = +0\r\n * pow(-Infinity, odd integer > 0) = -Infinity\r\n * pow(-Infinity, even integer > 0) = +Infinity\r\n * pow(-Infinity, odd integer < 0) = -0\r\n * pow(-Infinity, even integer < 0) = +0\r\n * pow(+0, y > 0) = +0\r\n * pow(+0, y < 0) = +Infinity\r\n * pow(-0, odd integer > 0) = -0\r\n * pow(-0, even integer > 0) = +0\r\n * pow(-0, odd integer < 0) = -Infinity\r\n * pow(-0, even integer < 0) = +Infinity\r\n * pow(finite x < 0, finite non-integer) = NaN\r\n *\r\n * For non-integer or very large exponents pow(x, y) is calculated using\r\n *\r\n * x^y = exp(y*ln(x))\r\n *\r\n * Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the\r\n * probability of an incorrectly rounded result\r\n * P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14\r\n * i.e. 1 in 250,000,000,000,000\r\n *\r\n * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place).\r\n *\r\n * y {number|string|Decimal} The power to which to raise this Decimal.\r\n *\r\n */\r\n P.toPower = P.pow = function (y) {\r\n var e, k, pr, r, rm, s,\r\n x = this,\r\n Ctor = x.constructor,\r\n yn = +(y = new Ctor(y));\r\n\r\n // Either ±Infinity, NaN or ±0?\r\n if (!x.d || !y.d || !x.d[0] || !y.d[0]) return new Ctor(mathpow(+x, yn));\r\n\r\n x = new Ctor(x);\r\n\r\n if (x.eq(1)) return x;\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n if (y.eq(1)) return finalise(x, pr, rm);\r\n\r\n // y exponent\r\n e = mathfloor(y.e / LOG_BASE);\r\n\r\n // If y is a small integer use the 'exponentiation by squaring' algorithm.\r\n if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {\r\n r = intPow(Ctor, x, k, pr);\r\n return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm);\r\n }\r\n\r\n s = x.s;\r\n\r\n // if x is negative\r\n if (s < 0) {\r\n\r\n // if y is not an integer\r\n if (e < y.d.length - 1) return new Ctor(NaN);\r\n\r\n // Result is positive if x is negative and the last digit of integer y is even.\r\n if ((y.d[e] & 1) == 0) s = 1;\r\n\r\n // if x.eq(-1)\r\n if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) {\r\n x.s = s;\r\n return x;\r\n }\r\n }\r\n\r\n // Estimate result exponent.\r\n // x^y = 10^e, where e = y * log10(x)\r\n // log10(x) = log10(x_significand) + x_exponent\r\n // log10(x_significand) = ln(x_significand) / ln(10)\r\n k = mathpow(+x, yn);\r\n e = k == 0 || !isFinite(k)\r\n ? mathfloor(yn * (Math.log('0.' + digitsToString(x.d)) / Math.LN10 + x.e + 1))\r\n : new Ctor(k + '').e;\r\n\r\n // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1.\r\n\r\n // Overflow/underflow?\r\n if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) return new Ctor(e > 0 ? s / 0 : 0);\r\n\r\n external = false;\r\n Ctor.rounding = x.s = 1;\r\n\r\n // Estimate the extra guard digits needed to ensure five correct rounding digits from\r\n // naturalLogarithm(x). Example of failure without these extra digits (precision: 10):\r\n // new Decimal(2.32456).pow('2087987436534566.46411')\r\n // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815\r\n k = Math.min(12, (e + '').length);\r\n\r\n // r = x^y = exp(y*ln(x))\r\n r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr);\r\n\r\n // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40)\r\n if (r.d) {\r\n\r\n // Truncate to the required precision plus five rounding digits.\r\n r = finalise(r, pr + 5, 1);\r\n\r\n // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate\r\n // the result.\r\n if (checkRoundingDigits(r.d, pr, rm)) {\r\n e = pr + 10;\r\n\r\n // Truncate to the increased precision plus five rounding digits.\r\n r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1);\r\n\r\n // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9).\r\n if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) {\r\n r = finalise(r, pr + 1, 0);\r\n }\r\n }\r\n }\r\n\r\n r.s = s;\r\n external = true;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(r, pr, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal rounded to `sd` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * Return exponential notation if `sd` is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = finalise(new Ctor(x), sd, rm);\r\n str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd);\r\n }\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`\r\n * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if\r\n * omitted.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toSD() digits out of range: {sd}'\r\n * 'toSD() digits not an integer: {sd}'\r\n * 'toSD() rounding mode not an integer: {rm}'\r\n * 'toSD() rounding mode out of range: {rm}'\r\n *\r\n */\r\n P.toSignificantDigits = P.toSD = function (sd, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n }\r\n\r\n return finalise(new Ctor(x), sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal.\r\n *\r\n * Return exponential notation if this Decimal has a positive exponent equal to or greater than\r\n * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.\r\n *\r\n */\r\n P.toString = function () {\r\n var x = this,\r\n Ctor = x.constructor,\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal truncated to a whole number.\r\n *\r\n */\r\n P.truncated = P.trunc = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal.\r\n * Unlike `toString`, negative zero will include the minus sign.\r\n *\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n var x = this,\r\n Ctor = x.constructor,\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n\r\n return x.isNeg() ? '-' + str : str;\r\n };\r\n\r\n\r\n // Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.\r\n\r\n\r\n /*\r\n * digitsToString P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower,\r\n * finiteToString, naturalExponential, naturalLogarithm\r\n * checkInt32 P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest,\r\n * P.toPrecision, P.toSignificantDigits, toStringBinary, random\r\n * checkRoundingDigits P.logarithm, P.toPower, naturalExponential, naturalLogarithm\r\n * convertBase toStringBinary, parseOther\r\n * cos P.cos\r\n * divide P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy,\r\n * P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction,\r\n * P.toNearest, toStringBinary, naturalExponential, naturalLogarithm,\r\n * taylorSeries, atan2, parseOther\r\n * finalise P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh,\r\n * P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus,\r\n * P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot,\r\n * P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed,\r\n * P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits,\r\n * P.truncated, divide, getLn10, getPi, naturalExponential,\r\n * naturalLogarithm, ceil, floor, round, trunc\r\n * finiteToString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf,\r\n * toStringBinary\r\n * getBase10Exponent P.minus, P.plus, P.times, parseOther\r\n * getLn10 P.logarithm, naturalLogarithm\r\n * getPi P.acos, P.asin, P.atan, toLessThanHalfPi, atan2\r\n * getPrecision P.precision, P.toFraction\r\n * getZeroString digitsToString, finiteToString\r\n * intPow P.toPower, parseOther\r\n * isOdd toLessThanHalfPi\r\n * maxOrMin max, min\r\n * naturalExponential P.naturalExponential, P.toPower\r\n * naturalLogarithm P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm,\r\n * P.toPower, naturalExponential\r\n * nonFiniteToString finiteToString, toStringBinary\r\n * parseDecimal Decimal\r\n * parseOther Decimal\r\n * sin P.sin\r\n * taylorSeries P.cosh, P.sinh, cos, sin\r\n * toLessThanHalfPi P.cos, P.sin\r\n * toStringBinary P.toBinary, P.toHexadecimal, P.toOctal\r\n * truncate intPow\r\n *\r\n * Throws: P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi,\r\n * naturalLogarithm, config, parseOther, random, Decimal\r\n */\r\n\r\n\r\n function digitsToString(d) {\r\n var i, k, ws,\r\n indexOfLastWord = d.length - 1,\r\n str = '',\r\n w = d[0];\r\n\r\n if (indexOfLastWord > 0) {\r\n str += w;\r\n for (i = 1; i < indexOfLastWord; i++) {\r\n ws = d[i] + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n str += ws;\r\n }\r\n\r\n w = d[i];\r\n ws = w + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n } else if (w === 0) {\r\n return '0';\r\n }\r\n\r\n // Remove trailing zeros of last w.\r\n for (; w % 10 === 0;) w /= 10;\r\n\r\n return str + w;\r\n }\r\n\r\n\r\n function checkInt32(i, min, max) {\r\n if (i !== ~~i || i < min || i > max) {\r\n throw Error(invalidArgument + i);\r\n }\r\n }\r\n\r\n\r\n /*\r\n * Check 5 rounding digits if `repeating` is null, 4 otherwise.\r\n * `repeating == null` if caller is `log` or `pow`,\r\n * `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`.\r\n */\r\n function checkRoundingDigits(d, i, rm, repeating) {\r\n var di, k, r, rd;\r\n\r\n // Get the length of the first word of the array d.\r\n for (k = d[0]; k >= 10; k /= 10) --i;\r\n\r\n // Is the rounding digit in the first word of d?\r\n if (--i < 0) {\r\n i += LOG_BASE;\r\n di = 0;\r\n } else {\r\n di = Math.ceil((i + 1) / LOG_BASE);\r\n i %= LOG_BASE;\r\n }\r\n\r\n // i is the index (0 - 6) of the rounding digit.\r\n // E.g. if within the word 3487563 the first rounding digit is 5,\r\n // then i = 4, k = 1000, rd = 3487563 % 1000 = 563\r\n k = mathpow(10, LOG_BASE - i);\r\n rd = d[di] % k | 0;\r\n\r\n if (repeating == null) {\r\n if (i < 3) {\r\n if (i == 0) rd = rd / 100 | 0;\r\n else if (i == 1) rd = rd / 10 | 0;\r\n r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 50000 || rd == 0;\r\n } else {\r\n r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) &&\r\n (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 ||\r\n (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0;\r\n }\r\n } else {\r\n if (i < 4) {\r\n if (i == 0) rd = rd / 1000 | 0;\r\n else if (i == 1) rd = rd / 100 | 0;\r\n else if (i == 2) rd = rd / 10 | 0;\r\n r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999;\r\n } else {\r\n r = ((repeating || rm < 4) && rd + 1 == k ||\r\n (!repeating && rm > 3) && rd + 1 == k / 2) &&\r\n (d[di + 1] / k / 1000 | 0) == mathpow(10, i - 3) - 1;\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n\r\n // Convert string of `baseIn` to an array of numbers of `baseOut`.\r\n // Eg. convertBase('255', 10, 16) returns [15, 15].\r\n // Eg. convertBase('ff', 16, 10) returns [2, 5, 5].\r\n function convertBase(str, baseIn, baseOut) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n strL = str.length;\r\n\r\n for (; i < strL;) {\r\n for (arrL = arr.length; arrL--;) arr[arrL] *= baseIn;\r\n arr[0] += NUMERALS.indexOf(str.charAt(i++));\r\n for (j = 0; j < arr.length; j++) {\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] === void 0) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n\r\n /*\r\n * cos(x) = 1 - x^2/2! + x^4/4! - ...\r\n * |x| < pi/2\r\n *\r\n */\r\n function cosine(Ctor, x) {\r\n var k, len, y;\r\n\r\n if (x.isZero()) return x;\r\n\r\n // Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1\r\n // i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n len = x.d.length;\r\n if (len < 32) {\r\n k = Math.ceil(len / 3);\r\n y = (1 / tinyPow(4, k)).toString();\r\n } else {\r\n k = 16;\r\n y = '2.3283064365386962890625e-10';\r\n }\r\n\r\n Ctor.precision += k;\r\n\r\n x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1));\r\n\r\n // Reverse argument reduction\r\n for (var i = k; i--;) {\r\n var cos2x = x.times(x);\r\n x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1);\r\n }\r\n\r\n Ctor.precision -= k;\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Perform division in the specified base.\r\n */\r\n var divide = (function () {\r\n\r\n // Assumes non-zero x and k, and hence non-zero result.\r\n function multiplyInteger(x, k, base) {\r\n var temp,\r\n carry = 0,\r\n i = x.length;\r\n\r\n for (x = x.slice(); i--;) {\r\n temp = x[i] * k + carry;\r\n x[i] = temp % base | 0;\r\n carry = temp / base | 0;\r\n }\r\n\r\n if (carry) x.unshift(carry);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, r;\r\n\r\n if (aL != bL) {\r\n r = aL > bL ? 1 : -1;\r\n } else {\r\n for (i = r = 0; i < aL; i++) {\r\n if (a[i] != b[i]) {\r\n r = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1;) a.shift();\r\n }\r\n\r\n return function (x, y, pr, rm, dp, base) {\r\n var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0,\r\n yL, yz,\r\n Ctor = x.constructor,\r\n sign = x.s == y.s ? 1 : -1,\r\n xd = x.d,\r\n yd = y.d;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xd || !xd[0] || !yd || !yd[0]) {\r\n\r\n return new Ctor(// Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN :\r\n\r\n // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.\r\n xd && xd[0] == 0 || !yd ? sign * 0 : sign / 0);\r\n }\r\n\r\n if (base) {\r\n logBase = 1;\r\n e = x.e - y.e;\r\n } else {\r\n base = BASE;\r\n logBase = LOG_BASE;\r\n e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase);\r\n }\r\n\r\n yL = yd.length;\r\n xL = xd.length;\r\n q = new Ctor(sign);\r\n qd = q.d = [];\r\n\r\n // Result exponent may be one less than e.\r\n // The digit array of a Decimal from toStringBinary may have trailing zeros.\r\n for (i = 0; yd[i] == (xd[i] || 0); i++);\r\n\r\n if (yd[i] > (xd[i] || 0)) e--;\r\n\r\n if (pr == null) {\r\n sd = pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else if (dp) {\r\n sd = pr + (x.e - y.e) + 1;\r\n } else {\r\n sd = pr;\r\n }\r\n\r\n if (sd < 0) {\r\n qd.push(1);\r\n more = true;\r\n } else {\r\n\r\n // Convert precision in number of base 10 digits to base 1e7 digits.\r\n sd = sd / logBase + 2 | 0;\r\n i = 0;\r\n\r\n // divisor < 1e7\r\n if (yL == 1) {\r\n k = 0;\r\n yd = yd[0];\r\n sd++;\r\n\r\n // k is the carry.\r\n for (; (i < xL || k) && sd--; i++) {\r\n t = k * base + (xd[i] || 0);\r\n qd[i] = t / yd | 0;\r\n k = t % yd | 0;\r\n }\r\n\r\n more = k || i < xL;\r\n\r\n // divisor >= 1e7\r\n } else {\r\n\r\n // Normalise xd and yd so highest order digit of yd is >= base/2\r\n k = base / (yd[0] + 1) | 0;\r\n\r\n if (k > 1) {\r\n yd = multiplyInteger(yd, k, base);\r\n xd = multiplyInteger(xd, k, base);\r\n yL = yd.length;\r\n xL = xd.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xd.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL;) rem[remL++] = 0;\r\n\r\n yz = yd.slice();\r\n yz.unshift(0);\r\n yd0 = yd[0];\r\n\r\n if (yd[1] >= base / 2) ++yd0;\r\n\r\n do {\r\n k = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, k.\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // k will be how many times the divisor goes into the current remainder.\r\n k = rem0 / yd0 | 0;\r\n\r\n // Algorithm:\r\n // 1. product = divisor * trial digit (k)\r\n // 2. if product > remainder: product -= divisor, k--\r\n // 3. remainder -= product\r\n // 4. if product was < remainder at 2:\r\n // 5. compare new remainder and divisor\r\n // 6. If remainder > divisor: remainder -= divisor, k++\r\n\r\n if (k > 1) {\r\n if (k >= base) k = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiplyInteger(yd, k, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n cmp = compare(prod, rem, prodL, remL);\r\n\r\n // product > remainder.\r\n if (cmp == 1) {\r\n k--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yd, prodL, base);\r\n }\r\n } else {\r\n\r\n // cmp is -1.\r\n // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1\r\n // to avoid it. If k is 1 there is a need to compare yd and rem again below.\r\n if (k == 0) cmp = k = 1;\r\n prod = yd.slice();\r\n }\r\n\r\n prodL = prod.length;\r\n if (prodL < remL) prod.unshift(0);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n\r\n // If product was < previous remainder.\r\n if (cmp == -1) {\r\n remL = rem.length;\r\n\r\n // Compare divisor and new remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n if (cmp < 1) {\r\n k++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yd, remL, base);\r\n }\r\n }\r\n\r\n remL = rem.length;\r\n } else if (cmp === 0) {\r\n k++;\r\n rem = [0];\r\n } // if cmp === 1, k will be 0\r\n\r\n // Add the next digit, k, to the result array.\r\n qd[i++] = k;\r\n\r\n // Update the remainder.\r\n if (cmp && rem[0]) {\r\n rem[remL++] = xd[xi] || 0;\r\n } else {\r\n rem = [xd[xi]];\r\n remL = 1;\r\n }\r\n\r\n } while ((xi++ < xL || rem[0] !== void 0) && sd--);\r\n\r\n more = rem[0] !== void 0;\r\n }\r\n\r\n // Leading zero?\r\n if (!qd[0]) qd.shift();\r\n }\r\n\r\n // logBase is 1 when divide is being used for base conversion.\r\n if (logBase == 1) {\r\n q.e = e;\r\n inexact = more;\r\n } else {\r\n\r\n // To calculate q.e, first get the number of digits of qd[0].\r\n for (i = 1, k = qd[0]; k >= 10; k /= 10) i++;\r\n q.e = i + e * logBase - 1;\r\n\r\n finalise(q, dp ? pr + q.e + 1 : pr, rm, more);\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Round `x` to `sd` significant digits using rounding mode `rm`.\r\n * Check for over/under-flow.\r\n */\r\n function finalise(x, sd, rm, isTruncated) {\r\n var digits, i, j, k, rd, roundUp, w, xd, xdi,\r\n Ctor = x.constructor;\r\n\r\n // Don't round if sd is null or undefined.\r\n out: if (sd != null) {\r\n xd = x.d;\r\n\r\n // Infinity/NaN.\r\n if (!xd) return x;\r\n\r\n // rd: the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // w: the word of xd containing rd, a base 1e7 number.\r\n // xdi: the index of w within xd.\r\n // digits: the number of digits of w.\r\n // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if\r\n // they had leading zeros)\r\n // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero).\r\n\r\n // Get the length of the first word of the digits array xd.\r\n for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++;\r\n i = sd - digits;\r\n\r\n // Is the rounding digit in the first word of xd?\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n w = xd[xdi = 0];\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = w / mathpow(10, digits - j - 1) % 10 | 0;\r\n } else {\r\n xdi = Math.ceil((i + 1) / LOG_BASE);\r\n k = xd.length;\r\n if (xdi >= k) {\r\n if (isTruncated) {\r\n\r\n // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`.\r\n for (; k++ <= xdi;) xd.push(0);\r\n w = rd = 0;\r\n digits = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n w = k = xd[xdi];\r\n\r\n // Get the number of digits of w.\r\n for (digits = 1; k >= 10; k /= 10) digits++;\r\n\r\n // Get the index of rd within w.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within w, adjusted for leading zeros.\r\n // The number of leading zeros of w is given by LOG_BASE - digits.\r\n j = i - LOG_BASE + digits;\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0;\r\n }\r\n }\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n isTruncated = isTruncated || sd < 0 ||\r\n xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1));\r\n\r\n // The expression `w % mathpow(10, digits - j - 1)` returns all the digits of w to the right\r\n // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression\r\n // will give 714.\r\n\r\n roundUp = rm < 4\r\n ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xd[0]) {\r\n xd.length = 0;\r\n if (roundUp) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE);\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xd[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xd.length = xdi;\r\n k = 1;\r\n xdi--;\r\n } else {\r\n xd.length = xdi + 1;\r\n k = mathpow(10, LOG_BASE - i);\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of w.\r\n xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0;\r\n }\r\n\r\n if (roundUp) {\r\n for (;;) {\r\n\r\n // Is the digit to be rounded up in the first word of xd?\r\n if (xdi == 0) {\r\n\r\n // i will be the length of xd[0] before k is added.\r\n for (i = 1, j = xd[0]; j >= 10; j /= 10) i++;\r\n j = xd[0] += k;\r\n for (k = 1; j >= 10; j /= 10) k++;\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xd[0] == BASE) xd[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xd[xdi] += k;\r\n if (xd[xdi] != BASE) break;\r\n xd[xdi--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xd.length; xd[--i] === 0;) xd.pop();\r\n }\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > Ctor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < Ctor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // Ctor.underflow = true;\r\n } // else Ctor.underflow = false;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function finiteToString(x, isExp, sd) {\r\n if (!x.isFinite()) return nonFiniteToString(x);\r\n var k,\r\n e = x.e,\r\n str = digitsToString(x.d),\r\n len = str.length;\r\n\r\n if (isExp) {\r\n if (sd && (k = sd - len) > 0) {\r\n str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k);\r\n } else if (len > 1) {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n\r\n str = str + (x.e < 0 ? 'e' : 'e+') + x.e;\r\n } else if (e < 0) {\r\n str = '0.' + getZeroString(-e - 1) + str;\r\n if (sd && (k = sd - len) > 0) str += getZeroString(k);\r\n } else if (e >= len) {\r\n str += getZeroString(e + 1 - len);\r\n if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k);\r\n } else {\r\n if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k);\r\n if (sd && (k = sd - len) > 0) {\r\n if (e + 1 === len) str += '.';\r\n str += getZeroString(k);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n // Calculate the base 10 exponent from the base 1e7 exponent.\r\n function getBase10Exponent(digits, e) {\r\n var w = digits[0];\r\n\r\n // Add the number of digits of the first word of the digits array.\r\n for ( e *= LOG_BASE; w >= 10; w /= 10) e++;\r\n return e;\r\n }\r\n\r\n\r\n function getLn10(Ctor, sd, pr) {\r\n if (sd > LN10_PRECISION) {\r\n\r\n // Reset global state in case the exception is caught.\r\n external = true;\r\n if (pr) Ctor.precision = pr;\r\n throw Error(precisionLimitExceeded);\r\n }\r\n return finalise(new Ctor(LN10), sd, 1, true);\r\n }\r\n\r\n\r\n function getPi(Ctor, sd, rm) {\r\n if (sd > PI_PRECISION) throw Error(precisionLimitExceeded);\r\n return finalise(new Ctor(PI), sd, rm, true);\r\n }\r\n\r\n\r\n function getPrecision(digits) {\r\n var w = digits.length - 1,\r\n len = w * LOG_BASE + 1;\r\n\r\n w = digits[w];\r\n\r\n // If non-zero...\r\n if (w) {\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n for (; w % 10 == 0; w /= 10) len--;\r\n\r\n // Add the number of digits of the first word.\r\n for (w = digits[0]; w >= 10; w /= 10) len++;\r\n }\r\n\r\n return len;\r\n }\r\n\r\n\r\n function getZeroString(k) {\r\n var zs = '';\r\n for (; k--;) zs += '0';\r\n return zs;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of Decimal `x` to the power `n`, where `n` is an\r\n * integer of type number.\r\n *\r\n * Implements 'exponentiation by squaring'. Called by `pow` and `parseOther`.\r\n *\r\n */\r\n function intPow(Ctor, x, n, pr) {\r\n var isTruncated,\r\n r = new Ctor(1),\r\n\r\n // Max n of 9007199254740991 takes 53 loop iterations.\r\n // Maximum digits array length; leaves [28, 34] guard digits.\r\n k = Math.ceil(pr / LOG_BASE + 4);\r\n\r\n external = false;\r\n\r\n for (;;) {\r\n if (n % 2) {\r\n r = r.times(x);\r\n if (truncate(r.d, k)) isTruncated = true;\r\n }\r\n\r\n n = mathfloor(n / 2);\r\n if (n === 0) {\r\n\r\n // To ensure correct rounding when r.d is truncated, increment the last word if it is zero.\r\n n = r.d.length - 1;\r\n if (isTruncated && r.d[n] === 0) ++r.d[n];\r\n break;\r\n }\r\n\r\n x = x.times(x);\r\n truncate(x.d, k);\r\n }\r\n\r\n external = true;\r\n\r\n return r;\r\n }\r\n\r\n\r\n function isOdd(n) {\r\n return n.d[n.d.length - 1] & 1;\r\n }\r\n\r\n\r\n /*\r\n * Handle `max` and `min`. `ltgt` is 'lt' or 'gt'.\r\n */\r\n function maxOrMin(Ctor, args, ltgt) {\r\n var y,\r\n x = new Ctor(args[0]),\r\n i = 0;\r\n\r\n for (; ++i < args.length;) {\r\n y = new Ctor(args[i]);\r\n if (!y.s) {\r\n x = y;\r\n break;\r\n } else if (x[ltgt](y)) {\r\n x = y;\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of `x` rounded to `sd` significant\r\n * digits.\r\n *\r\n * Taylor/Maclaurin series.\r\n *\r\n * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...\r\n *\r\n * Argument reduction:\r\n * Repeat x = x / 32, k += 5, until |x| < 0.1\r\n * exp(x) = exp(x / 2^k)^(2^k)\r\n *\r\n * Previously, the argument was initially reduced by\r\n * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10)\r\n * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was\r\n * found to be slower than just dividing repeatedly by 32 as above.\r\n *\r\n * Max integer argument: exp('20723265836946413') = 6.3e+9000000000000000\r\n * Min integer argument: exp('-20723265836946411') = 1.2e-9000000000000000\r\n * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)\r\n *\r\n * exp(Infinity) = Infinity\r\n * exp(-Infinity) = 0\r\n * exp(NaN) = NaN\r\n * exp(±0) = 1\r\n *\r\n * exp(x) is non-terminating for any finite, non-zero x.\r\n *\r\n * The result will always be correctly rounded.\r\n *\r\n */\r\n function naturalExponential(x, sd) {\r\n var denominator, guard, j, pow, sum, t, wpr,\r\n rep = 0,\r\n i = 0,\r\n k = 0,\r\n Ctor = x.constructor,\r\n rm = Ctor.rounding,\r\n pr = Ctor.precision;\r\n\r\n // 0/NaN/Infinity?\r\n if (!x.d || !x.d[0] || x.e > 17) {\r\n\r\n return new Ctor(x.d\r\n ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0\r\n : x.s ? x.s < 0 ? 0 : x : 0 / 0);\r\n }\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n t = new Ctor(0.03125);\r\n\r\n // while abs(x) >= 0.1\r\n while (x.e > -2) {\r\n\r\n // x = x / 2^5\r\n x = x.times(t);\r\n k += 5;\r\n }\r\n\r\n // Use 2 * log10(2^k) + 5 (empirically derived) to estimate the increase in precision\r\n // necessary to ensure the first 4 rounding digits are correct.\r\n guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0;\r\n wpr += guard;\r\n denominator = pow = sum = new Ctor(1);\r\n Ctor.precision = wpr;\r\n\r\n for (;;) {\r\n pow = finalise(pow.times(x), wpr, 1);\r\n denominator = denominator.times(++i);\r\n t = sum.plus(divide(pow, denominator, wpr, 1));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n j = k;\r\n while (j--) sum = finalise(sum.times(sum), wpr, 1);\r\n\r\n // Check to see if the first 4 rounding digits are [49]999.\r\n // If so, repeat the summation with a higher precision, otherwise\r\n // e.g. with precision: 18, rounding: 1\r\n // exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123)\r\n // `wpr - guard` is the index of first rounding digit.\r\n if (sd == null) {\r\n\r\n if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {\r\n Ctor.precision = wpr += 10;\r\n denominator = pow = t = new Ctor(1);\r\n i = 0;\r\n rep++;\r\n } else {\r\n return finalise(sum, Ctor.precision = pr, rm, external = true);\r\n }\r\n } else {\r\n Ctor.precision = pr;\r\n return sum;\r\n }\r\n }\r\n\r\n sum = t;\r\n }\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant\r\n * digits.\r\n *\r\n * ln(-n) = NaN\r\n * ln(0) = -Infinity\r\n * ln(-0) = -Infinity\r\n * ln(1) = 0\r\n * ln(Infinity) = Infinity\r\n * ln(-Infinity) = NaN\r\n * ln(NaN) = NaN\r\n *\r\n * ln(n) (n != 1) is non-terminating.\r\n *\r\n */\r\n function naturalLogarithm(y, sd) {\r\n var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2,\r\n n = 1,\r\n guard = 10,\r\n x = y,\r\n xd = x.d,\r\n Ctor = x.constructor,\r\n rm = Ctor.rounding,\r\n pr = Ctor.precision;\r\n\r\n // Is x negative or Infinity, NaN, 0 or 1?\r\n if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) {\r\n return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x);\r\n }\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n Ctor.precision = wpr += guard;\r\n c = digitsToString(xd);\r\n c0 = c.charAt(0);\r\n\r\n if (Math.abs(e = x.e) < 1.5e15) {\r\n\r\n // Argument reduction.\r\n // The series converges faster the closer the argument is to 1, so using\r\n // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b\r\n // multiply the argument by itself until the leading digits of the significand are 7, 8, 9,\r\n // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can\r\n // later be divided by this number, then separate out the power of 10 using\r\n // ln(a*10^b) = ln(a) + b*ln(10).\r\n\r\n // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14).\r\n //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) {\r\n // max n is 6 (gives 0.7 - 1.3)\r\n while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) {\r\n x = x.times(y);\r\n c = digitsToString(x.d);\r\n c0 = c.charAt(0);\r\n n++;\r\n }\r\n\r\n e = x.e;\r\n\r\n if (c0 > 1) {\r\n x = new Ctor('0.' + c);\r\n e++;\r\n } else {\r\n x = new Ctor(c0 + '.' + c.slice(1));\r\n }\r\n } else {\r\n\r\n // The argument reduction method above may result in overflow if the argument y is a massive\r\n // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this\r\n // function using ln(x*10^e) = ln(x) + e*ln(10).\r\n t = getLn10(Ctor, wpr + 2, pr).times(e + '');\r\n x = naturalLogarithm(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t);\r\n Ctor.precision = pr;\r\n\r\n return sd == null ? finalise(x, pr, rm, external = true) : x;\r\n }\r\n\r\n // x1 is x reduced to a value near 1.\r\n x1 = x;\r\n\r\n // Taylor series.\r\n // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...)\r\n // where x = (y - 1)/(y + 1) (|x| < 1)\r\n sum = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1);\r\n x2 = finalise(x.times(x), wpr, 1);\r\n denominator = 3;\r\n\r\n for (;;) {\r\n numerator = finalise(numerator.times(x2), wpr, 1);\r\n t = sum.plus(divide(numerator, new Ctor(denominator), wpr, 1));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n sum = sum.times(2);\r\n\r\n // Reverse the argument reduction. Check that e is not 0 because, besides preventing an\r\n // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0.\r\n if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + ''));\r\n sum = divide(sum, new Ctor(n), wpr, 1);\r\n\r\n // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has\r\n // been repeated previously) and the first 4 rounding digits 9999?\r\n // If so, restart the summation with a higher precision, otherwise\r\n // e.g. with precision: 12, rounding: 1\r\n // ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463.\r\n // `wpr - guard` is the index of first rounding digit.\r\n if (sd == null) {\r\n if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {\r\n Ctor.precision = wpr += guard;\r\n t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1);\r\n x2 = finalise(x.times(x), wpr, 1);\r\n denominator = rep = 1;\r\n } else {\r\n return finalise(sum, Ctor.precision = pr, rm, external = true);\r\n }\r\n } else {\r\n Ctor.precision = pr;\r\n return sum;\r\n }\r\n }\r\n\r\n sum = t;\r\n denominator += 2;\r\n }\r\n }\r\n\r\n\r\n // ±Infinity, NaN.\r\n function nonFiniteToString(x) {\r\n // Unsigned.\r\n return String(x.s * x.s / 0);\r\n }\r\n\r\n\r\n /*\r\n * Parse the value of a new Decimal `x` from string `str`.\r\n */\r\n function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Parse the value of a new Decimal `x` from a string `str`, which is not a decimal value.\r\n */\r\n function parseOther(x, str) {\r\n var base, Ctor, divisor, i, isFloat, len, p, xd, xe;\r\n\r\n if (str.indexOf('_') > -1) {\r\n str = str.replace(/(\\d)_(?=\\d)/g, '$1');\r\n if (isDecimal.test(str)) return parseDecimal(x, str);\r\n } else if (str === 'Infinity' || str === 'NaN') {\r\n if (!+str) x.s = NaN;\r\n x.e = NaN;\r\n x.d = null;\r\n return x;\r\n }\r\n\r\n if (isHex.test(str)) {\r\n base = 16;\r\n str = str.toLowerCase();\r\n } else if (isBinary.test(str)) {\r\n base = 2;\r\n } else if (isOctal.test(str)) {\r\n base = 8;\r\n } else {\r\n throw Error(invalidArgument + str);\r\n }\r\n\r\n // Is there a binary exponent part?\r\n i = str.search(/p/i);\r\n\r\n if (i > 0) {\r\n p = +str.slice(i + 1);\r\n str = str.substring(2, i);\r\n } else {\r\n str = str.slice(2);\r\n }\r\n\r\n // Convert `str` as an integer then divide the result by `base` raised to a power such that the\r\n // fraction part will be restored.\r\n i = str.indexOf('.');\r\n isFloat = i >= 0;\r\n Ctor = x.constructor;\r\n\r\n if (isFloat) {\r\n str = str.replace('.', '');\r\n len = str.length;\r\n i = len - i;\r\n\r\n // log[10](16) = 1.2041... , log[10](88) = 1.9444....\r\n divisor = intPow(Ctor, new Ctor(base), i, i * 2);\r\n }\r\n\r\n xd = convertBase(str, base, BASE);\r\n xe = xd.length - 1;\r\n\r\n // Remove trailing zeros.\r\n for (i = xe; xd[i] === 0; --i) xd.pop();\r\n if (i < 0) return new Ctor(x.s * 0);\r\n x.e = getBase10Exponent(xd, xe);\r\n x.d = xd;\r\n external = false;\r\n\r\n // At what precision to perform the division to ensure exact conversion?\r\n // maxDecimalIntegerPartDigitCount = ceil(log[10](b) * otherBaseIntegerPartDigitCount)\r\n // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412\r\n // E.g. ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits.\r\n // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount\r\n // Therefore using 4 * the number of digits of str will always be enough.\r\n if (isFloat) x = divide(x, divisor, len * 4);\r\n\r\n // Multiply by the binary exponent part if present.\r\n if (p) x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p));\r\n external = true;\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * sin(x) = x - x^3/3! + x^5/5! - ...\r\n * |x| < pi/2\r\n *\r\n */\r\n function sine(Ctor, x) {\r\n var k,\r\n len = x.d.length;\r\n\r\n if (len < 3) {\r\n return x.isZero() ? x : taylorSeries(Ctor, 2, x, x);\r\n }\r\n\r\n // Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x)\r\n // i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5)\r\n // and sin(x) = sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20))\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n k = 1.4 * Math.sqrt(len);\r\n k = k > 16 ? 16 : k | 0;\r\n\r\n x = x.times(1 / tinyPow(5, k));\r\n x = taylorSeries(Ctor, 2, x, x);\r\n\r\n // Reverse argument reduction\r\n var sin2_x,\r\n d5 = new Ctor(5),\r\n d16 = new Ctor(16),\r\n d20 = new Ctor(20);\r\n for (; k--;) {\r\n sin2_x = x.times(x);\r\n x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20))));\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n // Calculate Taylor series for `cos`, `cosh`, `sin` and `sinh`.\r\n function taylorSeries(Ctor, n, x, y, isHyperbolic) {\r\n var j, t, u, x2,\r\n i = 1,\r\n pr = Ctor.precision,\r\n k = Math.ceil(pr / LOG_BASE);\r\n\r\n external = false;\r\n x2 = x.times(x);\r\n u = new Ctor(y);\r\n\r\n for (;;) {\r\n t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1);\r\n u = isHyperbolic ? y.plus(t) : y.minus(t);\r\n y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1);\r\n t = u.plus(y);\r\n\r\n if (t.d[k] !== void 0) {\r\n for (j = k; t.d[j] === u.d[j] && j--;);\r\n if (j == -1) break;\r\n }\r\n\r\n j = u;\r\n u = y;\r\n y = t;\r\n t = j;\r\n i++;\r\n }\r\n\r\n external = true;\r\n t.d.length = k + 1;\r\n\r\n return t;\r\n }\r\n\r\n\r\n // Exponent e must be positive and non-zero.\r\n function tinyPow(b, e) {\r\n var n = b;\r\n while (--e) n *= b;\r\n return n;\r\n }\r\n\r\n\r\n // Return the absolute value of `x` reduced to less than or equal to half pi.\r\n function toLessThanHalfPi(Ctor, x) {\r\n var t,\r\n isNeg = x.s < 0,\r\n pi = getPi(Ctor, Ctor.precision, 1),\r\n halfPi = pi.times(0.5);\r\n\r\n x = x.abs();\r\n\r\n if (x.lte(halfPi)) {\r\n quadrant = isNeg ? 4 : 1;\r\n return x;\r\n }\r\n\r\n t = x.divToInt(pi);\r\n\r\n if (t.isZero()) {\r\n quadrant = isNeg ? 3 : 2;\r\n } else {\r\n x = x.minus(t.times(pi));\r\n\r\n // 0 <= x < pi\r\n if (x.lte(halfPi)) {\r\n quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1);\r\n return x;\r\n }\r\n\r\n quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2);\r\n }\r\n\r\n return x.minus(pi).abs();\r\n }\r\n\r\n\r\n /*\r\n * Return the value of Decimal `x` as a string in base `baseOut`.\r\n *\r\n * If the optional `sd` argument is present include a binary exponent suffix.\r\n */\r\n function toStringBinary(x, baseOut, sd, rm) {\r\n var base, e, i, k, len, roundUp, str, xd, y,\r\n Ctor = x.constructor,\r\n isExp = sd !== void 0;\r\n\r\n if (isExp) {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n } else {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n }\r\n\r\n if (!x.isFinite()) {\r\n str = nonFiniteToString(x);\r\n } else {\r\n str = finiteToString(x);\r\n i = str.indexOf('.');\r\n\r\n // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required:\r\n // maxBinaryExponent = floor((decimalExponent + 1) * log[2](10))\r\n // minBinaryExponent = floor(decimalExponent * log[2](10))\r\n // log[2](10) = 3.321928094887362347870319429489390175864\r\n\r\n if (isExp) {\r\n base = 2;\r\n if (baseOut == 16) {\r\n sd = sd * 4 - 3;\r\n } else if (baseOut == 8) {\r\n sd = sd * 3 - 2;\r\n }\r\n } else {\r\n base = baseOut;\r\n }\r\n\r\n // Convert the number as an integer then divide the result by its base raised to a power such\r\n // that the fraction part will be restored.\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n str = str.replace('.', '');\r\n y = new Ctor(1);\r\n y.e = str.length - i;\r\n y.d = convertBase(finiteToString(y), 10, base);\r\n y.e = y.d.length;\r\n }\r\n\r\n xd = convertBase(str, 10, base);\r\n e = len = xd.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] == 0;) xd.pop();\r\n\r\n if (!xd[0]) {\r\n str = isExp ? '0p+0' : '0';\r\n } else {\r\n if (i < 0) {\r\n e--;\r\n } else {\r\n x = new Ctor(x);\r\n x.d = xd;\r\n x.e = e;\r\n x = divide(x, y, sd, rm, 0, base);\r\n xd = x.d;\r\n e = x.e;\r\n roundUp = inexact;\r\n }\r\n\r\n // The rounding digit, i.e. the digit after the digit that may be rounded up.\r\n i = xd[sd];\r\n k = base / 2;\r\n roundUp = roundUp || xd[sd + 1] !== void 0;\r\n\r\n roundUp = rm < 4\r\n ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2))\r\n : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 ||\r\n rm === (x.s < 0 ? 8 : 7));\r\n\r\n xd.length = sd;\r\n\r\n if (roundUp) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (; ++xd[--sd] > base - 1;) {\r\n xd[sd] = 0;\r\n if (!sd) {\r\n ++e;\r\n xd.unshift(1);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (len = xd.length; !xd[len - 1]; --len);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i < len; i++) str += NUMERALS.charAt(xd[i]);\r\n\r\n // Add binary exponent suffix?\r\n if (isExp) {\r\n if (len > 1) {\r\n if (baseOut == 16 || baseOut == 8) {\r\n i = baseOut == 16 ? 4 : 3;\r\n for (--len; len % i; len++) str += '0';\r\n xd = convertBase(str, base, baseOut);\r\n for (len = xd.length; !xd[len - 1]; --len);\r\n\r\n // xd[0] will always be be 1\r\n for (i = 1, str = '1.'; i < len; i++) str += NUMERALS.charAt(xd[i]);\r\n } else {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n }\r\n\r\n str = str + (e < 0 ? 'p' : 'p+') + e;\r\n } else if (e < 0) {\r\n for (; ++e;) str = '0' + str;\r\n str = '0.' + str;\r\n } else {\r\n if (++e > len) for (e -= len; e-- ;) str += '0';\r\n else if (e < len) str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n str = (baseOut == 16 ? '0x' : baseOut == 2 ? '0b' : baseOut == 8 ? '0o' : '') + str;\r\n }\r\n\r\n return x.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Does not strip trailing zeros.\r\n function truncate(arr, len) {\r\n if (arr.length > len) {\r\n arr.length = len;\r\n return true;\r\n }\r\n }\r\n\r\n\r\n // Decimal methods\r\n\r\n\r\n /*\r\n * abs\r\n * acos\r\n * acosh\r\n * add\r\n * asin\r\n * asinh\r\n * atan\r\n * atanh\r\n * atan2\r\n * cbrt\r\n * ceil\r\n * clamp\r\n * clone\r\n * config\r\n * cos\r\n * cosh\r\n * div\r\n * exp\r\n * floor\r\n * hypot\r\n * ln\r\n * log\r\n * log2\r\n * log10\r\n * max\r\n * min\r\n * mod\r\n * mul\r\n * pow\r\n * random\r\n * round\r\n * set\r\n * sign\r\n * sin\r\n * sinh\r\n * sqrt\r\n * sub\r\n * sum\r\n * tan\r\n * tanh\r\n * trunc\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the absolute value of `x`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function abs(x) {\r\n return new this(x).abs();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arccosine in radians of `x`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function acos(x) {\r\n return new this(x).acos();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function acosh(x) {\r\n return new this(x).acosh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function add(x, y) {\r\n return new this(x).plus(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arcsine in radians of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function asin(x) {\r\n return new this(x).asin();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic sine of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function asinh(x) {\r\n return new this(x).asinh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent in radians of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function atan(x) {\r\n return new this(x).atan();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function atanh(x) {\r\n return new this(x).atanh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi\r\n * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi, pi]\r\n *\r\n * y {number|string|Decimal} The y-coordinate.\r\n * x {number|string|Decimal} The x-coordinate.\r\n *\r\n * atan2(±0, -0) = ±pi\r\n * atan2(±0, +0) = ±0\r\n * atan2(±0, -x) = ±pi for x > 0\r\n * atan2(±0, x) = ±0 for x > 0\r\n * atan2(-y, ±0) = -pi/2 for y > 0\r\n * atan2(y, ±0) = pi/2 for y > 0\r\n * atan2(±y, -Infinity) = ±pi for finite y > 0\r\n * atan2(±y, +Infinity) = ±0 for finite y > 0\r\n * atan2(±Infinity, x) = ±pi/2 for finite x\r\n * atan2(±Infinity, -Infinity) = ±3*pi/4\r\n * atan2(±Infinity, +Infinity) = ±pi/4\r\n * atan2(NaN, x) = NaN\r\n * atan2(y, NaN) = NaN\r\n *\r\n */\r\n function atan2(y, x) {\r\n y = new this(y);\r\n x = new this(x);\r\n var r,\r\n pr = this.precision,\r\n rm = this.rounding,\r\n wpr = pr + 4;\r\n\r\n // Either NaN\r\n if (!y.s || !x.s) {\r\n r = new this(NaN);\r\n\r\n // Both ±Infinity\r\n } else if (!y.d && !x.d) {\r\n r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75);\r\n r.s = y.s;\r\n\r\n // x is ±Infinity or y is ±0\r\n } else if (!x.d || y.isZero()) {\r\n r = x.s < 0 ? getPi(this, pr, rm) : new this(0);\r\n r.s = y.s;\r\n\r\n // y is ±Infinity or x is ±0\r\n } else if (!y.d || x.isZero()) {\r\n r = getPi(this, wpr, 1).times(0.5);\r\n r.s = y.s;\r\n\r\n // Both non-zero and finite\r\n } else if (x.s < 0) {\r\n this.precision = wpr;\r\n this.rounding = 1;\r\n r = this.atan(divide(y, x, wpr, 1));\r\n x = getPi(this, wpr, 1);\r\n this.precision = pr;\r\n this.rounding = rm;\r\n r = y.s < 0 ? r.minus(x) : r.plus(x);\r\n } else {\r\n r = this.atan(divide(y, x, wpr, 1));\r\n }\r\n\r\n return r;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cube root of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function cbrt(x) {\r\n return new this(x).cbrt();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` rounded to an integer using `ROUND_CEIL`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function ceil(x) {\r\n return finalise(x = new this(x), x.e + 1, 2);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` clamped to the range delineated by `min` and `max`.\r\n *\r\n * x {number|string|Decimal}\r\n * min {number|string|Decimal}\r\n * max {number|string|Decimal}\r\n *\r\n */\r\n function clamp(x, min, max) {\r\n return new this(x).clamp(min, max);\r\n }\r\n\r\n\r\n /*\r\n * Configure global settings for a Decimal constructor.\r\n *\r\n * `obj` is an object with one or more of the following properties,\r\n *\r\n * precision {number}\r\n * rounding {number}\r\n * toExpNeg {number}\r\n * toExpPos {number}\r\n * maxE {number}\r\n * minE {number}\r\n * modulo {number}\r\n * crypto {boolean|number}\r\n * defaults {true}\r\n *\r\n * E.g. Decimal.config({ precision: 20, rounding: 4 })\r\n *\r\n */\r\n function config(obj) {\r\n if (!obj || typeof obj !== 'object') throw Error(decimalError + 'Object expected');\r\n var i, p, v,\r\n useDefaults = obj.defaults === true,\r\n ps = [\r\n 'precision', 1, MAX_DIGITS,\r\n 'rounding', 0, 8,\r\n 'toExpNeg', -EXP_LIMIT, 0,\r\n 'toExpPos', 0, EXP_LIMIT,\r\n 'maxE', 0, EXP_LIMIT,\r\n 'minE', -EXP_LIMIT, 0,\r\n 'modulo', 0, 9\r\n ];\r\n\r\n for (i = 0; i < ps.length; i += 3) {\r\n if (p = ps[i], useDefaults) this[p] = DEFAULTS[p];\r\n if ((v = obj[p]) !== void 0) {\r\n if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v;\r\n else throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n if (p = 'crypto', useDefaults) this[p] = DEFAULTS[p];\r\n if ((v = obj[p]) !== void 0) {\r\n if (v === true || v === false || v === 0 || v === 1) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n this[p] = true;\r\n } else {\r\n throw Error(cryptoUnavailable);\r\n }\r\n } else {\r\n this[p] = false;\r\n }\r\n } else {\r\n throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cosine of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function cos(x) {\r\n return new this(x).cos();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic cosine of `x`, rounded to precision\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function cosh(x) {\r\n return new this(x).cosh();\r\n }\r\n\r\n\r\n /*\r\n * Create and return a Decimal constructor with the same configuration properties as this Decimal\r\n * constructor.\r\n *\r\n */\r\n function clone(obj) {\r\n var i, p, ps;\r\n\r\n /*\r\n * The Decimal constructor and exported function.\r\n * Return a new Decimal instance.\r\n *\r\n * v {number|string|Decimal} A numeric value.\r\n *\r\n */\r\n function Decimal(v) {\r\n var e, i, t,\r\n x = this;\r\n\r\n // Decimal called without new.\r\n if (!(x instanceof Decimal)) return new Decimal(v);\r\n\r\n // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor\r\n // which points to Object.\r\n x.constructor = Decimal;\r\n\r\n // Duplicate.\r\n if (isDecimalInstance(v)) {\r\n x.s = v.s;\r\n\r\n if (external) {\r\n if (!v.d || v.e > Decimal.maxE) {\r\n\r\n // Infinity.\r\n x.e = NaN;\r\n x.d = null;\r\n } else if (v.e < Decimal.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n } else {\r\n x.e = v.e;\r\n x.d = v.d.slice();\r\n }\r\n } else {\r\n x.e = v.e;\r\n x.d = v.d ? v.d.slice() : v.d;\r\n }\r\n\r\n return;\r\n }\r\n\r\n t = typeof v;\r\n\r\n if (t === 'number') {\r\n if (v === 0) {\r\n x.s = 1 / v < 0 ? -1 : 1;\r\n x.e = 0;\r\n x.d = [0];\r\n return;\r\n }\r\n\r\n if (v < 0) {\r\n v = -v;\r\n x.s = -1;\r\n } else {\r\n x.s = 1;\r\n }\r\n\r\n // Fast path for small integers.\r\n if (v === ~~v && v < 1e7) {\r\n for (e = 0, i = v; i >= 10; i /= 10) e++;\r\n\r\n if (external) {\r\n if (e > Decimal.maxE) {\r\n x.e = NaN;\r\n x.d = null;\r\n } else if (e < Decimal.minE) {\r\n x.e = 0;\r\n x.d = [0];\r\n } else {\r\n x.e = e;\r\n x.d = [v];\r\n }\r\n } else {\r\n x.e = e;\r\n x.d = [v];\r\n }\r\n\r\n return;\r\n\r\n // Infinity, NaN.\r\n } else if (v * 0 !== 0) {\r\n if (!v) x.s = NaN;\r\n x.e = NaN;\r\n x.d = null;\r\n return;\r\n }\r\n\r\n return parseDecimal(x, v.toString());\r\n\r\n } else if (t !== 'string') {\r\n throw Error(invalidArgument + v);\r\n }\r\n\r\n // Minus sign?\r\n if ((i = v.charCodeAt(0)) === 45) {\r\n v = v.slice(1);\r\n x.s = -1;\r\n } else {\r\n // Plus sign?\r\n if (i === 43) v = v.slice(1);\r\n x.s = 1;\r\n }\r\n\r\n return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);\r\n }\r\n\r\n Decimal.prototype = P;\r\n\r\n Decimal.ROUND_UP = 0;\r\n Decimal.ROUND_DOWN = 1;\r\n Decimal.ROUND_CEIL = 2;\r\n Decimal.ROUND_FLOOR = 3;\r\n Decimal.ROUND_HALF_UP = 4;\r\n Decimal.ROUND_HALF_DOWN = 5;\r\n Decimal.ROUND_HALF_EVEN = 6;\r\n Decimal.ROUND_HALF_CEIL = 7;\r\n Decimal.ROUND_HALF_FLOOR = 8;\r\n Decimal.EUCLID = 9;\r\n\r\n Decimal.config = Decimal.set = config;\r\n Decimal.clone = clone;\r\n Decimal.isDecimal = isDecimalInstance;\r\n\r\n Decimal.abs = abs;\r\n Decimal.acos = acos;\r\n Decimal.acosh = acosh; // ES6\r\n Decimal.add = add;\r\n Decimal.asin = asin;\r\n Decimal.asinh = asinh; // ES6\r\n Decimal.atan = atan;\r\n Decimal.atanh = atanh; // ES6\r\n Decimal.atan2 = atan2;\r\n Decimal.cbrt = cbrt; // ES6\r\n Decimal.ceil = ceil;\r\n Decimal.clamp = clamp;\r\n Decimal.cos = cos;\r\n Decimal.cosh = cosh; // ES6\r\n Decimal.div = div;\r\n Decimal.exp = exp;\r\n Decimal.floor = floor;\r\n Decimal.hypot = hypot; // ES6\r\n Decimal.ln = ln;\r\n Decimal.log = log;\r\n Decimal.log10 = log10; // ES6\r\n Decimal.log2 = log2; // ES6\r\n Decimal.max = max;\r\n Decimal.min = min;\r\n Decimal.mod = mod;\r\n Decimal.mul = mul;\r\n Decimal.pow = pow;\r\n Decimal.random = random;\r\n Decimal.round = round;\r\n Decimal.sign = sign; // ES6\r\n Decimal.sin = sin;\r\n Decimal.sinh = sinh; // ES6\r\n Decimal.sqrt = sqrt;\r\n Decimal.sub = sub;\r\n Decimal.sum = sum;\r\n Decimal.tan = tan;\r\n Decimal.tanh = tanh; // ES6\r\n Decimal.trunc = trunc; // ES6\r\n\r\n if (obj === void 0) obj = {};\r\n if (obj) {\r\n if (obj.defaults !== true) {\r\n ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'];\r\n for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p];\r\n }\r\n }\r\n\r\n Decimal.config(obj);\r\n\r\n return Decimal;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function div(x, y) {\r\n return new this(x).div(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} The power to which to raise the base of the natural log.\r\n *\r\n */\r\n function exp(x) {\r\n return new this(x).exp();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` round to an integer using `ROUND_FLOOR`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function floor(x) {\r\n return finalise(x = new this(x), x.e + 1, 3);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of the sum of the squares of the arguments,\r\n * rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * hypot(a, b, ...) = sqrt(a^2 + b^2 + ...)\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function hypot() {\r\n var i, n,\r\n t = new this(0);\r\n\r\n external = false;\r\n\r\n for (i = 0; i < arguments.length;) {\r\n n = new this(arguments[i++]);\r\n if (!n.d) {\r\n if (n.s) {\r\n external = true;\r\n return new this(1 / 0);\r\n }\r\n t = n;\r\n } else if (t.d) {\r\n t = t.plus(n.times(n));\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return t.sqrt();\r\n }\r\n\r\n\r\n /*\r\n * Return true if object is a Decimal instance (where Decimal is any Decimal constructor),\r\n * otherwise return false.\r\n *\r\n */\r\n function isDecimalInstance(obj) {\r\n return obj instanceof Decimal || obj && obj.toStringTag === tag || false;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function ln(x) {\r\n return new this(x).ln();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the log of `x` to the base `y`, or to base 10 if no base\r\n * is specified, rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * log[y](x)\r\n *\r\n * x {number|string|Decimal} The argument of the logarithm.\r\n * y {number|string|Decimal} The base of the logarithm.\r\n *\r\n */\r\n function log(x, y) {\r\n return new this(x).log(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the base 2 logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function log2(x) {\r\n return new this(x).log(2);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the base 10 logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function log10(x) {\r\n return new this(x).log(10);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function max() {\r\n return maxOrMin(this, arguments, 'lt');\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function min() {\r\n return maxOrMin(this, arguments, 'gt');\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function mod(x, y) {\r\n return new this(x).mod(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function mul(x, y) {\r\n return new this(x).mul(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} The base.\r\n * y {number|string|Decimal} The exponent.\r\n *\r\n */\r\n function pow(x, y) {\r\n return new this(x).pow(y);\r\n }\r\n\r\n\r\n /*\r\n * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with\r\n * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros\r\n * are produced).\r\n *\r\n * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive.\r\n *\r\n */\r\n function random(sd) {\r\n var d, e, k, n,\r\n i = 0,\r\n r = new this(1),\r\n rd = [];\r\n\r\n if (sd === void 0) sd = this.precision;\r\n else checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n k = Math.ceil(sd / LOG_BASE);\r\n\r\n if (!this.crypto) {\r\n for (; i < k;) rd[i++] = Math.random() * 1e7 | 0;\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n } else if (crypto.getRandomValues) {\r\n d = crypto.getRandomValues(new Uint32Array(k));\r\n\r\n for (; i < k;) {\r\n n = d[i];\r\n\r\n // 0 <= n < 4294967296\r\n // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865).\r\n if (n >= 4.29e9) {\r\n d[i] = crypto.getRandomValues(new Uint32Array(1))[0];\r\n } else {\r\n\r\n // 0 <= n <= 4289999999\r\n // 0 <= (n % 1e7) <= 9999999\r\n rd[i++] = n % 1e7;\r\n }\r\n }\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n d = crypto.randomBytes(k *= 4);\r\n\r\n for (; i < k;) {\r\n\r\n // 0 <= n < 2147483648\r\n n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24);\r\n\r\n // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286).\r\n if (n >= 2.14e9) {\r\n crypto.randomBytes(4).copy(d, i);\r\n } else {\r\n\r\n // 0 <= n <= 2139999999\r\n // 0 <= (n % 1e7) <= 9999999\r\n rd.push(n % 1e7);\r\n i += 4;\r\n }\r\n }\r\n\r\n i = k / 4;\r\n } else {\r\n throw Error(cryptoUnavailable);\r\n }\r\n\r\n k = rd[--i];\r\n sd %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to sd.\r\n if (k && sd) {\r\n n = mathpow(10, LOG_BASE - sd);\r\n rd[i] = (k / n | 0) * n;\r\n }\r\n\r\n // Remove trailing words which are zero.\r\n for (; rd[i] === 0; i--) rd.pop();\r\n\r\n // Zero?\r\n if (i < 0) {\r\n e = 0;\r\n rd = [0];\r\n } else {\r\n e = -1;\r\n\r\n // Remove leading words which are zero and adjust exponent accordingly.\r\n for (; rd[0] === 0; e -= LOG_BASE) rd.shift();\r\n\r\n // Count the digits of the first word of rd to determine leading zeros.\r\n for (k = 1, n = rd[0]; n >= 10; n /= 10) k++;\r\n\r\n // Adjust the exponent for leading zeros of the first word of rd.\r\n if (k < LOG_BASE) e -= LOG_BASE - k;\r\n }\r\n\r\n r.e = e;\r\n r.d = rd;\r\n\r\n return r;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`.\r\n *\r\n * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL).\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function round(x) {\r\n return finalise(x = new this(x), x.e + 1, this.rounding);\r\n }\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if x > 0,\r\n * -1 if x < 0,\r\n * 0 if x is 0,\r\n * -0 if x is -0,\r\n * NaN otherwise\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function sign(x) {\r\n x = new this(x);\r\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function sin(x) {\r\n return new this(x).sin();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function sinh(x) {\r\n return new this(x).sinh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function sqrt(x) {\r\n return new this(x).sqrt();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function sub(x, y) {\r\n return new this(x).sub(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sum of the arguments, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * Only the result is rounded, not the intermediate calculations.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function sum() {\r\n var i = 0,\r\n args = arguments,\r\n x = new this(args[i]);\r\n\r\n external = false;\r\n for (; x.s && ++i < args.length;) x = x.plus(args[i]);\r\n external = true;\r\n\r\n return finalise(x, this.precision, this.rounding);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function tan(x) {\r\n return new this(x).tan();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function tanh(x) {\r\n return new this(x).tanh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` truncated to an integer.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function trunc(x) {\r\n return finalise(x = new this(x), x.e + 1, 1);\r\n }\r\n\r\n\r\n // Create and configure initial Decimal constructor.\r\n Decimal = clone(DEFAULTS);\r\n Decimal.prototype.constructor = Decimal;\r\n Decimal['default'] = Decimal.Decimal = Decimal;\r\n\r\n // Create the internal constants from their string values.\r\n LN10 = new Decimal(LN10);\r\n PI = new Decimal(PI);\r\n\r\n\r\n // Export.\r\n\r\n\r\n // AMD.\r\n if (true) {\r\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\r\n return Decimal;\r\n }).call(exports, __webpack_require__, exports, module),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\r\n // Node and other environments that support module.exports.\r\n } else {}\r\n})(this);\r\n\n\n/***/ }),\n\n/***/ 2296:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar $defineProperty = __webpack_require__(4429);\n\nvar $SyntaxError = __webpack_require__(3464);\nvar $TypeError = __webpack_require__(4453);\n\nvar gopd = __webpack_require__(7296);\n\n/** @type {import('.')} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n\n\n/***/ }),\n\n/***/ 4289:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar keys = __webpack_require__(2215);\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = __webpack_require__(2296);\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = __webpack_require__(1044)();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n\n\n/***/ }),\n\n/***/ 2114:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nfunction assign(obj, props) {\n for (const key in props) {\n Object.defineProperty(obj, key, {\n value: props[key],\n enumerable: true,\n configurable: true,\n });\n }\n\n return obj;\n}\n\nfunction createError(err, code, props) {\n if (!err || typeof err === 'string') {\n throw new TypeError('Please pass an Error to err-code');\n }\n\n if (!props) {\n props = {};\n }\n\n if (typeof code === 'object') {\n props = code;\n code = undefined;\n }\n\n if (code != null) {\n props.code = code;\n }\n\n try {\n return assign(err, props);\n } catch (_) {\n props.message = err.message;\n props.stack = err.stack;\n\n const ErrClass = function () {};\n\n ErrClass.prototype = Object.create(Object.getPrototypeOf(err));\n\n return assign(new ErrClass(), props);\n }\n}\n\nmodule.exports = createError;\n\n\n/***/ }),\n\n/***/ 4429:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar GetIntrinsic = __webpack_require__(210);\n\n/** @type {import('.')} */\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n\n\n/***/ }),\n\n/***/ 3981:\n/***/ (function(module) {\n\n\"use strict\";\n\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n\n\n/***/ }),\n\n/***/ 1648:\n/***/ (function(module) {\n\n\"use strict\";\n\n\n/** @type {import('.')} */\nmodule.exports = Error;\n\n\n/***/ }),\n\n/***/ 4726:\n/***/ (function(module) {\n\n\"use strict\";\n\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n\n\n/***/ }),\n\n/***/ 6712:\n/***/ (function(module) {\n\n\"use strict\";\n\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n\n\n/***/ }),\n\n/***/ 3464:\n/***/ (function(module) {\n\n\"use strict\";\n\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n\n\n/***/ }),\n\n/***/ 4453:\n/***/ (function(module) {\n\n\"use strict\";\n\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n\n\n/***/ }),\n\n/***/ 3915:\n/***/ (function(module) {\n\n\"use strict\";\n\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n\n\n/***/ }),\n\n/***/ 6729:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif (true) {\n module.exports = EventEmitter;\n}\n\n\n/***/ }),\n\n/***/ 4029:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar isCallable = __webpack_require__(5320);\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n\n\n/***/ }),\n\n/***/ 7648:\n/***/ (function(module) {\n\n\"use strict\";\n\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n\n\n/***/ }),\n\n/***/ 8612:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar implementation = __webpack_require__(7648);\n\nmodule.exports = Function.prototype.bind || implementation;\n\n\n/***/ }),\n\n/***/ 210:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar undefined;\n\nvar $Error = __webpack_require__(1648);\nvar $EvalError = __webpack_require__(3981);\nvar $RangeError = __webpack_require__(4726);\nvar $ReferenceError = __webpack_require__(6712);\nvar $SyntaxError = __webpack_require__(3464);\nvar $TypeError = __webpack_require__(4453);\nvar $URIError = __webpack_require__(3915);\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = __webpack_require__(1405)();\nvar hasProto = __webpack_require__(8185)();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = __webpack_require__(8612);\nvar hasOwn = __webpack_require__(8824);\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n\n\n/***/ }),\n\n/***/ 7296:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar GetIntrinsic = __webpack_require__(210);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n\n\n/***/ }),\n\n/***/ 1044:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar $defineProperty = __webpack_require__(4429);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\treturn !!$defineProperty;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!$defineProperty) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n\n\n/***/ }),\n\n/***/ 8185:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nvar test = {\n\t__proto__: null,\n\tfoo: {}\n};\n\nvar $Object = Object;\n\n/** @type {import('.')} */\nmodule.exports = function hasProto() {\n\t// @ts-expect-error: TS errors on an inherited property for some reason\n\treturn { __proto__: test }.foo === test.foo\n\t\t&& !(test instanceof $Object);\n};\n\n\n/***/ }),\n\n/***/ 1405:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = __webpack_require__(5419);\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n\n\n/***/ }),\n\n/***/ 5419:\n/***/ (function(module) {\n\n\"use strict\";\n\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n\n\n/***/ }),\n\n/***/ 6410:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar hasSymbols = __webpack_require__(5419);\n\n/** @type {import('.')} */\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n\n\n/***/ }),\n\n/***/ 8824:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = __webpack_require__(8612);\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n\n\n/***/ }),\n\n/***/ 8679:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar reactIs = __webpack_require__(7109);\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n/***/ }),\n\n/***/ 6103:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n\n\n/***/ }),\n\n/***/ 7109:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nif (true) {\n module.exports = __webpack_require__(6103);\n} else {}\n\n\n/***/ }),\n\n/***/ 645:\n/***/ (function(__unused_webpack_module, exports) {\n\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n/***/ }),\n\n/***/ 5717:\n/***/ (function(module) {\n\nif (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n\n\n/***/ }),\n\n/***/ 2584:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar hasToStringTag = __webpack_require__(6410)();\nvar callBound = __webpack_require__(1924);\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n\n\n/***/ }),\n\n/***/ 5320:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n\n\n/***/ }),\n\n/***/ 8662:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = __webpack_require__(6410)();\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar GeneratorFunction;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\tif (!getProto) {\n\t\treturn false;\n\t}\n\tif (typeof GeneratorFunction === 'undefined') {\n\t\tvar generatorFunc = getGeneratorFunc();\n\t\tGeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;\n\t}\n\treturn getProto(fn) === GeneratorFunction;\n};\n\n\n/***/ }),\n\n/***/ 8611:\n/***/ (function(module) {\n\n\"use strict\";\n\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function isNaN(value) {\n\treturn value !== value;\n};\n\n\n/***/ }),\n\n/***/ 360:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar callBind = __webpack_require__(5559);\nvar define = __webpack_require__(4289);\n\nvar implementation = __webpack_require__(8611);\nvar getPolyfill = __webpack_require__(9415);\nvar shim = __webpack_require__(3194);\n\nvar polyfill = callBind(getPolyfill(), Number);\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n\n\n/***/ }),\n\n/***/ 9415:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar implementation = __webpack_require__(8611);\n\nmodule.exports = function getPolyfill() {\n\tif (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) {\n\t\treturn Number.isNaN;\n\t}\n\treturn implementation;\n};\n\n\n/***/ }),\n\n/***/ 3194:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar define = __webpack_require__(4289);\nvar getPolyfill = __webpack_require__(9415);\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function shimNumberIsNaN() {\n\tvar polyfill = getPolyfill();\n\tdefine(Number, { isNaN: polyfill }, {\n\t\tisNaN: function testIsNaN() {\n\t\t\treturn Number.isNaN !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n\n\n/***/ }),\n\n/***/ 5692:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar whichTypedArray = __webpack_require__(6430);\n\n/** @type {import('.')} */\nmodule.exports = function isTypedArray(value) {\n\treturn !!whichTypedArray(value);\n};\n\n\n/***/ }),\n\n/***/ 1198:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nconst uuid = (__webpack_require__(4880).v4);\nconst generateRequest = __webpack_require__(7741);\n\n/**\n * Constructor for a Jayson Browser Client that does not depend any node.js core libraries\n * @class ClientBrowser\n * @param {Function} callServer Method that calls the server, receives the stringified request and a regular node-style callback\n * @param {Object} [options]\n * @param {Function} [options.reviver] Reviver function for JSON\n * @param {Function} [options.replacer] Replacer function for JSON\n * @param {Number} [options.version=2] JSON-RPC version to use (1|2)\n * @param {Function} [options.generator] Function to use for generating request IDs\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @return {ClientBrowser}\n */\nconst ClientBrowser = function(callServer, options) {\n if(!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n\n if (!options) {\n options = {};\n }\n\n this.options = {\n reviver: typeof options.reviver !== 'undefined' ? options.reviver : null,\n replacer: typeof options.replacer !== 'undefined' ? options.replacer : null,\n generator: typeof options.generator !== 'undefined' ? options.generator : function() { return uuid(); },\n version: typeof options.version !== 'undefined' ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === 'boolean' ? options.notificationIdNull : false,\n };\n\n this.callServer = callServer;\n};\n\nmodule.exports = ClientBrowser;\n\n/**\n * Creates a request and dispatches it if given a callback.\n * @param {String|Array} method A batch request if passed an Array, or a method name if passed a String\n * @param {Array|Object} [params] Parameters for the method\n * @param {String|Number} [id] Optional id. If undefined an id will be generated. If null it creates a notification request\n * @param {Function} [callback] Request callback. If specified, executes the request rather than only returning it.\n * @throws {TypeError} Invalid parameters\n * @return {Object} JSON-RPC 1.0 or 2.0 compatible request\n */\nClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n\n // is this a batch request?\n const isBatch = Array.isArray(method) && typeof params === 'function';\n\n if (this.options.version === 1 && isBatch) {\n throw new TypeError('JSON-RPC 1.0 does not support batching');\n }\n\n // is this a raw request?\n const isRaw = !isBatch && method && typeof method === 'object' && typeof params === 'function';\n\n if(isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if(typeof id === 'function') {\n callback = id;\n // specifically undefined because \"null\" is a notification request\n id = undefined;\n }\n\n const hasCallback = typeof callback === 'function';\n\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull,\n });\n } catch(err) {\n if(hasCallback) {\n return callback(err);\n }\n throw err;\n }\n\n // no callback means we should just return a raw request\n if(!hasCallback) {\n return request;\n }\n\n }\n\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch(err) {\n return callback(err);\n }\n\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n\n // always return the raw request\n return request;\n};\n\n/**\n * Parses a response from a server\n * @param {Object} err Error to pass on that is unrelated to the actual response\n * @param {String} responseText JSON-RPC 1.0 or 2.0 response\n * @param {Function} callback Callback that will receive different arguments depending on the amount of parameters\n * @private\n */\nClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if(err) {\n callback(err);\n return;\n }\n\n if(!responseText) {\n // empty response text, assume that is correct because it could be a\n // notification which jayson does not give any body for\n return callback();\n }\n\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch(err) {\n return callback(err);\n }\n\n if(callback.length === 3) {\n // if callback length is 3, we split callback arguments on error and response\n\n // is batch response?\n if(Array.isArray(response)) {\n\n // neccesary to split strictly on validity according to spec here\n const isError = function(res) {\n return typeof res.error !== 'undefined';\n };\n\n const isNotError = function (res) {\n return !isError(res);\n };\n\n return callback(null, response.filter(isError), response.filter(isNotError));\n \n } else {\n\n // split regardless of validity\n return callback(null, response.error, response.result);\n \n }\n \n }\n\n callback(null, response);\n};\n\n\n/***/ }),\n\n/***/ 7741:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nconst uuid = (__webpack_require__(4880).v4);\n\n/**\n * Generates a JSON-RPC 1.0 or 2.0 request\n * @param {String} method Name of method to call\n * @param {Array|Object} params Array of parameters passed to the method as specified, or an object of parameter names and corresponding value\n * @param {String|Number|null} [id] Request ID can be a string, number, null for explicit notification or left out for automatic generation\n * @param {Object} [options]\n * @param {Number} [options.version=2] JSON-RPC version to use (1 or 2)\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @param {Function} [options.generator] Passed the request, and the options object and is expected to return a request ID\n * @throws {TypeError} If any of the parameters are invalid\n * @return {Object} A JSON-RPC 1.0 or 2.0 request\n * @memberOf Utils\n */\nconst generateRequest = function(method, params, id, options) {\n if(typeof method !== 'string') {\n throw new TypeError(method + ' must be a string');\n }\n\n options = options || {};\n\n // check valid version provided\n const version = typeof options.version === 'number' ? options.version : 2;\n if (version !== 1 && version !== 2) {\n throw new TypeError(version + ' must be 1 or 2');\n }\n\n const request = {\n method: method\n };\n\n if(version === 2) {\n request.jsonrpc = '2.0';\n }\n\n if(params) {\n // params given, but invalid?\n if(typeof params !== 'object' && !Array.isArray(params)) {\n throw new TypeError(params + ' must be an object, array or omitted');\n }\n request.params = params;\n }\n\n // if id was left out, generate one (null means explicit notification)\n if(typeof(id) === 'undefined') {\n const generator = typeof options.generator === 'function' ? options.generator : function() { return uuid(); };\n request.id = generator(request, options);\n } else if (version === 2 && id === null) {\n // we have a version 2 notification\n if (options.notificationIdNull) {\n request.id = null; // id will not be set at all unless option provided\n }\n } else {\n request.id = id;\n }\n\n return request;\n};\n\nmodule.exports = generateRequest;\n\n\n/***/ }),\n\n/***/ 2023:\n/***/ (function(module, exports, __webpack_require__) {\n\n/* provided dependency */ var process = __webpack_require__(4155);\nvar __WEBPACK_AMD_DEFINE_RESULT__;/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var ERROR = 'input is invalid type';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA256_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = __webpack_require__.g;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && \"object\" === 'object' && module.exports;\n var AMD = true && __webpack_require__.amdO;\n var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var EXTRA = [-2147483648, 8388608, 32768, 128];\n var SHIFT = [24, 16, 8, 0];\n var K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ];\n var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];\n\n var blocks = [];\n\n if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (outputType, is224) {\n return function (message) {\n return new Sha256(is224, true).update(message)[outputType]();\n };\n };\n\n var createMethod = function (is224) {\n var method = createOutputMethod('hex', is224);\n if (NODE_JS) {\n method = nodeWrap(method, is224);\n }\n method.create = function () {\n return new Sha256(is224);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createOutputMethod(type, is224);\n }\n return method;\n };\n\n var nodeWrap = function (method, is224) {\n var crypto = eval(\"require('crypto')\");\n var Buffer = eval(\"require('buffer').Buffer\");\n var algorithm = is224 ? 'sha224' : 'sha256';\n var nodeMethod = function (message) {\n if (typeof message === 'string') {\n return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');\n } else {\n if (message === null || message === undefined) {\n throw new Error(ERROR);\n } else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n }\n }\n if (Array.isArray(message) || ArrayBuffer.isView(message) ||\n message.constructor === Buffer) {\n return crypto.createHash(algorithm).update(new Buffer(message)).digest('hex');\n } else {\n return method(message);\n }\n };\n return nodeMethod;\n };\n\n var createHmacOutputMethod = function (outputType, is224) {\n return function (key, message) {\n return new HmacSha256(key, is224, true).update(message)[outputType]();\n };\n };\n\n var createHmacMethod = function (is224) {\n var method = createHmacOutputMethod('hex', is224);\n method.create = function (key) {\n return new HmacSha256(key, is224);\n };\n method.update = function (key, message) {\n return method.create(key).update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createHmacOutputMethod(type, is224);\n }\n return method;\n };\n\n function Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else { // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n }\n\n Sha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code, index = 0, i, length = message.length, blocks = this.blocks;\n\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n };\n\n Sha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n blocks[14] = this.hBytes << 3 | this.bytes >>> 29;\n blocks[15] = this.bytes << 3;\n this.hash();\n };\n\n Sha256.prototype.hash = function () {\n var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6,\n h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = t1 - 150054599 << 0;\n d = t1 + 24177077 << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = t1 - 1521486534 << 0;\n d = t1 + 143694565 << 0;\n }\n this.first = false;\n } else {\n s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));\n s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = d + t1 << 0;\n d = t1 + t2 << 0;\n }\n s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10));\n s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (h & e) ^ (~h & f);\n t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = c + t1 << 0;\n c = t1 + t2 << 0;\n s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10));\n s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = b + t1 << 0;\n b = t1 + t2 << 0;\n s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10));\n s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = a + t1 << 0;\n a = t1 + t2 << 0;\n }\n\n this.h0 = this.h0 + a << 0;\n this.h1 = this.h1 + b << 0;\n this.h2 = this.h2 + c << 0;\n this.h3 = this.h3 + d << 0;\n this.h4 = this.h4 + e << 0;\n this.h5 = this.h5 + f << 0;\n this.h6 = this.h6 + g << 0;\n this.h7 = this.h7 + h << 0;\n };\n\n Sha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +\n HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +\n HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +\n HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +\n HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +\n HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +\n HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +\n HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +\n HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +\n HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +\n HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +\n HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +\n HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] +\n HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +\n HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +\n HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +\n HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] +\n HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] +\n HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] +\n HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] +\n HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] +\n HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] +\n HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] +\n HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] +\n HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] +\n HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] +\n HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] +\n HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F];\n if (!this.is224) {\n hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] +\n HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] +\n HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] +\n HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F];\n }\n return hex;\n };\n\n Sha256.prototype.toString = Sha256.prototype.hex;\n\n Sha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var arr = [\n (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF,\n (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF,\n (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF,\n (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF,\n (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF,\n (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF,\n (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF\n ];\n if (!this.is224) {\n arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF);\n }\n return arr;\n };\n\n Sha256.prototype.array = Sha256.prototype.digest;\n\n Sha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n };\n\n function HmacSha256(key, is224, sharedMemory) {\n var i, type = typeof key;\n if (type === 'string') {\n var bytes = [], length = key.length, index = 0, code;\n for (i = 0; i < length; ++i) {\n code = key.charCodeAt(i);\n if (code < 0x80) {\n bytes[index++] = code;\n } else if (code < 0x800) {\n bytes[index++] = (0xc0 | (code >> 6));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes[index++] = (0xe0 | (code >> 12));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));\n bytes[index++] = (0xf0 | (code >> 18));\n bytes[index++] = (0x80 | ((code >> 12) & 0x3f));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n }\n }\n key = bytes;\n } else {\n if (type === 'object') {\n if (key === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {\n key = new Uint8Array(key);\n } else if (!Array.isArray(key)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n }\n\n if (key.length > 64) {\n key = (new Sha256(is224, true)).update(key).array();\n }\n\n var oKeyPad = [], iKeyPad = [];\n for (i = 0; i < 64; ++i) {\n var b = key[i] || 0;\n oKeyPad[i] = 0x5c ^ b;\n iKeyPad[i] = 0x36 ^ b;\n }\n\n Sha256.call(this, is224, sharedMemory);\n\n this.update(iKeyPad);\n this.oKeyPad = oKeyPad;\n this.inner = true;\n this.sharedMemory = sharedMemory;\n }\n HmacSha256.prototype = new Sha256();\n\n HmacSha256.prototype.finalize = function () {\n Sha256.prototype.finalize.call(this);\n if (this.inner) {\n this.inner = false;\n var innerHash = this.array();\n Sha256.call(this, this.is224, this.sharedMemory);\n this.update(this.oKeyPad);\n this.update(innerHash);\n Sha256.prototype.finalize.call(this);\n }\n };\n\n var exports = createMethod();\n exports.sha256 = exports;\n exports.sha224 = createMethod(true);\n exports.sha256.hmac = createHmacMethod();\n exports.sha224.hmac = createHmacMethod(true);\n\n if (COMMON_JS) {\n module.exports = exports;\n } else {\n root.sha256 = exports.sha256;\n root.sha224 = exports.sha224;\n if (AMD) {\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n return exports;\n }).call(exports, __webpack_require__, exports, module),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n }\n }\n})();\n\n\n/***/ }),\n\n/***/ 1094:\n/***/ (function(module, exports, __webpack_require__) {\n\n/* provided dependency */ var process = __webpack_require__(4155);\nvar __WEBPACK_AMD_DEFINE_RESULT__;/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.9.3\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2023\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = __webpack_require__.g;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && \"object\" === 'object' && module.exports;\n var AMD = true && __webpack_require__.amdO;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n\n var isArray = root.JS_SHA3_NO_NODE_JS || !Array.isArray\n ? function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n }\n : Array.isArray;\n\n var isView = (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView))\n ? function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n }\n : ArrayBuffer.isView;\n\n // [message: string, isString: bool]\n var formatMessage = function (message) {\n var type = typeof message;\n if (type === 'string') {\n return [message, true];\n }\n if (type !== 'object' || message === null) {\n throw new Error(INPUT_ERROR);\n }\n if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n return [new Uint8Array(message), false];\n }\n if (!isArray(message) && !isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n return [message, false];\n }\n\n var empty = function (message) {\n return formatMessage(message)[0].length === 0;\n };\n\n var cloneArray = function (array) {\n var newArray = [];\n for (var i = 0; i < array.length; ++i) {\n newArray[i] = array[i];\n }\n return newArray;\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, outputBits);\n };\n method.update = function (message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits, padding);\n };\n\n var createCshakeMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createCshakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits, n, s) {\n if (empty(n) && empty(s)) {\n return methods['shake' + bits].create(outputBits);\n } else {\n return new Keccak(bits, padding, outputBits).bytepad([n, s], w);\n }\n };\n method.update = function (message, outputBits, n, s) {\n return method.create(outputBits, n, s).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits, padding);\n };\n\n var createKmacMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createKmacOutputMethod(bits, padding, 'hex');\n method.create = function (key, outputBits, s) {\n return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w);\n };\n method.update = function (key, message, outputBits, s) {\n return method.create(key, outputBits, s).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits, padding);\n };\n\n var algorithms = [\n { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod },\n { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod },\n { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n\n var methods = {}, methodNames = [];\n\n for (var i = 0; i < algorithms.length; ++i) {\n var algorithm = algorithms[i];\n var bits = algorithm.bits;\n for (var j = 0; j < bits.length; ++j) {\n var methodName = algorithm.name + '_' + bits[j];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);\n if (algorithm.name !== 'sha3') {\n var newMethodName = algorithm.name + bits[j];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n\n function Keccak(bits, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = (1600 - (bits << 1)) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n\n for (var i = 0; i < 50; ++i) {\n this.s[i] = 0;\n }\n }\n\n Keccak.prototype.update = function (message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var result = formatMessage(message);\n message = result[0];\n var isString = result[1];\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length,\n blockCount = this.blockCount, index = 0, s = this.s, i, code;\n\n while (index < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n if (isString) {\n for (i = this.start; index < length && i < byteCount; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n } else {\n for (i = this.start; index < length && i < byteCount; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n }\n this.lastByteIndex = i;\n if (i >= byteCount) {\n this.start = i - byteCount;\n this.block = blocks[blockCount];\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n this.reset = true;\n } else {\n this.start = i;\n }\n }\n return this;\n };\n\n Keccak.prototype.encode = function (x, right) {\n var o = x & 255, n = 1;\n var bytes = [o];\n x = x >> 8;\n o = x & 255;\n while (o > 0) {\n bytes.unshift(o);\n x = x >> 8;\n o = x & 255;\n ++n;\n }\n if (right) {\n bytes.push(n);\n } else {\n bytes.unshift(n);\n }\n this.update(bytes);\n return bytes.length;\n };\n\n Keccak.prototype.encodeString = function (str) {\n var result = formatMessage(str);\n str = result[0];\n var isString = result[1];\n var bytes = 0, length = str.length;\n if (isString) {\n for (var i = 0; i < str.length; ++i) {\n var code = str.charCodeAt(i);\n if (code < 0x80) {\n bytes += 1;\n } else if (code < 0x800) {\n bytes += 2;\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes += 3;\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));\n bytes += 4;\n }\n }\n } else {\n bytes = length;\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n\n Keccak.prototype.bytepad = function (strs, w) {\n var bytes = this.encode(w);\n for (var i = 0; i < strs.length; ++i) {\n bytes += this.encodeString(strs[i]);\n }\n var paddingBytes = (w - bytes % w) % w;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n\n Keccak.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;\n blocks[i >> 2] |= this.padding[i & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n blocks[blockCount - 1] |= 0x80000000;\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n };\n\n Keccak.prototype.toString = Keccak.prototype.hex = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var hex = '', block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +\n HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +\n HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +\n HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];\n }\n if (j % blockCount === 0) {\n s = cloneArray(s);\n f(s);\n i = 0;\n }\n }\n if (extraBytes) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];\n if (extraBytes > 1) {\n hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];\n }\n }\n return hex;\n };\n\n Keccak.prototype.arrayBuffer = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var bytes = this.outputBits >> 3;\n var buffer;\n if (extraBytes) {\n buffer = new ArrayBuffer((outputBlocks + 1) << 2);\n } else {\n buffer = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer);\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n array[j] = s[i];\n }\n if (j % blockCount === 0) {\n s = cloneArray(s);\n f(s);\n }\n }\n if (extraBytes) {\n array[j] = s[i];\n buffer = buffer.slice(0, bytes);\n }\n return buffer;\n };\n\n Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;\n\n Keccak.prototype.digest = Keccak.prototype.array = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var array = [], offset, block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n array[offset + 1] = (block >> 8) & 0xFF;\n array[offset + 2] = (block >> 16) & 0xFF;\n array[offset + 3] = (block >> 24) & 0xFF;\n }\n if (j % blockCount === 0) {\n s = cloneArray(s);\n f(s);\n }\n }\n if (extraBytes) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n if (extraBytes > 1) {\n array[offset + 1] = (block >> 8) & 0xFF;\n }\n if (extraBytes > 2) {\n array[offset + 2] = (block >> 16) & 0xFF;\n }\n }\n return array;\n };\n\n function Kmac(bits, padding, outputBits) {\n Keccak.call(this, bits, padding, outputBits);\n }\n\n Kmac.prototype = new Keccak();\n\n Kmac.prototype.finalize = function () {\n this.encode(this.outputBits, true);\n return Keccak.prototype.finalize.call(this);\n };\n\n var f = function (s) {\n var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,\n b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,\n b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,\n b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n = 0; n < 48; n += 2) {\n c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];\n c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];\n c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];\n c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];\n c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];\n c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];\n c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];\n c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];\n c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];\n c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];\n\n h = c8 ^ ((c2 << 1) | (c3 >>> 31));\n l = c9 ^ ((c3 << 1) | (c2 >>> 31));\n s[0] ^= h;\n s[1] ^= l;\n s[10] ^= h;\n s[11] ^= l;\n s[20] ^= h;\n s[21] ^= l;\n s[30] ^= h;\n s[31] ^= l;\n s[40] ^= h;\n s[41] ^= l;\n h = c0 ^ ((c4 << 1) | (c5 >>> 31));\n l = c1 ^ ((c5 << 1) | (c4 >>> 31));\n s[2] ^= h;\n s[3] ^= l;\n s[12] ^= h;\n s[13] ^= l;\n s[22] ^= h;\n s[23] ^= l;\n s[32] ^= h;\n s[33] ^= l;\n s[42] ^= h;\n s[43] ^= l;\n h = c2 ^ ((c6 << 1) | (c7 >>> 31));\n l = c3 ^ ((c7 << 1) | (c6 >>> 31));\n s[4] ^= h;\n s[5] ^= l;\n s[14] ^= h;\n s[15] ^= l;\n s[24] ^= h;\n s[25] ^= l;\n s[34] ^= h;\n s[35] ^= l;\n s[44] ^= h;\n s[45] ^= l;\n h = c4 ^ ((c8 << 1) | (c9 >>> 31));\n l = c5 ^ ((c9 << 1) | (c8 >>> 31));\n s[6] ^= h;\n s[7] ^= l;\n s[16] ^= h;\n s[17] ^= l;\n s[26] ^= h;\n s[27] ^= l;\n s[36] ^= h;\n s[37] ^= l;\n s[46] ^= h;\n s[47] ^= l;\n h = c6 ^ ((c0 << 1) | (c1 >>> 31));\n l = c7 ^ ((c1 << 1) | (c0 >>> 31));\n s[8] ^= h;\n s[9] ^= l;\n s[18] ^= h;\n s[19] ^= l;\n s[28] ^= h;\n s[29] ^= l;\n s[38] ^= h;\n s[39] ^= l;\n s[48] ^= h;\n s[49] ^= l;\n\n b0 = s[0];\n b1 = s[1];\n b32 = (s[11] << 4) | (s[10] >>> 28);\n b33 = (s[10] << 4) | (s[11] >>> 28);\n b14 = (s[20] << 3) | (s[21] >>> 29);\n b15 = (s[21] << 3) | (s[20] >>> 29);\n b46 = (s[31] << 9) | (s[30] >>> 23);\n b47 = (s[30] << 9) | (s[31] >>> 23);\n b28 = (s[40] << 18) | (s[41] >>> 14);\n b29 = (s[41] << 18) | (s[40] >>> 14);\n b20 = (s[2] << 1) | (s[3] >>> 31);\n b21 = (s[3] << 1) | (s[2] >>> 31);\n b2 = (s[13] << 12) | (s[12] >>> 20);\n b3 = (s[12] << 12) | (s[13] >>> 20);\n b34 = (s[22] << 10) | (s[23] >>> 22);\n b35 = (s[23] << 10) | (s[22] >>> 22);\n b16 = (s[33] << 13) | (s[32] >>> 19);\n b17 = (s[32] << 13) | (s[33] >>> 19);\n b48 = (s[42] << 2) | (s[43] >>> 30);\n b49 = (s[43] << 2) | (s[42] >>> 30);\n b40 = (s[5] << 30) | (s[4] >>> 2);\n b41 = (s[4] << 30) | (s[5] >>> 2);\n b22 = (s[14] << 6) | (s[15] >>> 26);\n b23 = (s[15] << 6) | (s[14] >>> 26);\n b4 = (s[25] << 11) | (s[24] >>> 21);\n b5 = (s[24] << 11) | (s[25] >>> 21);\n b36 = (s[34] << 15) | (s[35] >>> 17);\n b37 = (s[35] << 15) | (s[34] >>> 17);\n b18 = (s[45] << 29) | (s[44] >>> 3);\n b19 = (s[44] << 29) | (s[45] >>> 3);\n b10 = (s[6] << 28) | (s[7] >>> 4);\n b11 = (s[7] << 28) | (s[6] >>> 4);\n b42 = (s[17] << 23) | (s[16] >>> 9);\n b43 = (s[16] << 23) | (s[17] >>> 9);\n b24 = (s[26] << 25) | (s[27] >>> 7);\n b25 = (s[27] << 25) | (s[26] >>> 7);\n b6 = (s[36] << 21) | (s[37] >>> 11);\n b7 = (s[37] << 21) | (s[36] >>> 11);\n b38 = (s[47] << 24) | (s[46] >>> 8);\n b39 = (s[46] << 24) | (s[47] >>> 8);\n b30 = (s[8] << 27) | (s[9] >>> 5);\n b31 = (s[9] << 27) | (s[8] >>> 5);\n b12 = (s[18] << 20) | (s[19] >>> 12);\n b13 = (s[19] << 20) | (s[18] >>> 12);\n b44 = (s[29] << 7) | (s[28] >>> 25);\n b45 = (s[28] << 7) | (s[29] >>> 25);\n b26 = (s[38] << 8) | (s[39] >>> 24);\n b27 = (s[39] << 8) | (s[38] >>> 24);\n b8 = (s[48] << 14) | (s[49] >>> 18);\n b9 = (s[49] << 14) | (s[48] >>> 18);\n\n s[0] = b0 ^ (~b2 & b4);\n s[1] = b1 ^ (~b3 & b5);\n s[10] = b10 ^ (~b12 & b14);\n s[11] = b11 ^ (~b13 & b15);\n s[20] = b20 ^ (~b22 & b24);\n s[21] = b21 ^ (~b23 & b25);\n s[30] = b30 ^ (~b32 & b34);\n s[31] = b31 ^ (~b33 & b35);\n s[40] = b40 ^ (~b42 & b44);\n s[41] = b41 ^ (~b43 & b45);\n s[2] = b2 ^ (~b4 & b6);\n s[3] = b3 ^ (~b5 & b7);\n s[12] = b12 ^ (~b14 & b16);\n s[13] = b13 ^ (~b15 & b17);\n s[22] = b22 ^ (~b24 & b26);\n s[23] = b23 ^ (~b25 & b27);\n s[32] = b32 ^ (~b34 & b36);\n s[33] = b33 ^ (~b35 & b37);\n s[42] = b42 ^ (~b44 & b46);\n s[43] = b43 ^ (~b45 & b47);\n s[4] = b4 ^ (~b6 & b8);\n s[5] = b5 ^ (~b7 & b9);\n s[14] = b14 ^ (~b16 & b18);\n s[15] = b15 ^ (~b17 & b19);\n s[24] = b24 ^ (~b26 & b28);\n s[25] = b25 ^ (~b27 & b29);\n s[34] = b34 ^ (~b36 & b38);\n s[35] = b35 ^ (~b37 & b39);\n s[44] = b44 ^ (~b46 & b48);\n s[45] = b45 ^ (~b47 & b49);\n s[6] = b6 ^ (~b8 & b0);\n s[7] = b7 ^ (~b9 & b1);\n s[16] = b16 ^ (~b18 & b10);\n s[17] = b17 ^ (~b19 & b11);\n s[26] = b26 ^ (~b28 & b20);\n s[27] = b27 ^ (~b29 & b21);\n s[36] = b36 ^ (~b38 & b30);\n s[37] = b37 ^ (~b39 & b31);\n s[46] = b46 ^ (~b48 & b40);\n s[47] = b47 ^ (~b49 & b41);\n s[8] = b8 ^ (~b0 & b2);\n s[9] = b9 ^ (~b1 & b3);\n s[18] = b18 ^ (~b10 & b12);\n s[19] = b19 ^ (~b11 & b13);\n s[28] = b28 ^ (~b20 & b22);\n s[29] = b29 ^ (~b21 & b23);\n s[38] = b38 ^ (~b30 & b32);\n s[39] = b39 ^ (~b31 & b33);\n s[48] = b48 ^ (~b40 & b42);\n s[49] = b49 ^ (~b41 & b43);\n\n s[0] ^= RC[n];\n s[1] ^= RC[n + 1];\n }\n };\n\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i = 0; i < methodNames.length; ++i) {\n root[methodNames[i]] = methods[methodNames[i]];\n }\n if (AMD) {\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n return methods;\n }).call(exports, __webpack_require__, exports, module),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n }\n }\n})();\n\n\n/***/ }),\n\n/***/ 9499:\n/***/ (function(module) {\n\n(function(i,_){ true?module.exports=_():0})(this,function(){'use strict';var i=Math.imul,_=Math.clz32,t=Math.abs,e=Math.max,g=Math.floor;class o extends Array{constructor(i,_){if(super(i),this.sign=_,i>o.__kMaxLength)throw new RangeError(\"Maximum BigInt size exceeded\")}static BigInt(i){var _=Number.isFinite;if(\"number\"==typeof i){if(0===i)return o.__zero();if(o.__isOneDigitInt(i))return 0>i?o.__oneDigit(-i,!0):o.__oneDigit(i,!1);if(!_(i)||g(i)!==i)throw new RangeError(\"The number \"+i+\" cannot be converted to BigInt because it is not an integer\");return o.__fromDouble(i)}if(\"string\"==typeof i){const _=o.__fromString(i);if(null===_)throw new SyntaxError(\"Cannot convert \"+i+\" to a BigInt\");return _}if(\"boolean\"==typeof i)return!0===i?o.__oneDigit(1,!1):o.__zero();if(\"object\"==typeof i){if(i.constructor===o)return i;const _=o.__toPrimitive(i);return o.BigInt(_)}throw new TypeError(\"Cannot convert \"+i+\" to a BigInt\")}toDebugString(){const i=[\"BigInt[\"];for(const _ of this)i.push((_?(_>>>0).toString(16):_)+\", \");return i.push(\"]\"),i.join(\"\")}toString(i=10){if(2>i||36>>=12;const u=r-12;let d=12<=r?0:s<<20+r,h=20+r;for(0>>30-u,d=s<>>30-h,h-=30;const m=o.__decideRounding(i,h,l,s);if((1===m||0===m&&1==(1&d))&&(d=d+1>>>0,0===d&&(a++,0!=a>>>20&&(a=0,g++,1023=o.__kMaxLengthBits)throw new RangeError(\"BigInt too big\");if(1===i.length&&2===i.__digit(0)){const _=1+(0|t/30),e=i.sign&&0!=(1&t),n=new o(_,e);n.__initializeDigits();const g=1<>=1;0!==t;t>>=1)n=o.multiply(n,n),0!=(1&t)&&(null===e?e=n:e=o.multiply(e,n));return e}static multiply(_,t){if(0===_.length)return _;if(0===t.length)return t;let i=_.length+t.length;30<=_.__clzmsd()+t.__clzmsd()&&i--;const e=new o(i,_.sign!==t.sign);e.__initializeDigits();for(let n=0;n<_.length;n++)o.__multiplyAccumulate(t,_.__digit(n),e,n);return e.__trim()}static divide(i,_){if(0===_.length)throw new RangeError(\"Division by zero\");if(0>o.__absoluteCompare(i,_))return o.__zero();const t=i.sign!==_.sign,e=_.__unsignedDigit(0);let n;if(1===_.length&&32767>=e){if(1===e)return t===i.sign?i:o.unaryMinus(i);n=o.__absoluteDivSmall(i,e,null)}else n=o.__absoluteDivLarge(i,_,!0,!1);return n.sign=t,n.__trim()}static remainder(i,_){if(0===_.length)throw new RangeError(\"Division by zero\");if(0>o.__absoluteCompare(i,_))return i;const t=_.__unsignedDigit(0);if(1===_.length&&32767>=t){if(1===t)return o.__zero();const _=o.__absoluteModSmall(i,t);return 0===_?o.__zero():o.__oneDigit(_,i.sign)}const e=o.__absoluteDivLarge(i,_,!1,!0);return e.sign=i.sign,e.__trim()}static add(i,_){const t=i.sign;return t===_.sign?o.__absoluteAdd(i,_,t):0<=o.__absoluteCompare(i,_)?o.__absoluteSub(i,_,t):o.__absoluteSub(_,i,!t)}static subtract(i,_){const t=i.sign;return t===_.sign?0<=o.__absoluteCompare(i,_)?o.__absoluteSub(i,_,t):o.__absoluteSub(_,i,!t):o.__absoluteAdd(i,_,t)}static leftShift(i,_){return 0===_.length||0===i.length?i:_.sign?o.__rightShiftByAbsolute(i,_):o.__leftShiftByAbsolute(i,_)}static signedRightShift(i,_){return 0===_.length||0===i.length?i:_.sign?o.__leftShiftByAbsolute(i,_):o.__rightShiftByAbsolute(i,_)}static unsignedRightShift(){throw new TypeError(\"BigInts have no unsigned right shift; use >> instead\")}static lessThan(i,_){return 0>o.__compareToBigInt(i,_)}static lessThanOrEqual(i,_){return 0>=o.__compareToBigInt(i,_)}static greaterThan(i,_){return 0_)throw new RangeError(\"Invalid value: not (convertible to) a safe integer\");if(0===_)return o.__zero();if(_>=o.__kMaxLengthBits)return t;const e=0|(_+29)/30;if(t.lengthi)throw new RangeError(\"Invalid value: not (convertible to) a safe integer\");if(0===i)return o.__zero();if(_.sign){if(i>o.__kMaxLengthBits)throw new RangeError(\"BigInt too big\");return o.__truncateAndSubFromPowerOfTwo(i,_,!1)}if(i>=o.__kMaxLengthBits)return _;const t=0|(i+29)/30;if(_.length>>e)return _}return o.__truncateToNBits(i,_)}static ADD(i,_){if(i=o.__toPrimitive(i),_=o.__toPrimitive(_),\"string\"==typeof i)return\"string\"!=typeof _&&(_=_.toString()),i+_;if(\"string\"==typeof _)return i.toString()+_;if(i=o.__toNumeric(i),_=o.__toNumeric(_),o.__isBigInt(i)&&o.__isBigInt(_))return o.add(i,_);if(\"number\"==typeof i&&\"number\"==typeof _)return i+_;throw new TypeError(\"Cannot mix BigInt and other types, use explicit conversions\")}static LT(i,_){return o.__compare(i,_,0)}static LE(i,_){return o.__compare(i,_,1)}static GT(i,_){return o.__compare(i,_,2)}static GE(i,_){return o.__compare(i,_,3)}static EQ(i,_){for(;;){if(o.__isBigInt(i))return o.__isBigInt(_)?o.equal(i,_):o.EQ(_,i);if(\"number\"==typeof i){if(o.__isBigInt(_))return o.__equalToNumber(_,i);if(\"object\"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if(\"string\"==typeof i){if(o.__isBigInt(_))return i=o.__fromString(i),null!==i&&o.equal(i,_);if(\"object\"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if(\"boolean\"==typeof i){if(o.__isBigInt(_))return o.__equalToNumber(_,+i);if(\"object\"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if(\"symbol\"==typeof i){if(o.__isBigInt(_))return!1;if(\"object\"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if(\"object\"==typeof i){if(\"object\"==typeof _&&_.constructor!==o)return i==_;i=o.__toPrimitive(i)}else return i==_}}static NE(i,_){return!o.EQ(i,_)}static __zero(){return new o(0,!1)}static __oneDigit(i,_){const t=new o(1,_);return t.__setDigit(0,i),t}__copy(){const _=new o(this.length,this.sign);for(let t=0;t_)n=-_-1;else{if(0===t)return-1;t--,e=i.__digit(t),n=29}let g=1<>>20,t=_-1023,e=(0|t/30)+1,n=new o(e,0>i);let g=1048575&o.__kBitConversionInts[1]|1048576,s=o.__kBitConversionInts[0];const l=20,r=t%30;let a,u=0;if(20>r){const i=l-r;u=i+32,a=g>>>i,g=g<<32-i|s>>>i,s<<=32-i}else if(20===r)u=32,a=g,g=s,s=0;else{const i=r-l;u=32-i,a=g<>>32-i,g=s<>>2,g=g<<30|s>>>2,s<<=30):a=0,n.__setDigit(_,a);return n.__trim()}static __isWhitespace(i){return!!(13>=i&&9<=i)||(159>=i?32==i:131071>=i?160==i||5760==i:196607>=i?(i&=131071,10>=i||40==i||41==i||47==i||95==i||4096==i):65279==i)}static __fromString(i,_=0){let t=0;const e=i.length;let n=0;if(n===e)return o.__zero();let g=i.charCodeAt(n);for(;o.__isWhitespace(g);){if(++n===e)return o.__zero();g=i.charCodeAt(n)}if(43===g){if(++n===e)return null;g=i.charCodeAt(n),t=1}else if(45===g){if(++n===e)return null;g=i.charCodeAt(n),t=-1}if(0===_){if(_=10,48===g){if(++n===e)return o.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(_=16,++n===e)return null;g=i.charCodeAt(n)}else if(79===g||111===g){if(_=8,++n===e)return null;g=i.charCodeAt(n)}else if(66===g||98===g){if(_=2,++n===e)return null;g=i.charCodeAt(n)}}}else if(16===_&&48===g){if(++n===e)return o.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(++n===e)return null;g=i.charCodeAt(n)}}if(0!=t&&10!==_)return null;for(;48===g;){if(++n===e)return o.__zero();g=i.charCodeAt(n)}const s=e-n;let l=o.__kMaxBitsPerChar[_],r=o.__kBitsPerCharTableMultiplier-1;if(s>1073741824/l)return null;const a=l*s+r>>>o.__kBitsPerCharTableShift,u=new o(0|(a+29)/30,!1),h=10>_?_:10,b=10<_?_-10:0;if(0==(_&_-1)){l>>=o.__kBitsPerCharTableShift;const _=[],t=[];let s=!1;do{let o=0,r=0;for(;;){let _;if(g-48>>>0>>0>>0>>0>>o.__kBitsPerCharTableShift)/30;u.__inplaceMultiplyAdd(D,a,c)}while(!t)}if(n!==e){if(!o.__isWhitespace(g))return null;for(n++;n>>l-o)}if(0!==g){if(n>=_.length)throw new Error(\"implementation bug\");_.__setDigit(n++,g)}for(;n<_.length;n++)_.__setDigit(n,0)}static __toStringBasePowerOfTwo(_,i){const t=_.length;let e=i-1;e=(85&e>>>1)+(85&e),e=(51&e>>>2)+(51&e),e=(15&e>>>4)+(15&e);const n=e,g=i-1,s=_.__digit(t-1),l=o.__clz30(s);let r=0|(30*t-l+n-1)/n;if(_.sign&&r++,268435456>>s,h=30-s;h>=n;)a[u--]=o.__kConversionChars[d&g],d>>>=n,h-=n}const m=(d|s<>>n-h;0!==d;)a[u--]=o.__kConversionChars[d&g],d>>>=n;if(_.sign&&(a[u--]=\"-\"),-1!=u)throw new Error(\"implementation bug\");return a.join(\"\")}static __toStringGeneric(_,i,t){const e=_.length;if(0===e)return\"\";if(1===e){let e=_.__unsignedDigit(0).toString(i);return!1===t&&_.sign&&(e=\"-\"+e),e}const n=30*e-o.__clz30(_.__digit(e-1)),g=o.__kMaxBitsPerChar[i],s=g-1;let l=n*o.__kBitsPerCharTableMultiplier;l+=s-1,l=0|l/s;const r=l+1>>1,a=o.exponentiate(o.__oneDigit(i,!1),o.__oneDigit(r,!1));let u,d;const h=a.__unsignedDigit(0);if(1===a.length&&32767>=h){u=new o(_.length,!1),u.__initializeDigits();let t=0;for(let e=2*_.length-1;0<=e;e--){const i=t<<15|_.__halfDigit(e);u.__setHalfDigit(e,0|i/h),t=0|i%h}d=t.toString(i)}else{const t=o.__absoluteDivLarge(_,a,!0,!0);u=t.quotient;const e=t.remainder.__trim();d=o.__toStringGeneric(e,i,!0)}u.__trim();let m=o.__toStringGeneric(u,i,!0);for(;d.lengthe?o.__absoluteLess(t):0}static __compareToNumber(i,_){if(o.__isOneDigitInt(_)){const e=i.sign,n=0>_;if(e!==n)return o.__unequalSign(e);if(0===i.length){if(n)throw new Error(\"implementation bug\");return 0===_?0:-1}if(1g?o.__absoluteGreater(e):s_)return o.__unequalSign(t);if(0===_)throw new Error(\"implementation bug: should be handled elsewhere\");if(0===i.length)return-1;o.__kBitConversionDouble[0]=_;const e=2047&o.__kBitConversionInts[1]>>>20;if(2047==e)throw new Error(\"implementation bug: handled elsewhere\");const n=e-1023;if(0>n)return o.__absoluteGreater(t);const g=i.length;let s=i.__digit(g-1);const l=o.__clz30(s),r=30*g-l,a=n+1;if(ra)return o.__absoluteGreater(t);let u=1048576|1048575&o.__kBitConversionInts[1],d=o.__kBitConversionInts[0];const h=20,m=29-l;if(m!==(0|(r-1)%30))throw new Error(\"implementation bug\");let b,D=0;if(20>m){const i=h-m;D=i+32,b=u>>>i,u=u<<32-i|d>>>i,d<<=32-i}else if(20===m)D=32,b=u,u=d,d=0;else{const i=m-h;D=32-i,b=u<>>32-i,u=d<>>=0,b>>>=0,s>b)return o.__absoluteGreater(t);if(s>>2,u=u<<30|d>>>2,d<<=30):b=0;const _=i.__unsignedDigit(e);if(_>b)return o.__absoluteGreater(t);if(__&&i.__unsignedDigit(0)===t(_):0===o.__compareToDouble(i,_)}static __comparisonResultToBool(i,_){return 0===_?0>i:1===_?0>=i:2===_?0_;case 3:return i>=_;}if(o.__isBigInt(i)&&\"string\"==typeof _)return _=o.__fromString(_),null!==_&&o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if(\"string\"==typeof i&&o.__isBigInt(_))return i=o.__fromString(i),null!==i&&o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if(i=o.__toNumeric(i),_=o.__toNumeric(_),o.__isBigInt(i)){if(o.__isBigInt(_))return o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if(\"number\"!=typeof _)throw new Error(\"implementation bug\");return o.__comparisonResultToBool(o.__compareToNumber(i,_),t)}if(\"number\"!=typeof i)throw new Error(\"implementation bug\");if(o.__isBigInt(_))return o.__comparisonResultToBool(o.__compareToNumber(_,i),2^t);if(\"number\"!=typeof _)throw new Error(\"implementation bug\");return 0===t?i<_:1===t?i<=_:2===t?i>_:3===t?i>=_:void 0}__clzmsd(){return o.__clz30(this.__digit(this.length-1))}static __absoluteAdd(_,t,e){if(_.length>>30,g.__setDigit(l,1073741823&i)}for(;l<_.length;l++){const i=_.__digit(l)+s;s=i>>>30,g.__setDigit(l,1073741823&i)}return l>>30,n.__setDigit(s,1073741823&i)}for(;s<_.length;s++){const i=_.__digit(s)-g;g=1&i>>>30,n.__setDigit(s,1073741823&i)}return n.__trim()}static __absoluteAddOne(_,i,t=null){const e=_.length;null===t?t=new o(e,i):t.sign=i;let n=1;for(let g=0;g>>30,t.__setDigit(g,1073741823&i)}return 0!=n&&t.__setDigitGrow(e,1),t}static __absoluteSubOne(_,t){const e=_.length;t=t||e;const n=new o(t,!1);let g=1;for(let o=0;o>>30,n.__setDigit(o,1073741823&i)}if(0!=g)throw new Error(\"implementation bug\");for(let g=e;gn?0:_.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(_,t,e,n){if(0===t)return;const g=32767&t,s=t>>>15;let l=0,r=0;for(let a,u=0;u<_.length;u++,n++){a=e.__digit(n);const i=_.__digit(u),t=32767&i,d=i>>>15,h=o.__imul(t,g),m=o.__imul(t,s),b=o.__imul(d,g),D=o.__imul(d,s);a+=r+h+l,l=a>>>30,a&=1073741823,a+=((32767&m)<<15)+((32767&b)<<15),l+=a>>>30,r=D+(m>>>15)+(b>>>15),e.__setDigit(n,1073741823&a)}for(;0!=l||0!==r;n++){let i=e.__digit(n);i+=l+r,r=0,l=i>>>30,e.__setDigit(n,1073741823&i)}}static __internalMultiplyAdd(_,t,e,g,s){let l=e,a=0;for(let n=0;n>>15,t),u=e+((32767&g)<<15)+a+l;l=u>>>30,a=g>>>15,s.__setDigit(n,1073741823&u)}if(s.length>g)for(s.__setDigit(g++,l+a);gthis.length&&(t=this.length);const e=32767&i,n=i>>>15;let g=0,s=_;for(let l=0;l>>15,r=o.__imul(_,e),a=o.__imul(_,n),u=o.__imul(t,e),d=o.__imul(t,n);let h=s+r+g;g=h>>>30,h&=1073741823,h+=((32767&a)<<15)+((32767&u)<<15),g+=h>>>30,s=d+(a>>>15)+(u>>>15),this.__setDigit(l,1073741823&h)}if(0!=g||0!==s)throw new Error(\"implementation bug\")}static __absoluteDivSmall(_,t,e=null){null===e&&(e=new o(_.length,!1));let n=0;for(let g,o=2*_.length-1;0<=o;o-=2){g=(n<<15|_.__halfDigit(o))>>>0;const i=0|g/t;n=0|g%t,g=(n<<15|_.__halfDigit(o-1))>>>0;const s=0|g/t;n=0|g%t,e.__setDigit(o>>>1,i<<15|s)}return e}static __absoluteModSmall(_,t){let e=0;for(let n=2*_.length-1;0<=n;n--){const i=(e<<15|_.__halfDigit(n))>>>0;e=0|i%t}return e}static __absoluteDivLarge(i,_,t,e){const g=_.__halfDigitLength(),n=_.length,s=i.__halfDigitLength()-g;let l=null;t&&(l=new o(s+2>>>1,!1),l.__initializeDigits());const r=new o(g+2>>>1,!1);r.__initializeDigits();const a=o.__clz15(_.__halfDigit(g-1));0>>0;a=0|t/u;let e=0|t%u;const n=_.__halfDigit(g-2),s=d.__halfDigit(m+g-2);for(;o.__imul(a,n)>>>0>(e<<16|s)>>>0&&(a--,e+=u,!(32767>>1,h|a))}if(e)return d.__inplaceRightShift(a),t?{quotient:l,remainder:d}:d;if(t)return l;throw new Error(\"unreachable\")}static __clz15(i){return o.__clz30(i)-15}__inplaceAdd(_,t,e){let n=0;for(let g=0;g>>15,this.__setHalfDigit(t+g,32767&i)}return n}__inplaceSub(_,t,e){let n=0;if(1&t){t>>=1;let g=this.__digit(t),o=32767&g,s=0;for(;s>>1;s++){const i=_.__digit(s),e=(g>>>15)-(32767&i)-n;n=1&e>>>15,this.__setDigit(t+s,(32767&e)<<15|32767&o),g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15}const i=_.__digit(s),l=(g>>>15)-(32767&i)-n;n=1&l>>>15,this.__setDigit(t+s,(32767&l)<<15|32767&o);if(t+s+1>=this.length)throw new RangeError(\"out of bounds\");0==(1&e)&&(g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15,this.__setDigit(t+_.length,1073709056&g|32767&o))}else{t>>=1;let g=0;for(;g<_.length-1;g++){const i=this.__digit(t+g),e=_.__digit(g),o=(32767&i)-(32767&e)-n;n=1&o>>>15;const s=(i>>>15)-(e>>>15)-n;n=1&s>>>15,this.__setDigit(t+g,(32767&s)<<15|32767&o)}const i=this.__digit(t+g),o=_.__digit(g),s=(32767&i)-(32767&o)-n;n=1&s>>>15;let l=0;0==(1&e)&&(l=(i>>>15)-(o>>>15)-n,n=1&l>>>15),this.__setDigit(t+g,(32767&l)<<15|32767&s)}return n}__inplaceRightShift(_){if(0===_)return;let t=this.__digit(0)>>>_;const e=this.length-1;for(let n=0;n>>_}this.__setDigit(e,t)}static __specialLeftShift(_,t,e){const g=_.length,n=new o(g+e,!1);if(0===t){for(let t=0;t>>30-t}return 0t)throw new RangeError(\"BigInt too big\");const e=0|t/30,n=t%30,g=_.length,s=0!==n&&0!=_.__digit(g-1)>>>30-n,l=g+e+(s?1:0),r=new o(l,_.sign);if(0===n){let t=0;for(;t>>30-n}if(s)r.__setDigit(g+e,t);else if(0!==t)throw new Error(\"implementation bug\")}return r.__trim()}static __rightShiftByAbsolute(_,i){const t=_.length,e=_.sign,n=o.__toShiftAmount(i);if(0>n)return o.__rightShiftByMaximum(e);const g=0|n/30,s=n%30;let l=t-g;if(0>=l)return o.__rightShiftByMaximum(e);let r=!1;if(e){if(0!=(_.__digit(g)&(1<>>s;const n=t-g-1;for(let t=0;t>>s}a.__setDigit(n,e)}return r&&(a=o.__absoluteAddOne(a,!0,a)),a.__trim()}static __rightShiftByMaximum(i){return i?o.__oneDigit(1,!0):o.__zero()}static __toShiftAmount(i){if(1o.__kMaxLengthBits?-1:_}static __toPrimitive(i,_=\"default\"){if(\"object\"!=typeof i)return i;if(i.constructor===o)return i;if(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol.toPrimitive){const t=i[Symbol.toPrimitive];if(t){const i=t(_);if(\"object\"!=typeof i)return i;throw new TypeError(\"Cannot convert object to primitive value\")}}const t=i.valueOf;if(t){const _=t.call(i);if(\"object\"!=typeof _)return _}const e=i.toString;if(e){const _=e.call(i);if(\"object\"!=typeof _)return _}throw new TypeError(\"Cannot convert object to primitive value\")}static __toNumeric(i){return o.__isBigInt(i)?i:+i}static __isBigInt(i){return\"object\"==typeof i&&null!==i&&i.constructor===o}static __truncateToNBits(i,_){const t=0|(i+29)/30,e=new o(t,_.sign),n=t-1;for(let t=0;t>>_}return e.__setDigit(n,g),e.__trim()}static __truncateAndSubFromPowerOfTwo(_,t,e){var n=Math.min;const g=0|(_+29)/30,s=new o(g,e);let l=0;const r=g-1;let a=0;for(const i=n(r,t.length);l>>30,s.__setDigit(l,1073741823&i)}for(;l>>i;const _=1<<32-i;h=_-u-a,h&=_-1}return s.__setDigit(r,h),s.__trim()}__digit(_){return this[_]}__unsignedDigit(_){return this[_]>>>0}__setDigit(_,i){this[_]=0|i}__setDigitGrow(_,i){this[_]=0|i}__halfDigitLength(){const i=this.length;return 32767>=this.__unsignedDigit(i-1)?2*i-1:2*i}__halfDigit(_){return 32767&this[_>>>1]>>>15*(1&_)}__setHalfDigit(_,i){const t=_>>>1,e=this.__digit(t),n=1&_?32767&e|i<<15:1073709056&e|32767&i;this.__setDigit(t,n)}static __digitPow(i,_){let t=1;for(;0<_;)1&_&&(t*=i),_>>>=1,i*=i;return t}static __isOneDigitInt(i){return(1073741823&i)===i}}return o.__kMaxLength=33554432,o.__kMaxLengthBits=o.__kMaxLength<<5,o.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],o.__kBitsPerCharTableShift=5,o.__kBitsPerCharTableMultiplier=1<>>0)/_)},o.__imul=i||function(i,_){return 0|i*_},o});\n//# sourceMappingURL=jsbi-umd.js.map\n\n\n/***/ }),\n\n/***/ 1296:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n\n\n/***/ }),\n\n/***/ 8399:\n/***/ (function(module) {\n\n\"use strict\";\n\nmodule.exports = function() {\n return Object.assign;\n};\n\n//# sourceMappingURL=polyfill.js.map\n\n/***/ }),\n\n/***/ 6840:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/_app\",\n function () {\n return __webpack_require__(9214);\n }\n ]);\n if(false) {}\n \n\n/***/ }),\n\n/***/ 9214:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ MyApp; }\n});\n\n// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js\nvar jsx_runtime = __webpack_require__(5893);\n// EXTERNAL MODULE: ./node_modules/@fontsource-variable/inter/index.css\nvar inter = __webpack_require__(511);\n// EXTERNAL MODULE: ./node_modules/@fontsource/rubik-mono-one/index.css\nvar rubik_mono_one = __webpack_require__(6106);\n// EXTERNAL MODULE: ./src/styles/global.scss\nvar global = __webpack_require__(393);\n// EXTERNAL MODULE: ./node_modules/react/index.js\nvar react = __webpack_require__(7294);\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/is-browser.mjs\nconst isBrowser = typeof document !== \"undefined\";\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs\n\n\n\nconst useIsomorphicLayoutEffect = isBrowser ? react.useLayoutEffect : react.useEffect;\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs\n\n\n\nfunction useIsMounted() {\n const isMounted = (0,react.useRef)(false);\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/noop.mjs\nconst noop_noop = (any) => any;\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/GlobalConfig.mjs\nconst MotionGlobalConfig = {\n skipAnimations: false,\n useManualTiming: false,\n};\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/frameloop/render-step.mjs\nclass Queue {\n constructor() {\n this.order = [];\n this.scheduled = new Set();\n }\n add(process) {\n if (!this.scheduled.has(process)) {\n this.scheduled.add(process);\n this.order.push(process);\n return true;\n }\n }\n remove(process) {\n const index = this.order.indexOf(process);\n if (index !== -1) {\n this.order.splice(index, 1);\n this.scheduled.delete(process);\n }\n }\n clear() {\n this.order.length = 0;\n this.scheduled.clear();\n }\n}\nfunction createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Queue();\n let nextFrame = new Queue();\n let numToRun = 0;\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (queue.add(callback) && addToCurrentFrame && isProcessing) {\n // If we're adding it to the currently running queue, update its measured size\n numToRun = thisFrame.order.length;\n }\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.remove(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [thisFrame, nextFrame] = [nextFrame, thisFrame];\n // Clear the next frame queue\n nextFrame.clear();\n // Execute this frame\n numToRun = thisFrame.order.length;\n if (numToRun) {\n for (let i = 0; i < numToRun; i++) {\n const callback = thisFrame.order[i];\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(frameData);\n }\n }\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/frameloop/batcher.mjs\n\n\n\nconst stepsOrder = [\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0,\n timestamp: 0,\n isProcessing: false,\n };\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(() => (runNextFrame = true));\n return acc;\n }, {});\n const processStep = (stepId) => {\n steps[stepId].process(state);\n };\n const processBatch = () => {\n const timestamp = MotionGlobalConfig.useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n state.timestamp = timestamp;\n state.isProcessing = true;\n stepsOrder.forEach(processStep);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => stepsOrder.forEach((key) => steps[key].cancel(process));\n return { schedule, cancel, state, steps };\n}\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/frameloop/frame.mjs\n\n\n\nconst { schedule: frame_frame, cancel: cancelFrame, state: frameData, steps, } = createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop_noop, true);\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-force-update.mjs\n\n\n\n\nfunction useForceUpdate() {\n const isMounted = useIsMounted();\n const [forcedRenderCount, setForcedRenderCount] = (0,react.useState)(0);\n const forceRender = (0,react.useCallback)(() => {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n const deferredForceRender = (0,react.useCallback)(() => frame_frame.postRender(forceRender), [forceRender]);\n return [deferredForceRender, forcedRenderCount];\n}\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/PresenceContext.mjs\n\n\n/**\n * @public\n */\nconst PresenceContext = (0,react.createContext)(null);\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-constant.mjs\n\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nfunction useConstant(init) {\n const ref = (0,react.useRef)(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs\n\n\n/**\n * @public\n */\nconst MotionConfigContext = (0,react.createContext)({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs\n\n\n\n\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends react.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (element && prevProps.isPresent && !this.props.isPresent) {\n const size = this.props.sizeRef.current;\n size.height = element.offsetHeight || 0;\n size.width = element.offsetWidth || 0;\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent }) {\n const id = (0,react.useId)();\n const ref = (0,react.useRef)(null);\n const size = (0,react.useRef)({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n });\n const { nonce } = (0,react.useContext)(MotionConfigContext);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n (0,react.useInsertionEffect)(() => {\n const { width, height, top, left } = size.current;\n if (isPresent || !ref.current || !width || !height)\n return;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n document.head.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n top: ${top}px !important;\n left: ${left}px !important;\n }\n `);\n }\n return () => {\n document.head.removeChild(style);\n };\n }, [isPresent]);\n return ((0,jsx_runtime.jsx)(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, children: react.cloneElement(children, { ref }) }));\n}\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs\n\n\n\n\n\n\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = (0,react.useId)();\n const context = (0,react.useMemo)(() => ({\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => presenceChildren.delete(childId);\n },\n }), \n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n presenceAffectsLayout ? [Math.random()] : [isPresent]);\n (0,react.useMemo)(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n react.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n if (mode === \"popLayout\") {\n children = (0,jsx_runtime.jsx)(PopChild, { isPresent: isPresent, children: children });\n }\n return ((0,jsx_runtime.jsx)(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs\n\n\nconst LayoutGroupContext = (0,react.createContext)({});\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs\n\n\nfunction useUnmountEffect(callback) {\n return (0,react.useEffect)(() => () => callback(), []);\n}\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/errors.mjs\n\n\nlet warning = (/* unused pure expression or super */ null && (noop));\nlet invariant = noop_noop;\nif (false) {}\n\n\n\n;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs\n\n\n\n\n\n\n\n\n\n\nconst getChildKey = (child) => child.key || \"\";\nfunction updateChildLookup(children, allChildren) {\n children.forEach((child) => {\n const key = getChildKey(child);\n allChildren.set(key, child);\n });\n}\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n react.Children.forEach(children, (child) => {\n if ((0,react.isValidElement)(child))\n filtered.push(child);\n });\n return filtered;\n}\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * \n * {items.map(item => (\n * \n * ))}\n * \n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, exitBeforeEnter, presenceAffectsLayout = true, mode = \"sync\", }) => {\n invariant(!exitBeforeEnter, \"Replace exitBeforeEnter with mode='wait'\");\n // We want to force a re-render once all exiting animations have finished. We\n // either use a local forceRender function, or one from a parent context if it exists.\n const forceRender = (0,react.useContext)(LayoutGroupContext).forceRender || useForceUpdate()[0];\n const isMounted = useIsMounted();\n // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key\n const filteredChildren = onlyElements(children);\n let childrenToRender = filteredChildren;\n const exitingChildren = (0,react.useRef)(new Map()).current;\n // Keep a living record of the children we're actually rendering so we\n // can diff to figure out which are entering and exiting\n const presentChildren = (0,react.useRef)(childrenToRender);\n // A lookup table to quickly reference components by key\n const allChildren = (0,react.useRef)(new Map()).current;\n // If this is the initial component render, just deal with logic surrounding whether\n // we play onMount animations or not.\n const isInitialRender = (0,react.useRef)(true);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n updateChildLookup(filteredChildren, allChildren);\n presentChildren.current = childrenToRender;\n });\n useUnmountEffect(() => {\n isInitialRender.current = true;\n allChildren.clear();\n exitingChildren.clear();\n });\n if (isInitialRender.current) {\n return ((0,jsx_runtime.jsx)(jsx_runtime.Fragment, { children: childrenToRender.map((child) => ((0,jsx_runtime.jsx)(PresenceChild, { isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)))) }));\n }\n // If this is a subsequent render, deal with entering and exiting children\n childrenToRender = [...childrenToRender];\n // Diff the keys of the currently-present and target children to update our\n // exiting list.\n const presentKeys = presentChildren.current.map(getChildKey);\n const targetKeys = filteredChildren.map(getChildKey);\n // Diff the present children with our target children and mark those that are exiting\n const numPresent = presentKeys.length;\n for (let i = 0; i < numPresent; i++) {\n const key = presentKeys[i];\n if (targetKeys.indexOf(key) === -1 && !exitingChildren.has(key)) {\n exitingChildren.set(key, undefined);\n }\n }\n // If we currently have exiting children, and we're deferring rendering incoming children\n // until after all current children have exiting, empty the childrenToRender array\n if (mode === \"wait\" && exitingChildren.size) {\n childrenToRender = [];\n }\n // Loop through all currently exiting components and clone them to overwrite `animate`\n // with any `exit` prop they might have defined.\n exitingChildren.forEach((component, key) => {\n // If this component is actually entering again, early return\n if (targetKeys.indexOf(key) !== -1)\n return;\n const child = allChildren.get(key);\n if (!child)\n return;\n const insertionIndex = presentKeys.indexOf(key);\n let exitingComponent = component;\n if (!exitingComponent) {\n const onExit = () => {\n // clean up the exiting children map\n exitingChildren.delete(key);\n // compute the keys of children that were rendered once but are no longer present\n // this could happen in case of too many fast consequent renderings\n // @link https://github.com/framer/motion/issues/2023\n const leftOverKeys = Array.from(allChildren.keys()).filter((childKey) => !targetKeys.includes(childKey));\n // clean up the all children map\n leftOverKeys.forEach((leftOverKey) => allChildren.delete(leftOverKey));\n // make sure to render only the children that are actually visible\n presentChildren.current = filteredChildren.filter((presentChild) => {\n const presentChildKey = getChildKey(presentChild);\n return (\n // filter out the node exiting\n presentChildKey === key ||\n // filter out the leftover children\n leftOverKeys.includes(presentChildKey));\n });\n // Defer re-rendering until all exiting children have indeed left\n if (!exitingChildren.size) {\n if (isMounted.current === false)\n return;\n forceRender();\n onExitComplete && onExitComplete();\n }\n };\n exitingComponent = ((0,jsx_runtime.jsx)(PresenceChild, { isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)));\n exitingChildren.set(key, exitingComponent);\n }\n childrenToRender.splice(insertionIndex, 0, exitingComponent);\n });\n // Add `MotionContext` even to children that don't need it to ensure we're rendering\n // the same tree between renders\n childrenToRender = childrenToRender.map((child) => {\n const key = child.key;\n return exitingChildren.has(key) ? (child) : ((0,jsx_runtime.jsx)(PresenceChild, { isPresent: true, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)));\n });\n if (false) {}\n return ((0,jsx_runtime.jsx)(jsx_runtime.Fragment, { children: exitingChildren.size\n ? childrenToRender\n : childrenToRender.map((child) => (0,react.cloneElement)(child)) }));\n};\n\n\n\n// EXTERNAL MODULE: ./node_modules/next/head.js\nvar head = __webpack_require__(9008);\nvar head_default = /*#__PURE__*/__webpack_require__.n(head);\n// EXTERNAL MODULE: ./node_modules/prop-types/index.js\nvar prop_types = __webpack_require__(5697);\nvar prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);\n// EXTERNAL MODULE: ./node_modules/react-query/es/index.js\nvar es = __webpack_require__(8767);\n// EXTERNAL MODULE: ./node_modules/react-query/devtools/index.js\nvar devtools = __webpack_require__(938);\n// EXTERNAL MODULE: ./src/providers/solana/index.tsx + 1 modules\nvar solana = __webpack_require__(3671);\n// EXTERNAL MODULE: ./node_modules/lodash.debounce/index.js\nvar lodash_debounce = __webpack_require__(1296);\n;// CONCATENATED MODULE: ./node_modules/usehooks-ts/dist/index.mjs\n\n\n\n// src/useBoolean/useBoolean.ts\nfunction useBoolean(defaultValue) {\n const [value, setValue] = useState(!!defaultValue);\n const setTrue = useCallback(() => {\n setValue(true);\n }, []);\n const setFalse = useCallback(() => {\n setValue(false);\n }, []);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return { value, setValue, setTrue, setFalse, toggle };\n}\nvar dist_useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? react.useLayoutEffect : react.useEffect;\n\n// src/useEventListener/useEventListener.ts\nfunction useEventListener(eventName, handler, element, options) {\n const savedHandler = (0,react.useRef)(handler);\n dist_useIsomorphicLayoutEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n (0,react.useEffect)(() => {\n const targetElement = (element == null ? void 0 : element.current) ?? window;\n if (!(targetElement && targetElement.addEventListener))\n return;\n const listener = (event) => {\n savedHandler.current(event);\n };\n targetElement.addEventListener(eventName, listener, options);\n return () => {\n targetElement.removeEventListener(eventName, listener, options);\n };\n }, [eventName, element, options]);\n}\n\n// src/useClickAnyWhere/useClickAnyWhere.ts\nfunction useClickAnyWhere(handler) {\n useEventListener(\"click\", (event) => {\n handler(event);\n });\n}\nfunction useCopyToClipboard() {\n const [copiedText, setCopiedText] = useState(null);\n const copy = useCallback(async (text) => {\n if (!(navigator == null ? void 0 : navigator.clipboard)) {\n console.warn(\"Clipboard not supported\");\n return false;\n }\n try {\n await navigator.clipboard.writeText(text);\n setCopiedText(text);\n return true;\n } catch (error) {\n console.warn(\"Copy failed\", error);\n setCopiedText(null);\n return false;\n }\n }, []);\n return [copiedText, copy];\n}\nfunction useCounter(initialValue) {\n const [count, setCount] = useState(initialValue ?? 0);\n const increment = () => {\n setCount((x) => x + 1);\n };\n const decrement = () => {\n setCount((x) => x - 1);\n };\n const reset = () => {\n setCount(initialValue ?? 0);\n };\n return {\n count,\n increment,\n decrement,\n reset,\n setCount\n };\n}\nfunction useInterval(callback, delay) {\n const savedCallback = useRef(callback);\n dist_useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (delay === null) {\n return;\n }\n const id = setInterval(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearInterval(id);\n };\n }, [delay]);\n}\n\n// src/useCountdown/useCountdown.ts\nfunction useCountdown(countdownOptions) {\n let isDeprecated = false;\n let countStart, intervalMs, isIncrement, countStop;\n if (\"seconds\" in countdownOptions) {\n console.warn(\n \"[useCountdown:DEPRECATED] new interface is already available (see https://usehooks-ts.com/react-hook/use-countdown), the old version will retire on usehooks-ts@3.\"\n );\n isDeprecated = true;\n countStart = countdownOptions.seconds;\n intervalMs = countdownOptions.interval;\n isIncrement = countdownOptions.isIncrement;\n } else {\n ({ countStart, intervalMs, isIncrement, countStop } = countdownOptions);\n }\n intervalMs = intervalMs ?? 1e3;\n isIncrement = isIncrement ?? false;\n countStop = countStop ?? 0;\n const {\n count,\n increment,\n decrement,\n reset: resetCounter\n } = useCounter(countStart);\n const {\n value: isCountdownRunning,\n setTrue: startCountdown,\n setFalse: stopCountdown\n } = useBoolean(false);\n const resetCountdown = () => {\n stopCountdown();\n resetCounter();\n };\n const countdownCallback = useCallback(() => {\n if (count === countStop) {\n stopCountdown();\n return;\n }\n if (isIncrement) {\n increment();\n } else {\n decrement();\n }\n }, [count, countStop, decrement, increment, isIncrement, stopCountdown]);\n useInterval(countdownCallback, isCountdownRunning ? intervalMs : null);\n return isDeprecated ? [\n count,\n {\n start: startCountdown,\n stop: stopCountdown,\n reset: resetCountdown\n }\n ] : [\n count,\n {\n startCountdown,\n stopCountdown,\n resetCountdown\n }\n ];\n}\nfunction useEventCallback(fn) {\n const ref = (0,react.useRef)(() => {\n throw new Error(\"Cannot call an event handler while rendering.\");\n });\n dist_useIsomorphicLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n return (0,react.useCallback)((...args) => ref.current(...args), [ref]);\n}\n\n// src/useLocalStorage/useLocalStorage.ts\nvar IS_SERVER = typeof window === \"undefined\";\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER) {\n return initialValueToUse;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER) {\n console.warn(\n `Tried setting localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.localStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting localStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if ((event == null ? void 0 : event.key) && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return [storedValue, setValue];\n}\nvar IS_SERVER2 = typeof window === \"undefined\";\nfunction useMediaQuery(query, options) {\n const defaultValue = typeof options === \"boolean\" ? options : (options == null ? void 0 : options.defaultValue) ?? false;\n const initializeWithValue = typeof options === \"boolean\" ? void 0 : (options == null ? void 0 : options.initializeWithValue) ?? void 0;\n const getMatches = (query2) => {\n if (IS_SERVER2) {\n return defaultValue;\n }\n return window.matchMedia(query2).matches;\n };\n const [matches, setMatches] = useState(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n function handleChange() {\n setMatches(getMatches(query));\n }\n dist_useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n handleChange();\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener(\"change\", handleChange);\n }\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener(\"change\", handleChange);\n }\n };\n }, [query]);\n return matches;\n}\n\n// src/useDarkMode/useDarkMode.ts\nvar COLOR_SCHEME_QUERY = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY = \"usehooks-ts-dark-mode\";\nfunction useDarkMode(options, localStorageKeyProps = LOCAL_STORAGE_KEY) {\n const counter = useRef(0);\n counter.current++;\n const defaultValue = typeof options === \"boolean\" ? options : options == null ? void 0 : options.defaultValue;\n const localStorageKey = typeof options === \"boolean\" ? localStorageKeyProps ?? LOCAL_STORAGE_KEY : (options == null ? void 0 : options.localStorageKey) ?? LOCAL_STORAGE_KEY;\n const initializeWithValue = typeof options === \"boolean\" ? void 0 : (options == null ? void 0 : options.initializeWithValue) ?? void 0;\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY, {\n initializeWithValue,\n defaultValue\n });\n const [isDarkMode, setDarkMode] = useLocalStorage(\n localStorageKey,\n defaultValue ?? isDarkOS ?? false,\n { initializeWithValue }\n );\n dist_useIsomorphicLayoutEffect(() => {\n if (isDarkOS !== isDarkMode) {\n setDarkMode(isDarkOS);\n }\n }, [isDarkOS]);\n return {\n isDarkMode,\n toggle: () => {\n setDarkMode((prev) => !prev);\n },\n enable: () => {\n setDarkMode(true);\n },\n disable: () => {\n setDarkMode(false);\n },\n set: (value) => {\n setDarkMode(value);\n }\n };\n}\nfunction useDebounce(value, delay) {\n const [debouncedValue, setDebouncedValue] = useState(value);\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedValue(value);\n }, delay ?? 500);\n return () => {\n clearTimeout(timer);\n };\n }, [value, delay]);\n return debouncedValue;\n}\nfunction useUnmount(func) {\n const funcRef = useRef(func);\n funcRef.current = func;\n useEffect(\n () => () => {\n funcRef.current();\n },\n []\n );\n}\n\n// src/useDebounceCallback/useDebounceCallback.ts\nfunction useDebounceCallback(func, delay = 500, options) {\n const debouncedFunc = useRef();\n useUnmount(() => {\n if (debouncedFunc.current) {\n debouncedFunc.current.cancel();\n }\n });\n const debounced = useMemo(() => {\n const debouncedFuncInstance = debounce(func, delay, options);\n const wrappedFunc = (...args) => {\n return debouncedFuncInstance(...args);\n };\n wrappedFunc.cancel = () => {\n debouncedFuncInstance.cancel();\n };\n wrappedFunc.isPending = () => {\n return !!debouncedFunc.current;\n };\n wrappedFunc.flush = () => {\n return debouncedFuncInstance.flush();\n };\n return wrappedFunc;\n }, [func, delay, options]);\n useEffect(() => {\n debouncedFunc.current = debounce(func, delay, options);\n }, [func, delay, options]);\n return debounced;\n}\nfunction useDebounceValue(initialValue, delay, options) {\n const eq = (options == null ? void 0 : options.equalityFn) ?? ((left, right) => left === right);\n const unwrappedInitialValue = initialValue instanceof Function ? initialValue() : initialValue;\n const [debouncedValue, setDebouncedValue] = useState(unwrappedInitialValue);\n const previousValueRef = useRef(unwrappedInitialValue);\n const updateDebouncedValue = useDebounceCallback(\n setDebouncedValue,\n delay,\n options\n );\n if (!eq(previousValueRef.current, unwrappedInitialValue)) {\n updateDebouncedValue(unwrappedInitialValue);\n previousValueRef.current = unwrappedInitialValue;\n }\n return [debouncedValue, updateDebouncedValue];\n}\nfunction useDocumentTitle(title, options = {}) {\n const { preserveTitleOnUnmount = true } = options;\n const defaultTitle = useRef(null);\n dist_useIsomorphicLayoutEffect(() => {\n defaultTitle.current = window.document.title;\n }, []);\n dist_useIsomorphicLayoutEffect(() => {\n window.document.title = title;\n }, [title]);\n useUnmount(() => {\n if (!preserveTitleOnUnmount && defaultTitle.current) {\n window.document.title = defaultTitle.current;\n }\n });\n}\nfunction useEffectOnce(effect) {\n useEffect(effect, []);\n}\nfunction useElementSize(options = {}) {\n const { initializeWithValue = true } = options;\n const [ref, setRef] = useState(null);\n const readValue = useCallback(() => {\n return {\n width: (ref == null ? void 0 : ref.offsetWidth) ?? void 0,\n height: (ref == null ? void 0 : ref.offsetHeight) ?? void 0\n };\n }, [ref == null ? void 0 : ref.offsetHeight, ref == null ? void 0 : ref.offsetWidth]);\n const [size, setSize] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return { width: void 0, height: void 0 };\n });\n const handleSize = useCallback(() => {\n setSize(readValue());\n }, [ref == null ? void 0 : ref.offsetHeight, ref == null ? void 0 : ref.offsetWidth]);\n useEventListener(\"resize\", handleSize);\n dist_useIsomorphicLayoutEffect(() => {\n handleSize();\n }, [ref == null ? void 0 : ref.offsetHeight, ref == null ? void 0 : ref.offsetWidth]);\n const result = [setRef, size];\n result.ref = result[0];\n result.width = size.width;\n result.height = size.height;\n return result;\n}\nfunction useFetch(url, options) {\n const cache = useRef({});\n const cancelRequest = useRef(false);\n const initialState = {\n error: void 0,\n data: void 0\n };\n const fetchReducer = (state2, action) => {\n switch (action.type) {\n case \"loading\":\n return { ...initialState };\n case \"fetched\":\n return { ...initialState, data: action.payload };\n case \"error\":\n return { ...initialState, error: action.payload };\n default:\n return state2;\n }\n };\n const [state, dispatch] = useReducer(fetchReducer, initialState);\n useEffect(() => {\n if (!url)\n return;\n cancelRequest.current = false;\n const fetchData = async () => {\n dispatch({ type: \"loading\" });\n const currentCache = cache.current[url];\n if (currentCache) {\n dispatch({ type: \"fetched\", payload: currentCache });\n return;\n }\n try {\n const response = await fetch(url, options);\n if (!response.ok) {\n throw new Error(response.statusText);\n }\n const data = await response.json();\n cache.current[url] = data;\n if (cancelRequest.current)\n return;\n dispatch({ type: \"fetched\", payload: data });\n } catch (error) {\n if (cancelRequest.current)\n return;\n dispatch({ type: \"error\", payload: error });\n }\n };\n void fetchData();\n return () => {\n cancelRequest.current = true;\n };\n }, [url]);\n return state;\n}\nfunction useHover(elementRef) {\n const [value, setValue] = useState(false);\n const handleMouseEnter = () => {\n setValue(true);\n };\n const handleMouseLeave = () => {\n setValue(false);\n };\n useEventListener(\"mouseenter\", handleMouseEnter, elementRef);\n useEventListener(\"mouseleave\", handleMouseLeave, elementRef);\n return value;\n}\nfunction useImageOnLoad() {\n const [isLoaded, setIsLoaded] = useState(false);\n const handleImageOnLoad = () => {\n setIsLoaded(true);\n };\n const css = {\n // Thumbnail style.\n thumbnail: {\n visibility: isLoaded ? \"hidden\" : \"visible\",\n filter: \"blur(8px)\",\n transition: \"visibility 0ms ease-out 500ms\"\n },\n // Full image style.\n fullSize: {\n opacity: isLoaded ? 1 : 0,\n transition: \"opacity 500ms ease-in 0ms\"\n }\n };\n return { handleImageOnLoad, css };\n}\nfunction useIntersectionObserver(optionsOrLegacyRef, legacyOptions) {\n var _a;\n const isLegacySignature = \"current\" in optionsOrLegacyRef;\n const options = isLegacySignature ? legacyOptions : optionsOrLegacyRef;\n const {\n threshold = 0,\n root = null,\n rootMargin = \"0%\",\n freezeOnceVisible = false,\n initialIsIntersecting = false\n } = options ?? {};\n const [newRef, setNewRef] = useState(null);\n const ref = isLegacySignature ? optionsOrLegacyRef.current : newRef;\n const [state, setState] = useState(() => ({\n isIntersecting: initialIsIntersecting,\n entry: void 0\n }));\n const callbackRef = useRef();\n callbackRef.current = options == null ? void 0 : options.onChange;\n const frozen = ((_a = state.entry) == null ? void 0 : _a.isIntersecting) && freezeOnceVisible;\n useEffect(() => {\n if (!ref)\n return;\n if (!(\"IntersectionObserver\" in window))\n return;\n if (frozen)\n return;\n let unobserve;\n const observer = new IntersectionObserver(\n (entries) => {\n const thresholds = Array.isArray(observer.thresholds) ? observer.thresholds : [observer.thresholds];\n entries.forEach((entry) => {\n const isIntersecting = entry.isIntersecting && thresholds.some((threshold2) => entry.intersectionRatio >= threshold2);\n setState({ isIntersecting, entry });\n if (callbackRef.current) {\n callbackRef.current(isIntersecting, entry);\n }\n if (isIntersecting && freezeOnceVisible && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n });\n },\n { threshold, root, rootMargin }\n );\n observer.observe(ref);\n return () => {\n observer.disconnect();\n };\n }, [\n ref,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold),\n root,\n rootMargin,\n frozen,\n freezeOnceVisible\n ]);\n const prevRef = useRef(null);\n useEffect(() => {\n var _a2;\n if (!ref && ((_a2 = state.entry) == null ? void 0 : _a2.target) && !freezeOnceVisible && !frozen && prevRef.current !== state.entry.target) {\n prevRef.current = state.entry.target;\n setState({ isIntersecting: initialIsIntersecting, entry: void 0 });\n }\n }, [ref, state.entry, freezeOnceVisible, frozen, initialIsIntersecting]);\n if (isLegacySignature) {\n return state.entry;\n }\n const result = [\n setNewRef,\n !!state.isIntersecting,\n state.entry\n ];\n result.ref = result[0];\n result.isIntersecting = result[1];\n result.entry = result[2];\n return result;\n}\nfunction useIsClient() {\n const [isClient, setClient] = useState(false);\n useEffect(() => {\n setClient(true);\n }, []);\n return isClient;\n}\nfunction useIsFirstRender() {\n const isFirst = useRef(true);\n if (isFirst.current) {\n isFirst.current = false;\n return true;\n }\n return isFirst.current;\n}\nfunction dist_useIsMounted() {\n const isMounted = useRef(false);\n useEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return useCallback(() => isMounted.current, []);\n}\nfunction useLockedBody(initialLocked = false, rootId = \"___gatsby\") {\n const [locked, setLocked] = useState(initialLocked);\n dist_useIsomorphicLayoutEffect(() => {\n if (!locked) {\n return;\n }\n const originalOverflow = document.body.style.overflow;\n const originalPaddingRight = document.body.style.paddingRight;\n document.body.style.overflow = \"hidden\";\n const root = document.getElementById(rootId);\n const scrollBarWidth = root ? root.offsetWidth - root.scrollWidth : 0;\n if (scrollBarWidth) {\n document.body.style.paddingRight = `${scrollBarWidth}px`;\n }\n return () => {\n document.body.style.overflow = originalOverflow;\n if (scrollBarWidth) {\n document.body.style.paddingRight = originalPaddingRight;\n }\n };\n }, [locked]);\n useEffect(() => {\n if (locked !== initialLocked) {\n setLocked(initialLocked);\n }\n }, [initialLocked]);\n return [locked, setLocked];\n}\nfunction useMap(initialState = /* @__PURE__ */ new Map()) {\n const [map, setMap] = useState(new Map(initialState));\n const actions = {\n set: useCallback((key, value) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.set(key, value);\n return copy;\n });\n }, []),\n setAll: useCallback((entries) => {\n setMap(() => new Map(entries));\n }, []),\n remove: useCallback((key) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.delete(key);\n return copy;\n });\n }, []),\n reset: useCallback(() => {\n setMap(() => /* @__PURE__ */ new Map());\n }, [])\n };\n return [map, actions];\n}\n\n// src/useOnClickOutside/useOnClickOutside.ts\nfunction useOnClickOutside(ref, handler, eventType = \"mousedown\") {\n useEventListener(eventType, (event) => {\n const target = event.target;\n if (!target || !target.isConnected) {\n return;\n }\n const isOutside = Array.isArray(ref) ? ref.every((r) => r.current && !r.current.contains(target)) : ref.current && !ref.current.contains(target);\n if (isOutside) {\n handler(event);\n }\n });\n}\nvar IS_SERVER3 = typeof window === \"undefined\";\nfunction useReadLocalStorage(key, options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER3) {\n initializeWithValue = false;\n }\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return null;\n }\n return parsed;\n },\n [options]\n );\n const readValue = useCallback(() => {\n if (IS_SERVER3) {\n return null;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : null;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return null;\n }\n }, [key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return void 0;\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if ((event == null ? void 0 : event.key) && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return storedValue;\n}\nvar initialSize = {\n width: void 0,\n height: void 0\n};\nfunction useResizeObserver(options) {\n const { ref, box = \"content-box\" } = options;\n const [{ width, height }, setSize] = useState(initialSize);\n const isMounted = dist_useIsMounted();\n const previousSize = useRef({ ...initialSize });\n const onResize = useRef(void 0);\n onResize.current = options == null ? void 0 : options.onResize;\n useEffect(() => {\n if (!(ref == null ? void 0 : ref.current))\n return;\n if (typeof window === \"undefined\" || !(\"ResizeObserver\" in window))\n return;\n const observer = new ResizeObserver(([entry]) => {\n const boxProp = box === \"border-box\" ? \"borderBoxSize\" : box === \"device-pixel-content-box\" ? \"devicePixelContentBoxSize\" : \"contentBoxSize\";\n const newWidth = extractSize(entry, boxProp, \"inlineSize\");\n const newHeight = extractSize(entry, boxProp, \"blockSize\");\n const hasChanged = previousSize.current.width !== newWidth || previousSize.current.height !== newHeight;\n if (hasChanged) {\n const newSize = { width: newWidth, height: newHeight };\n previousSize.current.width = newWidth;\n previousSize.current.height = newHeight;\n if (onResize == null ? void 0 : onResize.current) {\n onResize.current(newSize);\n } else {\n if (isMounted()) {\n setSize(newSize);\n }\n }\n }\n });\n observer.observe(ref.current, { box });\n return () => {\n observer.disconnect();\n };\n }, [box, ref, isMounted]);\n return { width, height };\n}\nfunction extractSize(entry, box, sizeType) {\n if (!entry[box]) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"];\n }\n return void 0;\n }\n return Array.isArray(entry[box]) ? entry[box][0][sizeType] : (\n // @ts-ignore Support Firefox's non-standard behavior\n entry[box][sizeType]\n );\n}\nvar IS_SERVER4 = typeof window === \"undefined\";\nfunction useScreen(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER4) {\n initializeWithValue = false;\n }\n const readScreen = () => {\n if (IS_SERVER4) {\n return void 0;\n }\n return window.screen;\n };\n const [screen, setScreen] = useState(() => {\n if (initializeWithValue) {\n return readScreen();\n }\n return void 0;\n });\n const debouncedSetScreen = useDebounceCallback(\n setScreen,\n options == null ? void 0 : options.debounceDelay\n );\n function handleSize() {\n const newScreen = readScreen();\n const setSize = (options == null ? void 0 : options.debounceDelay) ? debouncedSetScreen : setScreen;\n if (newScreen) {\n const {\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n } = newScreen;\n setSize({\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n });\n }\n }\n useEventListener(\"resize\", handleSize);\n dist_useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return screen;\n}\nvar cachedScriptStatuses = /* @__PURE__ */ new Map();\nfunction getScriptNode(src) {\n const node = document.querySelector(\n `script[src=\"${src}\"]`\n );\n const status = node == null ? void 0 : node.getAttribute(\"data-status\");\n return {\n node,\n status\n };\n}\nfunction useScript(src, options) {\n const [status, setStatus] = useState(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return \"idle\";\n }\n if (typeof window === \"undefined\") {\n return \"loading\";\n }\n return cachedScriptStatuses.get(src) ?? \"loading\";\n });\n useEffect(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return;\n }\n const cachedScriptStatus = cachedScriptStatuses.get(src);\n if (cachedScriptStatus === \"ready\" || cachedScriptStatus === \"error\") {\n setStatus(cachedScriptStatus);\n return;\n }\n const script = getScriptNode(src);\n let scriptNode = script.node;\n if (!scriptNode) {\n scriptNode = document.createElement(\"script\");\n scriptNode.src = src;\n scriptNode.async = true;\n if (options == null ? void 0 : options.id) {\n scriptNode.id = options.id;\n }\n scriptNode.setAttribute(\"data-status\", \"loading\");\n document.body.appendChild(scriptNode);\n const setAttributeFromEvent = (event) => {\n const scriptStatus = event.type === \"load\" ? \"ready\" : \"error\";\n scriptNode == null ? void 0 : scriptNode.setAttribute(\"data-status\", scriptStatus);\n };\n scriptNode.addEventListener(\"load\", setAttributeFromEvent);\n scriptNode.addEventListener(\"error\", setAttributeFromEvent);\n } else {\n setStatus(script.status ?? cachedScriptStatus ?? \"loading\");\n }\n const setStateFromEvent = (event) => {\n const newStatus = event.type === \"load\" ? \"ready\" : \"error\";\n setStatus(newStatus);\n cachedScriptStatuses.set(src, newStatus);\n };\n scriptNode.addEventListener(\"load\", setStateFromEvent);\n scriptNode.addEventListener(\"error\", setStateFromEvent);\n return () => {\n if (scriptNode) {\n scriptNode.removeEventListener(\"load\", setStateFromEvent);\n scriptNode.removeEventListener(\"error\", setStateFromEvent);\n }\n if (scriptNode && (options == null ? void 0 : options.removeOnUnmount)) {\n scriptNode.remove();\n cachedScriptStatuses.delete(src);\n }\n };\n }, [src, options == null ? void 0 : options.shouldPreventLoad, options == null ? void 0 : options.removeOnUnmount, options == null ? void 0 : options.id]);\n return status;\n}\nvar IS_SERVER5 = typeof window === \"undefined\";\nfunction useScrollLock(options = {}) {\n const { autoLock = true, lockTarget, widthReflow = true } = options;\n const [isLocked, setIsLocked] = useState(false);\n const target = useRef(null);\n const originalStyle = useRef(null);\n const lock = () => {\n if (target.current) {\n const { overflow, paddingRight } = target.current.style;\n originalStyle.current = { overflow, paddingRight };\n if (widthReflow) {\n const offsetWidth = target.current === document.body ? window.innerWidth : target.current.offsetWidth;\n const currentPaddingRight = parseInt(window.getComputedStyle(target.current).paddingRight, 10) || 0;\n const scrollbarWidth = offsetWidth - target.current.scrollWidth;\n target.current.style.paddingRight = `${scrollbarWidth + currentPaddingRight}px`;\n }\n target.current.style.overflow = \"hidden\";\n setIsLocked(true);\n }\n };\n const unlock = () => {\n if (target.current && originalStyle.current) {\n target.current.style.overflow = originalStyle.current.overflow;\n if (widthReflow) {\n target.current.style.paddingRight = originalStyle.current.paddingRight;\n }\n }\n setIsLocked(false);\n };\n dist_useIsomorphicLayoutEffect(() => {\n if (IS_SERVER5)\n return;\n if (lockTarget) {\n target.current = typeof lockTarget === \"string\" ? document.querySelector(lockTarget) : lockTarget;\n }\n if (!target.current) {\n target.current = document.body;\n }\n if (autoLock) {\n lock();\n }\n return () => {\n unlock();\n };\n }, [autoLock, lockTarget, widthReflow]);\n return { isLocked, lock, unlock };\n}\nvar IS_SERVER6 = typeof window === \"undefined\";\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER6) {\n return initialValueToUse;\n }\n try {\n const raw = window.sessionStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading sessionStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER6) {\n console.warn(\n `Tried setting sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.sessionStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting sessionStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if ((event == null ? void 0 : event.key) && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"session-storage\", handleStorageChange);\n return [storedValue, setValue];\n}\n\n// src/useSsr/useSsr.ts\nfunction useSsr() {\n var _a;\n const isDOM = (\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n typeof window !== \"undefined\" && !!((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement)\n );\n return {\n isBrowser: isDOM,\n isServer: !isDOM\n };\n}\nfunction useStep(maxStep) {\n const [currentStep, setCurrentStep] = useState(1);\n const canGoToNextStep = currentStep + 1 <= maxStep;\n const canGoToPrevStep = currentStep - 1 > 0;\n const setStep = useCallback(\n (step) => {\n const newStep = step instanceof Function ? step(currentStep) : step;\n if (newStep >= 1 && newStep <= maxStep) {\n setCurrentStep(newStep);\n return;\n }\n throw new Error(\"Step not valid\");\n },\n [maxStep, currentStep]\n );\n const goToNextStep = useCallback(() => {\n if (canGoToNextStep) {\n setCurrentStep((step) => step + 1);\n }\n }, [canGoToNextStep]);\n const goToPrevStep = useCallback(() => {\n if (canGoToPrevStep) {\n setCurrentStep((step) => step - 1);\n }\n }, [canGoToPrevStep]);\n const reset = useCallback(() => {\n setCurrentStep(1);\n }, []);\n return [\n currentStep,\n {\n goToNextStep,\n goToPrevStep,\n canGoToNextStep,\n canGoToPrevStep,\n setStep,\n reset\n }\n ];\n}\n\n// src/useTernaryDarkMode/useTernaryDarkMode.ts\nvar COLOR_SCHEME_QUERY2 = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY2 = \"usehooks-ts-ternary-dark-mode\";\nfunction useTernaryDarkMode(options) {\n const defaultValue = typeof options === \"string\" ? \"system\" : (options == null ? void 0 : options.defaultValue) ?? \"system\";\n const localStorageKey = typeof options === \"string\" ? options : (options == null ? void 0 : options.localStorageKey) ?? LOCAL_STORAGE_KEY2;\n const initializeWithValue = typeof options === \"string\" ? void 0 : (options == null ? void 0 : options.initializeWithValue) ?? void 0;\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY2, { initializeWithValue });\n const [mode, setMode] = useLocalStorage(localStorageKey, defaultValue, {\n initializeWithValue\n });\n const isDarkMode = mode === \"dark\" || mode === \"system\" && isDarkOS;\n const toggleTernaryDarkMode = () => {\n const modes = [\"light\", \"system\", \"dark\"];\n setMode((prevMode) => {\n const nextIndex = (modes.indexOf(prevMode) + 1) % modes.length;\n return modes[nextIndex];\n });\n };\n return {\n isDarkMode,\n ternaryDarkMode: mode,\n setTernaryDarkMode: setMode,\n toggleTernaryDarkMode\n };\n}\nfunction useTimeout(callback, delay) {\n const savedCallback = useRef(callback);\n dist_useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (!delay && delay !== 0) {\n return;\n }\n const id = setTimeout(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearTimeout(id);\n };\n }, [delay]);\n}\nfunction useToggle(defaultValue) {\n const [value, setValue] = useState(!!defaultValue);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return [value, toggle, setValue];\n}\nfunction useUpdateEffect(effect, deps) {\n const isFirst = useIsFirstRender();\n useEffect(() => {\n if (!isFirst) {\n return effect();\n }\n }, deps);\n}\nvar IS_SERVER7 = typeof window === \"undefined\";\nfunction useWindowSize(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER7) {\n initializeWithValue = false;\n }\n const [windowSize, setWindowSize] = useState(() => {\n if (initializeWithValue) {\n return {\n width: window.innerWidth,\n height: window.innerHeight\n };\n }\n return {\n width: void 0,\n height: void 0\n };\n });\n const debouncedSetWindowSize = useDebounceCallback(\n setWindowSize,\n options == null ? void 0 : options.debounceDelay\n );\n function handleSize() {\n const setSize = (options == null ? void 0 : options.debounceDelay) ? debouncedSetWindowSize : setWindowSize;\n setSize({\n width: window.innerWidth,\n height: window.innerHeight\n });\n }\n useEventListener(\"resize\", handleSize);\n dist_useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return windowSize;\n}\n\n\n\n;// CONCATENATED MODULE: ./src/hooks/use-local-storage.ts\n/* eslint-disable no-console */ \n\nfunction use_local_storage_useLocalStorage(key, initialValue) {\n const readValue = (0,react.useCallback)(()=>{\n if (false) {}\n try {\n const item = window.localStorage.getItem(key);\n return item ? JSON.parse(item) : initialValue;\n } catch (error) {\n console.warn(\"Error reading localStorage key “\".concat(key, \"”:\"), error);\n return initialValue;\n }\n }, [\n initialValue,\n key\n ]);\n const [storedValue, setStoredValue] = (0,react.useState)(readValue);\n const setValue = useEventCallback((value)=>{\n // Prevent build error \"window is undefined\" but keeps working\n if (false) {}\n try {\n const newValue = value instanceof Function ? value(storedValue) : value;\n window.localStorage.setItem(key, JSON.stringify(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new Event(\"local-storage\"));\n } catch (error) {\n console.warn(\"Error setting localStorage key “\".concat(key, \"”:\"), error);\n }\n });\n (0,react.useEffect)(()=>{\n setStoredValue(readValue());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const handleStorageChange = (0,react.useCallback)((event)=>{\n if ((event === null || event === void 0 ? void 0 : event.key) && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n }, [\n key,\n readValue\n ]);\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return [\n storedValue,\n setValue\n ];\n}\n/* harmony default export */ var use_local_storage = (use_local_storage_useLocalStorage);\n\n// EXTERNAL MODULE: ./node_modules/@mui/material/styles/createTheme.js + 14 modules\nvar createTheme = __webpack_require__(1265);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js\nvar esm_extends = __webpack_require__(7462);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\nvar objectWithoutPropertiesLoose = __webpack_require__(3366);\n;// CONCATENATED MODULE: ./node_modules/@mui/private-theming/useTheme/ThemeContext.js\n\nconst ThemeContext = /*#__PURE__*/react.createContext(null);\nif (false) {}\n/* harmony default export */ var useTheme_ThemeContext = (ThemeContext);\n;// CONCATENATED MODULE: ./node_modules/@mui/private-theming/useTheme/useTheme.js\n\n\nfunction useTheme() {\n const theme = react.useContext(useTheme_ThemeContext);\n if (false) {}\n return theme;\n}\n;// CONCATENATED MODULE: ./node_modules/@mui/private-theming/ThemeProvider/nested.js\nconst hasSymbol = typeof Symbol === 'function' && Symbol.for;\n/* harmony default export */ var nested = (hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__');\n;// CONCATENATED MODULE: ./node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js\n\n\n\n\n\n\n\n\n// To support composition of theme.\n\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(outerTheme);\n if (false) {}\n return mergedTheme;\n }\n return (0,esm_extends/* default */.Z)({}, outerTheme, localTheme);\n}\n\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme\n } = props;\n const outerTheme = useTheme();\n if (false) {}\n const theme = react.useMemo(() => {\n const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);\n if (output != null) {\n output[nested] = outerTheme !== null;\n }\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/(0,jsx_runtime.jsx)(useTheme_ThemeContext.Provider, {\n value: theme,\n children: children\n });\n}\n false ? 0 : void 0;\nif (false) {}\n/* harmony default export */ var ThemeProvider_ThemeProvider = (ThemeProvider);\n// EXTERNAL MODULE: ./node_modules/@emotion/react/dist/emotion-element-43c6fea0.browser.esm.js\nvar emotion_element_43c6fea0_browser_esm = __webpack_require__(6498);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/useThemeWithoutDefault.js\nvar useThemeWithoutDefault = __webpack_require__(4168);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/RtlProvider/index.js\nvar RtlProvider = __webpack_require__(2056);\n// EXTERNAL MODULE: ./node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js\nvar DefaultPropsProvider = __webpack_require__(2842);\n;// CONCATENATED MODULE: ./node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js\n'use client';\n\n\n\n\n\n\n\n\n\n\n\nconst EMPTY_THEME = {};\nfunction useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {\n return react.useMemo(() => {\n const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(resolvedTheme);\n const result = themeId ? (0,esm_extends/* default */.Z)({}, upperTheme, {\n [themeId]: mergedTheme\n }) : mergedTheme;\n // must return a function for the private theme to NOT merge with the upper theme.\n // see the test case \"use provided theme from a callback\" in ThemeProvider.test.js\n if (isPrivate) {\n return () => result;\n }\n return result;\n }\n return themeId ? (0,esm_extends/* default */.Z)({}, upperTheme, {\n [themeId]: localTheme\n }) : (0,esm_extends/* default */.Z)({}, upperTheme, localTheme);\n }, [themeId, upperTheme, localTheme, isPrivate]);\n}\n\n/**\n * This component makes the `theme` available down the React tree.\n * It should preferably be used at **the root of your component tree**.\n *\n * // existing use case\n * // theme scoping\n */\nfunction ThemeProvider_ThemeProvider_ThemeProvider(props) {\n const {\n children,\n theme: localTheme,\n themeId\n } = props;\n const upperTheme = (0,useThemeWithoutDefault/* default */.Z)(EMPTY_THEME);\n const upperPrivateTheme = useTheme() || EMPTY_THEME;\n if (false) {}\n const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);\n const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);\n const rtlValue = engineTheme.direction === 'rtl';\n return /*#__PURE__*/(0,jsx_runtime.jsx)(ThemeProvider_ThemeProvider, {\n theme: privateTheme,\n children: /*#__PURE__*/(0,jsx_runtime.jsx)(emotion_element_43c6fea0_browser_esm.T.Provider, {\n value: engineTheme,\n children: /*#__PURE__*/(0,jsx_runtime.jsx)(RtlProvider/* default */.Z, {\n value: rtlValue,\n children: /*#__PURE__*/(0,jsx_runtime.jsx)(DefaultPropsProvider/* default */.Z, {\n value: engineTheme == null ? void 0 : engineTheme.components,\n children: children\n })\n })\n })\n });\n}\n false ? 0 : void 0;\nif (false) {}\n/* harmony default export */ var esm_ThemeProvider_ThemeProvider = (ThemeProvider_ThemeProvider_ThemeProvider);\n// EXTERNAL MODULE: ./node_modules/@mui/material/styles/identifier.js\nvar identifier = __webpack_require__(606);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/styles/ThemeProvider.js\n'use client';\n\n\n\nconst _excluded = [\"theme\"];\n\n\n\n\n\nfunction styles_ThemeProvider_ThemeProvider(_ref) {\n let {\n theme: themeInput\n } = _ref,\n props = (0,objectWithoutPropertiesLoose/* default */.Z)(_ref, _excluded);\n const scopedTheme = themeInput[identifier/* default */.Z];\n return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_ThemeProvider_ThemeProvider, (0,esm_extends/* default */.Z)({}, props, {\n themeId: scopedTheme ? identifier/* default */.Z : undefined,\n theme: scopedTheme || themeInput\n }));\n}\n false ? 0 : void 0;\n// EXTERNAL MODULE: ./node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.js\nvar DefaultPropsProvider_DefaultPropsProvider = __webpack_require__(8628);\n// EXTERNAL MODULE: ./node_modules/@mui/material/GlobalStyles/GlobalStyles.js + 1 modules\nvar GlobalStyles = __webpack_require__(9773);\n;// CONCATENATED MODULE: ./node_modules/@mui/material/CssBaseline/CssBaseline.js\n'use client';\n\n\n\n\n\n\n\n\nconst html = (theme, enableColorScheme) => (0,esm_extends/* default */.Z)({\n WebkitFontSmoothing: 'antialiased',\n // Antialiasing.\n MozOsxFontSmoothing: 'grayscale',\n // Antialiasing.\n // Change from `box-sizing: content-box` so that `width`\n // is not affected by `padding` or `border`.\n boxSizing: 'border-box',\n // Fix font resize problem in iOS\n WebkitTextSizeAdjust: '100%'\n}, enableColorScheme && !theme.vars && {\n colorScheme: theme.palette.mode\n});\nconst body = theme => (0,esm_extends/* default */.Z)({\n color: (theme.vars || theme).palette.text.primary\n}, theme.typography.body1, {\n backgroundColor: (theme.vars || theme).palette.background.default,\n '@media print': {\n // Save printer ink.\n backgroundColor: (theme.vars || theme).palette.common.white\n }\n});\nconst styles = (theme, enableColorScheme = false) => {\n var _theme$components;\n const colorSchemeStyles = {};\n if (enableColorScheme && theme.colorSchemes) {\n Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {\n var _scheme$palette;\n colorSchemeStyles[theme.getColorSchemeSelector(key).replace(/\\s*&/, '')] = {\n colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode\n };\n });\n }\n let defaultStyles = (0,esm_extends/* default */.Z)({\n html: html(theme, enableColorScheme),\n '*, *::before, *::after': {\n boxSizing: 'inherit'\n },\n 'strong, b': {\n fontWeight: theme.typography.fontWeightBold\n },\n body: (0,esm_extends/* default */.Z)({\n margin: 0\n }, body(theme), {\n // Add support for document.body.requestFullScreen().\n // Other elements, if background transparent, are not supported.\n '&::backdrop': {\n backgroundColor: (theme.vars || theme).palette.background.default\n }\n })\n }, colorSchemeStyles);\n const themeOverrides = (_theme$components = theme.components) == null || (_theme$components = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components.styleOverrides;\n if (themeOverrides) {\n defaultStyles = [defaultStyles, themeOverrides];\n }\n return defaultStyles;\n};\n\n/**\n * Kickstart an elegant, consistent, and simple baseline to build upon.\n */\nfunction CssBaseline(inProps) {\n const props = (0,DefaultPropsProvider_DefaultPropsProvider/* useDefaultProps */.i)({\n props: inProps,\n name: 'MuiCssBaseline'\n });\n const {\n children,\n enableColorScheme = false\n } = props;\n return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {\n children: [/*#__PURE__*/(0,jsx_runtime.jsx)(GlobalStyles/* default */.Z, {\n styles: theme => styles(theme, enableColorScheme)\n }), children]\n });\n}\n false ? 0 : void 0;\n/* harmony default export */ var CssBaseline_CssBaseline = (CssBaseline);\n;// CONCATENATED MODULE: ./src/providers/theme/options.ts\nconst breakpoints = {\n values: {\n xs: 0,\n sm: 640,\n md: 810,\n lg: 1200,\n xl: 1500\n }\n};\nconst fontFamily = \"Inter Variable\";\nconst typography = {\n fontFamily: fontFamily,\n h1: {\n fontFamily: fontFamily\n },\n h2: {\n fontFamily: fontFamily\n },\n h3: {\n fontFamily: fontFamily\n },\n h4: {\n fontFamily: fontFamily\n },\n h5: {\n fontFamily: fontFamily\n },\n h6: {\n fontFamily: fontFamily,\n fontWeight: 700\n }\n};\nconst settings = {\n light: {\n palette: {\n mode: \"light\",\n background: {\n default: \"#FFFFFF\"\n },\n primary: {\n main: \"#00782A\"\n },\n secondary: {\n main: \"#F5A302\"\n },\n text: {\n primary: \"#000000\",\n secondary: \"#F5A302\"\n }\n },\n typography,\n components: {},\n breakpoints\n }\n};\nconst getThemeOptions = (mode)=>settings[\"light\"];\n/* harmony default export */ var options = (getThemeOptions);\n\n;// CONCATENATED MODULE: ./src/providers/theme/index.tsx\n\n\n\n\n\nconst theme_ThemeContext = /*#__PURE__*/ (0,react.createContext)({});\nconst localStorageThemeModeKeyName = \"THEME_MODE\";\nfunction Provider(param) {\n let { children } = param;\n const preferredMode = \"light\";\n const [savedThemeMode, setSavedThemeMode] = use_local_storage(localStorageThemeModeKeyName, preferredMode);\n const [mode, setMode] = (0,react.useState)(savedThemeMode !== null && savedThemeMode !== void 0 ? savedThemeMode : preferredMode);\n const contextValues = (0,react.useMemo)(()=>{\n const themeOptions = (0,createTheme/* default */.Z)(options(mode));\n return {\n themeMode: mode,\n themeOptions,\n toggleThemeMode: (newMode)=>{\n setMode((prevMode)=>newMode !== null && newMode !== void 0 ? newMode : prevMode === \"light\" ? \"dark\" : \"light\");\n }\n };\n }, [\n mode\n ]);\n (0,react.useEffect)(()=>{\n document.documentElement.setAttribute(\"data-theme\", mode);\n if (mode === \"dark\") {\n document.documentElement.classList.add(\"dark\");\n } else {\n document.documentElement.classList.remove(\"dark\");\n }\n setSavedThemeMode(mode);\n }, [\n mode,\n setSavedThemeMode\n ]);\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(theme_ThemeContext.Provider, {\n value: contextValues,\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(styles_ThemeProvider_ThemeProvider, {\n theme: contextValues.themeOptions,\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(CssBaseline_CssBaseline, {}),\n children\n ]\n })\n });\n}\n/* harmony default export */ var theme = (Provider);\n\n// EXTERNAL MODULE: ./node_modules/@solana/wallet-adapter-react-ui/styles.css\nvar wallet_adapter_react_ui_styles = __webpack_require__(6672);\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-base/lib/esm/types.js\nvar WalletAdapterNetwork;\n(function (WalletAdapterNetwork) {\n WalletAdapterNetwork[\"Mainnet\"] = \"mainnet-beta\";\n WalletAdapterNetwork[\"Testnet\"] = \"testnet\";\n WalletAdapterNetwork[\"Devnet\"] = \"devnet\";\n})(WalletAdapterNetwork || (WalletAdapterNetwork = {}));\n//# sourceMappingURL=types.js.map\n// EXTERNAL MODULE: ./node_modules/@solana/web3.js/lib/index.browser.esm.js + 15 modules\nvar index_browser_esm = __webpack_require__(6737);\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react/lib/esm/useConnection.js\n\nconst ConnectionContext = (0,react.createContext)({});\nfunction useConnection() {\n return (0,react.useContext)(ConnectionContext);\n}\n//# sourceMappingURL=useConnection.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react/lib/esm/ConnectionProvider.js\n\n\n\nconst ConnectionProvider = ({ children, endpoint, config = { commitment: 'confirmed' }, }) => {\n const connection = (0,react.useMemo)(() => new index_browser_esm.Connection(endpoint, config), [endpoint, config]);\n return react.createElement(ConnectionContext.Provider, { value: { connection } }, children);\n};\n//# sourceMappingURL=ConnectionProvider.js.map\n// EXTERNAL MODULE: ./node_modules/eventemitter3/index.js\nvar eventemitter3 = __webpack_require__(6729);\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-base/lib/esm/errors.js\nclass WalletError extends Error {\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n constructor(message, error) {\n super(message);\n this.error = error;\n }\n}\nclass WalletNotReadyError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotReadyError';\n }\n}\nclass WalletLoadError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletLoadError';\n }\n}\nclass WalletConfigError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletConfigError';\n }\n}\nclass WalletConnectionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletConnectionError';\n }\n}\nclass WalletDisconnectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletDisconnectedError';\n }\n}\nclass WalletDisconnectionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletDisconnectionError';\n }\n}\nclass WalletAccountError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletAccountError';\n }\n}\nclass WalletPublicKeyError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletPublicKeyError';\n }\n}\nclass WalletKeypairError extends (/* unused pure expression or super */ null && (WalletError)) {\n constructor() {\n super(...arguments);\n this.name = 'WalletKeypairError';\n }\n}\nclass WalletNotConnectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotConnectedError';\n }\n}\nclass WalletSendTransactionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSendTransactionError';\n }\n}\nclass WalletSignTransactionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignTransactionError';\n }\n}\nclass WalletSignMessageError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignMessageError';\n }\n}\nclass WalletSignInError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignInError';\n }\n}\nclass WalletTimeoutError extends (/* unused pure expression or super */ null && (WalletError)) {\n constructor() {\n super(...arguments);\n this.name = 'WalletTimeoutError';\n }\n}\nclass WalletWindowBlockedError extends (/* unused pure expression or super */ null && (WalletError)) {\n constructor() {\n super(...arguments);\n this.name = 'WalletWindowBlockedError';\n }\n}\nclass WalletWindowClosedError extends (/* unused pure expression or super */ null && (WalletError)) {\n constructor() {\n super(...arguments);\n this.name = 'WalletWindowClosedError';\n }\n}\n//# sourceMappingURL=errors.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-base/lib/esm/adapter.js\n\n\n\n/**\n * A wallet's readiness describes a series of states that the wallet can be in,\n * depending on what kind of wallet it is. An installable wallet (eg. a browser\n * extension like Phantom) might be `Installed` if we've found the Phantom API\n * in the global scope, or `NotDetected` otherwise. A loadable, zero-install\n * runtime (eg. Torus Wallet) might simply signal that it's `Loadable`. Use this\n * metadata to personalize the wallet list for each user (eg. to show their\n * installed wallets first).\n */\nvar WalletReadyState;\n(function (WalletReadyState) {\n /**\n * User-installable wallets can typically be detected by scanning for an API\n * that they've injected into the global context. If such an API is present,\n * we consider the wallet to have been installed.\n */\n WalletReadyState[\"Installed\"] = \"Installed\";\n WalletReadyState[\"NotDetected\"] = \"NotDetected\";\n /**\n * Loadable wallets are always available to you. Since you can load them at\n * any time, it's meaningless to say that they have been detected.\n */\n WalletReadyState[\"Loadable\"] = \"Loadable\";\n /**\n * If a wallet is not supported on a given platform (eg. server-rendering, or\n * mobile) then it will stay in the `Unsupported` state.\n */\n WalletReadyState[\"Unsupported\"] = \"Unsupported\";\n})(WalletReadyState || (WalletReadyState = {}));\nclass BaseWalletAdapter extends eventemitter3 {\n get connected() {\n return !!this.publicKey;\n }\n async autoConnect() {\n await this.connect();\n }\n async prepareTransaction(transaction, connection, options = {}) {\n const publicKey = this.publicKey;\n if (!publicKey)\n throw new WalletNotConnectedError();\n transaction.feePayer = transaction.feePayer || publicKey;\n transaction.recentBlockhash =\n transaction.recentBlockhash ||\n (await connection.getLatestBlockhash({\n commitment: options.preflightCommitment,\n minContextSlot: options.minContextSlot,\n })).blockhash;\n return transaction;\n }\n}\nfunction scopePollingDetectionStrategy(detect) {\n // Early return when server-side rendering\n if (typeof window === 'undefined' || typeof document === 'undefined')\n return;\n const disposers = [];\n function detectAndDispose() {\n const detected = detect();\n if (detected) {\n for (const dispose of disposers) {\n dispose();\n }\n }\n }\n // Strategy #1: Try detecting every second.\n const interval = \n // TODO: #334 Replace with idle callback strategy.\n setInterval(detectAndDispose, 1000);\n disposers.push(() => clearInterval(interval));\n // Strategy #2: Detect as soon as the DOM becomes 'ready'/'interactive'.\n if (\n // Implies that `DOMContentLoaded` has not yet fired.\n document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', detectAndDispose, { once: true });\n disposers.push(() => document.removeEventListener('DOMContentLoaded', detectAndDispose));\n }\n // Strategy #3: Detect after the `window` has fully loaded.\n if (\n // If the `complete` state has been reached, we're too late.\n document.readyState !== 'complete') {\n window.addEventListener('load', detectAndDispose, { once: true });\n disposers.push(() => window.removeEventListener('load', detectAndDispose));\n }\n // Strategy #4: Detect synchronously, now.\n detectAndDispose();\n}\n/**\n * Users on iOS can be redirected into a wallet's in-app browser automatically,\n * if that wallet has a universal link configured to do so\n * But should not be redirected from within a webview, eg. if they're already\n * inside a wallet's browser\n * This function can be used to identify users who are on iOS and can be redirected\n *\n * @returns true if the user can be redirected\n */\nfunction isIosAndRedirectable() {\n // SSR: return false\n if (!navigator)\n return false;\n const userAgent = navigator.userAgent.toLowerCase();\n // if on iOS the user agent will contain either iPhone or iPad\n // caveat: if requesting desktop site then this won't work\n const isIos = userAgent.includes('iphone') || userAgent.includes('ipad');\n // if in a webview then it will not include Safari\n // note that other iOS browsers also include Safari\n // so we will redirect only if Safari is also included\n const isSafari = userAgent.includes('safari');\n return isIos && isSafari;\n}\n//# sourceMappingURL=adapter.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-base/lib/esm/transaction.js\nfunction isVersionedTransaction(transaction) {\n return 'version' in transaction;\n}\n//# sourceMappingURL=transaction.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-base/lib/esm/signer.js\n\n\n\nclass BaseSignerWalletAdapter extends BaseWalletAdapter {\n async sendTransaction(transaction, connection, options = {}) {\n let emit = true;\n try {\n if (isVersionedTransaction(transaction)) {\n if (!this.supportedTransactionVersions)\n throw new WalletSendTransactionError(`Sending versioned transactions isn't supported by this wallet`);\n if (!this.supportedTransactionVersions.has(transaction.version))\n throw new WalletSendTransactionError(`Sending transaction version ${transaction.version} isn't supported by this wallet`);\n try {\n transaction = await this.signTransaction(transaction);\n const rawTransaction = transaction.serialize();\n return await connection.sendRawTransaction(rawTransaction, options);\n }\n catch (error) {\n // If the error was thrown by `signTransaction`, rethrow it and don't emit a duplicate event\n if (error instanceof WalletSignTransactionError) {\n emit = false;\n throw error;\n }\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n else {\n try {\n const { signers, ...sendOptions } = options;\n transaction = await this.prepareTransaction(transaction, connection, sendOptions);\n signers?.length && transaction.partialSign(...signers);\n transaction = await this.signTransaction(transaction);\n const rawTransaction = transaction.serialize();\n return await connection.sendRawTransaction(rawTransaction, sendOptions);\n }\n catch (error) {\n // If the error was thrown by `signTransaction`, rethrow it and don't emit a duplicate event\n if (error instanceof WalletSignTransactionError) {\n emit = false;\n throw error;\n }\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n }\n catch (error) {\n if (emit) {\n this.emit('error', error);\n }\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n for (const transaction of transactions) {\n if (isVersionedTransaction(transaction)) {\n if (!this.supportedTransactionVersions)\n throw new WalletSignTransactionError(`Signing versioned transactions isn't supported by this wallet`);\n if (!this.supportedTransactionVersions.has(transaction.version))\n throw new WalletSignTransactionError(`Signing transaction version ${transaction.version} isn't supported by this wallet`);\n }\n }\n const signedTransactions = [];\n for (const transaction of transactions) {\n signedTransactions.push(await this.signTransaction(transaction));\n }\n return signedTransactions;\n }\n}\nclass BaseMessageSignerWalletAdapter extends BaseSignerWalletAdapter {\n}\nclass BaseSignInMessageSignerWalletAdapter extends BaseMessageSignerWalletAdapter {\n}\n//# sourceMappingURL=signer.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-standard-util/lib/esm/signIn.js\n\n\n/**\n * TODO: docs\n */\nfunction verifySignIn(input, output) {\n const { signedMessage, signature, account: { publicKey }, } = output;\n const message = deriveSignInMessage(input, output);\n return !!message && verifyMessageSignature({ message, signedMessage, signature, publicKey });\n}\n/**\n * TODO: docs\n */\nfunction deriveSignInMessage(input, output) {\n const text = deriveSignInMessageText(input, output);\n if (!text)\n return null;\n return new TextEncoder().encode(text);\n}\n/**\n * TODO: docs\n */\nfunction deriveSignInMessageText(input, output) {\n const parsed = parseSignInMessage(output.signedMessage);\n if (!parsed)\n return null;\n if (input.domain && input.domain !== parsed.domain)\n return null;\n if (input.address && input.address !== parsed.address)\n return null;\n if (input.statement !== parsed.statement)\n return null;\n if (input.uri !== parsed.uri)\n return null;\n if (input.version !== parsed.version)\n return null;\n if (input.chainId !== parsed.chainId)\n return null;\n if (input.nonce !== parsed.nonce)\n return null;\n if (input.issuedAt !== parsed.issuedAt)\n return null;\n if (input.expirationTime !== parsed.expirationTime)\n return null;\n if (input.notBefore !== parsed.notBefore)\n return null;\n if (input.requestId !== parsed.requestId)\n return null;\n if (input.resources) {\n if (!parsed.resources)\n return null;\n if (!arraysEqual(input.resources, parsed.resources))\n return null;\n }\n else if (parsed.resources)\n return null;\n return createSignInMessageText(parsed);\n}\n/**\n * TODO: docs\n */\nfunction parseSignInMessage(message) {\n const text = new TextDecoder().decode(message);\n return parseSignInMessageText(text);\n}\n// TODO: implement https://github.com/solana-labs/solana/blob/master/docs/src/proposals/off-chain-message-signing.md\nconst DOMAIN = '(?[^\\\\n]+?) wants you to sign in with your Solana account:\\\\n';\nconst ADDRESS = '(?
[^\\\\n]+)(?:\\\\n|$)';\nconst STATEMENT = '(?:\\\\n(?[\\\\S\\\\s]*?)(?:\\\\n|$))??';\nconst URI = '(?:\\\\nURI: (?[^\\\\n]+))?';\nconst VERSION = '(?:\\\\nVersion: (?[^\\\\n]+))?';\nconst CHAIN_ID = '(?:\\\\nChain ID: (?[^\\\\n]+))?';\nconst NONCE = '(?:\\\\nNonce: (?[^\\\\n]+))?';\nconst ISSUED_AT = '(?:\\\\nIssued At: (?[^\\\\n]+))?';\nconst EXPIRATION_TIME = '(?:\\\\nExpiration Time: (?[^\\\\n]+))?';\nconst NOT_BEFORE = '(?:\\\\nNot Before: (?[^\\\\n]+))?';\nconst REQUEST_ID = '(?:\\\\nRequest ID: (?[^\\\\n]+))?';\nconst RESOURCES = '(?:\\\\nResources:(?(?:\\\\n- [^\\\\n]+)*))?';\nconst FIELDS = `${URI}${VERSION}${CHAIN_ID}${NONCE}${ISSUED_AT}${EXPIRATION_TIME}${NOT_BEFORE}${REQUEST_ID}${RESOURCES}`;\nconst MESSAGE = new RegExp(`^${DOMAIN}${ADDRESS}${STATEMENT}${FIELDS}\\\\n*$`);\n/**\n * TODO: docs\n */\nfunction parseSignInMessageText(text) {\n const match = MESSAGE.exec(text);\n if (!match)\n return null;\n const groups = match.groups;\n if (!groups)\n return null;\n return {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n domain: groups.domain,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n address: groups.address,\n statement: groups.statement,\n uri: groups.uri,\n version: groups.version,\n nonce: groups.nonce,\n chainId: groups.chainId,\n issuedAt: groups.issuedAt,\n expirationTime: groups.expirationTime,\n notBefore: groups.notBefore,\n requestId: groups.requestId,\n resources: groups.resources?.split('\\n- ').slice(1),\n };\n}\n/**\n * TODO: docs\n */\nfunction createSignInMessage(input) {\n const text = createSignInMessageText(input);\n return new TextEncoder().encode(text);\n}\n/**\n * TODO: docs\n */\nfunction createSignInMessageText(input) {\n // ${domain} wants you to sign in with your Solana account:\n // ${address}\n //\n // ${statement}\n //\n // URI: ${uri}\n // Version: ${version}\n // Chain ID: ${chain}\n // Nonce: ${nonce}\n // Issued At: ${issued-at}\n // Expiration Time: ${expiration-time}\n // Not Before: ${not-before}\n // Request ID: ${request-id}\n // Resources:\n // - ${resources[0]}\n // - ${resources[1]}\n // ...\n // - ${resources[n]}\n let message = `${input.domain} wants you to sign in with your Solana account:\\n`;\n message += `${input.address}`;\n if (input.statement) {\n message += `\\n\\n${input.statement}`;\n }\n const fields = [];\n if (input.uri) {\n fields.push(`URI: ${input.uri}`);\n }\n if (input.version) {\n fields.push(`Version: ${input.version}`);\n }\n if (input.chainId) {\n fields.push(`Chain ID: ${input.chainId}`);\n }\n if (input.nonce) {\n fields.push(`Nonce: ${input.nonce}`);\n }\n if (input.issuedAt) {\n fields.push(`Issued At: ${input.issuedAt}`);\n }\n if (input.expirationTime) {\n fields.push(`Expiration Time: ${input.expirationTime}`);\n }\n if (input.notBefore) {\n fields.push(`Not Before: ${input.notBefore}`);\n }\n if (input.requestId) {\n fields.push(`Request ID: ${input.requestId}`);\n }\n if (input.resources) {\n fields.push(`Resources:`);\n for (const resource of input.resources) {\n fields.push(`- ${resource}`);\n }\n }\n if (fields.length) {\n message += `\\n\\n${fields.join('\\n')}`;\n }\n return message;\n}\n//# sourceMappingURL=signIn.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana-mobile/mobile-wallet-adapter-protocol/lib/esm/index.js\n\n\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst SolanaMobileWalletAdapterErrorCode = {\n ERROR_ASSOCIATION_PORT_OUT_OF_RANGE: 'ERROR_ASSOCIATION_PORT_OUT_OF_RANGE',\n ERROR_FORBIDDEN_WALLET_BASE_URL: 'ERROR_FORBIDDEN_WALLET_BASE_URL',\n ERROR_SECURE_CONTEXT_REQUIRED: 'ERROR_SECURE_CONTEXT_REQUIRED',\n ERROR_SESSION_CLOSED: 'ERROR_SESSION_CLOSED',\n ERROR_SESSION_TIMEOUT: 'ERROR_SESSION_TIMEOUT',\n ERROR_WALLET_NOT_FOUND: 'ERROR_WALLET_NOT_FOUND',\n ERROR_INVALID_PROTOCOL_VERSION: 'ERROR_INVALID_PROTOCOL_VERSION',\n};\nclass SolanaMobileWalletAdapterError extends Error {\n constructor(...args) {\n const [code, message, data] = args;\n super(message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaMobileWalletAdapterError';\n }\n}\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst SolanaMobileWalletAdapterProtocolErrorCode = {\n // Keep these in sync with `mobilewalletadapter/common/ProtocolContract.java`.\n ERROR_AUTHORIZATION_FAILED: -1,\n ERROR_INVALID_PAYLOADS: -2,\n ERROR_NOT_SIGNED: -3,\n ERROR_NOT_SUBMITTED: -4,\n ERROR_TOO_MANY_PAYLOADS: -5,\n ERROR_ATTEST_ORIGIN_ANDROID: -100,\n};\nclass SolanaMobileWalletAdapterProtocolError extends Error {\n constructor(...args) {\n const [jsonRpcMessageId, code, message, data] = args;\n super(message);\n this.code = code;\n this.data = data;\n this.jsonRpcMessageId = jsonRpcMessageId;\n this.name = 'SolanaMobileWalletAdapterProtocolError';\n }\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction createHelloReq(ecdhPublicKey, associationKeypairPrivateKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const publicKeyBuffer = yield crypto.subtle.exportKey('raw', ecdhPublicKey);\n const signatureBuffer = yield crypto.subtle.sign({ hash: 'SHA-256', name: 'ECDSA' }, associationKeypairPrivateKey, publicKeyBuffer);\n const response = new Uint8Array(publicKeyBuffer.byteLength + signatureBuffer.byteLength);\n response.set(new Uint8Array(publicKeyBuffer), 0);\n response.set(new Uint8Array(signatureBuffer), publicKeyBuffer.byteLength);\n return response;\n });\n}\n\nfunction encode(input) {\n return window.btoa(input);\n}\n\nfunction createSIWSMessage(payload) {\n return createSignInMessageText(payload);\n}\nfunction createSIWSMessageBase64(payload) {\n return encode(createSIWSMessage(payload));\n}\n\n// optional features\nconst SolanaSignTransactions = 'solana:signTransactions';\nconst SolanaCloneAuthorization = 'solana:cloneAuthorization';\nconst SolanaSignInWithSolana = 'solana:signInWithSolana';\n\n/**\n * Creates a {@link MobileWallet} proxy that handles backwards compatibility and API to RPC conversion.\n *\n * @param protocolVersion the protocol version in use for this session/request\n * @param protocolRequestHandler callback function that handles sending the RPC request to the wallet endpoint.\n * @returns a {@link MobileWallet} proxy\n */\nfunction createMobileWalletProxy(protocolVersion, protocolRequestHandler) {\n return new Proxy({}, {\n get(target, p) {\n if (target[p] == null) {\n target[p] = function (inputParams) {\n return __awaiter(this, void 0, void 0, function* () {\n const { method, params } = handleMobileWalletRequest(p, inputParams, protocolVersion);\n const result = yield protocolRequestHandler(method, params);\n // if the request tried to sign in but the wallet did not return a sign in result, fallback on message signing\n if (method === 'authorize' && params.sign_in_payload && !result.sign_in_result) {\n result['sign_in_result'] = yield signInFallback(params.sign_in_payload, result, protocolRequestHandler);\n }\n return handleMobileWalletResponse(p, result, protocolVersion);\n });\n };\n }\n return target[p];\n },\n defineProperty() {\n return false;\n },\n deleteProperty() {\n return false;\n },\n });\n}\n/**\n * Handles all {@link MobileWallet} API requests and determines the correct MWA RPC method and params to call.\n * This handles backwards compatibility, based on the provided @protocolVersion.\n *\n * @param methodName the name of {@link MobileWallet} method that was called\n * @param methodParams the parameters that were passed to the method\n * @param protocolVersion the protocol version in use for this session/request\n * @returns the RPC request method and params that should be sent to the wallet endpoint\n */\nfunction handleMobileWalletRequest(methodName, methodParams, protocolVersion) {\n let params = methodParams;\n let method = methodName\n .toString()\n .replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)\n .toLowerCase();\n switch (methodName) {\n case 'authorize': {\n let { chain } = params;\n if (protocolVersion === 'legacy') {\n switch (chain) {\n case 'solana:testnet': {\n chain = 'testnet';\n break;\n }\n case 'solana:devnet': {\n chain = 'devnet';\n break;\n }\n case 'solana:mainnet': {\n chain = 'mainnet-beta';\n break;\n }\n default: {\n chain = params.cluster;\n }\n }\n params.cluster = chain;\n }\n else {\n switch (chain) {\n case 'testnet':\n case 'devnet': {\n chain = `solana:${chain}`;\n break;\n }\n case 'mainnet-beta': {\n chain = 'solana:mainnet';\n break;\n }\n }\n params.chain = chain;\n }\n }\n case 'reauthorize': {\n const { auth_token, identity } = params;\n if (auth_token) {\n switch (protocolVersion) {\n case 'legacy': {\n method = 'reauthorize';\n params = { auth_token: auth_token, identity: identity };\n break;\n }\n default: {\n method = 'authorize';\n break;\n }\n }\n }\n break;\n }\n }\n return { method, params };\n}\n/**\n * Handles all {@link MobileWallet} API responses and modifies the response for backwards compatibility, if needed\n *\n * @param method the {@link MobileWallet} method that was called\n * @param response the original response that was returned by the method call\n * @param protocolVersion the protocol version in use for this session/request\n * @returns the possibly modified response\n */\nfunction handleMobileWalletResponse(method, response, protocolVersion) {\n switch (method) {\n case 'getCapabilities': {\n const capabilities = response;\n switch (protocolVersion) {\n case 'legacy': {\n const features = [SolanaSignTransactions];\n if (capabilities.supports_clone_authorization === true) {\n features.push(SolanaCloneAuthorization);\n }\n return Object.assign(Object.assign({}, capabilities), { features: features });\n }\n case 'v1': {\n return Object.assign(Object.assign({}, capabilities), { supports_sign_and_send_transactions: true, supports_clone_authorization: capabilities.features.includes(SolanaCloneAuthorization) });\n }\n }\n }\n }\n return response;\n}\nfunction signInFallback(signInPayload, authorizationResult, protocolRequestHandler) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const domain = (_a = signInPayload.domain) !== null && _a !== void 0 ? _a : window.location.host;\n const address = authorizationResult.accounts[0].address;\n const siwsMessage = createSIWSMessageBase64(Object.assign(Object.assign({}, signInPayload), { domain, address }));\n const signMessageResult = yield protocolRequestHandler('sign_messages', {\n addresses: [address],\n payloads: [siwsMessage]\n });\n const signInResult = {\n address: address,\n signed_message: siwsMessage,\n signature: signMessageResult.signed_payloads[0].slice(siwsMessage.length)\n };\n return signInResult;\n });\n}\n\nconst SEQUENCE_NUMBER_BYTES = 4;\nfunction createSequenceNumberVector(sequenceNumber) {\n if (sequenceNumber >= 4294967296) {\n throw new Error('Outbound sequence number overflow. The maximum sequence number is 32-bytes.');\n }\n const byteArray = new ArrayBuffer(SEQUENCE_NUMBER_BYTES);\n const view = new DataView(byteArray);\n view.setUint32(0, sequenceNumber, /* littleEndian */ false);\n return new Uint8Array(byteArray);\n}\n\nconst INITIALIZATION_VECTOR_BYTES = 12;\nconst ENCODED_PUBLIC_KEY_LENGTH_BYTES = 65;\nfunction encryptMessage(plaintext, sequenceNumber, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = createSequenceNumberVector(sequenceNumber);\n const initializationVector = new Uint8Array(INITIALIZATION_VECTOR_BYTES);\n crypto.getRandomValues(initializationVector);\n const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, new TextEncoder().encode(plaintext));\n const response = new Uint8Array(sequenceNumberVector.byteLength + initializationVector.byteLength + ciphertext.byteLength);\n response.set(new Uint8Array(sequenceNumberVector), 0);\n response.set(new Uint8Array(initializationVector), sequenceNumberVector.byteLength);\n response.set(new Uint8Array(ciphertext), sequenceNumberVector.byteLength + initializationVector.byteLength);\n return response;\n });\n}\nfunction decryptMessage(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = message.slice(0, SEQUENCE_NUMBER_BYTES);\n const initializationVector = message.slice(SEQUENCE_NUMBER_BYTES, SEQUENCE_NUMBER_BYTES + INITIALIZATION_VECTOR_BYTES);\n const ciphertext = message.slice(SEQUENCE_NUMBER_BYTES + INITIALIZATION_VECTOR_BYTES);\n const plaintextBuffer = yield crypto.subtle.decrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, ciphertext);\n const plaintext = getUtf8Decoder().decode(plaintextBuffer);\n return plaintext;\n });\n}\nfunction getAlgorithmParams(sequenceNumber, initializationVector) {\n return {\n additionalData: sequenceNumber,\n iv: initializationVector,\n name: 'AES-GCM',\n tagLength: 128, // 16 byte tag => 128 bits\n };\n}\nlet _utf8Decoder;\nfunction getUtf8Decoder() {\n if (_utf8Decoder === undefined) {\n _utf8Decoder = new TextDecoder('utf-8');\n }\n return _utf8Decoder;\n}\n\nfunction generateAssociationKeypair() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield crypto.subtle.generateKey({\n name: 'ECDSA',\n namedCurve: 'P-256',\n }, false /* extractable */, ['sign'] /* keyUsages */);\n });\n}\n\nfunction generateECDHKeypair() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield crypto.subtle.generateKey({\n name: 'ECDH',\n namedCurve: 'P-256',\n }, false /* extractable */, ['deriveKey', 'deriveBits'] /* keyUsages */);\n });\n}\n\nfunction encryptJsonRpcMessage(jsonRpcMessage, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = JSON.stringify(jsonRpcMessage);\n const sequenceNumber = jsonRpcMessage.id;\n return encryptMessage(plaintext, sequenceNumber, sharedSecret);\n });\n}\nfunction decryptJsonRpcMessage(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = yield decryptMessage(message, sharedSecret);\n const jsonRpcMessage = JSON.parse(plaintext);\n if (Object.hasOwnProperty.call(jsonRpcMessage, 'error')) {\n throw new SolanaMobileWalletAdapterProtocolError(jsonRpcMessage.id, jsonRpcMessage.error.code, jsonRpcMessage.error.message);\n }\n return jsonRpcMessage;\n });\n}\n\nfunction parseHelloRsp(payloadBuffer, // The X9.62-encoded wallet endpoint ephemeral ECDH public keypoint.\nassociationPublicKey, ecdhPrivateKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const [associationPublicKeyBuffer, walletPublicKey] = yield Promise.all([\n crypto.subtle.exportKey('raw', associationPublicKey),\n crypto.subtle.importKey('raw', payloadBuffer.slice(0, ENCODED_PUBLIC_KEY_LENGTH_BYTES), { name: 'ECDH', namedCurve: 'P-256' }, false /* extractable */, [] /* keyUsages */),\n ]);\n const sharedSecret = yield crypto.subtle.deriveBits({ name: 'ECDH', public: walletPublicKey }, ecdhPrivateKey, 256);\n const ecdhSecretKey = yield crypto.subtle.importKey('raw', sharedSecret, 'HKDF', false /* extractable */, ['deriveKey'] /* keyUsages */);\n const aesKeyMaterialVal = yield crypto.subtle.deriveKey({\n name: 'HKDF',\n hash: 'SHA-256',\n salt: new Uint8Array(associationPublicKeyBuffer),\n info: new Uint8Array(),\n }, ecdhSecretKey, { name: 'AES-GCM', length: 128 }, false /* extractable */, ['encrypt', 'decrypt']);\n return aesKeyMaterialVal;\n });\n}\n\nfunction parseSessionProps(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = yield decryptMessage(message, sharedSecret);\n const jsonProperties = JSON.parse(plaintext);\n let protocolVersion = 'legacy';\n if (Object.hasOwnProperty.call(jsonProperties, 'v')) {\n switch (jsonProperties.v) {\n case 1:\n case '1':\n case 'v1':\n protocolVersion = 'v1';\n break;\n case 'legacy':\n protocolVersion = 'legacy';\n break;\n default:\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_INVALID_PROTOCOL_VERSION, `Unknown/unsupported protocol version: ${jsonProperties.v}`);\n }\n }\n return ({\n protocol_version: protocolVersion\n });\n });\n}\n\nfunction getRandomAssociationPort() {\n return assertAssociationPort(49152 + Math.floor(Math.random() * (65535 - 49152 + 1)));\n}\nfunction assertAssociationPort(port) {\n if (port < 49152 || port > 65535) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_ASSOCIATION_PORT_OUT_OF_RANGE, `Association port number must be between 49152 and 65535. ${port} given.`, { port });\n }\n return port;\n}\n\n// https://stackoverflow.com/a/9458996/802047\nfunction arrayBufferToBase64String(buffer) {\n let binary = '';\n const bytes = new Uint8Array(buffer);\n const len = bytes.byteLength;\n for (let ii = 0; ii < len; ii++) {\n binary += String.fromCharCode(bytes[ii]);\n }\n return window.btoa(binary);\n}\n\nfunction getStringWithURLUnsafeCharactersReplaced(unsafeBase64EncodedString) {\n return unsafeBase64EncodedString.replace(/[/+=]/g, (m) => ({\n '/': '_',\n '+': '-',\n '=': '.',\n }[m]));\n}\n\nconst INTENT_NAME = 'solana-wallet';\nfunction getPathParts(pathString) {\n return (pathString\n // Strip leading and trailing slashes\n .replace(/(^\\/+|\\/+$)/g, '')\n // Return an array of directories\n .split('/'));\n}\nfunction getIntentURL(methodPathname, intentUrlBase) {\n let baseUrl = null;\n if (intentUrlBase) {\n try {\n baseUrl = new URL(intentUrlBase);\n }\n catch (_a) { } // eslint-disable-line no-empty\n if ((baseUrl === null || baseUrl === void 0 ? void 0 : baseUrl.protocol) !== 'https:') {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Base URLs supplied by wallets must be valid `https` URLs');\n }\n }\n baseUrl || (baseUrl = new URL(`${INTENT_NAME}:/`));\n const pathname = methodPathname.startsWith('/')\n ? // Method is an absolute path. Replace it wholesale.\n methodPathname\n : // Method is a relative path. Merge it with the existing one.\n [...getPathParts(baseUrl.pathname), ...getPathParts(methodPathname)].join('/');\n return new URL(pathname, baseUrl);\n}\nfunction getAssociateAndroidIntentURL(associationPublicKey, putativePort, associationURLBase, protocolVersions = ['v1']) {\n return __awaiter(this, void 0, void 0, function* () {\n const associationPort = assertAssociationPort(putativePort);\n const exportedKey = yield crypto.subtle.exportKey('raw', associationPublicKey);\n const encodedKey = arrayBufferToBase64String(exportedKey);\n const url = getIntentURL('v1/associate/local', associationURLBase);\n url.searchParams.set('association', getStringWithURLUnsafeCharactersReplaced(encodedKey));\n url.searchParams.set('port', `${associationPort}`);\n protocolVersions.forEach((version) => {\n url.searchParams.set('v', version);\n });\n return url;\n });\n}\n\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst Browser = {\n Firefox: 0,\n Other: 1,\n};\nfunction assertUnreachable(x) {\n return x;\n}\nfunction getBrowser() {\n return navigator.userAgent.indexOf('Firefox/') !== -1 ? Browser.Firefox : Browser.Other;\n}\nfunction getDetectionPromise() {\n // Chrome and others silently fail if a custom protocol is not supported.\n // For these, we wait to see if the browser is navigated away from in\n // a reasonable amount of time (ie. the native wallet opened).\n return new Promise((resolve, reject) => {\n function cleanup() {\n clearTimeout(timeoutId);\n window.removeEventListener('blur', handleBlur);\n }\n function handleBlur() {\n cleanup();\n resolve();\n }\n window.addEventListener('blur', handleBlur);\n const timeoutId = setTimeout(() => {\n cleanup();\n reject();\n }, 2000);\n });\n}\nlet _frame = null;\nfunction launchUrlThroughHiddenFrame(url) {\n if (_frame == null) {\n _frame = document.createElement('iframe');\n _frame.style.display = 'none';\n document.body.appendChild(_frame);\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _frame.contentWindow.location.href = url.toString();\n}\nfunction startSession(associationPublicKey, associationURLBase) {\n return __awaiter(this, void 0, void 0, function* () {\n const randomAssociationPort = getRandomAssociationPort();\n const associationUrl = yield getAssociateAndroidIntentURL(associationPublicKey, randomAssociationPort, associationURLBase);\n if (associationUrl.protocol === 'https:') {\n // The association URL is an Android 'App Link' or iOS 'Universal Link'.\n // These are regular web URLs that are designed to launch an app if it\n // is installed or load the actual target webpage if not.\n window.location.assign(associationUrl);\n }\n else {\n // The association URL has a custom protocol (eg. `solana-wallet:`)\n try {\n const browser = getBrowser();\n switch (browser) {\n case Browser.Firefox:\n // If a custom protocol is not supported in Firefox, it throws.\n launchUrlThroughHiddenFrame(associationUrl);\n // If we reached this line, it's supported.\n break;\n case Browser.Other: {\n const detectionPromise = getDetectionPromise();\n window.location.assign(associationUrl);\n yield detectionPromise;\n break;\n }\n default:\n assertUnreachable(browser);\n }\n }\n catch (e) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_WALLET_NOT_FOUND, 'Found no installed wallet that supports the mobile wallet protocol.');\n }\n }\n return randomAssociationPort;\n });\n}\n\nconst WEBSOCKET_CONNECTION_CONFIG = {\n /**\n * 300 milliseconds is a generally accepted threshold for what someone\n * would consider an acceptable response time for a user interface\n * after having performed a low-attention tapping task. We set the initial\n * interval at which we wait for the wallet to set up the websocket at\n * half this, as per the Nyquist frequency, with a progressive backoff\n * sequence from there. The total wait time is 30s, which allows for the\n * user to be presented with a disambiguation dialog, select a wallet, and\n * for the wallet app to subsequently start.\n */\n retryDelayScheduleMs: [150, 150, 200, 500, 500, 750, 750, 1000],\n timeoutMs: 30000,\n};\nconst WEBSOCKET_PROTOCOL = 'com.solana.mobilewalletadapter.v1';\nfunction assertSecureContext() {\n if (typeof window === 'undefined' || window.isSecureContext !== true) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SECURE_CONTEXT_REQUIRED, 'The mobile wallet adapter protocol must be used in a secure context (`https`).');\n }\n}\nfunction assertSecureEndpointSpecificURI(walletUriBase) {\n let url;\n try {\n url = new URL(walletUriBase);\n }\n catch (_a) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Invalid base URL supplied by wallet');\n }\n if (url.protocol !== 'https:') {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Base URLs supplied by wallets must be valid `https` URLs');\n }\n}\nfunction getSequenceNumberFromByteArray(byteArray) {\n const view = new DataView(byteArray);\n return view.getUint32(0, /* littleEndian */ false);\n}\nfunction transact(callback, config) {\n return __awaiter(this, void 0, void 0, function* () {\n assertSecureContext();\n const associationKeypair = yield generateAssociationKeypair();\n const sessionPort = yield startSession(associationKeypair.publicKey, config === null || config === void 0 ? void 0 : config.baseUri);\n const websocketURL = `ws://localhost:${sessionPort}/solana-wallet`;\n let connectionStartTime;\n const getNextRetryDelayMs = (() => {\n const schedule = [...WEBSOCKET_CONNECTION_CONFIG.retryDelayScheduleMs];\n return () => (schedule.length > 1 ? schedule.shift() : schedule[0]);\n })();\n let nextJsonRpcMessageId = 1;\n let lastKnownInboundSequenceNumber = 0;\n let state = { __type: 'disconnected' };\n return new Promise((resolve, reject) => {\n let socket;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const jsonRpcResponsePromises = {};\n const handleOpen = () => __awaiter(this, void 0, void 0, function* () {\n if (state.__type !== 'connecting') {\n console.warn('Expected adapter state to be `connecting` at the moment the websocket opens. ' +\n `Got \\`${state.__type}\\`.`);\n return;\n }\n const { associationKeypair } = state;\n socket.removeEventListener('open', handleOpen);\n const ecdhKeypair = yield generateECDHKeypair();\n socket.send(yield createHelloReq(ecdhKeypair.publicKey, associationKeypair.privateKey));\n state = {\n __type: 'hello_req_sent',\n associationPublicKey: associationKeypair.publicKey,\n ecdhPrivateKey: ecdhKeypair.privateKey,\n };\n });\n const handleClose = (evt) => {\n if (evt.wasClean) {\n state = { __type: 'disconnected' };\n }\n else {\n reject(new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SESSION_CLOSED, `The wallet session dropped unexpectedly (${evt.code}: ${evt.reason}).`, { closeEvent: evt }));\n }\n disposeSocket();\n };\n const handleError = (_evt) => __awaiter(this, void 0, void 0, function* () {\n disposeSocket();\n if (Date.now() - connectionStartTime >= WEBSOCKET_CONNECTION_CONFIG.timeoutMs) {\n reject(new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SESSION_TIMEOUT, `Failed to connect to the wallet websocket on port ${sessionPort}.`));\n }\n else {\n yield new Promise((resolve) => {\n const retryDelayMs = getNextRetryDelayMs();\n retryWaitTimeoutId = window.setTimeout(resolve, retryDelayMs);\n });\n attemptSocketConnection();\n }\n });\n const handleMessage = (evt) => __awaiter(this, void 0, void 0, function* () {\n const responseBuffer = yield evt.data.arrayBuffer();\n switch (state.__type) {\n case 'connected':\n try {\n const sequenceNumberVector = responseBuffer.slice(0, SEQUENCE_NUMBER_BYTES);\n const sequenceNumber = getSequenceNumberFromByteArray(sequenceNumberVector);\n if (sequenceNumber !== (lastKnownInboundSequenceNumber + 1)) {\n throw new Error('Encrypted message has invalid sequence number');\n }\n lastKnownInboundSequenceNumber = sequenceNumber;\n const jsonRpcMessage = yield decryptJsonRpcMessage(responseBuffer, state.sharedSecret);\n const responsePromise = jsonRpcResponsePromises[jsonRpcMessage.id];\n delete jsonRpcResponsePromises[jsonRpcMessage.id];\n responsePromise.resolve(jsonRpcMessage.result);\n }\n catch (e) {\n if (e instanceof SolanaMobileWalletAdapterProtocolError) {\n const responsePromise = jsonRpcResponsePromises[e.jsonRpcMessageId];\n delete jsonRpcResponsePromises[e.jsonRpcMessageId];\n responsePromise.reject(e);\n }\n else {\n throw e;\n }\n }\n break;\n case 'hello_req_sent': {\n const sharedSecret = yield parseHelloRsp(responseBuffer, state.associationPublicKey, state.ecdhPrivateKey);\n const sessionPropertiesBuffer = responseBuffer.slice(ENCODED_PUBLIC_KEY_LENGTH_BYTES);\n const sessionProperties = sessionPropertiesBuffer.byteLength !== 0\n ? yield (() => __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = sessionPropertiesBuffer.slice(0, SEQUENCE_NUMBER_BYTES);\n const sequenceNumber = getSequenceNumberFromByteArray(sequenceNumberVector);\n if (sequenceNumber !== (lastKnownInboundSequenceNumber + 1)) {\n throw new Error('Encrypted message has invalid sequence number');\n }\n lastKnownInboundSequenceNumber = sequenceNumber;\n return parseSessionProps(sessionPropertiesBuffer, sharedSecret);\n }))() : { protocol_version: 'legacy' };\n state = { __type: 'connected', sharedSecret, sessionProperties };\n const wallet = createMobileWalletProxy(sessionProperties.protocol_version, (method, params) => __awaiter(this, void 0, void 0, function* () {\n const id = nextJsonRpcMessageId++;\n socket.send(yield encryptJsonRpcMessage({\n id,\n jsonrpc: '2.0',\n method,\n params: params !== null && params !== void 0 ? params : {},\n }, sharedSecret));\n return new Promise((resolve, reject) => {\n jsonRpcResponsePromises[id] = {\n resolve(result) {\n switch (method) {\n case 'authorize':\n case 'reauthorize': {\n const { wallet_uri_base } = result;\n if (wallet_uri_base != null) {\n try {\n assertSecureEndpointSpecificURI(wallet_uri_base);\n }\n catch (e) {\n reject(e);\n return;\n }\n }\n break;\n }\n }\n resolve(result);\n },\n reject,\n };\n });\n }));\n try {\n resolve(yield callback(wallet));\n }\n catch (e) {\n reject(e);\n }\n finally {\n disposeSocket();\n socket.close();\n }\n break;\n }\n }\n });\n let disposeSocket;\n let retryWaitTimeoutId;\n const attemptSocketConnection = () => {\n if (disposeSocket) {\n disposeSocket();\n }\n state = { __type: 'connecting', associationKeypair };\n if (connectionStartTime === undefined) {\n connectionStartTime = Date.now();\n }\n socket = new WebSocket(websocketURL, [WEBSOCKET_PROTOCOL]);\n socket.addEventListener('open', handleOpen);\n socket.addEventListener('close', handleClose);\n socket.addEventListener('error', handleError);\n socket.addEventListener('message', handleMessage);\n disposeSocket = () => {\n window.clearTimeout(retryWaitTimeoutId);\n socket.removeEventListener('open', handleOpen);\n socket.removeEventListener('close', handleClose);\n socket.removeEventListener('error', handleError);\n socket.removeEventListener('message', handleMessage);\n };\n };\n attemptSocketConnection();\n });\n });\n}\n\n\n\n// EXTERNAL MODULE: ./node_modules/bs58/index.js\nvar bs58 = __webpack_require__(7191);\n;// CONCATENATED MODULE: ./node_modules/@solana-mobile/mobile-wallet-adapter-protocol-web3js/lib/esm/index.js\n\n\n\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction esm_awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction fromUint8Array(byteArray) {\n return window.btoa(String.fromCharCode.call(null, ...byteArray));\n}\nfunction toUint8Array(base64EncodedByteArray) {\n return new Uint8Array(window\n .atob(base64EncodedByteArray)\n .split('')\n .map((c) => c.charCodeAt(0)));\n}\n\nfunction getPayloadFromTransaction(transaction) {\n const serializedTransaction = 'version' in transaction\n ? transaction.serialize()\n : transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n });\n const payload = fromUint8Array(serializedTransaction);\n return payload;\n}\nfunction getTransactionFromWireMessage(byteArray) {\n const numSignatures = byteArray[0];\n const messageOffset = numSignatures * index_browser_esm.SIGNATURE_LENGTH_IN_BYTES + 1;\n const version = index_browser_esm.VersionedMessage.deserializeMessageVersion(byteArray.slice(messageOffset, byteArray.length));\n if (version === 'legacy') {\n return index_browser_esm.Transaction.from(byteArray);\n }\n else {\n return index_browser_esm.VersionedTransaction.deserialize(byteArray);\n }\n}\nfunction esm_transact(callback, config) {\n return esm_awaiter(this, void 0, void 0, function* () {\n const augmentedCallback = (wallet) => {\n const augmentedAPI = new Proxy({}, {\n get(target, p) {\n if (target[p] == null) {\n switch (p) {\n case 'signAndSendTransactions':\n target[p] = function (_a) {\n var { minContextSlot, commitment, skipPreflight, maxRetries, waitForCommitmentToSendNextTransaction, transactions } = _a, rest = __rest(_a, [\"minContextSlot\", \"commitment\", \"skipPreflight\", \"maxRetries\", \"waitForCommitmentToSendNextTransaction\", \"transactions\"]);\n return esm_awaiter(this, void 0, void 0, function* () {\n const payloads = transactions.map(getPayloadFromTransaction);\n const options = {\n min_context_slot: minContextSlot,\n commitment: commitment,\n skip_preflight: skipPreflight,\n max_retries: maxRetries,\n wait_for_commitment_to_send_next_transaction: waitForCommitmentToSendNextTransaction\n };\n const { signatures: base64EncodedSignatures } = yield wallet.signAndSendTransactions(Object.assign(Object.assign(Object.assign({}, rest), (Object.values(options).some(element => element != null)\n ? { options: options }\n : null)), { payloads }));\n const signatures = base64EncodedSignatures.map(toUint8Array).map(bs58.encode);\n return signatures;\n });\n };\n break;\n case 'signMessages':\n target[p] = function (_a) {\n var { payloads } = _a, rest = __rest(_a, [\"payloads\"]);\n return esm_awaiter(this, void 0, void 0, function* () {\n const base64EncodedPayloads = payloads.map(fromUint8Array);\n const { signed_payloads: base64EncodedSignedMessages } = yield wallet.signMessages(Object.assign(Object.assign({}, rest), { payloads: base64EncodedPayloads }));\n const signedMessages = base64EncodedSignedMessages.map(toUint8Array);\n return signedMessages;\n });\n };\n break;\n case 'signTransactions':\n target[p] = function (_a) {\n var { transactions } = _a, rest = __rest(_a, [\"transactions\"]);\n return esm_awaiter(this, void 0, void 0, function* () {\n const payloads = transactions.map(getPayloadFromTransaction);\n const { signed_payloads: base64EncodedCompiledTransactions } = yield wallet.signTransactions(Object.assign(Object.assign({}, rest), { payloads }));\n const compiledTransactions = base64EncodedCompiledTransactions.map(toUint8Array);\n const signedTransactions = compiledTransactions.map(getTransactionFromWireMessage);\n return signedTransactions;\n });\n };\n break;\n default: {\n target[p] = wallet[p];\n break;\n }\n }\n }\n return target[p];\n },\n defineProperty() {\n return false;\n },\n deleteProperty() {\n return false;\n },\n });\n return callback(augmentedAPI);\n };\n return yield transact(augmentedCallback, config);\n });\n}\n\n\n\n;// CONCATENATED MODULE: ./node_modules/@solana-mobile/wallet-adapter-mobile/lib/esm/index.js\n\n\n\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction lib_esm_awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction esm_toUint8Array(base64EncodedByteArray) {\n return new Uint8Array(window\n .atob(base64EncodedByteArray)\n .split('')\n .map((c) => c.charCodeAt(0)));\n}\n\nfunction getIsSupported() {\n return (typeof window !== 'undefined' &&\n window.isSecureContext &&\n typeof document !== 'undefined' &&\n /android/i.test(navigator.userAgent));\n}\n\nconst SolanaMobileWalletAdapterWalletName = 'Mobile Wallet Adapter';\nconst SIGNATURE_LENGTH_IN_BYTES = 64;\nfunction getPublicKeyFromAddress(address) {\n const publicKeyByteArray = esm_toUint8Array(address);\n return new index_browser_esm.PublicKey(publicKeyByteArray);\n}\nfunction esm_isVersionedTransaction(transaction) {\n return 'version' in transaction;\n}\nclass SolanaMobileWalletAdapter extends BaseSignInMessageSignerWalletAdapter {\n constructor(config) {\n var _a;\n super();\n this.supportedTransactionVersions = new Set(\n // FIXME(#244): We can't actually know what versions are supported until we know which wallet we're talking to.\n ['legacy', 0]);\n this.name = SolanaMobileWalletAdapterWalletName;\n this.url = 'https://solanamobile.com/wallets';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI4IiB3aWR0aD0iMjgiIHZpZXdCb3g9Ii0zIDAgMjggMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0RDQjhGRiI+PHBhdGggZD0iTTE3LjQgMTcuNEgxNXYyLjRoMi40di0yLjRabTEuMi05LjZoLTIuNHYyLjRoMi40VjcuOFoiLz48cGF0aCBkPSJNMjEuNiAzVjBoLTIuNHYzaC0zLjZWMGgtMi40djNoLTIuNHY2LjZINC41YTIuMSAyLjEgMCAxIDEgMC00LjJoMi43VjNINC41QTQuNSA0LjUgMCAwIDAgMCA3LjVWMjRoMjEuNnYtNi42aC0yLjR2NC4ySDIuNFYxMS41Yy41LjMgMS4yLjQgMS44LjVoNy41QTYuNiA2LjYgMCAwIDAgMjQgOVYzaC0yLjRabTAgNS43YTQuMiA0LjIgMCAxIDEtOC40IDBWNS40aDguNHYzLjNaIi8+PC9nPjwvc3ZnPg==';\n this._connecting = false;\n /**\n * Every time the connection is recycled in some way (eg. `disconnect()` is called)\n * increment this and use it to make sure that `transact` calls from the previous\n * 'generation' don't continue to do work and throw exceptions.\n */\n this._connectionGeneration = 0;\n this._readyState = getIsSupported() ? WalletReadyState.Loadable : WalletReadyState.Unsupported;\n this._authorizationResultCache = config.authorizationResultCache;\n this._addressSelector = config.addressSelector;\n this._appIdentity = config.appIdentity;\n this._chain = (_a = config.chain) !== null && _a !== void 0 ? _a : config.cluster;\n this._onWalletNotFound = config.onWalletNotFound;\n if (this._readyState !== WalletReadyState.Unsupported) {\n this._authorizationResultCache.get().then((authorizationResult) => {\n if (authorizationResult) {\n // Having a prior authorization result is, right now, the best\n // indication that a mobile wallet is installed. There is no API\n // we can use to test for whether the association URI is supported.\n this.declareWalletAsInstalled();\n }\n });\n }\n }\n get publicKey() {\n if (this._publicKey == null && this._selectedAddress != null) {\n try {\n this._publicKey = getPublicKeyFromAddress(this._selectedAddress);\n }\n catch (e) {\n throw new WalletPublicKeyError((e instanceof Error && (e === null || e === void 0 ? void 0 : e.message)) || 'Unknown error', e);\n }\n }\n return this._publicKey ? this._publicKey : null;\n }\n get connected() {\n return !!this._authorizationResult;\n }\n get connecting() {\n return this._connecting;\n }\n get readyState() {\n return this._readyState;\n }\n declareWalletAsInstalled() {\n if (this._readyState !== WalletReadyState.Installed) {\n this.emit('readyStateChange', (this._readyState = WalletReadyState.Installed));\n }\n }\n runWithGuard(callback) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n try {\n return yield callback();\n }\n catch (e) {\n this.emit('error', e);\n throw e;\n }\n });\n }\n /** @deprecated Use `autoConnect()` instead. */\n autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED() {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n return yield this.autoConnect();\n });\n }\n autoConnect() {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n if (this.connecting || this.connected) {\n return;\n }\n return yield this.runWithGuard(() => lib_esm_awaiter(this, void 0, void 0, function* () {\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n const cachedAuthorizationResult = yield this._authorizationResultCache.get();\n if (cachedAuthorizationResult) {\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this.handleAuthorizationResult(cachedAuthorizationResult);\n }\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n connect() {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n if (this.connecting || this.connected) {\n return;\n }\n return yield this.runWithGuard(() => lib_esm_awaiter(this, void 0, void 0, function* () {\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n yield this.performAuthorization();\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n performAuthorization(signInPayload) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n try {\n const cachedAuthorizationResult = yield this._authorizationResultCache.get();\n if (cachedAuthorizationResult) {\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this.handleAuthorizationResult(cachedAuthorizationResult);\n return cachedAuthorizationResult;\n }\n return yield this.transact((wallet) => lib_esm_awaiter(this, void 0, void 0, function* () {\n const authorizationResult = yield wallet.authorize({\n chain: this._chain,\n identity: this._appIdentity,\n sign_in_payload: signInPayload,\n });\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n Promise.all([\n this._authorizationResultCache.set(authorizationResult),\n this.handleAuthorizationResult(authorizationResult),\n ]);\n return authorizationResult;\n }));\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n });\n }\n handleAuthorizationResult(authorizationResult) {\n var _a;\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n const didPublicKeysChange = \n // Case 1: We started from having no authorization.\n this._authorizationResult == null ||\n // Case 2: The number of authorized accounts changed.\n ((_a = this._authorizationResult) === null || _a === void 0 ? void 0 : _a.accounts.length) !== authorizationResult.accounts.length ||\n // Case 3: The new list of addresses isn't exactly the same as the old list, in the same order.\n this._authorizationResult.accounts.some((account, ii) => account.address !== authorizationResult.accounts[ii].address);\n this._authorizationResult = authorizationResult;\n this.declareWalletAsInstalled();\n if (didPublicKeysChange) {\n const nextSelectedAddress = yield this._addressSelector.select(authorizationResult.accounts.map(({ address }) => address));\n if (nextSelectedAddress !== this._selectedAddress) {\n this._selectedAddress = nextSelectedAddress;\n delete this._publicKey;\n this.emit('connect', \n // Having just set `this._selectedAddress`, `this.publicKey` is definitely non-null\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.publicKey);\n }\n }\n });\n }\n performReauthorization(wallet, authToken) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n try {\n const authorizationResult = yield wallet.authorize({\n auth_token: authToken,\n identity: this._appIdentity,\n });\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n Promise.all([\n this._authorizationResultCache.set(authorizationResult),\n this.handleAuthorizationResult(authorizationResult),\n ]);\n }\n catch (e) {\n this.disconnect();\n throw new WalletDisconnectedError((e instanceof Error && (e === null || e === void 0 ? void 0 : e.message)) || 'Unknown error', e);\n }\n });\n }\n disconnect() {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n this._authorizationResultCache.clear(); // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this._connecting = false;\n this._connectionGeneration++;\n delete this._authorizationResult;\n delete this._publicKey;\n delete this._selectedAddress;\n this.emit('disconnect');\n });\n }\n transact(callback) {\n var _a;\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n const walletUriBase = (_a = this._authorizationResult) === null || _a === void 0 ? void 0 : _a.wallet_uri_base;\n const config = walletUriBase ? { baseUri: walletUriBase } : undefined;\n const currentConnectionGeneration = this._connectionGeneration;\n try {\n return yield esm_transact(callback, config);\n }\n catch (e) {\n if (this._connectionGeneration !== currentConnectionGeneration) {\n yield new Promise(() => { }); // Never resolve.\n }\n if (e instanceof Error &&\n e.name === 'SolanaMobileWalletAdapterError' &&\n e.code === 'ERROR_WALLET_NOT_FOUND') {\n yield this._onWalletNotFound(this);\n }\n throw e;\n }\n });\n }\n assertIsAuthorized() {\n if (!this._authorizationResult || !this._selectedAddress)\n throw new WalletNotConnectedError();\n return {\n authToken: this._authorizationResult.auth_token,\n selectedAddress: this._selectedAddress,\n };\n }\n performSignTransactions(transactions) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n const { authToken } = this.assertIsAuthorized();\n try {\n return yield this.transact((wallet) => lib_esm_awaiter(this, void 0, void 0, function* () {\n yield this.performReauthorization(wallet, authToken);\n const signedTransactions = yield wallet.signTransactions({\n transactions,\n });\n return signedTransactions;\n }));\n }\n catch (error) {\n throw new WalletSignTransactionError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n });\n }\n sendTransaction(transaction, connection, options) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => lib_esm_awaiter(this, void 0, void 0, function* () {\n const { authToken } = this.assertIsAuthorized();\n const minContextSlot = options === null || options === void 0 ? void 0 : options.minContextSlot;\n try {\n return yield this.transact((wallet) => lib_esm_awaiter(this, void 0, void 0, function* () {\n function getTargetCommitment() {\n let targetCommitment;\n switch (connection.commitment) {\n case 'confirmed':\n case 'finalized':\n case 'processed':\n targetCommitment = connection.commitment;\n break;\n default:\n targetCommitment = 'finalized';\n }\n let targetPreflightCommitment;\n switch (options === null || options === void 0 ? void 0 : options.preflightCommitment) {\n case 'confirmed':\n case 'finalized':\n case 'processed':\n targetPreflightCommitment = options.preflightCommitment;\n break;\n case undefined:\n targetPreflightCommitment = targetCommitment;\n break;\n default:\n targetPreflightCommitment = 'finalized';\n }\n const preflightCommitmentScore = targetPreflightCommitment === 'finalized'\n ? 2\n : targetPreflightCommitment === 'confirmed'\n ? 1\n : 0;\n const targetCommitmentScore = targetCommitment === 'finalized' ? 2 : targetCommitment === 'confirmed' ? 1 : 0;\n return preflightCommitmentScore < targetCommitmentScore\n ? targetPreflightCommitment\n : targetCommitment;\n }\n const [capabilities, _1, _2] = yield Promise.all([\n wallet.getCapabilities(),\n this.performReauthorization(wallet, authToken),\n esm_isVersionedTransaction(transaction)\n ? null\n : /**\n * Unlike versioned transactions, legacy `Transaction` objects\n * may not have an associated `feePayer` or `recentBlockhash`.\n * This code exists to patch them up in case they are missing.\n */\n (() => lib_esm_awaiter(this, void 0, void 0, function* () {\n var _a;\n transaction.feePayer || (transaction.feePayer = (_a = this.publicKey) !== null && _a !== void 0 ? _a : undefined);\n if (transaction.recentBlockhash == null) {\n const { blockhash } = yield connection.getLatestBlockhash({\n commitment: getTargetCommitment(),\n });\n transaction.recentBlockhash = blockhash;\n }\n }))(),\n ]);\n if (capabilities.supports_sign_and_send_transactions) {\n const signatures = yield wallet.signAndSendTransactions({\n minContextSlot,\n transactions: [transaction],\n });\n return signatures[0];\n }\n else {\n const [signedTransaction] = yield wallet.signTransactions({\n transactions: [transaction],\n });\n if (esm_isVersionedTransaction(signedTransaction)) {\n return yield connection.sendTransaction(signedTransaction);\n }\n else {\n const serializedTransaction = signedTransaction.serialize();\n return yield connection.sendRawTransaction(serializedTransaction, Object.assign(Object.assign({}, options), { preflightCommitment: getTargetCommitment() }));\n }\n }\n }));\n }\n catch (error) {\n throw new WalletSendTransactionError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n }));\n });\n }\n signTransaction(transaction) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => lib_esm_awaiter(this, void 0, void 0, function* () {\n const [signedTransaction] = yield this.performSignTransactions([transaction]);\n return signedTransaction;\n }));\n });\n }\n signAllTransactions(transactions) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => lib_esm_awaiter(this, void 0, void 0, function* () {\n const signedTransactions = yield this.performSignTransactions(transactions);\n return signedTransactions;\n }));\n });\n }\n signMessage(message) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => lib_esm_awaiter(this, void 0, void 0, function* () {\n const { authToken, selectedAddress } = this.assertIsAuthorized();\n try {\n return yield this.transact((wallet) => lib_esm_awaiter(this, void 0, void 0, function* () {\n yield this.performReauthorization(wallet, authToken);\n const [signedMessage] = yield wallet.signMessages({\n addresses: [selectedAddress],\n payloads: [message],\n });\n const signature = signedMessage.slice(-SIGNATURE_LENGTH_IN_BYTES);\n return signature;\n }));\n }\n catch (error) {\n throw new WalletSignMessageError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n }));\n });\n }\n signIn(input) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => lib_esm_awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n const authorizationResult = yield this.performAuthorization(Object.assign(Object.assign({}, input), { domain: (_a = input === null || input === void 0 ? void 0 : input.domain) !== null && _a !== void 0 ? _a : window.location.host }));\n if (!authorizationResult.sign_in_result) {\n throw new Error(\"Sign in failed, no sign in result returned by wallet\");\n }\n const signedInAddress = authorizationResult.sign_in_result.address;\n const signedInAccount = Object.assign(Object.assign({}, (_b = authorizationResult.accounts.find(acc => acc.address == signedInAddress)) !== null && _b !== void 0 ? _b : {\n address: signedInAddress\n }), { publicKey: esm_toUint8Array(signedInAddress) });\n return {\n account: signedInAccount,\n signedMessage: esm_toUint8Array(authorizationResult.sign_in_result.signed_message),\n signature: esm_toUint8Array(authorizationResult.sign_in_result.signature)\n };\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n}\n\nfunction createDefaultAddressSelector() {\n return {\n select(addresses) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n return addresses[0];\n });\n },\n };\n}\n\nconst CACHE_KEY = 'SolanaMobileWalletAdapterDefaultAuthorizationCache';\nfunction createDefaultAuthorizationResultCache() {\n let storage;\n try {\n storage = window.localStorage;\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n return {\n clear() {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n storage.removeItem(CACHE_KEY);\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n get() {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n return JSON.parse(storage.getItem(CACHE_KEY)) || undefined;\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n set(authorizationResult) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n storage.setItem(CACHE_KEY, JSON.stringify(authorizationResult));\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n };\n}\n\nfunction defaultWalletNotFoundHandler(mobileWalletAdapter) {\n return lib_esm_awaiter(this, void 0, void 0, function* () {\n if (typeof window !== 'undefined') {\n window.location.assign(mobileWalletAdapter.url);\n }\n });\n}\nfunction createDefaultWalletNotFoundHandler() {\n return defaultWalletNotFoundHandler;\n}\n\n\n\n// EXTERNAL MODULE: ./node_modules/@solana/wallet-standard-features/lib/esm/signAndSendTransaction.js\nvar signAndSendTransaction = __webpack_require__(3149);\n// EXTERNAL MODULE: ./node_modules/@solana/wallet-standard-features/lib/esm/signTransaction.js\nvar signTransaction = __webpack_require__(8112);\n;// CONCATENATED MODULE: ./node_modules/@wallet-standard/features/lib/esm/connect.js\n/** Name of the feature. */\nconst StandardConnect = 'standard:connect';\n/**\n * @deprecated Use {@link StandardConnect} instead.\n *\n * @group Deprecated\n */\nconst Connect = (/* unused pure expression or super */ null && (StandardConnect));\n//# sourceMappingURL=connect.js.map\n;// CONCATENATED MODULE: ./node_modules/@wallet-standard/features/lib/esm/events.js\n/** Name of the feature. */\nconst StandardEvents = 'standard:events';\n/**\n * @deprecated Use {@link StandardEvents} instead.\n *\n * @group Deprecated\n */\nconst Events = (/* unused pure expression or super */ null && (StandardEvents));\n//# sourceMappingURL=events.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-base/lib/esm/standard.js\n\n\nfunction isWalletAdapterCompatibleStandardWallet(wallet) {\n return (StandardConnect in wallet.features &&\n StandardEvents in wallet.features &&\n (signAndSendTransaction/* SolanaSignAndSendTransaction */.G in wallet.features || signTransaction/* SolanaSignTransaction */.R in wallet.features));\n}\n//# sourceMappingURL=standard.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-standard-wallet-adapter-base/lib/esm/types.js\n\n/**\n * @deprecated Use `isWalletAdapterCompatibleStandardWallet` from `@solana/wallet-adapter-base` instead.\n *\n * @group Deprecated\n */\nconst isWalletAdapterCompatibleWallet = isWalletAdapterCompatibleStandardWallet;\n//# sourceMappingURL=types.js.map\n// EXTERNAL MODULE: ./node_modules/@solana/wallet-standard-features/lib/esm/signMessage.js\nvar signMessage = __webpack_require__(1999);\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-standard-features/lib/esm/signIn.js\n/** Name of the feature. */\nconst SolanaSignIn = 'solana:signIn';\n//# sourceMappingURL=signIn.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-standard-chains/lib/esm/index.js\n/** Solana Mainnet (beta) cluster, e.g. https://api.mainnet-beta.solana.com */\nconst esm_SOLANA_MAINNET_CHAIN = 'solana:mainnet';\n/** Solana Devnet cluster, e.g. https://api.devnet.solana.com */\nconst esm_SOLANA_DEVNET_CHAIN = 'solana:devnet';\n/** Solana Testnet cluster, e.g. https://api.testnet.solana.com */\nconst esm_SOLANA_TESTNET_CHAIN = 'solana:testnet';\n/** Solana Localnet cluster, e.g. http://localhost:8899 */\nconst esm_SOLANA_LOCALNET_CHAIN = 'solana:localnet';\n/** Array of all Solana clusters */\nconst SOLANA_CHAINS = [\n esm_SOLANA_MAINNET_CHAIN,\n esm_SOLANA_DEVNET_CHAIN,\n esm_SOLANA_TESTNET_CHAIN,\n esm_SOLANA_LOCALNET_CHAIN,\n];\n/**\n * Check if a chain corresponds with one of the Solana clusters.\n */\nfunction isSolanaChain(chain) {\n return SOLANA_CHAINS.includes(chain);\n}\n//# sourceMappingURL=index.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-standard-util/lib/esm/endpoint.js\n\n/** TODO: docs */\nconst MAINNET_ENDPOINT = 'https://api.mainnet-beta.solana.com';\n/** TODO: docs */\nconst DEVNET_ENDPOINT = 'https://api.devnet.solana.com';\n/** TODO: docs */\nconst TESTNET_ENDPOINT = 'https://api.testnet.solana.com';\n/** TODO: docs */\nconst LOCALNET_ENDPOINT = 'http://localhost:8899';\n/**\n * TODO: docs\n */\nfunction getChainForEndpoint(endpoint) {\n if (endpoint.includes(MAINNET_ENDPOINT))\n return esm_SOLANA_MAINNET_CHAIN;\n if (/\\bdevnet\\b/i.test(endpoint))\n return esm_SOLANA_DEVNET_CHAIN;\n if (/\\btestnet\\b/i.test(endpoint))\n return esm_SOLANA_TESTNET_CHAIN;\n if (/\\blocalhost\\b/i.test(endpoint) || /\\b127\\.0\\.0\\.1\\b/.test(endpoint))\n return esm_SOLANA_LOCALNET_CHAIN;\n return esm_SOLANA_MAINNET_CHAIN;\n}\n/**\n * TODO: docs\n */\nfunction getEndpointForChain(chain, endpoint) {\n if (endpoint)\n return endpoint;\n if (chain === SOLANA_MAINNET_CHAIN)\n return MAINNET_ENDPOINT;\n if (chain === SOLANA_DEVNET_CHAIN)\n return DEVNET_ENDPOINT;\n if (chain === SOLANA_TESTNET_CHAIN)\n return TESTNET_ENDPOINT;\n if (chain === SOLANA_LOCALNET_CHAIN)\n return LOCALNET_ENDPOINT;\n return MAINNET_ENDPOINT;\n}\n//# sourceMappingURL=endpoint.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-standard-util/lib/esm/commitment.js\n/**\n * TODO: docs\n */\nfunction getCommitment(commitment) {\n switch (commitment) {\n case 'processed':\n case 'confirmed':\n case 'finalized':\n case undefined:\n return commitment;\n case 'recent':\n return 'processed';\n case 'single':\n case 'singleGossip':\n return 'confirmed';\n case 'max':\n case 'root':\n return 'finalized';\n default:\n return undefined;\n }\n}\n//# sourceMappingURL=commitment.js.map\n;// CONCATENATED MODULE: ./node_modules/@wallet-standard/features/lib/esm/disconnect.js\n/** Name of the feature. */\nconst StandardDisconnect = 'standard:disconnect';\n/**\n * @deprecated Use {@link StandardDisconnect} instead.\n *\n * @group Deprecated\n */\nconst Disconnect = (/* unused pure expression or super */ null && (StandardDisconnect));\n//# sourceMappingURL=disconnect.js.map\n;// CONCATENATED MODULE: ./node_modules/@wallet-standard/wallet/lib/esm/util.js\nvar __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _ReadonlyWalletAccount_address, _ReadonlyWalletAccount_publicKey, _ReadonlyWalletAccount_chains, _ReadonlyWalletAccount_features, _ReadonlyWalletAccount_label, _ReadonlyWalletAccount_icon;\n/**\n * Base implementation of a {@link \"@wallet-standard/base\".WalletAccount} to be used or extended by a\n * {@link \"@wallet-standard/base\".Wallet}.\n *\n * `WalletAccount` properties must be read-only. This class enforces this by making all properties\n * [truly private](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields) and\n * read-only, using getters for access, returning copies instead of references, and calling\n * [Object.freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze)\n * on the instance.\n *\n * @group Account\n */\nclass ReadonlyWalletAccount {\n /**\n * Create and freeze a read-only account.\n *\n * @param account Account to copy properties from.\n */\n constructor(account) {\n _ReadonlyWalletAccount_address.set(this, void 0);\n _ReadonlyWalletAccount_publicKey.set(this, void 0);\n _ReadonlyWalletAccount_chains.set(this, void 0);\n _ReadonlyWalletAccount_features.set(this, void 0);\n _ReadonlyWalletAccount_label.set(this, void 0);\n _ReadonlyWalletAccount_icon.set(this, void 0);\n if (new.target === ReadonlyWalletAccount) {\n Object.freeze(this);\n }\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_address, account.address, \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_publicKey, account.publicKey.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_chains, account.chains.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_features, account.features.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_label, account.label, \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_icon, account.icon, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.address | WalletAccount::address} */\n get address() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_address, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.publicKey | WalletAccount::publicKey} */\n get publicKey() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_publicKey, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.chains | WalletAccount::chains} */\n get chains() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_chains, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.features | WalletAccount::features} */\n get features() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_features, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.label | WalletAccount::label} */\n get label() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_label, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.icon | WalletAccount::icon} */\n get icon() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_icon, \"f\");\n }\n}\n_ReadonlyWalletAccount_address = new WeakMap(), _ReadonlyWalletAccount_publicKey = new WeakMap(), _ReadonlyWalletAccount_chains = new WeakMap(), _ReadonlyWalletAccount_features = new WeakMap(), _ReadonlyWalletAccount_label = new WeakMap(), _ReadonlyWalletAccount_icon = new WeakMap();\n/**\n * Efficiently compare {@link Indexed} arrays (e.g. `Array` and `Uint8Array`).\n *\n * @param a An array.\n * @param b Another array.\n *\n * @return `true` if the arrays have the same length and elements, `false` otherwise.\n *\n * @group Util\n */\nfunction util_arraysEqual(a, b) {\n if (a === b)\n return true;\n const length = a.length;\n if (length !== b.length)\n return false;\n for (let i = 0; i < length; i++) {\n if (a[i] !== b[i])\n return false;\n }\n return true;\n}\n/**\n * Efficiently compare byte arrays, using {@link arraysEqual}.\n *\n * @param a A byte array.\n * @param b Another byte array.\n *\n * @return `true` if the byte arrays have the same length and bytes, `false` otherwise.\n *\n * @group Util\n */\nfunction bytesEqual(a, b) {\n return util_arraysEqual(a, b);\n}\n/**\n * Efficiently concatenate byte arrays without modifying them.\n *\n * @param first A byte array.\n * @param others Additional byte arrays.\n *\n * @return New byte array containing the concatenation of all the byte arrays.\n *\n * @group Util\n */\nfunction concatBytes(first, ...others) {\n const length = others.reduce((length, bytes) => length + bytes.length, first.length);\n const bytes = new Uint8Array(length);\n bytes.set(first, 0);\n for (const other of others) {\n bytes.set(other, bytes.length);\n }\n return bytes;\n}\n/**\n * Create a new object with a subset of fields from a source object.\n *\n * @param source Object to pick fields from.\n * @param keys Names of fields to pick.\n *\n * @return New object with only the picked fields.\n *\n * @group Util\n */\nfunction pick(source, ...keys) {\n const picked = {};\n for (const key of keys) {\n picked[key] = source[key];\n }\n return picked;\n}\n/**\n * Call a callback function, catch an error if it throws, and log the error without rethrowing.\n *\n * @param callback Function to call.\n *\n * @group Util\n */\nfunction guard(callback) {\n try {\n callback();\n }\n catch (error) {\n console.error(error);\n }\n}\n//# sourceMappingURL=util.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-standard-wallet-adapter-base/lib/esm/adapter.js\nvar adapter_classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar adapter_classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _StandardWalletAdapter_instances, _StandardWalletAdapter_account, _StandardWalletAdapter_publicKey, _StandardWalletAdapter_connecting, _StandardWalletAdapter_disconnecting, _StandardWalletAdapter_off, _StandardWalletAdapter_supportedTransactionVersions, _StandardWalletAdapter_wallet, _StandardWalletAdapter_readyState, _StandardWalletAdapter_connect, _StandardWalletAdapter_connected, _StandardWalletAdapter_disconnected, _StandardWalletAdapter_reset, _StandardWalletAdapter_changed, _StandardWalletAdapter_signTransaction, _StandardWalletAdapter_signAllTransactions, _StandardWalletAdapter_signMessage, _StandardWalletAdapter_signIn;\n\n\n\n\n\n\n\n/** TODO: docs */\nclass StandardWalletAdapter extends BaseWalletAdapter {\n constructor({ wallet }) {\n super();\n _StandardWalletAdapter_instances.add(this);\n _StandardWalletAdapter_account.set(this, void 0);\n _StandardWalletAdapter_publicKey.set(this, void 0);\n _StandardWalletAdapter_connecting.set(this, void 0);\n _StandardWalletAdapter_disconnecting.set(this, void 0);\n _StandardWalletAdapter_off.set(this, void 0);\n _StandardWalletAdapter_supportedTransactionVersions.set(this, void 0);\n _StandardWalletAdapter_wallet.set(this, void 0);\n _StandardWalletAdapter_readyState.set(this, typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.Installed);\n _StandardWalletAdapter_changed.set(this, (properties) => {\n // If accounts have changed on the wallet, reflect this on the adapter.\n if ('accounts' in properties) {\n const account = adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts[0];\n // If the adapter isn't connected, or is disconnecting, or the first account hasn't changed, do nothing.\n if (adapter_classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\") && !adapter_classPrivateFieldGet(this, _StandardWalletAdapter_disconnecting, \"f\") && account !== adapter_classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")) {\n // If there's a connected account, connect the adapter. Otherwise, disconnect it.\n if (account) {\n // Connect the adapter.\n adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, account);\n }\n else {\n // Emit an error because the wallet spontaneously disconnected.\n this.emit('error', new WalletDisconnectedError());\n // Disconnect the adapter.\n adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_disconnected).call(this);\n }\n }\n }\n // After reflecting account changes, if features have changed on the wallet, reflect this on the adapter.\n if ('features' in properties) {\n adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n }\n });\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_wallet, wallet, \"f\");\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_off, adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardEvents].on('change', adapter_classPrivateFieldGet(this, _StandardWalletAdapter_changed, \"f\")), \"f\");\n adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n }\n get name() {\n return adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").name;\n }\n get url() {\n return 'https://github.com/solana-labs/wallet-standard';\n }\n get icon() {\n return adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").icon;\n }\n get readyState() {\n return adapter_classPrivateFieldGet(this, _StandardWalletAdapter_readyState, \"f\");\n }\n get publicKey() {\n return adapter_classPrivateFieldGet(this, _StandardWalletAdapter_publicKey, \"f\");\n }\n get connecting() {\n return adapter_classPrivateFieldGet(this, _StandardWalletAdapter_connecting, \"f\");\n }\n get supportedTransactionVersions() {\n return adapter_classPrivateFieldGet(this, _StandardWalletAdapter_supportedTransactionVersions, \"f\");\n }\n get wallet() {\n return adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\");\n }\n get standard() {\n return true;\n }\n destroy() {\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n const off = adapter_classPrivateFieldGet(this, _StandardWalletAdapter_off, \"f\");\n if (off) {\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_off, null, \"f\");\n off();\n }\n }\n async autoConnect() {\n return adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connect).call(this, { silent: true });\n }\n async connect() {\n return adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connect).call(this);\n }\n async disconnect() {\n if (StandardDisconnect in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n try {\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, true, \"f\");\n await adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardDisconnect].disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n finally {\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n }\n }\n adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_disconnected).call(this);\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const account = adapter_classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n let feature;\n if (signAndSendTransaction/* SolanaSignAndSendTransaction */.G in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n if (account.features.includes(signAndSendTransaction/* SolanaSignAndSendTransaction */.G)) {\n feature = signAndSendTransaction/* SolanaSignAndSendTransaction */.G;\n }\n else if (signTransaction/* SolanaSignTransaction */.R in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features &&\n account.features.includes(signTransaction/* SolanaSignTransaction */.R)) {\n feature = signTransaction/* SolanaSignTransaction */.R;\n }\n else {\n throw new WalletAccountError();\n }\n }\n else if (signTransaction/* SolanaSignTransaction */.R in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n if (!account.features.includes(signTransaction/* SolanaSignTransaction */.R))\n throw new WalletAccountError();\n feature = signTransaction/* SolanaSignTransaction */.R;\n }\n else {\n throw new WalletConfigError();\n }\n const chain = getChainForEndpoint(connection.rpcEndpoint);\n if (!account.chains.includes(chain))\n throw new WalletSendTransactionError();\n try {\n const { signers, ...sendOptions } = options;\n let serializedTransaction;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n serializedTransaction = transaction.serialize();\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n serializedTransaction = new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n }));\n }\n if (feature === signAndSendTransaction/* SolanaSignAndSendTransaction */.G) {\n const [output] = await adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[signAndSendTransaction/* SolanaSignAndSendTransaction */.G].signAndSendTransaction({\n account,\n chain,\n transaction: serializedTransaction,\n options: {\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n skipPreflight: sendOptions.skipPreflight,\n maxRetries: sendOptions.maxRetries,\n minContextSlot: sendOptions.minContextSlot,\n },\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return bs58.encode(output.signature);\n }\n else {\n const [output] = await adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[signTransaction/* SolanaSignTransaction */.R].signTransaction({\n account,\n chain,\n transaction: serializedTransaction,\n options: {\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n minContextSlot: sendOptions.minContextSlot,\n },\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return await connection.sendRawTransaction(output.signedTransaction, {\n ...sendOptions,\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n });\n }\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n_StandardWalletAdapter_account = new WeakMap(), _StandardWalletAdapter_publicKey = new WeakMap(), _StandardWalletAdapter_connecting = new WeakMap(), _StandardWalletAdapter_disconnecting = new WeakMap(), _StandardWalletAdapter_off = new WeakMap(), _StandardWalletAdapter_supportedTransactionVersions = new WeakMap(), _StandardWalletAdapter_wallet = new WeakMap(), _StandardWalletAdapter_readyState = new WeakMap(), _StandardWalletAdapter_changed = new WeakMap(), _StandardWalletAdapter_instances = new WeakSet(), _StandardWalletAdapter_connect = async function _StandardWalletAdapter_connect(input) {\n try {\n if (this.connected || this.connecting)\n return;\n if (adapter_classPrivateFieldGet(this, _StandardWalletAdapter_readyState, \"f\") !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_connecting, true, \"f\");\n if (!adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts.length) {\n try {\n await adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardConnect].connect(input);\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n const account = adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts[0];\n if (!account)\n throw new WalletAccountError();\n adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, account);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n }\n}, _StandardWalletAdapter_connected = function _StandardWalletAdapter_connected(account) {\n let publicKey;\n try {\n // Use account.address instead of account.publicKey since address could be a PDA\n publicKey = new index_browser_esm.PublicKey(account.address);\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_account, account, \"f\");\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, publicKey, \"f\");\n adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n this.emit('connect', publicKey);\n}, _StandardWalletAdapter_disconnected = function _StandardWalletAdapter_disconnected() {\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n this.emit('disconnect');\n}, _StandardWalletAdapter_reset = function _StandardWalletAdapter_reset() {\n const supportedTransactionVersions = signAndSendTransaction/* SolanaSignAndSendTransaction */.G in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features\n ? adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[signAndSendTransaction/* SolanaSignAndSendTransaction */.G].supportedTransactionVersions\n : adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[signTransaction/* SolanaSignTransaction */.R].supportedTransactionVersions;\n adapter_classPrivateFieldSet(this, _StandardWalletAdapter_supportedTransactionVersions, util_arraysEqual(supportedTransactionVersions, ['legacy'])\n ? null\n : new Set(supportedTransactionVersions), \"f\");\n if (signTransaction/* SolanaSignTransaction */.R in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features && adapter_classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")?.features.includes(signTransaction/* SolanaSignTransaction */.R)) {\n this.signTransaction = adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signTransaction);\n this.signAllTransactions = adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signAllTransactions);\n }\n else {\n delete this.signTransaction;\n delete this.signAllTransactions;\n }\n if (signMessage/* SolanaSignMessage */.g in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features && adapter_classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")?.features.includes(signMessage/* SolanaSignMessage */.g)) {\n this.signMessage = adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signMessage);\n }\n else {\n delete this.signMessage;\n }\n if (SolanaSignIn in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n this.signIn = adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signIn);\n }\n else {\n delete this.signIn;\n }\n}, _StandardWalletAdapter_signTransaction = async function _StandardWalletAdapter_signTransaction(transaction) {\n try {\n const account = adapter_classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(signTransaction/* SolanaSignTransaction */.R in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(signTransaction/* SolanaSignTransaction */.R))\n throw new WalletAccountError();\n try {\n const signedTransactions = await adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[signTransaction/* SolanaSignTransaction */.R].signTransaction({\n account,\n transaction: isVersionedTransaction(transaction)\n ? transaction.serialize()\n : new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n })),\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const serializedTransaction = signedTransactions[0].signedTransaction;\n return (isVersionedTransaction(transaction)\n ? index_browser_esm.VersionedTransaction.deserialize(serializedTransaction)\n : index_browser_esm.Transaction.from(serializedTransaction));\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signAllTransactions = async function _StandardWalletAdapter_signAllTransactions(transactions) {\n try {\n const account = adapter_classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(signTransaction/* SolanaSignTransaction */.R in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(signTransaction/* SolanaSignTransaction */.R))\n throw new WalletAccountError();\n try {\n const signedTransactions = await adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[signTransaction/* SolanaSignTransaction */.R].signTransaction(...transactions.map((transaction) => ({\n account,\n transaction: isVersionedTransaction(transaction)\n ? transaction.serialize()\n : new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n })),\n })));\n return transactions.map((transaction, index) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const signedTransaction = signedTransactions[index].signedTransaction;\n return (isVersionedTransaction(transaction)\n ? index_browser_esm.VersionedTransaction.deserialize(signedTransaction)\n : index_browser_esm.Transaction.from(signedTransaction));\n });\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signMessage = async function _StandardWalletAdapter_signMessage(message) {\n try {\n const account = adapter_classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(signMessage/* SolanaSignMessage */.g in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(signMessage/* SolanaSignMessage */.g))\n throw new WalletAccountError();\n try {\n const signedMessages = await adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[signMessage/* SolanaSignMessage */.g].signMessage({\n account,\n message,\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return signedMessages[0].signature;\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signIn = async function _StandardWalletAdapter_signIn(input = {}) {\n try {\n if (!(SolanaSignIn in adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n let output;\n try {\n [output] = await adapter_classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignIn].signIn(input);\n }\n catch (error) {\n throw new WalletSignInError(error?.message, error);\n }\n if (!output)\n throw new WalletSignInError();\n adapter_classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, output.account);\n return output;\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n};\n//# sourceMappingURL=adapter.js.map\n;// CONCATENATED MODULE: ./node_modules/@wallet-standard/app/lib/esm/wallets.js\nvar wallets_classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar wallets_classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _AppReadyEvent_detail;\nlet wallets = undefined;\nconst registered = new Set();\nconst listeners = {};\n/**\n * Get an API for {@link Wallets.get | getting}, {@link Wallets.on | listening for}, and\n * {@link Wallets.register | registering} {@link \"@wallet-standard/base\".Wallet | Wallets}.\n *\n * When called for the first time --\n *\n * This dispatches a {@link \"@wallet-standard/base\".WindowAppReadyEvent} to notify each Wallet that the app is ready\n * to register it.\n *\n * This also adds a listener for {@link \"@wallet-standard/base\".WindowRegisterWalletEvent} to listen for a notification\n * from each Wallet that the Wallet is ready to be registered by the app.\n *\n * This combination of event dispatch and listener guarantees that each Wallet will be registered synchronously as soon\n * as the app is ready whether the app loads before or after each Wallet.\n *\n * @return API for getting, listening for, and registering Wallets.\n *\n * @group App\n */\nfunction getWallets() {\n if (wallets)\n return wallets;\n wallets = Object.freeze({ register, get, on });\n if (typeof window === 'undefined')\n return wallets;\n const api = Object.freeze({ register });\n try {\n window.addEventListener('wallet-standard:register-wallet', ({ detail: callback }) => callback(api));\n }\n catch (error) {\n console.error('wallet-standard:register-wallet event listener could not be added\\n', error);\n }\n try {\n window.dispatchEvent(new AppReadyEvent(api));\n }\n catch (error) {\n console.error('wallet-standard:app-ready event could not be dispatched\\n', error);\n }\n return wallets;\n}\nfunction register(...wallets) {\n // Filter out wallets that have already been registered.\n // This prevents the same wallet from being registered twice, but it also prevents wallets from being\n // unregistered by reusing a reference to the wallet to obtain the unregister function for it.\n wallets = wallets.filter((wallet) => !registered.has(wallet));\n // If there are no new wallets to register, just return a no-op unregister function.\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n if (!wallets.length)\n return () => { };\n wallets.forEach((wallet) => registered.add(wallet));\n listeners['register']?.forEach((listener) => wallets_guard(() => listener(...wallets)));\n // Return a function that unregisters the registered wallets.\n return function unregister() {\n wallets.forEach((wallet) => registered.delete(wallet));\n listeners['unregister']?.forEach((listener) => wallets_guard(() => listener(...wallets)));\n };\n}\nfunction get() {\n return [...registered];\n}\nfunction on(event, listener) {\n listeners[event]?.push(listener) || (listeners[event] = [listener]);\n // Return a function that removes the event listener.\n return function off() {\n listeners[event] = listeners[event]?.filter((existingListener) => listener !== existingListener);\n };\n}\nfunction wallets_guard(callback) {\n try {\n callback();\n }\n catch (error) {\n console.error(error);\n }\n}\nclass AppReadyEvent extends Event {\n constructor(api) {\n super('wallet-standard:app-ready', {\n bubbles: false,\n cancelable: false,\n composed: false,\n });\n _AppReadyEvent_detail.set(this, void 0);\n wallets_classPrivateFieldSet(this, _AppReadyEvent_detail, api, \"f\");\n }\n get detail() {\n return wallets_classPrivateFieldGet(this, _AppReadyEvent_detail, \"f\");\n }\n get type() {\n return 'wallet-standard:app-ready';\n }\n /** @deprecated */\n preventDefault() {\n throw new Error('preventDefault cannot be called');\n }\n /** @deprecated */\n stopImmediatePropagation() {\n throw new Error('stopImmediatePropagation cannot be called');\n }\n /** @deprecated */\n stopPropagation() {\n throw new Error('stopPropagation cannot be called');\n }\n}\n_AppReadyEvent_detail = new WeakMap();\n/**\n * @deprecated Use {@link getWallets} instead.\n *\n * @group Deprecated\n */\nfunction DEPRECATED_getWallets() {\n if (wallets)\n return wallets;\n wallets = getWallets();\n if (typeof window === 'undefined')\n return wallets;\n const callbacks = window.navigator.wallets || [];\n if (!Array.isArray(callbacks)) {\n console.error('window.navigator.wallets is not an array');\n return wallets;\n }\n const { register } = wallets;\n const push = (...callbacks) => callbacks.forEach((callback) => wallets_guard(() => callback({ register })));\n try {\n Object.defineProperty(window.navigator, 'wallets', {\n value: Object.freeze({ push }),\n });\n }\n catch (error) {\n console.error('window.navigator.wallets could not be set');\n return wallets;\n }\n push(...callbacks);\n return wallets;\n}\n//# sourceMappingURL=wallets.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-standard-wallet-adapter-react/lib/esm/useStandardWalletAdapters.js\n\n\n\nfunction useStandardWalletAdapters(adapters) {\n const warnings = useStandardWalletAdapters_useConstant(() => new Set());\n const { get, on } = useStandardWalletAdapters_useConstant(() => DEPRECATED_getWallets());\n const [standardAdapters, setStandardAdapters] = (0,react.useState)(() => wrapWalletsWithAdapters(get()));\n (0,react.useEffect)(() => {\n const listeners = [\n on('register', (...wallets) => setStandardAdapters((standardAdapters) => [...standardAdapters, ...wrapWalletsWithAdapters(wallets)])),\n on('unregister', (...wallets) => setStandardAdapters((standardAdapters) => standardAdapters.filter((standardAdapter) => wallets.some((wallet) => wallet === standardAdapter.wallet)))),\n ];\n return () => listeners.forEach((off) => off());\n }, [on]);\n const prevStandardAdapters = usePrevious(standardAdapters);\n (0,react.useEffect)(() => {\n if (!prevStandardAdapters)\n return;\n const currentAdapters = new Set(standardAdapters);\n const removedAdapters = new Set(prevStandardAdapters.filter((previousAdapter) => !currentAdapters.has(previousAdapter)));\n removedAdapters.forEach((adapter) => adapter.destroy());\n }, [prevStandardAdapters, standardAdapters]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n (0,react.useEffect)(() => () => standardAdapters.forEach((adapter) => adapter.destroy()), []);\n return (0,react.useMemo)(() => [\n ...standardAdapters,\n ...adapters.filter(({ name }) => {\n if (standardAdapters.some((standardAdapter) => standardAdapter.name === name)) {\n if (!warnings.has(name)) {\n warnings.add(name);\n console.warn(`${name} was registered as a Standard Wallet. The Wallet Adapter for ${name} can be removed from your app.`);\n }\n return false;\n }\n return true;\n }),\n ], [standardAdapters, adapters, warnings]);\n}\nfunction useStandardWalletAdapters_useConstant(fn) {\n const ref = (0,react.useRef)();\n if (!ref.current) {\n ref.current = { value: fn() };\n }\n return ref.current.value;\n}\nfunction usePrevious(state) {\n const ref = (0,react.useRef)();\n (0,react.useEffect)(() => {\n ref.current = state;\n });\n return ref.current;\n}\nfunction wrapWalletsWithAdapters(wallets) {\n return wallets.filter(isWalletAdapterCompatibleWallet).map((wallet) => new StandardWalletAdapter({ wallet }));\n}\n//# sourceMappingURL=useStandardWalletAdapters.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react/lib/esm/getEnvironment.js\n\n\nvar Environment;\n(function (Environment) {\n Environment[Environment[\"DESKTOP_WEB\"] = 0] = \"DESKTOP_WEB\";\n Environment[Environment[\"MOBILE_WEB\"] = 1] = \"MOBILE_WEB\";\n})(Environment || (Environment = {}));\nfunction isWebView(userAgentString) {\n return /(WebView|Version\\/.+(Chrome)\\/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)|; wv\\).+(Chrome)\\/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+))/i.test(userAgentString);\n}\nfunction getEnvironment({ adapters, userAgentString }) {\n if (adapters.some((adapter) => adapter.name !== SolanaMobileWalletAdapterWalletName &&\n adapter.readyState === WalletReadyState.Installed)) {\n /**\n * There are only two ways a browser extension adapter should be able to reach `Installed` status:\n *\n * 1. Its browser extension is installed.\n * 2. The app is running on a mobile wallet's in-app browser.\n *\n * In either case, we consider the environment to be desktop-like.\n */\n return Environment.DESKTOP_WEB;\n }\n if (userAgentString &&\n // Step 1: Check whether we're on a platform that supports MWA at all.\n /android/i.test(userAgentString) &&\n // Step 2: Determine that we are *not* running in a WebView.\n !isWebView(userAgentString)) {\n return Environment.MOBILE_WEB;\n }\n else {\n return Environment.DESKTOP_WEB;\n }\n}\n//# sourceMappingURL=getEnvironment.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react/lib/esm/getInferredClusterFromEndpoint.js\nfunction getInferredClusterFromEndpoint(endpoint) {\n if (!endpoint) {\n return 'mainnet-beta';\n }\n if (/devnet/i.test(endpoint)) {\n return 'devnet';\n }\n else if (/testnet/i.test(endpoint)) {\n return 'testnet';\n }\n else {\n return 'mainnet-beta';\n }\n}\n//# sourceMappingURL=getInferredClusterFromEndpoint.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react/lib/esm/useLocalStorage.js\n\nfunction useLocalStorage_useLocalStorage(key, defaultState) {\n const state = (0,react.useState)(() => {\n try {\n const value = localStorage.getItem(key);\n if (value)\n return JSON.parse(value);\n }\n catch (error) {\n if (typeof window !== 'undefined') {\n console.error(error);\n }\n }\n return defaultState;\n });\n const value = state[0];\n const isFirstRenderRef = (0,react.useRef)(true);\n (0,react.useEffect)(() => {\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false;\n return;\n }\n try {\n if (value === null) {\n localStorage.removeItem(key);\n }\n else {\n localStorage.setItem(key, JSON.stringify(value));\n }\n }\n catch (error) {\n if (typeof window !== 'undefined') {\n console.error(error);\n }\n }\n }, [value, key]);\n return state;\n}\n//# sourceMappingURL=useLocalStorage.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react/lib/esm/errors.js\n\nclass WalletNotSelectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotSelectedError';\n }\n}\n//# sourceMappingURL=errors.js.map\n// EXTERNAL MODULE: ./node_modules/@solana/wallet-adapter-react/lib/esm/useWallet.js\nvar useWallet = __webpack_require__(4306);\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react/lib/esm/WalletProviderBase.js\n\n\n\n\nfunction WalletProviderBase({ children, wallets: adapters, adapter, isUnloadingRef, onAutoConnectRequest, onConnectError, onError, onSelectWallet, }) {\n const isConnectingRef = (0,react.useRef)(false);\n const [connecting, setConnecting] = (0,react.useState)(false);\n const isDisconnectingRef = (0,react.useRef)(false);\n const [disconnecting, setDisconnecting] = (0,react.useState)(false);\n const [publicKey, setPublicKey] = (0,react.useState)(() => adapter?.publicKey ?? null);\n const [connected, setConnected] = (0,react.useState)(() => adapter?.connected ?? false);\n /**\n * Store the error handlers as refs so that a change in the\n * custom error handler does not recompute other dependencies.\n */\n const onErrorRef = (0,react.useRef)(onError);\n (0,react.useEffect)(() => {\n onErrorRef.current = onError;\n return () => {\n onErrorRef.current = undefined;\n };\n }, [onError]);\n const handleErrorRef = (0,react.useRef)((error, adapter) => {\n if (!isUnloadingRef.current) {\n if (onErrorRef.current) {\n onErrorRef.current(error, adapter);\n }\n else {\n console.error(error, adapter);\n if (error instanceof WalletNotReadyError && typeof window !== 'undefined' && adapter) {\n window.open(adapter.url, '_blank');\n }\n }\n }\n return error;\n });\n // Wrap adapters to conform to the `Wallet` interface\n const [wallets, setWallets] = (0,react.useState)(() => adapters\n .map((adapter) => ({\n adapter,\n readyState: adapter.readyState,\n }))\n .filter(({ readyState }) => readyState !== WalletReadyState.Unsupported));\n // When the adapters change, start to listen for changes to their `readyState`\n (0,react.useEffect)(() => {\n // When the adapters change, wrap them to conform to the `Wallet` interface\n setWallets((wallets) => adapters\n .map((adapter, index) => {\n const wallet = wallets[index];\n // If the wallet hasn't changed, return the same instance\n return wallet && wallet.adapter === adapter && wallet.readyState === adapter.readyState\n ? wallet\n : {\n adapter: adapter,\n readyState: adapter.readyState,\n };\n })\n .filter(({ readyState }) => readyState !== WalletReadyState.Unsupported));\n function handleReadyStateChange(readyState) {\n setWallets((prevWallets) => {\n const index = prevWallets.findIndex(({ adapter }) => adapter === this);\n if (index === -1)\n return prevWallets;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const { adapter } = prevWallets[index];\n return [\n ...prevWallets.slice(0, index),\n { adapter, readyState },\n ...prevWallets.slice(index + 1),\n ].filter(({ readyState }) => readyState !== WalletReadyState.Unsupported);\n });\n }\n adapters.forEach((adapter) => adapter.on('readyStateChange', handleReadyStateChange, adapter));\n return () => {\n adapters.forEach((adapter) => adapter.off('readyStateChange', handleReadyStateChange, adapter));\n };\n }, [adapter, adapters]);\n const wallet = (0,react.useMemo)(() => wallets.find((wallet) => wallet.adapter === adapter) ?? null, [adapter, wallets]);\n // Setup and teardown event listeners when the adapter changes\n (0,react.useEffect)(() => {\n if (!adapter)\n return;\n const handleConnect = (publicKey) => {\n setPublicKey(publicKey);\n isConnectingRef.current = false;\n setConnecting(false);\n setConnected(true);\n isDisconnectingRef.current = false;\n setDisconnecting(false);\n };\n const handleDisconnect = () => {\n if (isUnloadingRef.current)\n return;\n setPublicKey(null);\n isConnectingRef.current = false;\n setConnecting(false);\n setConnected(false);\n isDisconnectingRef.current = false;\n setDisconnecting(false);\n };\n const handleError = (error) => {\n handleErrorRef.current(error, adapter);\n };\n adapter.on('connect', handleConnect);\n adapter.on('disconnect', handleDisconnect);\n adapter.on('error', handleError);\n return () => {\n adapter.off('connect', handleConnect);\n adapter.off('disconnect', handleDisconnect);\n adapter.off('error', handleError);\n handleDisconnect();\n };\n }, [adapter, isUnloadingRef]);\n // When the adapter changes, clear the `autoConnect` tracking flag\n const didAttemptAutoConnectRef = (0,react.useRef)(false);\n (0,react.useEffect)(() => {\n return () => {\n didAttemptAutoConnectRef.current = false;\n };\n }, [adapter]);\n // If auto-connect is enabled, request to connect when the adapter changes and is ready\n (0,react.useEffect)(() => {\n if (didAttemptAutoConnectRef.current ||\n isConnectingRef.current ||\n connected ||\n !onAutoConnectRequest ||\n !(wallet?.readyState === WalletReadyState.Installed || wallet?.readyState === WalletReadyState.Loadable))\n return;\n isConnectingRef.current = true;\n setConnecting(true);\n didAttemptAutoConnectRef.current = true;\n (async function () {\n try {\n await onAutoConnectRequest();\n }\n catch {\n onConnectError();\n // Drop the error. It will be caught by `handleError` anyway.\n }\n finally {\n setConnecting(false);\n isConnectingRef.current = false;\n }\n })();\n }, [connected, onAutoConnectRequest, onConnectError, wallet]);\n // Send a transaction using the provided connection\n const sendTransaction = (0,react.useCallback)(async (transaction, connection, options) => {\n if (!adapter)\n throw handleErrorRef.current(new WalletNotSelectedError());\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.sendTransaction(transaction, connection, options);\n }, [adapter, connected]);\n // Sign a transaction if the wallet supports it\n const signTransaction = (0,react.useMemo)(() => adapter && 'signTransaction' in adapter\n ? async (transaction) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signTransaction(transaction);\n }\n : undefined, [adapter, connected]);\n // Sign multiple transactions if the wallet supports it\n const signAllTransactions = (0,react.useMemo)(() => adapter && 'signAllTransactions' in adapter\n ? async (transactions) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signAllTransactions(transactions);\n }\n : undefined, [adapter, connected]);\n // Sign an arbitrary message if the wallet supports it\n const signMessage = (0,react.useMemo)(() => adapter && 'signMessage' in adapter\n ? async (message) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signMessage(message);\n }\n : undefined, [adapter, connected]);\n // Sign in if the wallet supports it\n const signIn = (0,react.useMemo)(() => adapter && 'signIn' in adapter\n ? async (input) => {\n return await adapter.signIn(input);\n }\n : undefined, [adapter]);\n const handleConnect = (0,react.useCallback)(async () => {\n if (isConnectingRef.current || isDisconnectingRef.current || wallet?.adapter.connected)\n return;\n if (!wallet)\n throw handleErrorRef.current(new WalletNotSelectedError());\n const { adapter, readyState } = wallet;\n if (!(readyState === WalletReadyState.Installed || readyState === WalletReadyState.Loadable))\n throw handleErrorRef.current(new WalletNotReadyError(), adapter);\n isConnectingRef.current = true;\n setConnecting(true);\n try {\n await adapter.connect();\n }\n catch (e) {\n onConnectError();\n throw e;\n }\n finally {\n setConnecting(false);\n isConnectingRef.current = false;\n }\n }, [onConnectError, wallet]);\n const handleDisconnect = (0,react.useCallback)(async () => {\n if (isDisconnectingRef.current)\n return;\n if (!adapter)\n return;\n isDisconnectingRef.current = true;\n setDisconnecting(true);\n try {\n await adapter.disconnect();\n }\n finally {\n setDisconnecting(false);\n isDisconnectingRef.current = false;\n }\n }, [adapter]);\n return (react.createElement(useWallet/* WalletContext.Provider */.z.Provider, { value: {\n autoConnect: !!onAutoConnectRequest,\n wallets,\n wallet,\n publicKey,\n connected,\n connecting,\n disconnecting,\n select: onSelectWallet,\n connect: handleConnect,\n disconnect: handleDisconnect,\n sendTransaction,\n signTransaction,\n signAllTransactions,\n signMessage,\n signIn,\n } }, children));\n}\n//# sourceMappingURL=WalletProviderBase.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react/lib/esm/WalletProvider.js\n\n\n\n\n\n\n\n\nlet _userAgent;\nfunction getUserAgent() {\n if (_userAgent === undefined) {\n _userAgent = globalThis.navigator?.userAgent ?? null;\n }\n return _userAgent;\n}\nfunction getIsMobile(adapters) {\n const userAgentString = getUserAgent();\n return getEnvironment({ adapters, userAgentString }) === Environment.MOBILE_WEB;\n}\nfunction getUriForAppIdentity() {\n const location = globalThis.location;\n if (!location)\n return;\n return `${location.protocol}//${location.host}`;\n}\nfunction WalletProvider({ children, wallets: adapters, autoConnect, localStorageKey = 'walletName', onError, }) {\n const { connection } = useConnection();\n const adaptersWithStandardAdapters = useStandardWalletAdapters(adapters);\n const mobileWalletAdapter = (0,react.useMemo)(() => {\n if (!getIsMobile(adaptersWithStandardAdapters)) {\n return null;\n }\n const existingMobileWalletAdapter = adaptersWithStandardAdapters.find((adapter) => adapter.name === SolanaMobileWalletAdapterWalletName);\n if (existingMobileWalletAdapter) {\n return existingMobileWalletAdapter;\n }\n return new SolanaMobileWalletAdapter({\n addressSelector: createDefaultAddressSelector(),\n appIdentity: {\n uri: getUriForAppIdentity(),\n },\n authorizationResultCache: createDefaultAuthorizationResultCache(),\n cluster: getInferredClusterFromEndpoint(connection?.rpcEndpoint),\n onWalletNotFound: createDefaultWalletNotFoundHandler(),\n });\n }, [adaptersWithStandardAdapters, connection?.rpcEndpoint]);\n const adaptersWithMobileWalletAdapter = (0,react.useMemo)(() => {\n if (mobileWalletAdapter == null || adaptersWithStandardAdapters.indexOf(mobileWalletAdapter) !== -1) {\n return adaptersWithStandardAdapters;\n }\n return [mobileWalletAdapter, ...adaptersWithStandardAdapters];\n }, [adaptersWithStandardAdapters, mobileWalletAdapter]);\n const [walletName, setWalletName] = useLocalStorage_useLocalStorage(localStorageKey, getIsMobile(adaptersWithStandardAdapters) ? SolanaMobileWalletAdapterWalletName : null);\n const adapter = (0,react.useMemo)(() => adaptersWithMobileWalletAdapter.find((a) => a.name === walletName) ?? null, [adaptersWithMobileWalletAdapter, walletName]);\n const changeWallet = (0,react.useCallback)((nextWalletName) => {\n if (walletName === nextWalletName)\n return;\n if (adapter &&\n // Selecting a wallet other than the mobile wallet adapter is not\n // sufficient reason to call `disconnect` on the mobile wallet adapter.\n // Calling `disconnect` on the mobile wallet adapter causes the entire\n // authorization store to be wiped.\n adapter.name !== SolanaMobileWalletAdapterWalletName) {\n adapter.disconnect();\n }\n setWalletName(nextWalletName);\n }, [adapter, setWalletName, walletName]);\n (0,react.useEffect)(() => {\n if (!adapter)\n return;\n function handleDisconnect() {\n if (isUnloadingRef.current)\n return;\n // Leave the adapter selected in the event of a disconnection.\n if (walletName === SolanaMobileWalletAdapterWalletName && getIsMobile(adaptersWithStandardAdapters))\n return;\n setWalletName(null);\n }\n adapter.on('disconnect', handleDisconnect);\n return () => {\n adapter.off('disconnect', handleDisconnect);\n };\n }, [adapter, adaptersWithStandardAdapters, setWalletName, walletName]);\n const hasUserSelectedAWallet = (0,react.useRef)(false);\n const handleAutoConnectRequest = (0,react.useMemo)(() => {\n if (!autoConnect || !adapter)\n return;\n return async () => {\n // If autoConnect is true or returns true, use the default autoConnect behavior.\n if (autoConnect === true || (await autoConnect(adapter))) {\n if (hasUserSelectedAWallet.current) {\n await adapter.connect();\n }\n else {\n await adapter.autoConnect();\n }\n }\n };\n }, [autoConnect, adapter]);\n const isUnloadingRef = (0,react.useRef)(false);\n (0,react.useEffect)(() => {\n if (walletName === SolanaMobileWalletAdapterWalletName && getIsMobile(adaptersWithStandardAdapters)) {\n isUnloadingRef.current = false;\n return;\n }\n function handleBeforeUnload() {\n isUnloadingRef.current = true;\n }\n /**\n * Some wallets fire disconnection events when the window unloads. Since there's no way to\n * distinguish between a disconnection event received because a user initiated it, and one\n * that was received because they've closed the window, we have to track window unload\n * events themselves. Downstream components use this information to decide whether to act\n * upon or drop wallet events and errors.\n */\n window.addEventListener('beforeunload', handleBeforeUnload);\n return () => {\n window.removeEventListener('beforeunload', handleBeforeUnload);\n };\n }, [adaptersWithStandardAdapters, walletName]);\n const handleConnectError = (0,react.useCallback)(() => {\n if (adapter && adapter.name !== SolanaMobileWalletAdapterWalletName) {\n // If any error happens while connecting, unset the adapter.\n changeWallet(null);\n }\n }, [adapter, changeWallet]);\n const selectWallet = (0,react.useCallback)((walletName) => {\n hasUserSelectedAWallet.current = true;\n changeWallet(walletName);\n }, [changeWallet]);\n return (react.createElement(WalletProviderBase, { wallets: adaptersWithMobileWalletAdapter, adapter: adapter, isUnloadingRef: isUnloadingRef, onAutoConnectRequest: handleAutoConnectRequest, onConnectError: handleConnectError, onError: onError, onSelectWallet: selectWallet }, children));\n}\n//# sourceMappingURL=WalletProvider.js.map\n// EXTERNAL MODULE: ./node_modules/@solana/wallet-adapter-react-ui/lib/esm/useWalletModal.js\nvar useWalletModal = __webpack_require__(3495);\n// EXTERNAL MODULE: ./node_modules/react-dom/index.js\nvar react_dom = __webpack_require__(3935);\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react-ui/lib/esm/Collapse.js\n\nconst Collapse = ({ id, children, expanded = false }) => {\n const ref = (0,react.useRef)(null);\n const instant = (0,react.useRef)(true);\n const transition = 'height 250ms ease-out';\n const openCollapse = () => {\n const node = ref.current;\n if (!node)\n return;\n requestAnimationFrame(() => {\n node.style.height = node.scrollHeight + 'px';\n });\n };\n const closeCollapse = () => {\n const node = ref.current;\n if (!node)\n return;\n requestAnimationFrame(() => {\n node.style.height = node.offsetHeight + 'px';\n node.style.overflow = 'hidden';\n requestAnimationFrame(() => {\n node.style.height = '0';\n });\n });\n };\n (0,react.useLayoutEffect)(() => {\n if (expanded) {\n openCollapse();\n }\n else {\n closeCollapse();\n }\n }, [expanded]);\n (0,react.useLayoutEffect)(() => {\n const node = ref.current;\n if (!node)\n return;\n function handleComplete() {\n if (!node)\n return;\n node.style.overflow = expanded ? 'initial' : 'hidden';\n if (expanded) {\n node.style.height = 'auto';\n }\n }\n function handleTransitionEnd(event) {\n if (node && event.target === node && event.propertyName === 'height') {\n handleComplete();\n }\n }\n if (instant.current) {\n handleComplete();\n instant.current = false;\n }\n node.addEventListener('transitionend', handleTransitionEnd);\n return () => node.removeEventListener('transitionend', handleTransitionEnd);\n }, [expanded]);\n return (react.createElement(\"div\", { className: \"wallet-adapter-collapse\", id: id, ref: ref, role: \"region\", style: { height: 0, transition: instant.current ? undefined : transition } }, children));\n};\n//# sourceMappingURL=Collapse.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react-ui/lib/esm/Button.js\n\nconst Button = (props) => {\n return (react.createElement(\"button\", { className: `wallet-adapter-button ${props.className || ''}`, disabled: props.disabled, style: props.style, onClick: props.onClick, tabIndex: props.tabIndex || 0, type: \"button\" },\n props.startIcon && react.createElement(\"i\", { className: \"wallet-adapter-button-start-icon\" }, props.startIcon),\n props.children,\n props.endIcon && react.createElement(\"i\", { className: \"wallet-adapter-button-end-icon\" }, props.endIcon)));\n};\n//# sourceMappingURL=Button.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletIcon.js\n\nconst WalletIcon = ({ wallet, ...props }) => {\n return wallet && react.createElement(\"img\", { src: wallet.adapter.icon, alt: `${wallet.adapter.name} icon`, ...props });\n};\n//# sourceMappingURL=WalletIcon.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletListItem.js\n\n\n\n\nconst WalletListItem = ({ handleClick, tabIndex, wallet }) => {\n return (react.createElement(\"li\", null,\n react.createElement(Button, { onClick: handleClick, startIcon: react.createElement(WalletIcon, { wallet: wallet }), tabIndex: tabIndex },\n wallet.adapter.name,\n wallet.readyState === WalletReadyState.Installed && react.createElement(\"span\", null, \"Detected\"))));\n};\n//# sourceMappingURL=WalletListItem.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletSVG.js\n\nconst WalletSVG = () => {\n return (react.createElement(\"svg\", { width: \"97\", height: \"96\", viewBox: \"0 0 97 96\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n react.createElement(\"circle\", { cx: \"48.5\", cy: \"48\", r: \"48\", fill: \"url(#paint0_linear_880_5115)\", fillOpacity: \"0.1\" }),\n react.createElement(\"circle\", { cx: \"48.5\", cy: \"48\", r: \"47\", stroke: \"url(#paint1_linear_880_5115)\", strokeOpacity: \"0.4\", strokeWidth: \"2\" }),\n react.createElement(\"g\", { clipPath: \"url(#clip0_880_5115)\" },\n react.createElement(\"path\", { d: \"M65.5769 28.1523H31.4231C27.6057 28.1523 24.5 31.258 24.5 35.0754V60.9215C24.5 64.7389 27.6057 67.8446 31.4231 67.8446H65.5769C69.3943 67.8446 72.5 64.7389 72.5 60.9215V35.0754C72.5 31.258 69.3943 28.1523 65.5769 28.1523ZM69.7308 52.1523H59.5769C57.2865 52.1523 55.4231 50.289 55.4231 47.9985C55.4231 45.708 57.2864 43.8446 59.5769 43.8446H69.7308V52.1523ZM69.7308 41.0754H59.5769C55.7595 41.0754 52.6539 44.1811 52.6539 47.9985C52.6539 51.8159 55.7595 54.9215 59.5769 54.9215H69.7308V60.9215C69.7308 63.2119 67.8674 65.0754 65.5769 65.0754H31.4231C29.1327 65.0754 27.2692 63.212 27.2692 60.9215V35.0754C27.2692 32.785 29.1326 30.9215 31.4231 30.9215H65.5769C67.8673 30.9215 69.7308 32.7849 69.7308 35.0754V41.0754Z\", fill: \"url(#paint2_linear_880_5115)\" }),\n react.createElement(\"path\", { d: \"M61.4231 46.6172H59.577C58.8123 46.6172 58.1924 47.2371 58.1924 48.0018C58.1924 48.7665 58.8123 49.3863 59.577 49.3863H61.4231C62.1878 49.3863 62.8077 48.7664 62.8077 48.0018C62.8077 47.2371 62.1878 46.6172 61.4231 46.6172Z\", fill: \"url(#paint3_linear_880_5115)\" })),\n react.createElement(\"defs\", null,\n react.createElement(\"linearGradient\", { id: \"paint0_linear_880_5115\", x1: \"3.41664\", y1: \"98.0933\", x2: \"103.05\", y2: \"8.42498\", gradientUnits: \"userSpaceOnUse\" },\n react.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n react.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n react.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n react.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n react.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n react.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n react.createElement(\"linearGradient\", { id: \"paint1_linear_880_5115\", x1: \"3.41664\", y1: \"98.0933\", x2: \"103.05\", y2: \"8.42498\", gradientUnits: \"userSpaceOnUse\" },\n react.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n react.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n react.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n react.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n react.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n react.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n react.createElement(\"linearGradient\", { id: \"paint2_linear_880_5115\", x1: \"25.9583\", y1: \"68.7101\", x2: \"67.2337\", y2: \"23.7879\", gradientUnits: \"userSpaceOnUse\" },\n react.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n react.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n react.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n react.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n react.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n react.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n react.createElement(\"linearGradient\", { id: \"paint3_linear_880_5115\", x1: \"58.3326\", y1: \"49.4467\", x2: \"61.0002\", y2: \"45.4453\", gradientUnits: \"userSpaceOnUse\" },\n react.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n react.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n react.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n react.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n react.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n react.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n react.createElement(\"clipPath\", { id: \"clip0_880_5115\" },\n react.createElement(\"rect\", { width: \"48\", height: \"48\", fill: \"white\", transform: \"translate(24.5 24)\" })))));\n};\n//# sourceMappingURL=WalletSVG.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletModal.js\n\n\n\n\n\n\n\n\nconst WalletModal = ({ className = '', container = 'body' }) => {\n const ref = (0,react.useRef)(null);\n const { wallets, select } = (0,useWallet/* useWallet */.O)();\n const { setVisible } = (0,useWalletModal/* useWalletModal */.h)();\n const [expanded, setExpanded] = (0,react.useState)(false);\n const [fadeIn, setFadeIn] = (0,react.useState)(false);\n const [portal, setPortal] = (0,react.useState)(null);\n const [listedWallets, collapsedWallets] = (0,react.useMemo)(() => {\n const installed = [];\n const notInstalled = [];\n for (const wallet of wallets) {\n if (wallet.readyState === WalletReadyState.Installed) {\n installed.push(wallet);\n }\n else {\n notInstalled.push(wallet);\n }\n }\n return installed.length ? [installed, notInstalled] : [notInstalled, []];\n }, [wallets]);\n const hideModal = (0,react.useCallback)(() => {\n setFadeIn(false);\n setTimeout(() => setVisible(false), 150);\n }, [setVisible]);\n const handleClose = (0,react.useCallback)((event) => {\n event.preventDefault();\n hideModal();\n }, [hideModal]);\n const handleWalletClick = (0,react.useCallback)((event, walletName) => {\n select(walletName);\n handleClose(event);\n }, [select, handleClose]);\n const handleCollapseClick = (0,react.useCallback)(() => setExpanded(!expanded), [expanded]);\n const handleTabKey = (0,react.useCallback)((event) => {\n const node = ref.current;\n if (!node)\n return;\n // here we query all focusable elements\n const focusableElements = node.querySelectorAll('button');\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const firstElement = focusableElements[0];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const lastElement = focusableElements[focusableElements.length - 1];\n if (event.shiftKey) {\n // if going backward by pressing tab and firstElement is active, shift focus to last focusable element\n if (document.activeElement === firstElement) {\n lastElement.focus();\n event.preventDefault();\n }\n }\n else {\n // if going forward by pressing tab and lastElement is active, shift focus to first focusable element\n if (document.activeElement === lastElement) {\n firstElement.focus();\n event.preventDefault();\n }\n }\n }, [ref]);\n (0,react.useLayoutEffect)(() => {\n const handleKeyDown = (event) => {\n if (event.key === 'Escape') {\n hideModal();\n }\n else if (event.key === 'Tab') {\n handleTabKey(event);\n }\n };\n // Get original overflow\n const { overflow } = window.getComputedStyle(document.body);\n // Hack to enable fade in animation after mount\n setTimeout(() => setFadeIn(true), 0);\n // Prevent scrolling on mount\n document.body.style.overflow = 'hidden';\n // Listen for keydown events\n window.addEventListener('keydown', handleKeyDown, false);\n return () => {\n // Re-enable scrolling when component unmounts\n document.body.style.overflow = overflow;\n window.removeEventListener('keydown', handleKeyDown, false);\n };\n }, [hideModal, handleTabKey]);\n (0,react.useLayoutEffect)(() => setPortal(document.querySelector(container)), [container]);\n return (portal &&\n (0,react_dom.createPortal)(react.createElement(\"div\", { \"aria-labelledby\": \"wallet-adapter-modal-title\", \"aria-modal\": \"true\", className: `wallet-adapter-modal ${fadeIn && 'wallet-adapter-modal-fade-in'} ${className}`, ref: ref, role: \"dialog\" },\n react.createElement(\"div\", { className: \"wallet-adapter-modal-container\" },\n react.createElement(\"div\", { className: \"wallet-adapter-modal-wrapper\" },\n react.createElement(\"button\", { onClick: handleClose, className: \"wallet-adapter-modal-button-close\" },\n react.createElement(\"svg\", { width: \"14\", height: \"14\" },\n react.createElement(\"path\", { d: \"M14 12.461 8.3 6.772l5.234-5.233L12.006 0 6.772 5.234 1.54 0 0 1.539l5.234 5.233L0 12.006l1.539 1.528L6.772 8.3l5.69 5.7L14 12.461z\" }))),\n listedWallets.length ? (react.createElement(react.Fragment, null,\n react.createElement(\"h1\", { className: \"wallet-adapter-modal-title\" }, \"Connect a wallet on Solana to continue\"),\n react.createElement(\"ul\", { className: \"wallet-adapter-modal-list\" },\n listedWallets.map((wallet) => (react.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), wallet: wallet }))),\n collapsedWallets.length ? (react.createElement(Collapse, { expanded: expanded, id: \"wallet-adapter-modal-collapse\" }, collapsedWallets.map((wallet) => (react.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), tabIndex: expanded ? 0 : -1, wallet: wallet }))))) : null),\n collapsedWallets.length ? (react.createElement(\"button\", { className: \"wallet-adapter-modal-list-more\", onClick: handleCollapseClick, tabIndex: 0 },\n react.createElement(\"span\", null,\n expanded ? 'Less ' : 'More ',\n \"options\"),\n react.createElement(\"svg\", { width: \"13\", height: \"7\", viewBox: \"0 0 13 7\", xmlns: \"http://www.w3.org/2000/svg\", className: `${expanded ? 'wallet-adapter-modal-list-more-icon-rotate' : ''}` },\n react.createElement(\"path\", { d: \"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z\" })))) : null)) : (react.createElement(react.Fragment, null,\n react.createElement(\"h1\", { className: \"wallet-adapter-modal-title\" }, \"You'll need a wallet on Solana to continue\"),\n react.createElement(\"div\", { className: \"wallet-adapter-modal-middle\" },\n react.createElement(WalletSVG, null)),\n collapsedWallets.length ? (react.createElement(react.Fragment, null,\n react.createElement(\"button\", { className: \"wallet-adapter-modal-list-more\", onClick: handleCollapseClick, tabIndex: 0 },\n react.createElement(\"span\", null,\n expanded ? 'Hide ' : 'Already have a wallet? View ',\n \"options\"),\n react.createElement(\"svg\", { width: \"13\", height: \"7\", viewBox: \"0 0 13 7\", xmlns: \"http://www.w3.org/2000/svg\", className: `${expanded ? 'wallet-adapter-modal-list-more-icon-rotate' : ''}` },\n react.createElement(\"path\", { d: \"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z\" }))),\n react.createElement(Collapse, { expanded: expanded, id: \"wallet-adapter-modal-collapse\" },\n react.createElement(\"ul\", { className: \"wallet-adapter-modal-list\" }, collapsedWallets.map((wallet) => (react.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), tabIndex: expanded ? 0 : -1, wallet: wallet }))))))) : null)))),\n react.createElement(\"div\", { className: \"wallet-adapter-modal-overlay\", onMouseDown: handleClose })), portal));\n};\n//# sourceMappingURL=WalletModal.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletModalProvider.js\n\n\n\nconst WalletModalProvider = ({ children, ...props }) => {\n const [visible, setVisible] = (0,react.useState)(false);\n return (react.createElement(useWalletModal/* WalletModalContext.Provider */.g.Provider, { value: {\n visible,\n setVisible,\n } },\n children,\n visible && react.createElement(WalletModal, { ...props })));\n};\n//# sourceMappingURL=WalletModalProvider.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-phantom/lib/esm/adapter.js\n\n\nconst PhantomWalletName = 'Phantom';\nclass PhantomWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = PhantomWalletName;\n this.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MDQgNzQuNjk4OSA0Mi41Nzk0Qzc0LjY5ODkgMzguOTg4NSA3Ni43ODE2IDM3LjE5MzEgNzkuMTg3NSAzNy4xOTMxQzgxLjU1NzUgMzcuMTkzMSA4My42NzYxIDM4Ljk4ODUgODMuNjc2MSA0Mi41Nzk0Wk03MC4yMTAzIDQyLjU3OTVDNzAuMjEwMyA0Ni4xNzA0IDY4LjA5MTYgNDcuOTY1OCA2NS43MjE2IDQ3Ljk2NThDNjMuMzE1NyA0Ny45NjU4IDYxLjIzMyA0Ni4xNzA0IDYxLjIzMyA0Mi41Nzk1QzYxLjIzMyAzOC45ODg1IDYzLjMxNTcgMzcuMTkzMSA2NS43MjE2IDM3LjE5MzFDNjguMDkxNiAzNy4xOTMxIDcwLjIxMDMgMzguOTg4NSA3MC4yMTAzIDQyLjU3OTVaIiBmaWxsPSIjRkZGREY4Ii8+Cjwvc3ZnPg==';\n this.supportedTransactionVersions = new Set(['legacy', 0]);\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.NotDetected;\n this._disconnected = () => {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._accountChanged = (newPublicKey) => {\n const publicKey = this._publicKey;\n if (!publicKey)\n return;\n try {\n newPublicKey = new index_browser_esm.PublicKey(newPublicKey.toBytes());\n }\n catch (error) {\n this.emit('error', new WalletPublicKeyError(error?.message, error));\n return;\n }\n if (publicKey.equals(newPublicKey))\n return;\n this._publicKey = newPublicKey;\n this.emit('connect', newPublicKey);\n };\n this._connecting = false;\n this._wallet = null;\n this._publicKey = null;\n if (this._readyState !== WalletReadyState.Unsupported) {\n if (isIosAndRedirectable()) {\n // when in iOS (not webview), set Phantom as loadable instead of checking for install\n this._readyState = WalletReadyState.Loadable;\n this.emit('readyStateChange', this._readyState);\n }\n else {\n scopePollingDetectionStrategy(() => {\n if (window.phantom?.solana?.isPhantom || window.solana?.isPhantom) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n }\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get readyState() {\n return this._readyState;\n }\n async autoConnect() {\n // Skip autoconnect in the Loadable state\n // We can't redirect to a universal link without user input\n if (this.readyState === WalletReadyState.Installed) {\n await this.connect();\n }\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this.readyState === WalletReadyState.Loadable) {\n // redirect to the Phantom /browse universal link\n // this will open the current URL in the Phantom in-wallet browser\n const url = encodeURIComponent(window.location.href);\n const ref = encodeURIComponent(window.location.origin);\n window.location.href = `https://phantom.app/ul/browse/${url}?ref=${ref}`;\n return;\n }\n if (this.readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n this._connecting = true;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const wallet = window.phantom?.solana || window.solana;\n if (!wallet.isConnected) {\n try {\n await wallet.connect();\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n if (!wallet.publicKey)\n throw new WalletAccountError();\n let publicKey;\n try {\n publicKey = new index_browser_esm.PublicKey(wallet.publicKey.toBytes());\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n wallet.on('disconnect', this._disconnected);\n wallet.on('accountChanged', this._accountChanged);\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n try {\n await wallet.disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n }\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n const { signature } = await wallet.signAndSendTransaction(transaction, sendOptions);\n return signature;\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signature } = await wallet.signMessage(message);\n return signature;\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map\n;// CONCATENATED MODULE: ./node_modules/@wallet-standard/wallet/lib/esm/register.js\nvar register_classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar register_classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _RegisterWalletEvent_detail;\n/**\n * Register a {@link \"@wallet-standard/base\".Wallet} as a Standard Wallet with the app.\n *\n * This dispatches a {@link \"@wallet-standard/base\".WindowRegisterWalletEvent} to notify the app that the Wallet is\n * ready to be registered.\n *\n * This also adds a listener for {@link \"@wallet-standard/base\".WindowAppReadyEvent} to listen for a notification from\n * the app that the app is ready to register the Wallet.\n *\n * This combination of event dispatch and listener guarantees that the Wallet will be registered synchronously as soon\n * as the app is ready whether the Wallet loads before or after the app.\n *\n * @param wallet Wallet to register.\n *\n * @group Wallet\n */\nfunction registerWallet(wallet) {\n const callback = ({ register }) => register(wallet);\n try {\n window.dispatchEvent(new RegisterWalletEvent(callback));\n }\n catch (error) {\n console.error('wallet-standard:register-wallet event could not be dispatched\\n', error);\n }\n try {\n window.addEventListener('wallet-standard:app-ready', ({ detail: api }) => callback(api));\n }\n catch (error) {\n console.error('wallet-standard:app-ready event listener could not be added\\n', error);\n }\n}\nclass RegisterWalletEvent extends Event {\n constructor(callback) {\n super('wallet-standard:register-wallet', {\n bubbles: false,\n cancelable: false,\n composed: false,\n });\n _RegisterWalletEvent_detail.set(this, void 0);\n register_classPrivateFieldSet(this, _RegisterWalletEvent_detail, callback, \"f\");\n }\n get detail() {\n return register_classPrivateFieldGet(this, _RegisterWalletEvent_detail, \"f\");\n }\n get type() {\n return 'wallet-standard:register-wallet';\n }\n /** @deprecated */\n preventDefault() {\n throw new Error('preventDefault cannot be called');\n }\n /** @deprecated */\n stopImmediatePropagation() {\n throw new Error('stopImmediatePropagation cannot be called');\n }\n /** @deprecated */\n stopPropagation() {\n throw new Error('stopPropagation cannot be called');\n }\n}\n_RegisterWalletEvent_detail = new WeakMap();\n/**\n * @deprecated Use {@link registerWallet} instead.\n *\n * @group Deprecated\n */\nfunction DEPRECATED_registerWallet(wallet) {\n var _a;\n registerWallet(wallet);\n try {\n ((_a = window.navigator).wallets || (_a.wallets = [])).push(({ register }) => register(wallet));\n }\n catch (error) {\n console.error('window.navigator.wallets could not be pushed\\n', error);\n }\n}\n//# sourceMappingURL=register.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/icon.js\n/** @internal */\nconst icon = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMxIiB2aWV3Qm94PSIwIDAgMzEgMzEiIHdpZHRoPSIzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjIwLjI1IiB4Mj0iMjYuNTcxIiB5MT0iMjcuMTczIiB5Mj0iMTkuODU4Ij48c3RvcCBvZmZzZXQ9Ii4wOCIgc3RvcC1jb2xvcj0iIzk5NDVmZiIvPjxzdG9wIG9mZnNldD0iLjMiIHN0b3AtY29sb3I9IiM4NzUyZjMiLz48c3RvcCBvZmZzZXQ9Ii41IiBzdG9wLWNvbG9yPSIjNTQ5N2Q1Ii8+PHN0b3Agb2Zmc2V0PSIuNiIgc3RvcC1jb2xvcj0iIzQzYjRjYSIvPjxzdG9wIG9mZnNldD0iLjcyIiBzdG9wLWNvbG9yPS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tLjA0LjEwMS0uMDdsMS4zMS0xLjM2OGMuMDItLjAyMS4wMzQtLjA0Ny4wMzktLjA3NnMuMDAxLS4wNTgtLjAxLS4wODRhLjE1LjE1IDAgMCAwIC0uMDU2LS4wNjVjLS4wMjUtLjAxNi0uMDU0LS4wMjQtLjA4My0uMDI0aC02LjIwOGEuMzEuMzEgMCAwIDAgLS4xMjEuMDI1Yy0uMDM4LjAxNi0uMDcyLjA0LS4xMDEuMDY5bC0xLjMxIDEuMzY4Yy0uMDIuMDIxLS4wMzQuMDQ3LS4wMzkuMDc2cy0uMDAxLjA1OC4wMS4wODQuMDMxLjA0OS4wNTYuMDY1LjA1NC4wMjQuMDgzLjAyNHoiIGZpbGw9InVybCgjYSkiLz48L3N2Zz4=';\n//# sourceMappingURL=icon.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/wallet.js\nvar wallet_classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar wallet_classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _SolflareMetaMaskWallet_instances, _SolflareMetaMaskWallet_listeners, _SolflareMetaMaskWallet_version, _SolflareMetaMaskWallet_name, _SolflareMetaMaskWallet_icon, _SolflareMetaMaskWallet_solflareMetaMask, _SolflareMetaMaskWallet_on, _SolflareMetaMaskWallet_emit, _SolflareMetaMaskWallet_off, _SolflareMetaMaskWallet_connect, _SolflareMetaMaskWallet_disconnect, _SolflareMetaMaskWallet_signAndSendTransaction, _SolflareMetaMaskWallet_signTransaction, _SolflareMetaMaskWallet_signMessage;\n\n\n\n\n\nclass SolflareMetaMaskWallet {\n constructor() {\n _SolflareMetaMaskWallet_instances.add(this);\n _SolflareMetaMaskWallet_listeners.set(this, {});\n _SolflareMetaMaskWallet_version.set(this, '1.0.0');\n _SolflareMetaMaskWallet_name.set(this, 'MetaMask');\n _SolflareMetaMaskWallet_icon.set(this, icon);\n _SolflareMetaMaskWallet_solflareMetaMask.set(this, null);\n _SolflareMetaMaskWallet_on.set(this, (event, listener) => {\n wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.push(listener) || (wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event] = [listener]);\n return () => wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_instances, \"m\", _SolflareMetaMaskWallet_off).call(this, event, listener);\n });\n _SolflareMetaMaskWallet_connect.set(this, async () => {\n if (!wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\")) {\n let SolflareMetaMaskClass;\n try {\n SolflareMetaMaskClass = (await __webpack_require__.e(/* import() */ 525).then(__webpack_require__.bind(__webpack_require__, 9525))).default;\n }\n catch (error) {\n throw new Error('Unable to load Solflare MetaMask SDK');\n }\n wallet_classPrivateFieldSet(this, _SolflareMetaMaskWallet_solflareMetaMask, new SolflareMetaMaskClass(), \"f\");\n wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").on('standard_change', (properties) => wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_instances, \"m\", _SolflareMetaMaskWallet_emit).call(this, 'change', properties));\n }\n if (!this.accounts.length) {\n await wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").connect();\n }\n return { accounts: this.accounts };\n });\n _SolflareMetaMaskWallet_disconnect.set(this, async () => {\n if (!wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n return;\n await wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").disconnect();\n });\n _SolflareMetaMaskWallet_signAndSendTransaction.set(this, async (...inputs) => {\n if (!wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignAndSendTransaction(...inputs);\n });\n _SolflareMetaMaskWallet_signTransaction.set(this, async (...inputs) => {\n if (!wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignTransaction(...inputs);\n });\n _SolflareMetaMaskWallet_signMessage.set(this, async (...inputs) => {\n if (!wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignMessage(...inputs);\n });\n }\n get version() {\n return wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_version, \"f\");\n }\n get name() {\n return wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_name, \"f\");\n }\n get icon() {\n return wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_icon, \"f\");\n }\n get chains() {\n return [esm_SOLANA_MAINNET_CHAIN, esm_SOLANA_DEVNET_CHAIN, esm_SOLANA_TESTNET_CHAIN];\n }\n get features() {\n return {\n [StandardConnect]: {\n version: '1.0.0',\n connect: wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_connect, \"f\"),\n },\n [StandardDisconnect]: {\n version: '1.0.0',\n disconnect: wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_disconnect, \"f\"),\n },\n [StandardEvents]: {\n version: '1.0.0',\n on: wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_on, \"f\"),\n },\n [signAndSendTransaction/* SolanaSignAndSendTransaction */.G]: {\n version: '1.0.0',\n supportedTransactionVersions: ['legacy', 0],\n signAndSendTransaction: wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_signAndSendTransaction, \"f\"),\n },\n [signTransaction/* SolanaSignTransaction */.R]: {\n version: '1.0.0',\n supportedTransactionVersions: ['legacy', 0],\n signTransaction: wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_signTransaction, \"f\"),\n },\n [signMessage/* SolanaSignMessage */.g]: {\n version: '1.0.0',\n signMessage: wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_signMessage, \"f\"),\n },\n };\n }\n get accounts() {\n return wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\") ? wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardAccounts : [];\n }\n}\n_SolflareMetaMaskWallet_listeners = new WeakMap(), _SolflareMetaMaskWallet_version = new WeakMap(), _SolflareMetaMaskWallet_name = new WeakMap(), _SolflareMetaMaskWallet_icon = new WeakMap(), _SolflareMetaMaskWallet_solflareMetaMask = new WeakMap(), _SolflareMetaMaskWallet_on = new WeakMap(), _SolflareMetaMaskWallet_connect = new WeakMap(), _SolflareMetaMaskWallet_disconnect = new WeakMap(), _SolflareMetaMaskWallet_signAndSendTransaction = new WeakMap(), _SolflareMetaMaskWallet_signTransaction = new WeakMap(), _SolflareMetaMaskWallet_signMessage = new WeakMap(), _SolflareMetaMaskWallet_instances = new WeakSet(), _SolflareMetaMaskWallet_emit = function _SolflareMetaMaskWallet_emit(event, ...args) {\n // eslint-disable-next-line prefer-spread\n wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.forEach((listener) => listener.apply(null, args));\n}, _SolflareMetaMaskWallet_off = function _SolflareMetaMaskWallet_off(event, listener) {\n wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event] = wallet_classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.filter((existingListener) => listener !== existingListener);\n};\n//# sourceMappingURL=wallet.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/detect.js\n\n\nlet detect_registered = false;\nfunction detect_register() {\n if (detect_registered)\n return;\n registerWallet(new SolflareMetaMaskWallet());\n detect_registered = true;\n}\n/** @internal */\nasync function detectAndRegisterSolflareMetaMaskWallet() {\n const id = 'solflare-detect-metamask';\n function postMessage() {\n window.postMessage({\n target: 'metamask-contentscript',\n data: {\n name: 'metamask-provider',\n data: {\n id,\n jsonrpc: '2.0',\n method: 'wallet_getSnaps',\n },\n },\n }, window.location.origin);\n }\n function onMessage(event) {\n const message = event.data;\n if (message?.target === 'metamask-inpage' && message.data?.name === 'metamask-provider') {\n if (message.data.data?.id === id) {\n window.removeEventListener('message', onMessage);\n if (!message.data.data.error) {\n detect_register();\n }\n }\n else {\n postMessage();\n }\n }\n }\n window.addEventListener('message', onMessage);\n window.setTimeout(() => window.removeEventListener('message', onMessage), 5000);\n postMessage();\n}\n//# sourceMappingURL=detect.js.map\n;// CONCATENATED MODULE: ./node_modules/@solana/wallet-adapter-solflare/lib/esm/adapter.js\n\n\n\nconst SolflareWalletName = 'Solflare';\nclass SolflareWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = SolflareWalletName;\n this.url = 'https://solflare.com';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjUwIiB2aWV3Qm94PSIwIDAgNTAgNTAiIHdpZHRoPSI1MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnL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MjEuMzI1My0uMjY5NC43OTYzLS4yNzk3IDEuMTMzNC0uMDI0OWwyLjY5MTggMi4wMzQ3YzIuMTQyMSAxLjYxMDkgNS4yMjk3LjI0MTcgNS40NTYxLTIuNDI0M2wuNzI0MS04LjU1OTk4Yy4wNDU3LS41NDA4LjUyNjUtLjk0MjU3IDEuMDczOS0uODk3Mzd6bS0yMy4xODczMyAyMC40Mzk2NWMuNTI1MDQgMCAuOTUwNjcuNDIxLjk1MDY3Ljk0MDNzLS40MjU2My45NDAzLS45NTA2Ny45NDAzYy0uNTI1MDQxIDAtLjk1MDY3LS40MjEtLjk1MDY3LS45NDAzcy40MjU2MjktLjk0MDMuOTUwNjctLjk0MDN6bTQ3LjY3OTczLS45NTQ3Yy41MjUgMCAuOTUwNy40MjEuOTUwNy45NDAzcy0uNDI1Ny45NDAyLS45NTA3Ljk0MDItLjk1MDctLjQyMDktLjk1MDctLjk0MDIuNDI1Ny0uOTQwMy45NTA3LS45NDAzem0tMjQuNjI5Ni0yMi40Nzk3Yy41MjUgMCAuOTUwNi40MjA5NzMuOTUwNi45NDAyNyAwIC41MTkzLS40MjU2Ljk0MDI3LS45NTA2Ljk0MDI3LS41MjUxIDAtLjk1MDctLjQyMDk3LS45NTA3LS45NDAyNyAwLS41MTkyOTcuNDI1Ni0uOTQwMjcuOTUwNy0uOTQwMjd6IiBmaWxsPSJ1cmwoI2IpIi8+PHBhdGggZD0ibTI0LjU3MSAzMi43NzkyYzQuOTU5NiAwIDguOTgwMi0zLjk3NjUgOC45ODAyLTguODgxOSAwLTQuOTA1My00LjAyMDYtOC44ODE5LTguOTgwMi04Ljg4MTlzLTguOTgwMiAzLjk3NjYtOC45ODAyIDguODgxOWMwIDQuOTA1NCA0LjAyMDYgOC44ODE5IDguOTgwMiA4Ljg4MTl6IiBmaWxsPSJ1cmwoI2MpIi8+PC9zdmc+';\n this.supportedTransactionVersions = new Set(['legacy', 0]);\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.Loadable;\n this._disconnected = () => {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n this._wallet = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._accountChanged = (newPublicKey) => {\n if (!newPublicKey)\n return;\n const publicKey = this._publicKey;\n if (!publicKey)\n return;\n try {\n newPublicKey = new index_browser_esm.PublicKey(newPublicKey.toBytes());\n }\n catch (error) {\n this.emit('error', new WalletPublicKeyError(error?.message, error));\n return;\n }\n if (publicKey.equals(newPublicKey))\n return;\n this._publicKey = newPublicKey;\n this.emit('connect', newPublicKey);\n };\n this._connecting = false;\n this._publicKey = null;\n this._wallet = null;\n this._config = config;\n if (this._readyState !== WalletReadyState.Unsupported) {\n scopePollingDetectionStrategy(() => {\n if (window.solflare?.isSolflare || window.SolflareApp) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n detectAndRegisterSolflareMetaMaskWallet();\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get connected() {\n return !!this._wallet?.connected;\n }\n get readyState() {\n return this._readyState;\n }\n async autoConnect() {\n // Skip autoconnect in the Loadable state on iOS\n // We can't redirect to a universal link without user input\n if (!(this.readyState === WalletReadyState.Loadable && isIosAndRedirectable())) {\n await this.connect();\n }\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this._readyState !== WalletReadyState.Loadable && this._readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n // redirect to the Solflare /browse universal link\n // this will open the current URL in the Solflare in-wallet browser\n if (this.readyState === WalletReadyState.Loadable && isIosAndRedirectable()) {\n const url = encodeURIComponent(window.location.href);\n const ref = encodeURIComponent(window.location.origin);\n window.location.href = `https://solflare.com/ul/v1/browse/${url}?ref=${ref}`;\n return;\n }\n let SolflareClass;\n try {\n SolflareClass = (await __webpack_require__.e(/* import() */ 119).then(__webpack_require__.bind(__webpack_require__, 119))).default;\n }\n catch (error) {\n throw new WalletLoadError(error?.message, error);\n }\n let wallet;\n try {\n wallet = new SolflareClass({ network: this._config.network });\n }\n catch (error) {\n throw new WalletConfigError(error?.message, error);\n }\n this._connecting = true;\n if (!wallet.connected) {\n try {\n await wallet.connect();\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n if (!wallet.publicKey)\n throw new WalletConnectionError();\n let publicKey;\n try {\n publicKey = new index_browser_esm.PublicKey(wallet.publicKey.toBytes());\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n wallet.on('disconnect', this._disconnected);\n wallet.on('accountChanged', this._accountChanged);\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n try {\n await wallet.disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n }\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n return await wallet.signAndSendTransaction(transaction, sendOptions);\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return await wallet.signMessage(message, 'utf8');\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map\n;// CONCATENATED MODULE: ./src/providers/wallet/index.tsx\n\n\n// Default styles that can be overridden by your app\n\n\n\n\n\n\nconst wallet_Provider = (param)=>{\n let { children } = param;\n const network = WalletAdapterNetwork.Devnet;\n // You can also provide a custom RPC endpoint.\n const endpoint = (0,react.useMemo)(()=>(0,index_browser_esm.clusterApiUrl)(network), [\n network\n ]);\n const wallets = (0,react.useMemo)(()=>[\n new PhantomWalletAdapter(),\n new SolflareWalletAdapter()\n ], [\n network\n ]);\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(ConnectionProvider, {\n endpoint: endpoint,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(WalletProvider, {\n wallets: wallets,\n autoConnect: true,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(WalletModalProvider, {\n children: children\n })\n })\n });\n};\n/* harmony default export */ var wallet = (wallet_Provider);\n\n// EXTERNAL MODULE: ./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js + 7 modules\nvar emotion_cache_browser_esm = __webpack_require__(8417);\n;// CONCATENATED MODULE: ./src/utils/create-emotion-cache.ts\n\nconst create_emotion_cache_isBrowser = typeof document !== \"undefined\";\n// On the client side, Create a meta tag at the top of the and set it as insertionPoint.\n// This assures that MUI styles are loaded first.\n// It allows developers to easily override MUI styles with other styling solutions, like CSS modules.\nconst createEmotionCache = ()=>{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let insertionPoint;\n if (create_emotion_cache_isBrowser) {\n const emotionInsertionPoint = document.querySelector('meta[name=\"emotion-insertion-point\"]');\n insertionPoint = emotionInsertionPoint !== null && emotionInsertionPoint !== void 0 ? emotionInsertionPoint : undefined;\n }\n return (0,emotion_cache_browser_esm/* default */.Z)({\n key: \"mui-style\",\n prepend: true,\n insertionPoint\n });\n};\n\n\n;// CONCATENATED MODULE: ./src/pages/_app.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Client-side cache, shared for the whole session of the user in the browser.\nconst clientSideEmotionCache = createEmotionCache();\nfunction MyApp(props) {\n const { Component , emotionCache =clientSideEmotionCache , pageProps } = props;\n const queryClient = (0,react.useMemo)(()=>new es.QueryClient(), []);\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(AnimatePresence, {\n mode: \"wait\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(emotion_element_43c6fea0_browser_esm.C, {\n value: emotionCache,\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)((head_default()), {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(\"title\", {\n children: \"Airdrop\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(\"meta\", {\n name: \"viewport\",\n content: \"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1\"\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(es.QueryClientProvider, {\n client: queryClient,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(es.Hydrate, {\n state: pageProps.dehydratedState,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(theme, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(wallet, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(solana/* SolanaProvider */.Q, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Component, {\n ...pageProps\n })\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(devtools.ReactQueryDevtools, {\n initialIsOpen: false\n })\n ]\n })\n })\n })\n })\n ]\n })\n });\n}\nMyApp.propTypes = {\n Component: (prop_types_default()).elementType.isRequired,\n emotionCache: (prop_types_default()).object,\n pageProps: (prop_types_default()).object.isRequired\n};\n\n\n/***/ }),\n\n/***/ 3671:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"Q\": function() { return /* binding */ SolanaProvider; },\n \"X\": function() { return /* binding */ useSolana; }\n});\n\n// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js\nvar jsx_runtime = __webpack_require__(5893);\n// EXTERNAL MODULE: ./node_modules/react/index.js\nvar react = __webpack_require__(7294);\n;// CONCATENATED MODULE: ./src/types/merkle_distributor.ts\nconst IDL = {\n version: \"0.0.1\",\n name: \"merkle_distributor\",\n instructions: [\n {\n name: \"newDistributor\",\n docs: [\n \"READ THE FOLLOWING:\",\n \"\",\n \"This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.\",\n \"\",\n \"An attack could look like:\",\n \"- A legitimate user opens a new distributor.\",\n \"- Someone observes the call to this instruction.\",\n \"- They replace the clawback_receiver, admin, or time parameters with their own.\",\n \"\",\n \"One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own.\",\n \"Then the attacker can steal all funds from the distributor to their own clawback_receiver account.\",\n \"\",\n \"HOW TO AVOID:\",\n \"- When you call into this instruction, ensure your transaction succeeds.\",\n \"- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and\",\n \"assert the parameters are what you expect, most importantly the clawback_receiver and admin.\",\n \"- If your transaction fails, double check the value on-chain matches what you expect.\"\n ],\n accounts: [\n {\n name: \"distributor\",\n isMut: true,\n isSigner: false,\n docs: [\n \"[MerkleDistributor].\"\n ],\n pda: {\n seeds: [\n {\n kind: \"const\",\n type: \"string\",\n value: \"MerkleDistributor\"\n },\n {\n kind: \"account\",\n type: \"publicKey\",\n account: \"Mint\",\n path: \"mint\"\n },\n {\n kind: \"arg\",\n type: \"u64\",\n path: \"version\"\n }\n ]\n }\n },\n {\n name: \"clawbackReceiver\",\n isMut: false,\n isSigner: false,\n docs: [\n \"Clawback receiver token account\"\n ]\n },\n {\n name: \"mint\",\n isMut: false,\n isSigner: false,\n docs: [\n \"The mint to distribute.\"\n ]\n },\n {\n name: \"tokenVault\",\n isMut: true,\n isSigner: false,\n docs: [\n \"Token vault\"\n ]\n },\n {\n name: \"admin\",\n isMut: true,\n isSigner: true,\n docs: [\n \"Admin wallet, responsible for creating the distributor and paying for the transaction.\",\n \"Also has the authority to set the clawback receiver and change itself.\"\n ]\n },\n {\n name: \"systemProgram\",\n isMut: false,\n isSigner: false,\n docs: [\n \"The [System] program.\"\n ]\n },\n {\n name: \"associatedTokenProgram\",\n isMut: false,\n isSigner: false,\n docs: [\n \"The [Associated Token] program.\"\n ]\n },\n {\n name: \"tokenProgram\",\n isMut: false,\n isSigner: false,\n docs: [\n \"The [Token] program.\"\n ]\n }\n ],\n args: [\n {\n name: \"version\",\n type: \"u64\"\n },\n {\n name: \"root\",\n type: {\n array: [\n \"u8\",\n 32\n ]\n }\n },\n {\n name: \"maxTotalClaim\",\n type: \"u64\"\n },\n {\n name: \"maxNumNodes\",\n type: \"u64\"\n },\n {\n name: \"startTs\",\n type: \"i64\"\n },\n {\n name: \"endTs\",\n type: \"i64\"\n }\n ]\n },\n {\n name: \"newClaim\",\n accounts: [\n {\n name: \"distributor\",\n isMut: true,\n isSigner: false,\n docs: [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n name: \"claimStatus\",\n isMut: true,\n isSigner: false,\n docs: [\n \"Claim status PDA\"\n ],\n pda: {\n seeds: [\n {\n kind: \"const\",\n type: \"string\",\n value: \"ClaimStatus\"\n },\n {\n kind: \"account\",\n type: \"publicKey\",\n path: \"claimant\"\n },\n {\n kind: \"account\",\n type: \"publicKey\",\n account: \"MerkleDistributor\",\n path: \"distributor\"\n }\n ]\n }\n },\n {\n name: \"from\",\n isMut: true,\n isSigner: false,\n docs: [\n \"Distributor ATA containing the tokens to distribute.\"\n ]\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: false,\n docs: [\n \"Account to send the claimed tokens to.\"\n ]\n },\n {\n name: \"claimant\",\n isMut: true,\n isSigner: true,\n docs: [\n \"Who is claiming the tokens.\"\n ]\n },\n {\n name: \"tokenProgram\",\n isMut: false,\n isSigner: false,\n docs: [\n \"SPL [Token] program.\"\n ]\n },\n {\n name: \"systemProgram\",\n isMut: false,\n isSigner: false,\n docs: [\n \"The [System] program.\"\n ]\n }\n ],\n args: [\n {\n name: \"index\",\n type: \"u64\"\n },\n {\n name: \"amount\",\n type: \"u64\"\n },\n {\n name: \"proof\",\n type: {\n vec: {\n array: [\n \"u8\",\n 32\n ]\n }\n }\n }\n ]\n },\n {\n name: \"clawback\",\n accounts: [\n {\n name: \"distributor\",\n isMut: true,\n isSigner: false,\n docs: [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n name: \"from\",\n isMut: true,\n isSigner: false,\n docs: [\n \"Distributor ATA containing the tokens to distribute.\"\n ]\n },\n {\n name: \"to\",\n isMut: true,\n isSigner: false,\n docs: [\n \"The Clawback token account.\"\n ]\n },\n {\n name: \"claimant\",\n isMut: false,\n isSigner: true,\n docs: [\n \"Claimant account\",\n \"Anyone can claw back the funds\"\n ]\n },\n {\n name: \"systemProgram\",\n isMut: false,\n isSigner: false,\n docs: [\n \"The [System] program.\"\n ]\n },\n {\n name: \"tokenProgram\",\n isMut: false,\n isSigner: false,\n docs: [\n \"SPL [Token] program.\"\n ]\n }\n ],\n args: [\n {\n name: \"amount\",\n type: \"u64\"\n }\n ]\n },\n {\n name: \"setClawbackReceiver\",\n accounts: [\n {\n name: \"distributor\",\n isMut: true,\n isSigner: false,\n docs: [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n name: \"newClawbackAccount\",\n isMut: false,\n isSigner: false,\n docs: [\n \"New clawback account\"\n ]\n },\n {\n name: \"admin\",\n isMut: true,\n isSigner: true,\n docs: [\n \"Admin signer\"\n ]\n }\n ],\n args: []\n },\n {\n name: \"setAdmin\",\n accounts: [\n {\n name: \"distributor\",\n isMut: true,\n isSigner: false,\n docs: [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n name: \"admin\",\n isMut: true,\n isSigner: true,\n docs: [\n \"Admin signer\"\n ]\n },\n {\n name: \"newAdmin\",\n isMut: true,\n isSigner: false,\n docs: [\n \"New admin account\"\n ]\n }\n ],\n args: []\n },\n {\n name: \"setTimestamp\",\n accounts: [\n {\n name: \"distributor\",\n isMut: true,\n isSigner: false,\n docs: [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n name: \"admin\",\n isMut: true,\n isSigner: true,\n docs: [\n \"Admin signer\"\n ]\n }\n ],\n args: [\n {\n name: \"startTs\",\n type: \"i64\"\n },\n {\n name: \"endTs\",\n type: \"i64\"\n }\n ]\n },\n {\n name: \"setMerkleRoot\",\n accounts: [\n {\n name: \"distributor\",\n isMut: true,\n isSigner: false,\n docs: [\n \"The [MerkleDistributor].\"\n ]\n },\n {\n name: \"admin\",\n isMut: true,\n isSigner: true,\n docs: [\n \"Admin signer\"\n ]\n }\n ],\n args: [\n {\n name: \"root\",\n type: {\n array: [\n \"u8\",\n 32\n ]\n }\n }\n ]\n }\n ],\n accounts: [\n {\n name: \"claimStatus\",\n docs: [\n \"Holds whether or not a claimant has claimed tokens.\"\n ],\n type: {\n kind: \"struct\",\n fields: [\n {\n name: \"isClaimed\",\n docs: [\n \"If true, the tokens have been claimed.\"\n ],\n type: \"bool\"\n },\n {\n name: \"claimant\",\n docs: [\n \"Authority that claimed the tokens.\"\n ],\n type: \"publicKey\"\n },\n {\n name: \"claimedAt\",\n docs: [\n \"When the tokens were claimed.\"\n ],\n type: \"i64\"\n },\n {\n name: \"amount\",\n docs: [\n \"Amount of tokens claimed.\"\n ],\n type: \"u64\"\n }\n ]\n }\n },\n {\n name: \"merkleDistributor\",\n docs: [\n \"State for the account which distributes tokens.\"\n ],\n type: {\n kind: \"struct\",\n fields: [\n {\n name: \"bump\",\n docs: [\n \"Bump seed.\"\n ],\n type: \"u8\"\n },\n {\n name: \"version\",\n docs: [\n \"Version of the airdrop\"\n ],\n type: \"u64\"\n },\n {\n name: \"root\",\n docs: [\n \"The 256-bit merkle root.\"\n ],\n type: {\n array: [\n \"u8\",\n 32\n ]\n }\n },\n {\n name: \"mint\",\n docs: [\n \"[Mint] of the token to be distributed.\"\n ],\n type: \"publicKey\"\n },\n {\n name: \"tokenVault\",\n docs: [\n \"Token Address of the vault\"\n ],\n type: \"publicKey\"\n },\n {\n name: \"maxTotalClaim\",\n docs: [\n \"Maximum number of tokens that can ever be claimed from this [MerkleDistributor].\"\n ],\n type: \"u64\"\n },\n {\n name: \"maxNumNodes\",\n docs: [\n \"Maximum number of nodes in [MerkleDistributor].\"\n ],\n type: \"u64\"\n },\n {\n name: \"totalAmountClaimed\",\n docs: [\n \"Total amount of tokens that have been claimed.\"\n ],\n type: \"u64\"\n },\n {\n name: \"numNodesClaimed\",\n docs: [\n \"Number of nodes that have been claimed.\"\n ],\n type: \"u64\"\n },\n {\n name: \"startTs\",\n docs: [\n \"Claim time start (Unix Timestamp)\"\n ],\n type: \"i64\"\n },\n {\n name: \"endTs\",\n docs: [\n \"Claim time end (Unix Timestamp)\"\n ],\n type: \"i64\"\n },\n {\n name: \"clawbackReceiver\",\n docs: [\n \"Clawback receiver\"\n ],\n type: \"publicKey\"\n },\n {\n name: \"admin\",\n docs: [\n \"Admin wallet\"\n ],\n type: \"publicKey\"\n }\n ]\n }\n }\n ],\n events: [\n {\n name: \"NewClaimEvent\",\n fields: [\n {\n name: \"claimant\",\n type: \"publicKey\",\n index: false\n },\n {\n name: \"timestamp\",\n type: \"i64\",\n index: false\n }\n ]\n },\n {\n name: \"ClaimedEvent\",\n fields: [\n {\n name: \"claimant\",\n type: \"publicKey\",\n index: false\n },\n {\n name: \"amount\",\n type: \"u64\",\n index: false\n }\n ]\n }\n ],\n errors: [\n {\n code: 6000,\n name: \"InvalidProof\",\n msg: \"Invalid Merkle proof\"\n },\n {\n code: 6001,\n name: \"ExceededMaxClaim\",\n msg: \"Exceeded maximum claim amount\"\n },\n {\n code: 6002,\n name: \"MaxNodesExceeded\",\n msg: \"Exceeded maximum node count\"\n },\n {\n code: 6003,\n name: \"Unauthorized\",\n msg: \"Account is not authorized to execute this instruction\"\n },\n {\n code: 6004,\n name: \"OwnerMismatch\",\n msg: \"Token account owner did not match intended owner\"\n },\n {\n code: 6005,\n name: \"SameClawbackReceiver\",\n msg: \"New and old Clawback receivers are identical\"\n },\n {\n code: 6006,\n name: \"SameAdmin\",\n msg: \"New and old admin are identical\"\n },\n {\n code: 6007,\n name: \"ClaimExpired\",\n msg: \"Claim window expired\"\n },\n {\n code: 6008,\n name: \"ArithmeticError\",\n msg: \"Arithmetic Error (overflow/underflow)\"\n },\n {\n code: 6009,\n name: \"StartTimestampAfterEnd\",\n msg: \"Start Timestamp cannot be after end Timestamp\"\n },\n {\n code: 6010,\n name: \"TimestampsNotInFuture\",\n msg: \"Timestamps cannot be in the past\"\n },\n {\n code: 6011,\n name: \"DistributionAlreadyStarted\",\n msg: \"Distribution already started\"\n },\n {\n code: 6012,\n name: \"InsufficientClawbackAmount\",\n msg: \"Insufficient clawback amount\"\n }\n ]\n};\n\n// EXTERNAL MODULE: ./node_modules/@coral-xyz/anchor/dist/browser/index.js\nvar browser = __webpack_require__(9828);\n// EXTERNAL MODULE: ./node_modules/@coral-xyz/anchor/dist/cjs/nodewallet.js\nvar nodewallet = __webpack_require__(3909);\n// EXTERNAL MODULE: ./node_modules/@project-serum/anchor/dist/browser/index.js\nvar dist_browser = __webpack_require__(4758);\n// EXTERNAL MODULE: ./node_modules/@renec-foundation/distributor-sdk/dist/index.js\nvar dist = __webpack_require__(1142);\n// EXTERNAL MODULE: ./node_modules/@solana/wallet-adapter-react/lib/esm/useWallet.js\nvar useWallet = __webpack_require__(4306);\n// EXTERNAL MODULE: ./node_modules/@solana/web3.js/lib/index.browser.esm.js + 15 modules\nvar index_browser_esm = __webpack_require__(6737);\n;// CONCATENATED MODULE: ./src/providers/solana/index.tsx\n\n\n\n\n\n\n\n\n\nconst defaultSolanaContext = {\n connection: null,\n provider: null,\n program: null,\n ctx: null,\n distributorClient: null,\n mintPublicKey: new index_browser_esm.PublicKey(\"11111111111111111111111111111111\"),\n merkleTreeVersion: 1,\n distributor: null,\n publicKey: null,\n connected: false,\n connect: async ()=>{},\n disconnect: async ()=>{}\n};\nconst SolanaContext = /*#__PURE__*/ react.createContext(defaultSolanaContext);\nconst SolanaProvider = (param)=>{\n let { children } = param;\n const { connect , disconnect , connected , publicKey: userPublicKey , signTransaction , signAllTransactions } = (0,useWallet/* useWallet */.O)();\n const defaultKeypair = index_browser_esm.Keypair.generate();\n const defaultWallet = new nodewallet/* default */.Z(defaultKeypair);\n const [publicKey, setPublicKey] = (0,react.useState)(defaultKeypair.publicKey);\n const connectionUrl = \"https://young-solemn-lake.solana-mainnet.quiknode.pro/f42e97b38309d8c0fa5f463a5945dd044dbdee6c\";\n if (!connectionUrl) {\n throw new Error(\"NEXT_PUBLIC_SOLANA_CONNECTION_URL is not defined\");\n }\n const connection = new index_browser_esm.Connection(connectionUrl, \"confirmed\");\n const [provider, setProvider] = (0,react.useState)(new dist_browser.AnchorProvider(connection, defaultWallet, {}));\n const programAddress = \"EqaUmBqKuUsS8C1HwvckQymErozrmzzivxkP9CazU2mX\";\n if (!programAddress) {\n throw new Error(\"NEXT_PUBLIC_PROGRAM_ADDRESS is not defined\");\n }\n const programId = new index_browser_esm.PublicKey(programAddress);\n const program = new dist_browser.Program(IDL, programId, provider);\n const ctx = dist.Context.withProvider(provider, new index_browser_esm.PublicKey(program.programId));\n const distributorClient = new dist.DistributorClient(ctx, new dist.PDA(program.programId));\n const mintAddress = \"DU16Ea8MidPg8GcDYhCBx88THwYXSDiAXDnGA7xfe1HA\"; // TODO move to useEffect if get mintAddress from database\n if (!mintAddress) {\n throw new Error(\"NEXT_PUBLIC_MINT_ADDRESS is not defined\");\n }\n const mintPublicKey = new index_browser_esm.PublicKey(mintAddress);\n var _process_env_NEXT_PUBLIC_MERKLE_TREE_VERSION;\n const merkleTreeVersion = parseInt((_process_env_NEXT_PUBLIC_MERKLE_TREE_VERSION = \"1\") !== null && _process_env_NEXT_PUBLIC_MERKLE_TREE_VERSION !== void 0 ? _process_env_NEXT_PUBLIC_MERKLE_TREE_VERSION : \"1\", 10);\n const distributor = distributorClient.pda.distributor(mintPublicKey, new browser.BN(merkleTreeVersion));\n (0,react.useEffect)(()=>{\n if (connected && userPublicKey) {\n setPublicKey(userPublicKey);\n setProvider(new dist_browser.AnchorProvider(connection, {\n publicKey: userPublicKey,\n signTransaction: signTransaction,\n signAllTransactions: signAllTransactions\n }, {}));\n } else {\n setPublicKey(defaultKeypair.publicKey);\n setProvider(new dist_browser.AnchorProvider(connection, defaultWallet, {}));\n }\n }, [\n connected,\n userPublicKey\n ]);\n const handleConnect = async ()=>{\n await connect();\n };\n const handleDisconnect = async ()=>{\n await disconnect();\n };\n const value = {\n connection,\n provider,\n program,\n ctx,\n distributorClient,\n mintPublicKey,\n merkleTreeVersion,\n distributor,\n publicKey,\n connected,\n connect: handleConnect,\n disconnect: handleDisconnect\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(SolanaContext.Provider, {\n value: value,\n children: children\n });\n};\nconst useSolana = ()=>(0,react.useContext)(SolanaContext);\n\n\n/***/ }),\n\n/***/ 393:\n/***/ (function() {\n\n// extracted by mini-css-extract-plugin\n\n/***/ }),\n\n/***/ 511:\n/***/ (function() {\n\n// extracted by mini-css-extract-plugin\n\n/***/ }),\n\n/***/ 6106:\n/***/ (function() {\n\n// extracted by mini-css-extract-plugin\n\n/***/ }),\n\n/***/ 6672:\n/***/ (function() {\n\n// extracted by mini-css-extract-plugin\n\n/***/ }),\n\n/***/ 9008:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(3121)\n\n\n/***/ }),\n\n/***/ 4244:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n\n\n/***/ }),\n\n/***/ 609:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar define = __webpack_require__(4289);\nvar callBind = __webpack_require__(5559);\n\nvar implementation = __webpack_require__(4244);\nvar getPolyfill = __webpack_require__(5624);\nvar shim = __webpack_require__(2281);\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n\n\n/***/ }),\n\n/***/ 5624:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar implementation = __webpack_require__(4244);\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n\n\n/***/ }),\n\n/***/ 2281:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar getPolyfill = __webpack_require__(5624);\nvar define = __webpack_require__(4289);\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n\n\n/***/ }),\n\n/***/ 8987:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = __webpack_require__(1414); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n\n\n/***/ }),\n\n/***/ 2215:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar slice = Array.prototype.slice;\nvar isArgs = __webpack_require__(1414);\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(8987);\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n\n\n/***/ }),\n\n/***/ 1414:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n\n\n/***/ }),\n\n/***/ 9908:\n/***/ (function(module) {\n\n\"use strict\";\n\n\n/** @type {import('.')} */\nmodule.exports = [\n\t'Float32Array',\n\t'Float64Array',\n\t'Int8Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'BigInt64Array',\n\t'BigUint64Array'\n];\n\n\n/***/ }),\n\n/***/ 4155:\n/***/ (function(module) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ }),\n\n/***/ 5273:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar errcode = __webpack_require__(2114);\nvar retry = __webpack_require__(1298);\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction isRetryError(err) {\n return err && err.code === 'EPROMISERETRY' && hasOwn.call(err, 'retried');\n}\n\nfunction promiseRetry(fn, options) {\n var temp;\n var operation;\n\n if (typeof fn === 'object' && typeof options === 'function') {\n // Swap options and fn when using alternate signature (options, fn)\n temp = options;\n options = fn;\n fn = temp;\n }\n\n operation = retry.operation(options);\n\n return new Promise(function (resolve, reject) {\n operation.attempt(function (number) {\n Promise.resolve()\n .then(function () {\n return fn(function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n }\n\n throw errcode(new Error('Retrying'), 'EPROMISERETRY', { retried: err });\n }, number);\n })\n .then(resolve, function (err) {\n if (isRetryError(err)) {\n err = err.retried;\n\n if (operation.retry(err || new Error())) {\n return;\n }\n }\n\n reject(err);\n });\n });\n });\n}\n\nmodule.exports = promiseRetry;\n\n\n/***/ }),\n\n/***/ 1298:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(5297);\n\n/***/ }),\n\n/***/ 5297:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\nvar RetryOperation = __webpack_require__(7361);\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && options.forever,\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n\n\n/***/ }),\n\n/***/ 7361:\n/***/ (function(module) {\n\nfunction RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts;\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(this._errors.length - 1, this._errors.length);\n this._timeouts = this._cachedTimeouts.slice(0);\n timeout = this._timeouts.shift();\n } else {\n return false;\n }\n }\n\n var self = this;\n var timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n\n\n/***/ }),\n\n/***/ 2703:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = __webpack_require__(414);\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n/***/ }),\n\n/***/ 5697:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (false) { var throwOnDirectAccess, ReactIs; } else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(2703)();\n}\n\n\n/***/ }),\n\n/***/ 414:\n/***/ (function(module) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n/***/ }),\n\n/***/ 938:\n/***/ (function(module) {\n\nif (true) {\n module.exports = {\n ReactQueryDevtools: function () {\n return null\n },\n ReactQueryDevtoolsPanel: function () {\n return null\n },\n }\n} else {}\n\n\n/***/ }),\n\n/***/ 9852:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"j\": function() { return /* binding */ focusManager; }\n/* harmony export */ });\n/* unused harmony export FocusManager */\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5068);\n/* harmony import */ var _subscribable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2943);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2288);\n\n\n\nvar FocusManager = /*#__PURE__*/function (_Subscribable) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)(FocusManager, _Subscribable);\n\n function FocusManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onFocus) {\n var _window;\n\n if (!_utils__WEBPACK_IMPORTED_MODULE_1__/* .isServer */ .sk && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onFocus();\n }; // Listen to visibillitychange and focus\n\n\n window.addEventListener('visibilitychange', listener, false);\n window.addEventListener('focus', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('visibilitychange', listener);\n window.removeEventListener('focus', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = FocusManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (focused) {\n if (typeof focused === 'boolean') {\n _this2.setFocused(focused);\n } else {\n _this2.onFocus();\n }\n });\n };\n\n _proto.setFocused = function setFocused(focused) {\n this.focused = focused;\n\n if (focused) {\n this.onFocus();\n }\n };\n\n _proto.onFocus = function onFocus() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isFocused = function isFocused() {\n if (typeof this.focused === 'boolean') {\n return this.focused;\n } // document global can be unavailable in react native\n\n\n if (typeof document === 'undefined') {\n return true;\n }\n\n return [undefined, 'visible', 'prerender'].includes(document.visibilityState);\n };\n\n return FocusManager;\n}(_subscribable__WEBPACK_IMPORTED_MODULE_2__/* .Subscribable */ .l);\nvar focusManager = new FocusManager();\n\n/***/ }),\n\n/***/ 6747:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"QueryClient\": function() { return /* reexport safe */ _queryClient__WEBPACK_IMPORTED_MODULE_0__.S; }\n/* harmony export */ });\n/* harmony import */ var _queryClient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9043);\n/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6755);\n/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony reexport (checked) */ if(__webpack_require__.o(_types__WEBPACK_IMPORTED_MODULE_1__, \"Hydrate\")) __webpack_require__.d(__webpack_exports__, { \"Hydrate\": function() { return _types__WEBPACK_IMPORTED_MODULE_1__.Hydrate; } });\n/* harmony reexport (checked) */ if(__webpack_require__.o(_types__WEBPACK_IMPORTED_MODULE_1__, \"QueryClientProvider\")) __webpack_require__.d(__webpack_exports__, { \"QueryClientProvider\": function() { return _types__WEBPACK_IMPORTED_MODULE_1__.QueryClientProvider; } });\n/* harmony reexport (checked) */ if(__webpack_require__.o(_types__WEBPACK_IMPORTED_MODULE_1__, \"useMutation\")) __webpack_require__.d(__webpack_exports__, { \"useMutation\": function() { return _types__WEBPACK_IMPORTED_MODULE_1__.useMutation; } });\n/* harmony reexport (checked) */ if(__webpack_require__.o(_types__WEBPACK_IMPORTED_MODULE_1__, \"useQuery\")) __webpack_require__.d(__webpack_exports__, { \"useQuery\": function() { return _types__WEBPACK_IMPORTED_MODULE_1__.useQuery; } });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Types\n\n\n\n/***/ }),\n\n/***/ 1909:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"E\": function() { return /* binding */ setLogger; },\n/* harmony export */ \"j\": function() { return /* binding */ getLogger; }\n/* harmony export */ });\n// TYPES\n// FUNCTIONS\nvar logger = console;\nfunction getLogger() {\n return logger;\n}\nfunction setLogger(newLogger) {\n logger = newLogger;\n}\n\n/***/ }),\n\n/***/ 1262:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"R\": function() { return /* binding */ getDefaultState; },\n/* harmony export */ \"m\": function() { return /* binding */ Mutation; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7462);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1909);\n/* harmony import */ var _notifyManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(101);\n/* harmony import */ var _retryer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1216);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2288);\n\n\n\n\n // TYPES\n\n// CLASS\nvar Mutation = /*#__PURE__*/function () {\n function Mutation(config) {\n this.options = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, config.defaultOptions, config.options);\n this.mutationId = config.mutationId;\n this.mutationCache = config.mutationCache;\n this.observers = [];\n this.state = config.state || getDefaultState();\n this.meta = config.meta;\n }\n\n var _proto = Mutation.prototype;\n\n _proto.setState = function setState(state) {\n this.dispatch({\n type: 'setState',\n state: state\n });\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n };\n\n _proto.cancel = function cancel() {\n if (this.retryer) {\n this.retryer.cancel();\n return this.retryer.promise.then(_utils__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .ZT).catch(_utils__WEBPACK_IMPORTED_MODULE_1__/* .noop */ .ZT);\n }\n\n return Promise.resolve();\n };\n\n _proto.continue = function _continue() {\n if (this.retryer) {\n this.retryer.continue();\n return this.retryer.promise;\n }\n\n return this.execute();\n };\n\n _proto.execute = function execute() {\n var _this = this;\n\n var data;\n var restored = this.state.status === 'loading';\n var promise = Promise.resolve();\n\n if (!restored) {\n this.dispatch({\n type: 'loading',\n variables: this.options.variables\n });\n promise = promise.then(function () {\n // Notify cache callback\n _this.mutationCache.config.onMutate == null ? void 0 : _this.mutationCache.config.onMutate(_this.state.variables, _this);\n }).then(function () {\n return _this.options.onMutate == null ? void 0 : _this.options.onMutate(_this.state.variables);\n }).then(function (context) {\n if (context !== _this.state.context) {\n _this.dispatch({\n type: 'loading',\n context: context,\n variables: _this.state.variables\n });\n }\n });\n }\n\n return promise.then(function () {\n return _this.executeMutation();\n }).then(function (result) {\n data = result; // Notify cache callback\n\n _this.mutationCache.config.onSuccess == null ? void 0 : _this.mutationCache.config.onSuccess(data, _this.state.variables, _this.state.context, _this);\n }).then(function () {\n return _this.options.onSuccess == null ? void 0 : _this.options.onSuccess(data, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(data, null, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'success',\n data: data\n });\n\n return data;\n }).catch(function (error) {\n // Notify cache callback\n _this.mutationCache.config.onError == null ? void 0 : _this.mutationCache.config.onError(error, _this.state.variables, _this.state.context, _this); // Log error\n\n (0,_logger__WEBPACK_IMPORTED_MODULE_2__/* .getLogger */ .j)().error(error);\n return Promise.resolve().then(function () {\n return _this.options.onError == null ? void 0 : _this.options.onError(error, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(undefined, error, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'error',\n error: error\n });\n\n throw error;\n });\n });\n };\n\n _proto.executeMutation = function executeMutation() {\n var _this2 = this,\n _this$options$retry;\n\n this.retryer = new _retryer__WEBPACK_IMPORTED_MODULE_3__/* .Retryer */ .m4({\n fn: function fn() {\n if (!_this2.options.mutationFn) {\n return Promise.reject('No mutationFn found');\n }\n\n return _this2.options.mutationFn(_this2.state.variables);\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: (_this$options$retry = this.options.retry) != null ? _this$options$retry : 0,\n retryDelay: this.options.retryDelay\n });\n return this.retryer.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = reducer(this.state, action);\n _notifyManager__WEBPACK_IMPORTED_MODULE_4__/* .notifyManager.batch */ .V.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onMutationUpdate(action);\n });\n\n _this3.mutationCache.notify(_this3);\n });\n };\n\n return Mutation;\n}();\nfunction getDefaultState() {\n return {\n context: undefined,\n data: undefined,\n error: null,\n failureCount: 0,\n isPaused: false,\n status: 'idle',\n variables: undefined\n };\n}\n\nfunction reducer(state, action) {\n switch (action.type) {\n case 'failed':\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, state, {\n failureCount: state.failureCount + 1\n });\n\n case 'pause':\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, state, {\n isPaused: false\n });\n\n case 'loading':\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, state, {\n context: action.context,\n data: undefined,\n error: null,\n isPaused: false,\n status: 'loading',\n variables: action.variables\n });\n\n case 'success':\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, state, {\n data: action.data,\n error: null,\n status: 'success',\n isPaused: false\n });\n\n case 'error':\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, state, {\n data: undefined,\n error: action.error,\n failureCount: state.failureCount + 1,\n isPaused: false,\n status: 'error'\n });\n\n case 'setState':\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, state, action.state);\n\n default:\n return state;\n }\n}\n\n/***/ }),\n\n/***/ 101:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"V\": function() { return /* binding */ notifyManager; }\n/* harmony export */ });\n/* unused harmony export NotifyManager */\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2288);\n // TYPES\n\n// CLASS\nvar NotifyManager = /*#__PURE__*/function () {\n function NotifyManager() {\n this.queue = [];\n this.transactions = 0;\n\n this.notifyFn = function (callback) {\n callback();\n };\n\n this.batchNotifyFn = function (callback) {\n callback();\n };\n }\n\n var _proto = NotifyManager.prototype;\n\n _proto.batch = function batch(callback) {\n var result;\n this.transactions++;\n\n try {\n result = callback();\n } finally {\n this.transactions--;\n\n if (!this.transactions) {\n this.flush();\n }\n }\n\n return result;\n };\n\n _proto.schedule = function schedule(callback) {\n var _this = this;\n\n if (this.transactions) {\n this.queue.push(callback);\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__/* .scheduleMicrotask */ .A4)(function () {\n _this.notifyFn(callback);\n });\n }\n }\n /**\n * All calls to the wrapped function will be batched.\n */\n ;\n\n _proto.batchCalls = function batchCalls(callback) {\n var _this2 = this;\n\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this2.schedule(function () {\n callback.apply(void 0, args);\n });\n };\n };\n\n _proto.flush = function flush() {\n var _this3 = this;\n\n var queue = this.queue;\n this.queue = [];\n\n if (queue.length) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__/* .scheduleMicrotask */ .A4)(function () {\n _this3.batchNotifyFn(function () {\n queue.forEach(function (callback) {\n _this3.notifyFn(callback);\n });\n });\n });\n }\n }\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n ;\n\n _proto.setNotifyFunction = function setNotifyFunction(fn) {\n this.notifyFn = fn;\n }\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n ;\n\n _proto.setBatchNotifyFunction = function setBatchNotifyFunction(fn) {\n this.batchNotifyFn = fn;\n };\n\n return NotifyManager;\n}(); // SINGLETON\n\nvar notifyManager = new NotifyManager();\n\n/***/ }),\n\n/***/ 68:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"N\": function() { return /* binding */ onlineManager; }\n/* harmony export */ });\n/* unused harmony export OnlineManager */\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5068);\n/* harmony import */ var _subscribable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2943);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2288);\n\n\n\nvar OnlineManager = /*#__PURE__*/function (_Subscribable) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)(OnlineManager, _Subscribable);\n\n function OnlineManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onOnline) {\n var _window;\n\n if (!_utils__WEBPACK_IMPORTED_MODULE_1__/* .isServer */ .sk && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onOnline();\n }; // Listen to online\n\n\n window.addEventListener('online', listener, false);\n window.addEventListener('offline', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', listener);\n window.removeEventListener('offline', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = OnlineManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (online) {\n if (typeof online === 'boolean') {\n _this2.setOnline(online);\n } else {\n _this2.onOnline();\n }\n });\n };\n\n _proto.setOnline = function setOnline(online) {\n this.online = online;\n\n if (online) {\n this.onOnline();\n }\n };\n\n _proto.onOnline = function onOnline() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isOnline = function isOnline() {\n if (typeof this.online === 'boolean') {\n return this.online;\n }\n\n if (typeof navigator === 'undefined' || typeof navigator.onLine === 'undefined') {\n return true;\n }\n\n return navigator.onLine;\n };\n\n return OnlineManager;\n}(_subscribable__WEBPACK_IMPORTED_MODULE_2__/* .Subscribable */ .l);\nvar onlineManager = new OnlineManager();\n\n/***/ }),\n\n/***/ 9043:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"S\": function() { return /* binding */ QueryClient; }\n});\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js\nvar esm_extends = __webpack_require__(7462);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/utils.js\nvar utils = __webpack_require__(2288);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules\nvar inheritsLoose = __webpack_require__(5068);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/notifyManager.js\nvar notifyManager = __webpack_require__(101);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/logger.js\nvar logger = __webpack_require__(1909);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/retryer.js\nvar retryer = __webpack_require__(1216);\n;// CONCATENATED MODULE: ./node_modules/react-query/es/core/query.js\n\n\n\n\n // TYPES\n\n// CLASS\nvar Query = /*#__PURE__*/function () {\n function Query(config) {\n this.abortSignalConsumed = false;\n this.hadObservers = false;\n this.defaultOptions = config.defaultOptions;\n this.setOptions(config.options);\n this.observers = [];\n this.cache = config.cache;\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n this.initialState = config.state || this.getDefaultState(this.options);\n this.state = this.initialState;\n this.meta = config.meta;\n this.scheduleGc();\n }\n\n var _proto = Query.prototype;\n\n _proto.setOptions = function setOptions(options) {\n var _this$options$cacheTi;\n\n this.options = (0,esm_extends/* default */.Z)({}, this.defaultOptions, options);\n this.meta = options == null ? void 0 : options.meta; // Default to 5 minutes if not cache time is set\n\n this.cacheTime = Math.max(this.cacheTime || 0, (_this$options$cacheTi = this.options.cacheTime) != null ? _this$options$cacheTi : 5 * 60 * 1000);\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.scheduleGc = function scheduleGc() {\n var _this = this;\n\n this.clearGcTimeout();\n\n if ((0,utils/* isValidTimeout */.PN)(this.cacheTime)) {\n this.gcTimeout = setTimeout(function () {\n _this.optionalRemove();\n }, this.cacheTime);\n }\n };\n\n _proto.clearGcTimeout = function clearGcTimeout() {\n if (this.gcTimeout) {\n clearTimeout(this.gcTimeout);\n this.gcTimeout = undefined;\n }\n };\n\n _proto.optionalRemove = function optionalRemove() {\n if (!this.observers.length) {\n if (this.state.isFetching) {\n if (this.hadObservers) {\n this.scheduleGc();\n }\n } else {\n this.cache.remove(this);\n }\n }\n };\n\n _proto.setData = function setData(updater, options) {\n var _this$options$isDataE, _this$options;\n\n var prevData = this.state.data; // Get the new data\n\n var data = (0,utils/* functionalUpdate */.SE)(updater, prevData); // Use prev data if an isDataEqual function is defined and returns `true`\n\n if ((_this$options$isDataE = (_this$options = this.options).isDataEqual) == null ? void 0 : _this$options$isDataE.call(_this$options, prevData, data)) {\n data = prevData;\n } else if (this.options.structuralSharing !== false) {\n // Structurally share data between prev and new data if needed\n data = (0,utils/* replaceEqualDeep */.Q$)(prevData, data);\n } // Set data and mark it as cached\n\n\n this.dispatch({\n data: data,\n type: 'success',\n dataUpdatedAt: options == null ? void 0 : options.updatedAt\n });\n return data;\n };\n\n _proto.setState = function setState(state, setStateOptions) {\n this.dispatch({\n type: 'setState',\n state: state,\n setStateOptions: setStateOptions\n });\n };\n\n _proto.cancel = function cancel(options) {\n var _this$retryer;\n\n var promise = this.promise;\n (_this$retryer = this.retryer) == null ? void 0 : _this$retryer.cancel(options);\n return promise ? promise.then(utils/* noop */.ZT).catch(utils/* noop */.ZT) : Promise.resolve();\n };\n\n _proto.destroy = function destroy() {\n this.clearGcTimeout();\n this.cancel({\n silent: true\n });\n };\n\n _proto.reset = function reset() {\n this.destroy();\n this.setState(this.initialState);\n };\n\n _proto.isActive = function isActive() {\n return this.observers.some(function (observer) {\n return observer.options.enabled !== false;\n });\n };\n\n _proto.isFetching = function isFetching() {\n return this.state.isFetching;\n };\n\n _proto.isStale = function isStale() {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some(function (observer) {\n return observer.getCurrentResult().isStale;\n });\n };\n\n _proto.isStaleByTime = function isStaleByTime(staleTime) {\n if (staleTime === void 0) {\n staleTime = 0;\n }\n\n return this.state.isInvalidated || !this.state.dataUpdatedAt || !(0,utils/* timeUntilStale */.Kp)(this.state.dataUpdatedAt, staleTime);\n };\n\n _proto.onFocus = function onFocus() {\n var _this$retryer2;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnWindowFocus();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer2 = this.retryer) == null ? void 0 : _this$retryer2.continue();\n };\n\n _proto.onOnline = function onOnline() {\n var _this$retryer3;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnReconnect();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer3 = this.retryer) == null ? void 0 : _this$retryer3.continue();\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n this.hadObservers = true; // Stop the query from being garbage collected\n\n this.clearGcTimeout();\n this.cache.notify({\n type: 'observerAdded',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n if (this.observers.indexOf(observer) !== -1) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n\n if (!this.observers.length) {\n // If the transport layer does not support cancellation\n // we'll let the query continue so the result can be cached\n if (this.retryer) {\n if (this.retryer.isTransportCancelable || this.abortSignalConsumed) {\n this.retryer.cancel({\n revert: true\n });\n } else {\n this.retryer.cancelRetry();\n }\n }\n\n if (this.cacheTime) {\n this.scheduleGc();\n } else {\n this.cache.remove(this);\n }\n }\n\n this.cache.notify({\n type: 'observerRemoved',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.getObserversCount = function getObserversCount() {\n return this.observers.length;\n };\n\n _proto.invalidate = function invalidate() {\n if (!this.state.isInvalidated) {\n this.dispatch({\n type: 'invalidate'\n });\n }\n };\n\n _proto.fetch = function fetch(options, fetchOptions) {\n var _this2 = this,\n _this$options$behavio,\n _context$fetchOptions,\n _abortController$abor;\n\n if (this.state.isFetching) {\n if (this.state.dataUpdatedAt && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) {\n // Silently cancel current fetch if the user wants to cancel refetches\n this.cancel({\n silent: true\n });\n } else if (this.promise) {\n var _this$retryer4;\n\n // make sure that retries that were potentially cancelled due to unmounts can continue\n (_this$retryer4 = this.retryer) == null ? void 0 : _this$retryer4.continueRetry(); // Return current promise if we are already fetching\n\n return this.promise;\n }\n } // Update config if passed, otherwise the config from the last execution is used\n\n\n if (options) {\n this.setOptions(options);\n } // Use the options from the first observer with a query function if no function is found.\n // This can happen when the query is hydrated or created with setQueryData.\n\n\n if (!this.options.queryFn) {\n var observer = this.observers.find(function (x) {\n return x.options.queryFn;\n });\n\n if (observer) {\n this.setOptions(observer.options);\n }\n }\n\n var queryKey = (0,utils/* ensureQueryKeyArray */.mc)(this.queryKey);\n var abortController = (0,utils/* getAbortController */.G9)(); // Create query function context\n\n var queryFnContext = {\n queryKey: queryKey,\n pageParam: undefined,\n meta: this.meta\n };\n Object.defineProperty(queryFnContext, 'signal', {\n enumerable: true,\n get: function get() {\n if (abortController) {\n _this2.abortSignalConsumed = true;\n return abortController.signal;\n }\n\n return undefined;\n }\n }); // Create fetch function\n\n var fetchFn = function fetchFn() {\n if (!_this2.options.queryFn) {\n return Promise.reject('Missing queryFn');\n }\n\n _this2.abortSignalConsumed = false;\n return _this2.options.queryFn(queryFnContext);\n }; // Trigger behavior hook\n\n\n var context = {\n fetchOptions: fetchOptions,\n options: this.options,\n queryKey: queryKey,\n state: this.state,\n fetchFn: fetchFn,\n meta: this.meta\n };\n\n if ((_this$options$behavio = this.options.behavior) == null ? void 0 : _this$options$behavio.onFetch) {\n var _this$options$behavio2;\n\n (_this$options$behavio2 = this.options.behavior) == null ? void 0 : _this$options$behavio2.onFetch(context);\n } // Store state in case the current fetch needs to be reverted\n\n\n this.revertState = this.state; // Set to fetching state if not already in it\n\n if (!this.state.isFetching || this.state.fetchMeta !== ((_context$fetchOptions = context.fetchOptions) == null ? void 0 : _context$fetchOptions.meta)) {\n var _context$fetchOptions2;\n\n this.dispatch({\n type: 'fetch',\n meta: (_context$fetchOptions2 = context.fetchOptions) == null ? void 0 : _context$fetchOptions2.meta\n });\n } // Try to fetch the data\n\n\n this.retryer = new retryer/* Retryer */.m4({\n fn: context.fetchFn,\n abort: abortController == null ? void 0 : (_abortController$abor = abortController.abort) == null ? void 0 : _abortController$abor.bind(abortController),\n onSuccess: function onSuccess(data) {\n _this2.setData(data); // Notify cache callback\n\n\n _this2.cache.config.onSuccess == null ? void 0 : _this2.cache.config.onSuccess(data, _this2); // Remove query after fetching if cache time is 0\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onError: function onError(error) {\n // Optimistically update state if needed\n if (!((0,retryer/* isCancelledError */.DV)(error) && error.silent)) {\n _this2.dispatch({\n type: 'error',\n error: error\n });\n }\n\n if (!(0,retryer/* isCancelledError */.DV)(error)) {\n // Notify cache callback\n _this2.cache.config.onError == null ? void 0 : _this2.cache.config.onError(error, _this2); // Log error\n\n (0,logger/* getLogger */.j)().error(error);\n } // Remove query after fetching if cache time is 0\n\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay\n });\n this.promise = this.retryer.promise;\n return this.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = this.reducer(this.state, action);\n notifyManager/* notifyManager.batch */.V.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onQueryUpdate(action);\n });\n\n _this3.cache.notify({\n query: _this3,\n type: 'queryUpdated',\n action: action\n });\n });\n };\n\n _proto.getDefaultState = function getDefaultState(options) {\n var data = typeof options.initialData === 'function' ? options.initialData() : options.initialData;\n var hasInitialData = typeof options.initialData !== 'undefined';\n var initialDataUpdatedAt = hasInitialData ? typeof options.initialDataUpdatedAt === 'function' ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n var hasData = typeof data !== 'undefined';\n return {\n data: data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt != null ? initialDataUpdatedAt : Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchMeta: null,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: hasData ? 'success' : 'idle'\n };\n };\n\n _proto.reducer = function reducer(state, action) {\n var _action$meta, _action$dataUpdatedAt;\n\n switch (action.type) {\n case 'failed':\n return (0,esm_extends/* default */.Z)({}, state, {\n fetchFailureCount: state.fetchFailureCount + 1\n });\n\n case 'pause':\n return (0,esm_extends/* default */.Z)({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return (0,esm_extends/* default */.Z)({}, state, {\n isPaused: false\n });\n\n case 'fetch':\n return (0,esm_extends/* default */.Z)({}, state, {\n fetchFailureCount: 0,\n fetchMeta: (_action$meta = action.meta) != null ? _action$meta : null,\n isFetching: true,\n isPaused: false\n }, !state.dataUpdatedAt && {\n error: null,\n status: 'loading'\n });\n\n case 'success':\n return (0,esm_extends/* default */.Z)({}, state, {\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: (_action$dataUpdatedAt = action.dataUpdatedAt) != null ? _action$dataUpdatedAt : Date.now(),\n error: null,\n fetchFailureCount: 0,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: 'success'\n });\n\n case 'error':\n var error = action.error;\n\n if ((0,retryer/* isCancelledError */.DV)(error) && error.revert && this.revertState) {\n return (0,esm_extends/* default */.Z)({}, this.revertState);\n }\n\n return (0,esm_extends/* default */.Z)({}, state, {\n error: error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n isFetching: false,\n isPaused: false,\n status: 'error'\n });\n\n case 'invalidate':\n return (0,esm_extends/* default */.Z)({}, state, {\n isInvalidated: true\n });\n\n case 'setState':\n return (0,esm_extends/* default */.Z)({}, state, action.state);\n\n default:\n return state;\n }\n };\n\n return Query;\n}();\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/subscribable.js\nvar subscribable = __webpack_require__(2943);\n;// CONCATENATED MODULE: ./node_modules/react-query/es/core/queryCache.js\n\n\n\n\n\n// CLASS\nvar QueryCache = /*#__PURE__*/function (_Subscribable) {\n (0,inheritsLoose/* default */.Z)(QueryCache, _Subscribable);\n\n function QueryCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.queries = [];\n _this.queriesMap = {};\n return _this;\n }\n\n var _proto = QueryCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var _options$queryHash;\n\n var queryKey = options.queryKey;\n var queryHash = (_options$queryHash = options.queryHash) != null ? _options$queryHash : (0,utils/* hashQueryKeyByOptions */.Rm)(queryKey, options);\n var query = this.get(queryHash);\n\n if (!query) {\n query = new Query({\n cache: this,\n queryKey: queryKey,\n queryHash: queryHash,\n options: client.defaultQueryOptions(options),\n state: state,\n defaultOptions: client.getQueryDefaults(queryKey),\n meta: options.meta\n });\n this.add(query);\n }\n\n return query;\n };\n\n _proto.add = function add(query) {\n if (!this.queriesMap[query.queryHash]) {\n this.queriesMap[query.queryHash] = query;\n this.queries.push(query);\n this.notify({\n type: 'queryAdded',\n query: query\n });\n }\n };\n\n _proto.remove = function remove(query) {\n var queryInMap = this.queriesMap[query.queryHash];\n\n if (queryInMap) {\n query.destroy();\n this.queries = this.queries.filter(function (x) {\n return x !== query;\n });\n\n if (queryInMap === query) {\n delete this.queriesMap[query.queryHash];\n }\n\n this.notify({\n type: 'queryRemoved',\n query: query\n });\n }\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager/* notifyManager.batch */.V.batch(function () {\n _this2.queries.forEach(function (query) {\n _this2.remove(query);\n });\n });\n };\n\n _proto.get = function get(queryHash) {\n return this.queriesMap[queryHash];\n };\n\n _proto.getAll = function getAll() {\n return this.queries;\n };\n\n _proto.find = function find(arg1, arg2) {\n var _parseFilterArgs = (0,utils/* parseFilterArgs */.I6)(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.queries.find(function (query) {\n return (0,utils/* matchQuery */._x)(filters, query);\n });\n };\n\n _proto.findAll = function findAll(arg1, arg2) {\n var _parseFilterArgs2 = (0,utils/* parseFilterArgs */.I6)(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n return Object.keys(filters).length > 0 ? this.queries.filter(function (query) {\n return (0,utils/* matchQuery */._x)(filters, query);\n }) : this.queries;\n };\n\n _proto.notify = function notify(event) {\n var _this3 = this;\n\n notifyManager/* notifyManager.batch */.V.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(event);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n var _this4 = this;\n\n notifyManager/* notifyManager.batch */.V.batch(function () {\n _this4.queries.forEach(function (query) {\n query.onFocus();\n });\n });\n };\n\n _proto.onOnline = function onOnline() {\n var _this5 = this;\n\n notifyManager/* notifyManager.batch */.V.batch(function () {\n _this5.queries.forEach(function (query) {\n query.onOnline();\n });\n });\n };\n\n return QueryCache;\n}(subscribable/* Subscribable */.l);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/mutation.js\nvar core_mutation = __webpack_require__(1262);\n;// CONCATENATED MODULE: ./node_modules/react-query/es/core/mutationCache.js\n\n\n\n\n // TYPES\n\n// CLASS\nvar MutationCache = /*#__PURE__*/function (_Subscribable) {\n (0,inheritsLoose/* default */.Z)(MutationCache, _Subscribable);\n\n function MutationCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.mutations = [];\n _this.mutationId = 0;\n return _this;\n }\n\n var _proto = MutationCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var mutation = new core_mutation/* Mutation */.m({\n mutationCache: this,\n mutationId: ++this.mutationId,\n options: client.defaultMutationOptions(options),\n state: state,\n defaultOptions: options.mutationKey ? client.getMutationDefaults(options.mutationKey) : undefined,\n meta: options.meta\n });\n this.add(mutation);\n return mutation;\n };\n\n _proto.add = function add(mutation) {\n this.mutations.push(mutation);\n this.notify(mutation);\n };\n\n _proto.remove = function remove(mutation) {\n this.mutations = this.mutations.filter(function (x) {\n return x !== mutation;\n });\n mutation.cancel();\n this.notify(mutation);\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager/* notifyManager.batch */.V.batch(function () {\n _this2.mutations.forEach(function (mutation) {\n _this2.remove(mutation);\n });\n });\n };\n\n _proto.getAll = function getAll() {\n return this.mutations;\n };\n\n _proto.find = function find(filters) {\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.mutations.find(function (mutation) {\n return (0,utils/* matchMutation */.X7)(filters, mutation);\n });\n };\n\n _proto.findAll = function findAll(filters) {\n return this.mutations.filter(function (mutation) {\n return (0,utils/* matchMutation */.X7)(filters, mutation);\n });\n };\n\n _proto.notify = function notify(mutation) {\n var _this3 = this;\n\n notifyManager/* notifyManager.batch */.V.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(mutation);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n this.resumePausedMutations();\n };\n\n _proto.onOnline = function onOnline() {\n this.resumePausedMutations();\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n var pausedMutations = this.mutations.filter(function (x) {\n return x.state.isPaused;\n });\n return notifyManager/* notifyManager.batch */.V.batch(function () {\n return pausedMutations.reduce(function (promise, mutation) {\n return promise.then(function () {\n return mutation.continue().catch(utils/* noop */.ZT);\n });\n }, Promise.resolve());\n });\n };\n\n return MutationCache;\n}(subscribable/* Subscribable */.l);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/focusManager.js\nvar focusManager = __webpack_require__(9852);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/onlineManager.js\nvar onlineManager = __webpack_require__(68);\n;// CONCATENATED MODULE: ./node_modules/react-query/es/core/infiniteQueryBehavior.js\n\n\nfunction infiniteQueryBehavior() {\n return {\n onFetch: function onFetch(context) {\n context.fetchFn = function () {\n var _context$fetchOptions, _context$fetchOptions2, _context$fetchOptions3, _context$fetchOptions4, _context$state$data, _context$state$data2;\n\n var refetchPage = (_context$fetchOptions = context.fetchOptions) == null ? void 0 : (_context$fetchOptions2 = _context$fetchOptions.meta) == null ? void 0 : _context$fetchOptions2.refetchPage;\n var fetchMore = (_context$fetchOptions3 = context.fetchOptions) == null ? void 0 : (_context$fetchOptions4 = _context$fetchOptions3.meta) == null ? void 0 : _context$fetchOptions4.fetchMore;\n var pageParam = fetchMore == null ? void 0 : fetchMore.pageParam;\n var isFetchingNextPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'forward';\n var isFetchingPreviousPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'backward';\n var oldPages = ((_context$state$data = context.state.data) == null ? void 0 : _context$state$data.pages) || [];\n var oldPageParams = ((_context$state$data2 = context.state.data) == null ? void 0 : _context$state$data2.pageParams) || [];\n var abortController = (0,utils/* getAbortController */.G9)();\n var abortSignal = abortController == null ? void 0 : abortController.signal;\n var newPageParams = oldPageParams;\n var cancelled = false; // Get query function\n\n var queryFn = context.options.queryFn || function () {\n return Promise.reject('Missing queryFn');\n };\n\n var buildNewPages = function buildNewPages(pages, param, page, previous) {\n newPageParams = previous ? [param].concat(newPageParams) : [].concat(newPageParams, [param]);\n return previous ? [page].concat(pages) : [].concat(pages, [page]);\n }; // Create function to fetch a page\n\n\n var fetchPage = function fetchPage(pages, manual, param, previous) {\n if (cancelled) {\n return Promise.reject('Cancelled');\n }\n\n if (typeof param === 'undefined' && !manual && pages.length) {\n return Promise.resolve(pages);\n }\n\n var queryFnContext = {\n queryKey: context.queryKey,\n signal: abortSignal,\n pageParam: param,\n meta: context.meta\n };\n var queryFnResult = queryFn(queryFnContext);\n var promise = Promise.resolve(queryFnResult).then(function (page) {\n return buildNewPages(pages, param, page, previous);\n });\n\n if ((0,retryer/* isCancelable */.LE)(queryFnResult)) {\n var promiseAsAny = promise;\n promiseAsAny.cancel = queryFnResult.cancel;\n }\n\n return promise;\n };\n\n var promise; // Fetch first page?\n\n if (!oldPages.length) {\n promise = fetchPage([]);\n } // Fetch next page?\n else if (isFetchingNextPage) {\n var manual = typeof pageParam !== 'undefined';\n var param = manual ? pageParam : getNextPageParam(context.options, oldPages);\n promise = fetchPage(oldPages, manual, param);\n } // Fetch previous page?\n else if (isFetchingPreviousPage) {\n var _manual = typeof pageParam !== 'undefined';\n\n var _param = _manual ? pageParam : getPreviousPageParam(context.options, oldPages);\n\n promise = fetchPage(oldPages, _manual, _param, true);\n } // Refetch pages\n else {\n (function () {\n newPageParams = [];\n var manual = typeof context.options.getNextPageParam === 'undefined';\n var shouldFetchFirstPage = refetchPage && oldPages[0] ? refetchPage(oldPages[0], 0, oldPages) : true; // Fetch first page\n\n promise = shouldFetchFirstPage ? fetchPage([], manual, oldPageParams[0]) : Promise.resolve(buildNewPages([], oldPageParams[0], oldPages[0])); // Fetch remaining pages\n\n var _loop = function _loop(i) {\n promise = promise.then(function (pages) {\n var shouldFetchNextPage = refetchPage && oldPages[i] ? refetchPage(oldPages[i], i, oldPages) : true;\n\n if (shouldFetchNextPage) {\n var _param2 = manual ? oldPageParams[i] : getNextPageParam(context.options, pages);\n\n return fetchPage(pages, manual, _param2);\n }\n\n return Promise.resolve(buildNewPages(pages, oldPageParams[i], oldPages[i]));\n });\n };\n\n for (var i = 1; i < oldPages.length; i++) {\n _loop(i);\n }\n })();\n }\n\n var finalPromise = promise.then(function (pages) {\n return {\n pages: pages,\n pageParams: newPageParams\n };\n });\n var finalPromiseAsAny = finalPromise;\n\n finalPromiseAsAny.cancel = function () {\n cancelled = true;\n abortController == null ? void 0 : abortController.abort();\n\n if ((0,retryer/* isCancelable */.LE)(promise)) {\n promise.cancel();\n }\n };\n\n return finalPromise;\n };\n }\n };\n}\nfunction getNextPageParam(options, pages) {\n return options.getNextPageParam == null ? void 0 : options.getNextPageParam(pages[pages.length - 1], pages);\n}\nfunction getPreviousPageParam(options, pages) {\n return options.getPreviousPageParam == null ? void 0 : options.getPreviousPageParam(pages[0], pages);\n}\n/**\n * Checks if there is a next page.\n * Returns `undefined` if it cannot be determined.\n */\n\nfunction hasNextPage(options, pages) {\n if (options.getNextPageParam && Array.isArray(pages)) {\n var nextPageParam = getNextPageParam(options, pages);\n return typeof nextPageParam !== 'undefined' && nextPageParam !== null && nextPageParam !== false;\n }\n}\n/**\n * Checks if there is a previous page.\n * Returns `undefined` if it cannot be determined.\n */\n\nfunction hasPreviousPage(options, pages) {\n if (options.getPreviousPageParam && Array.isArray(pages)) {\n var previousPageParam = getPreviousPageParam(options, pages);\n return typeof previousPageParam !== 'undefined' && previousPageParam !== null && previousPageParam !== false;\n }\n}\n;// CONCATENATED MODULE: ./node_modules/react-query/es/core/queryClient.js\n\n\n\n\n\n\n\n\n// CLASS\nvar QueryClient = /*#__PURE__*/function () {\n function QueryClient(config) {\n if (config === void 0) {\n config = {};\n }\n\n this.queryCache = config.queryCache || new QueryCache();\n this.mutationCache = config.mutationCache || new MutationCache();\n this.defaultOptions = config.defaultOptions || {};\n this.queryDefaults = [];\n this.mutationDefaults = [];\n }\n\n var _proto = QueryClient.prototype;\n\n _proto.mount = function mount() {\n var _this = this;\n\n this.unsubscribeFocus = focusManager/* focusManager.subscribe */.j.subscribe(function () {\n if (focusManager/* focusManager.isFocused */.j.isFocused() && onlineManager/* onlineManager.isOnline */.N.isOnline()) {\n _this.mutationCache.onFocus();\n\n _this.queryCache.onFocus();\n }\n });\n this.unsubscribeOnline = onlineManager/* onlineManager.subscribe */.N.subscribe(function () {\n if (focusManager/* focusManager.isFocused */.j.isFocused() && onlineManager/* onlineManager.isOnline */.N.isOnline()) {\n _this.mutationCache.onOnline();\n\n _this.queryCache.onOnline();\n }\n });\n };\n\n _proto.unmount = function unmount() {\n var _this$unsubscribeFocu, _this$unsubscribeOnli;\n\n (_this$unsubscribeFocu = this.unsubscribeFocus) == null ? void 0 : _this$unsubscribeFocu.call(this);\n (_this$unsubscribeOnli = this.unsubscribeOnline) == null ? void 0 : _this$unsubscribeOnli.call(this);\n };\n\n _proto.isFetching = function isFetching(arg1, arg2) {\n var _parseFilterArgs = (0,utils/* parseFilterArgs */.I6)(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n filters.fetching = true;\n return this.queryCache.findAll(filters).length;\n };\n\n _proto.isMutating = function isMutating(filters) {\n return this.mutationCache.findAll((0,esm_extends/* default */.Z)({}, filters, {\n fetching: true\n })).length;\n };\n\n _proto.getQueryData = function getQueryData(queryKey, filters) {\n var _this$queryCache$find;\n\n return (_this$queryCache$find = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find.state.data;\n };\n\n _proto.getQueriesData = function getQueriesData(queryKeyOrFilters) {\n return this.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref) {\n var queryKey = _ref.queryKey,\n state = _ref.state;\n var data = state.data;\n return [queryKey, data];\n });\n };\n\n _proto.setQueryData = function setQueryData(queryKey, updater, options) {\n var parsedOptions = (0,utils/* parseQueryArgs */._v)(queryKey);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions);\n return this.queryCache.build(this, defaultedOptions).setData(updater, options);\n };\n\n _proto.setQueriesData = function setQueriesData(queryKeyOrFilters, updater, options) {\n var _this2 = this;\n\n return notifyManager/* notifyManager.batch */.V.batch(function () {\n return _this2.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref2) {\n var queryKey = _ref2.queryKey;\n return [queryKey, _this2.setQueryData(queryKey, updater, options)];\n });\n });\n };\n\n _proto.getQueryState = function getQueryState(queryKey, filters) {\n var _this$queryCache$find2;\n\n return (_this$queryCache$find2 = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find2.state;\n };\n\n _proto.removeQueries = function removeQueries(arg1, arg2) {\n var _parseFilterArgs2 = (0,utils/* parseFilterArgs */.I6)(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n var queryCache = this.queryCache;\n notifyManager/* notifyManager.batch */.V.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n queryCache.remove(query);\n });\n });\n };\n\n _proto.resetQueries = function resetQueries(arg1, arg2, arg3) {\n var _this3 = this;\n\n var _parseFilterArgs3 = (0,utils/* parseFilterArgs */.I6)(arg1, arg2, arg3),\n filters = _parseFilterArgs3[0],\n options = _parseFilterArgs3[1];\n\n var queryCache = this.queryCache;\n\n var refetchFilters = (0,esm_extends/* default */.Z)({}, filters, {\n active: true\n });\n\n return notifyManager/* notifyManager.batch */.V.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n query.reset();\n });\n return _this3.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.cancelQueries = function cancelQueries(arg1, arg2, arg3) {\n var _this4 = this;\n\n var _parseFilterArgs4 = (0,utils/* parseFilterArgs */.I6)(arg1, arg2, arg3),\n filters = _parseFilterArgs4[0],\n _parseFilterArgs4$ = _parseFilterArgs4[1],\n cancelOptions = _parseFilterArgs4$ === void 0 ? {} : _parseFilterArgs4$;\n\n if (typeof cancelOptions.revert === 'undefined') {\n cancelOptions.revert = true;\n }\n\n var promises = notifyManager/* notifyManager.batch */.V.batch(function () {\n return _this4.queryCache.findAll(filters).map(function (query) {\n return query.cancel(cancelOptions);\n });\n });\n return Promise.all(promises).then(utils/* noop */.ZT).catch(utils/* noop */.ZT);\n };\n\n _proto.invalidateQueries = function invalidateQueries(arg1, arg2, arg3) {\n var _ref3,\n _filters$refetchActiv,\n _filters$refetchInact,\n _this5 = this;\n\n var _parseFilterArgs5 = (0,utils/* parseFilterArgs */.I6)(arg1, arg2, arg3),\n filters = _parseFilterArgs5[0],\n options = _parseFilterArgs5[1];\n\n var refetchFilters = (0,esm_extends/* default */.Z)({}, filters, {\n // if filters.refetchActive is not provided and filters.active is explicitly false,\n // e.g. invalidateQueries({ active: false }), we don't want to refetch active queries\n active: (_ref3 = (_filters$refetchActiv = filters.refetchActive) != null ? _filters$refetchActiv : filters.active) != null ? _ref3 : true,\n inactive: (_filters$refetchInact = filters.refetchInactive) != null ? _filters$refetchInact : false\n });\n\n return notifyManager/* notifyManager.batch */.V.batch(function () {\n _this5.queryCache.findAll(filters).forEach(function (query) {\n query.invalidate();\n });\n\n return _this5.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.refetchQueries = function refetchQueries(arg1, arg2, arg3) {\n var _this6 = this;\n\n var _parseFilterArgs6 = (0,utils/* parseFilterArgs */.I6)(arg1, arg2, arg3),\n filters = _parseFilterArgs6[0],\n options = _parseFilterArgs6[1];\n\n var promises = notifyManager/* notifyManager.batch */.V.batch(function () {\n return _this6.queryCache.findAll(filters).map(function (query) {\n return query.fetch(undefined, (0,esm_extends/* default */.Z)({}, options, {\n meta: {\n refetchPage: filters == null ? void 0 : filters.refetchPage\n }\n }));\n });\n });\n var promise = Promise.all(promises).then(utils/* noop */.ZT);\n\n if (!(options == null ? void 0 : options.throwOnError)) {\n promise = promise.catch(utils/* noop */.ZT);\n }\n\n return promise;\n };\n\n _proto.fetchQuery = function fetchQuery(arg1, arg2, arg3) {\n var parsedOptions = (0,utils/* parseQueryArgs */._v)(arg1, arg2, arg3);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions); // https://github.com/tannerlinsley/react-query/issues/652\n\n if (typeof defaultedOptions.retry === 'undefined') {\n defaultedOptions.retry = false;\n }\n\n var query = this.queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n };\n\n _proto.prefetchQuery = function prefetchQuery(arg1, arg2, arg3) {\n return this.fetchQuery(arg1, arg2, arg3).then(utils/* noop */.ZT).catch(utils/* noop */.ZT);\n };\n\n _proto.fetchInfiniteQuery = function fetchInfiniteQuery(arg1, arg2, arg3) {\n var parsedOptions = (0,utils/* parseQueryArgs */._v)(arg1, arg2, arg3);\n parsedOptions.behavior = infiniteQueryBehavior();\n return this.fetchQuery(parsedOptions);\n };\n\n _proto.prefetchInfiniteQuery = function prefetchInfiniteQuery(arg1, arg2, arg3) {\n return this.fetchInfiniteQuery(arg1, arg2, arg3).then(utils/* noop */.ZT).catch(utils/* noop */.ZT);\n };\n\n _proto.cancelMutations = function cancelMutations() {\n var _this7 = this;\n\n var promises = notifyManager/* notifyManager.batch */.V.batch(function () {\n return _this7.mutationCache.getAll().map(function (mutation) {\n return mutation.cancel();\n });\n });\n return Promise.all(promises).then(utils/* noop */.ZT).catch(utils/* noop */.ZT);\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n return this.getMutationCache().resumePausedMutations();\n };\n\n _proto.executeMutation = function executeMutation(options) {\n return this.mutationCache.build(this, options).execute();\n };\n\n _proto.getQueryCache = function getQueryCache() {\n return this.queryCache;\n };\n\n _proto.getMutationCache = function getMutationCache() {\n return this.mutationCache;\n };\n\n _proto.getDefaultOptions = function getDefaultOptions() {\n return this.defaultOptions;\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.setQueryDefaults = function setQueryDefaults(queryKey, options) {\n var result = this.queryDefaults.find(function (x) {\n return (0,utils/* hashQueryKey */.yF)(queryKey) === (0,utils/* hashQueryKey */.yF)(x.queryKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.queryDefaults.push({\n queryKey: queryKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getQueryDefaults = function getQueryDefaults(queryKey) {\n var _this$queryDefaults$f;\n\n return queryKey ? (_this$queryDefaults$f = this.queryDefaults.find(function (x) {\n return (0,utils/* partialMatchKey */.to)(queryKey, x.queryKey);\n })) == null ? void 0 : _this$queryDefaults$f.defaultOptions : undefined;\n };\n\n _proto.setMutationDefaults = function setMutationDefaults(mutationKey, options) {\n var result = this.mutationDefaults.find(function (x) {\n return (0,utils/* hashQueryKey */.yF)(mutationKey) === (0,utils/* hashQueryKey */.yF)(x.mutationKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.mutationDefaults.push({\n mutationKey: mutationKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getMutationDefaults = function getMutationDefaults(mutationKey) {\n var _this$mutationDefault;\n\n return mutationKey ? (_this$mutationDefault = this.mutationDefaults.find(function (x) {\n return (0,utils/* partialMatchKey */.to)(mutationKey, x.mutationKey);\n })) == null ? void 0 : _this$mutationDefault.defaultOptions : undefined;\n };\n\n _proto.defaultQueryOptions = function defaultQueryOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n var defaultedOptions = (0,esm_extends/* default */.Z)({}, this.defaultOptions.queries, this.getQueryDefaults(options == null ? void 0 : options.queryKey), options, {\n _defaulted: true\n });\n\n if (!defaultedOptions.queryHash && defaultedOptions.queryKey) {\n defaultedOptions.queryHash = (0,utils/* hashQueryKeyByOptions */.Rm)(defaultedOptions.queryKey, defaultedOptions);\n }\n\n return defaultedOptions;\n };\n\n _proto.defaultQueryObserverOptions = function defaultQueryObserverOptions(options) {\n return this.defaultQueryOptions(options);\n };\n\n _proto.defaultMutationOptions = function defaultMutationOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n return (0,esm_extends/* default */.Z)({}, this.defaultOptions.mutations, this.getMutationDefaults(options == null ? void 0 : options.mutationKey), options, {\n _defaulted: true\n });\n };\n\n _proto.clear = function clear() {\n this.queryCache.clear();\n this.mutationCache.clear();\n };\n\n return QueryClient;\n}();\n\n/***/ }),\n\n/***/ 1216:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DV\": function() { return /* binding */ isCancelledError; },\n/* harmony export */ \"LE\": function() { return /* binding */ isCancelable; },\n/* harmony export */ \"m4\": function() { return /* binding */ Retryer; }\n/* harmony export */ });\n/* unused harmony export CancelledError */\n/* harmony import */ var _focusManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9852);\n/* harmony import */ var _onlineManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2288);\n\n\n\n\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1000 * Math.pow(2, failureCount), 30000);\n}\n\nfunction isCancelable(value) {\n return typeof (value == null ? void 0 : value.cancel) === 'function';\n}\nvar CancelledError = function CancelledError(options) {\n this.revert = options == null ? void 0 : options.revert;\n this.silent = options == null ? void 0 : options.silent;\n};\nfunction isCancelledError(value) {\n return value instanceof CancelledError;\n} // CLASS\n\nvar Retryer = function Retryer(config) {\n var _this = this;\n\n var cancelRetry = false;\n var cancelFn;\n var continueFn;\n var promiseResolve;\n var promiseReject;\n this.abort = config.abort;\n\n this.cancel = function (cancelOptions) {\n return cancelFn == null ? void 0 : cancelFn(cancelOptions);\n };\n\n this.cancelRetry = function () {\n cancelRetry = true;\n };\n\n this.continueRetry = function () {\n cancelRetry = false;\n };\n\n this.continue = function () {\n return continueFn == null ? void 0 : continueFn();\n };\n\n this.failureCount = 0;\n this.isPaused = false;\n this.isResolved = false;\n this.isTransportCancelable = false;\n this.promise = new Promise(function (outerResolve, outerReject) {\n promiseResolve = outerResolve;\n promiseReject = outerReject;\n });\n\n var resolve = function resolve(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onSuccess == null ? void 0 : config.onSuccess(value);\n continueFn == null ? void 0 : continueFn();\n promiseResolve(value);\n }\n };\n\n var reject = function reject(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onError == null ? void 0 : config.onError(value);\n continueFn == null ? void 0 : continueFn();\n promiseReject(value);\n }\n };\n\n var pause = function pause() {\n return new Promise(function (continueResolve) {\n continueFn = continueResolve;\n _this.isPaused = true;\n config.onPause == null ? void 0 : config.onPause();\n }).then(function () {\n continueFn = undefined;\n _this.isPaused = false;\n config.onContinue == null ? void 0 : config.onContinue();\n });\n }; // Create loop function\n\n\n var run = function run() {\n // Do nothing if already resolved\n if (_this.isResolved) {\n return;\n }\n\n var promiseOrValue; // Execute query\n\n try {\n promiseOrValue = config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n } // Create callback to cancel this fetch\n\n\n cancelFn = function cancelFn(cancelOptions) {\n if (!_this.isResolved) {\n reject(new CancelledError(cancelOptions));\n _this.abort == null ? void 0 : _this.abort(); // Cancel transport if supported\n\n if (isCancelable(promiseOrValue)) {\n try {\n promiseOrValue.cancel();\n } catch (_unused) {}\n }\n }\n }; // Check if the transport layer support cancellation\n\n\n _this.isTransportCancelable = isCancelable(promiseOrValue);\n Promise.resolve(promiseOrValue).then(resolve).catch(function (error) {\n var _config$retry, _config$retryDelay;\n\n // Stop if the fetch is already resolved\n if (_this.isResolved) {\n return;\n } // Do we need to retry the request?\n\n\n var retry = (_config$retry = config.retry) != null ? _config$retry : 3;\n var retryDelay = (_config$retryDelay = config.retryDelay) != null ? _config$retryDelay : defaultRetryDelay;\n var delay = typeof retryDelay === 'function' ? retryDelay(_this.failureCount, error) : retryDelay;\n var shouldRetry = retry === true || typeof retry === 'number' && _this.failureCount < retry || typeof retry === 'function' && retry(_this.failureCount, error);\n\n if (cancelRetry || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error);\n return;\n }\n\n _this.failureCount++; // Notify on fail\n\n config.onFail == null ? void 0 : config.onFail(_this.failureCount, error); // Delay\n\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__/* .sleep */ .Gh)(delay) // Pause if the document is not visible or when the device is offline\n .then(function () {\n if (!_focusManager__WEBPACK_IMPORTED_MODULE_1__/* .focusManager.isFocused */ .j.isFocused() || !_onlineManager__WEBPACK_IMPORTED_MODULE_2__/* .onlineManager.isOnline */ .N.isOnline()) {\n return pause();\n }\n }).then(function () {\n if (cancelRetry) {\n reject(error);\n } else {\n run();\n }\n });\n });\n }; // Start loop\n\n\n run();\n};\n\n/***/ }),\n\n/***/ 2943:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"l\": function() { return /* binding */ Subscribable; }\n/* harmony export */ });\nvar Subscribable = /*#__PURE__*/function () {\n function Subscribable() {\n this.listeners = [];\n }\n\n var _proto = Subscribable.prototype;\n\n _proto.subscribe = function subscribe(listener) {\n var _this = this;\n\n var callback = listener || function () {\n return undefined;\n };\n\n this.listeners.push(callback);\n this.onSubscribe();\n return function () {\n _this.listeners = _this.listeners.filter(function (x) {\n return x !== callback;\n });\n\n _this.onUnsubscribe();\n };\n };\n\n _proto.hasListeners = function hasListeners() {\n return this.listeners.length > 0;\n };\n\n _proto.onSubscribe = function onSubscribe() {// Do nothing\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {// Do nothing\n };\n\n return Subscribable;\n}();\n\n/***/ }),\n\n/***/ 6755:\n/***/ (function() {\n\n\n\n/***/ }),\n\n/***/ 2288:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"A4\": function() { return /* binding */ scheduleMicrotask; },\n/* harmony export */ \"G9\": function() { return /* binding */ getAbortController; },\n/* harmony export */ \"Gh\": function() { return /* binding */ sleep; },\n/* harmony export */ \"I6\": function() { return /* binding */ parseFilterArgs; },\n/* harmony export */ \"Kp\": function() { return /* binding */ timeUntilStale; },\n/* harmony export */ \"PN\": function() { return /* binding */ isValidTimeout; },\n/* harmony export */ \"Q$\": function() { return /* binding */ replaceEqualDeep; },\n/* harmony export */ \"Rm\": function() { return /* binding */ hashQueryKeyByOptions; },\n/* harmony export */ \"SE\": function() { return /* binding */ functionalUpdate; },\n/* harmony export */ \"VS\": function() { return /* binding */ shallowEqualObjects; },\n/* harmony export */ \"X7\": function() { return /* binding */ matchMutation; },\n/* harmony export */ \"ZT\": function() { return /* binding */ noop; },\n/* harmony export */ \"_v\": function() { return /* binding */ parseQueryArgs; },\n/* harmony export */ \"_x\": function() { return /* binding */ matchQuery; },\n/* harmony export */ \"lV\": function() { return /* binding */ parseMutationArgs; },\n/* harmony export */ \"mc\": function() { return /* binding */ ensureQueryKeyArray; },\n/* harmony export */ \"sk\": function() { return /* binding */ isServer; },\n/* harmony export */ \"to\": function() { return /* binding */ partialMatchKey; },\n/* harmony export */ \"yF\": function() { return /* binding */ hashQueryKey; }\n/* harmony export */ });\n/* unused harmony exports difference, replaceAt, parseMutationFilterArgs, mapQueryStatusFilter, stableValueHash, partialDeepEqual, isPlainObject, isQueryKey, isError */\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7462);\n\n// TYPES\n// UTILS\nvar isServer = typeof window === 'undefined';\nfunction noop() {\n return undefined;\n}\nfunction functionalUpdate(updater, input) {\n return typeof updater === 'function' ? updater(input) : updater;\n}\nfunction isValidTimeout(value) {\n return typeof value === 'number' && value >= 0 && value !== Infinity;\n}\nfunction ensureQueryKeyArray(value) {\n return Array.isArray(value) ? value : [value];\n}\nfunction difference(array1, array2) {\n return array1.filter(function (x) {\n return array2.indexOf(x) === -1;\n });\n}\nfunction replaceAt(array, index, value) {\n var copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nfunction timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nfunction parseQueryArgs(arg1, arg2, arg3) {\n if (!isQueryKey(arg1)) {\n return arg1;\n }\n\n if (typeof arg2 === 'function') {\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, arg3, {\n queryKey: arg1,\n queryFn: arg2\n });\n }\n\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, arg2, {\n queryKey: arg1\n });\n}\nfunction parseMutationArgs(arg1, arg2, arg3) {\n if (isQueryKey(arg1)) {\n if (typeof arg2 === 'function') {\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, arg3, {\n mutationKey: arg1,\n mutationFn: arg2\n });\n }\n\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, arg2, {\n mutationKey: arg1\n });\n }\n\n if (typeof arg1 === 'function') {\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, arg2, {\n mutationFn: arg1\n });\n }\n\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, arg1);\n}\nfunction parseFilterArgs(arg1, arg2, arg3) {\n return isQueryKey(arg1) ? [(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z)({}, arg2, {\n queryKey: arg1\n }), arg3] : [arg1 || {}, arg2];\n}\nfunction parseMutationFilterArgs(arg1, arg2) {\n return isQueryKey(arg1) ? _extends({}, arg2, {\n mutationKey: arg1\n }) : arg1;\n}\nfunction mapQueryStatusFilter(active, inactive) {\n if (active === true && inactive === true || active == null && inactive == null) {\n return 'all';\n } else if (active === false && inactive === false) {\n return 'none';\n } else {\n // At this point, active|inactive can only be true|false or false|true\n // so, when only one value is provided, the missing one has to be the negated value\n var isActive = active != null ? active : !inactive;\n return isActive ? 'active' : 'inactive';\n }\n}\nfunction matchQuery(filters, query) {\n var active = filters.active,\n exact = filters.exact,\n fetching = filters.fetching,\n inactive = filters.inactive,\n predicate = filters.predicate,\n queryKey = filters.queryKey,\n stale = filters.stale;\n\n if (isQueryKey(queryKey)) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n\n var queryStatusFilter = mapQueryStatusFilter(active, inactive);\n\n if (queryStatusFilter === 'none') {\n return false;\n } else if (queryStatusFilter !== 'all') {\n var isActive = query.isActive();\n\n if (queryStatusFilter === 'active' && !isActive) {\n return false;\n }\n\n if (queryStatusFilter === 'inactive' && isActive) {\n return false;\n }\n }\n\n if (typeof stale === 'boolean' && query.isStale() !== stale) {\n return false;\n }\n\n if (typeof fetching === 'boolean' && query.isFetching() !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(query)) {\n return false;\n }\n\n return true;\n}\nfunction matchMutation(filters, mutation) {\n var exact = filters.exact,\n fetching = filters.fetching,\n predicate = filters.predicate,\n mutationKey = filters.mutationKey;\n\n if (isQueryKey(mutationKey)) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n\n if (exact) {\n if (hashQueryKey(mutation.options.mutationKey) !== hashQueryKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n\n if (typeof fetching === 'boolean' && mutation.state.status === 'loading' !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(mutation)) {\n return false;\n }\n\n return true;\n}\nfunction hashQueryKeyByOptions(queryKey, options) {\n var hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashQueryKey;\n return hashFn(queryKey);\n}\n/**\n * Default query keys hash function.\n */\n\nfunction hashQueryKey(queryKey) {\n var asArray = ensureQueryKeyArray(queryKey);\n return stableValueHash(asArray);\n}\n/**\n * Hashes the value into a stable hash.\n */\n\nfunction stableValueHash(value) {\n return JSON.stringify(value, function (_, val) {\n return isPlainObject(val) ? Object.keys(val).sort().reduce(function (result, key) {\n result[key] = val[key];\n return result;\n }, {}) : val;\n });\n}\n/**\n * Checks if key `b` partially matches with key `a`.\n */\n\nfunction partialMatchKey(a, b) {\n return partialDeepEqual(ensureQueryKeyArray(a), ensureQueryKeyArray(b));\n}\n/**\n * Checks if `b` partially matches with `a`.\n */\n\nfunction partialDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== typeof b) {\n return false;\n }\n\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n return !Object.keys(b).some(function (key) {\n return !partialDeepEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n/**\n * This function returns `a` if `b` is deeply equal.\n * If not, it will replace any deeply equal children of `b` with those of `a`.\n * This can be used for structural sharing between JSON values for example.\n */\n\nfunction replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n\n var array = Array.isArray(a) && Array.isArray(b);\n\n if (array || isPlainObject(a) && isPlainObject(b)) {\n var aSize = array ? a.length : Object.keys(a).length;\n var bItems = array ? b : Object.keys(b);\n var bSize = bItems.length;\n var copy = array ? [] : {};\n var equalItems = 0;\n\n for (var i = 0; i < bSize; i++) {\n var key = array ? i : bItems[i];\n copy[key] = replaceEqualDeep(a[key], b[key]);\n\n if (copy[key] === a[key]) {\n equalItems++;\n }\n }\n\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n\n return b;\n}\n/**\n * Shallow compare objects. Only works with objects that always have the same properties.\n */\n\nfunction shallowEqualObjects(a, b) {\n if (a && !b || b && !a) {\n return false;\n }\n\n for (var key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n\n return true;\n} // Copied from: https://github.com/jonschlinkert/is-plain-object\n\nfunction isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n } // If has modified constructor\n\n\n var ctor = o.constructor;\n\n if (typeof ctor === 'undefined') {\n return true;\n } // If has modified prototype\n\n\n var prot = ctor.prototype;\n\n if (!hasObjectPrototype(prot)) {\n return false;\n } // If constructor does not have an Object-specific method\n\n\n if (!prot.hasOwnProperty('isPrototypeOf')) {\n return false;\n } // Most likely a plain Object\n\n\n return true;\n}\n\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isQueryKey(value) {\n return typeof value === 'string' || Array.isArray(value);\n}\nfunction isError(value) {\n return value instanceof Error;\n}\nfunction sleep(timeout) {\n return new Promise(function (resolve) {\n setTimeout(resolve, timeout);\n });\n}\n/**\n * Schedules a microtask.\n * This can be useful to schedule state updates after rendering.\n */\n\nfunction scheduleMicrotask(callback) {\n Promise.resolve().then(callback).catch(function (error) {\n return setTimeout(function () {\n throw error;\n });\n });\n}\nfunction getAbortController() {\n if (typeof AbortController === 'function') {\n return new AbortController();\n }\n}\n\n/***/ }),\n\n/***/ 8767:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Hydrate\": function() { return /* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Hydrate; },\n/* harmony export */ \"QueryClient\": function() { return /* reexport safe */ _core__WEBPACK_IMPORTED_MODULE_0__.QueryClient; },\n/* harmony export */ \"QueryClientProvider\": function() { return /* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.QueryClientProvider; },\n/* harmony export */ \"useMutation\": function() { return /* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useMutation; },\n/* harmony export */ \"useQuery\": function() { return /* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useQuery; }\n/* harmony export */ });\n/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6747);\n/* harmony reexport (checked) */ if(__webpack_require__.o(_core__WEBPACK_IMPORTED_MODULE_0__, \"Hydrate\")) __webpack_require__.d(__webpack_exports__, { \"Hydrate\": function() { return _core__WEBPACK_IMPORTED_MODULE_0__.Hydrate; } });\n/* harmony reexport (checked) */ if(__webpack_require__.o(_core__WEBPACK_IMPORTED_MODULE_0__, \"QueryClientProvider\")) __webpack_require__.d(__webpack_exports__, { \"QueryClientProvider\": function() { return _core__WEBPACK_IMPORTED_MODULE_0__.QueryClientProvider; } });\n/* harmony reexport (checked) */ if(__webpack_require__.o(_core__WEBPACK_IMPORTED_MODULE_0__, \"useMutation\")) __webpack_require__.d(__webpack_exports__, { \"useMutation\": function() { return _core__WEBPACK_IMPORTED_MODULE_0__.useMutation; } });\n/* harmony reexport (checked) */ if(__webpack_require__.o(_core__WEBPACK_IMPORTED_MODULE_0__, \"useQuery\")) __webpack_require__.d(__webpack_exports__, { \"useQuery\": function() { return _core__WEBPACK_IMPORTED_MODULE_0__.useQuery; } });\n/* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4830);\n\n\n\n/***/ }),\n\n/***/ 4830:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"Hydrate\": function() { return /* reexport */ Hydrate; },\n \"QueryClientProvider\": function() { return /* reexport */ QueryClientProvider; },\n \"useMutation\": function() { return /* reexport */ useMutation; },\n \"useQuery\": function() { return /* reexport */ useQuery; }\n});\n\n// UNUSED EXPORTS: QueryErrorResetBoundary, useHydrate, useInfiniteQuery, useIsFetching, useIsMutating, useQueries, useQueryClient, useQueryErrorResetBoundary\n\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/notifyManager.js\nvar notifyManager = __webpack_require__(101);\n// EXTERNAL MODULE: ./node_modules/react-dom/index.js\nvar react_dom = __webpack_require__(3935);\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/reactBatchedUpdates.js\n\nvar unstable_batchedUpdates = react_dom.unstable_batchedUpdates;\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/setBatchUpdatesFn.js\n\n\nnotifyManager/* notifyManager.setBatchNotifyFunction */.V.setBatchNotifyFunction(unstable_batchedUpdates);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/logger.js\nvar logger = __webpack_require__(1909);\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/logger.js\nvar logger_logger = console;\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/setLogger.js\n\n\n(0,logger/* setLogger */.E)(logger_logger);\n// EXTERNAL MODULE: ./node_modules/react/index.js\nvar react = __webpack_require__(7294);\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/QueryClientProvider.js\n\nvar defaultContext = /*#__PURE__*/react.createContext(undefined);\nvar QueryClientSharingContext = /*#__PURE__*/react.createContext(false); // if contextSharing is on, we share the first and at least one\n// instance of the context across the window\n// to ensure that if React Query is used across\n// different bundles or microfrontends they will\n// all use the same **instance** of context, regardless\n// of module scoping.\n\nfunction getQueryClientContext(contextSharing) {\n if (contextSharing && typeof window !== 'undefined') {\n if (!window.ReactQueryClientContext) {\n window.ReactQueryClientContext = defaultContext;\n }\n\n return window.ReactQueryClientContext;\n }\n\n return defaultContext;\n}\n\nvar useQueryClient = function useQueryClient() {\n var queryClient = react.useContext(getQueryClientContext(react.useContext(QueryClientSharingContext)));\n\n if (!queryClient) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one');\n }\n\n return queryClient;\n};\nvar QueryClientProvider = function QueryClientProvider(_ref) {\n var client = _ref.client,\n _ref$contextSharing = _ref.contextSharing,\n contextSharing = _ref$contextSharing === void 0 ? false : _ref$contextSharing,\n children = _ref.children;\n react.useEffect(function () {\n client.mount();\n return function () {\n client.unmount();\n };\n }, [client]);\n var Context = getQueryClientContext(contextSharing);\n return /*#__PURE__*/react.createElement(QueryClientSharingContext.Provider, {\n value: contextSharing\n }, /*#__PURE__*/react.createElement(Context.Provider, {\n value: client\n }, children));\n};\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js\nvar esm_extends = __webpack_require__(7462);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/utils.js\nvar utils = __webpack_require__(2288);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules\nvar inheritsLoose = __webpack_require__(5068);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/mutation.js\nvar mutation = __webpack_require__(1262);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/subscribable.js\nvar subscribable = __webpack_require__(2943);\n;// CONCATENATED MODULE: ./node_modules/react-query/es/core/mutationObserver.js\n\n\n\n\n\n// CLASS\nvar MutationObserver = /*#__PURE__*/function (_Subscribable) {\n (0,inheritsLoose/* default */.Z)(MutationObserver, _Subscribable);\n\n function MutationObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n\n _this.setOptions(options);\n\n _this.bindMethods();\n\n _this.updateResult();\n\n return _this;\n }\n\n var _proto = MutationObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n };\n\n _proto.setOptions = function setOptions(options) {\n this.options = this.client.defaultMutationOptions(options);\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n var _this$currentMutation;\n\n (_this$currentMutation = this.currentMutation) == null ? void 0 : _this$currentMutation.removeObserver(this);\n }\n };\n\n _proto.onMutationUpdate = function onMutationUpdate(action) {\n this.updateResult(); // Determine which callbacks to trigger\n\n var notifyOptions = {\n listeners: true\n };\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error') {\n notifyOptions.onError = true;\n }\n\n this.notify(notifyOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.reset = function reset() {\n this.currentMutation = undefined;\n this.updateResult();\n this.notify({\n listeners: true\n });\n };\n\n _proto.mutate = function mutate(variables, options) {\n this.mutateOptions = options;\n\n if (this.currentMutation) {\n this.currentMutation.removeObserver(this);\n }\n\n this.currentMutation = this.client.getMutationCache().build(this.client, (0,esm_extends/* default */.Z)({}, this.options, {\n variables: typeof variables !== 'undefined' ? variables : this.options.variables\n }));\n this.currentMutation.addObserver(this);\n return this.currentMutation.execute();\n };\n\n _proto.updateResult = function updateResult() {\n var state = this.currentMutation ? this.currentMutation.state : (0,mutation/* getDefaultState */.R)();\n\n var result = (0,esm_extends/* default */.Z)({}, state, {\n isLoading: state.status === 'loading',\n isSuccess: state.status === 'success',\n isError: state.status === 'error',\n isIdle: state.status === 'idle',\n mutate: this.mutate,\n reset: this.reset\n });\n\n this.currentResult = result;\n };\n\n _proto.notify = function notify(options) {\n var _this2 = this;\n\n notifyManager/* notifyManager.batch */.V.batch(function () {\n // First trigger the mutate callbacks\n if (_this2.mutateOptions) {\n if (options.onSuccess) {\n _this2.mutateOptions.onSuccess == null ? void 0 : _this2.mutateOptions.onSuccess(_this2.currentResult.data, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(_this2.currentResult.data, null, _this2.currentResult.variables, _this2.currentResult.context);\n } else if (options.onError) {\n _this2.mutateOptions.onError == null ? void 0 : _this2.mutateOptions.onError(_this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(undefined, _this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n }\n } // Then trigger the listeners\n\n\n if (options.listeners) {\n _this2.listeners.forEach(function (listener) {\n listener(_this2.currentResult);\n });\n }\n });\n };\n\n return MutationObserver;\n}(subscribable/* Subscribable */.l);\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/utils.js\nfunction shouldThrowError(suspense, _useErrorBoundary, params) {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary.apply(void 0, params);\n } // Allow useErrorBoundary to override suspense's throwing behavior\n\n\n if (typeof _useErrorBoundary === 'boolean') return _useErrorBoundary; // If suspense is enabled default to throwing errors\n\n return !!suspense;\n}\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/useMutation.js\n\n\n\n\n\n\n // HOOK\n\nfunction useMutation(arg1, arg2, arg3) {\n var mountedRef = react.useRef(false);\n\n var _React$useState = react.useState(0),\n forceUpdate = _React$useState[1];\n\n var options = (0,utils/* parseMutationArgs */.lV)(arg1, arg2, arg3);\n var queryClient = useQueryClient();\n var obsRef = react.useRef();\n\n if (!obsRef.current) {\n obsRef.current = new MutationObserver(queryClient, options);\n } else {\n obsRef.current.setOptions(options);\n }\n\n var currentResult = obsRef.current.getCurrentResult();\n react.useEffect(function () {\n mountedRef.current = true;\n var unsubscribe = obsRef.current.subscribe(notifyManager/* notifyManager.batchCalls */.V.batchCalls(function () {\n if (mountedRef.current) {\n forceUpdate(function (x) {\n return x + 1;\n });\n }\n }));\n return function () {\n mountedRef.current = false;\n unsubscribe();\n };\n }, []);\n var mutate = react.useCallback(function (variables, mutateOptions) {\n obsRef.current.mutate(variables, mutateOptions).catch(utils/* noop */.ZT);\n }, []);\n\n if (currentResult.error && shouldThrowError(undefined, obsRef.current.options.useErrorBoundary, [currentResult.error])) {\n throw currentResult.error;\n }\n\n return (0,esm_extends/* default */.Z)({}, currentResult, {\n mutate: mutate,\n mutateAsync: currentResult.mutate\n });\n}\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/focusManager.js\nvar focusManager = __webpack_require__(9852);\n// EXTERNAL MODULE: ./node_modules/react-query/es/core/retryer.js\nvar retryer = __webpack_require__(1216);\n;// CONCATENATED MODULE: ./node_modules/react-query/es/core/queryObserver.js\n\n\n\n\n\n\n\n\nvar QueryObserver = /*#__PURE__*/function (_Subscribable) {\n (0,inheritsLoose/* default */.Z)(QueryObserver, _Subscribable);\n\n function QueryObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n _this.options = options;\n _this.trackedProps = [];\n _this.selectError = null;\n\n _this.bindMethods();\n\n _this.setOptions(options);\n\n return _this;\n }\n\n var _proto = QueryObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.remove = this.remove.bind(this);\n this.refetch = this.refetch.bind(this);\n };\n\n _proto.onSubscribe = function onSubscribe() {\n if (this.listeners.length === 1) {\n this.currentQuery.addObserver(this);\n\n if (shouldFetchOnMount(this.currentQuery, this.options)) {\n this.executeFetch();\n }\n\n this.updateTimers();\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n this.destroy();\n }\n };\n\n _proto.shouldFetchOnReconnect = function shouldFetchOnReconnect() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnReconnect);\n };\n\n _proto.shouldFetchOnWindowFocus = function shouldFetchOnWindowFocus() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnWindowFocus);\n };\n\n _proto.destroy = function destroy() {\n this.listeners = [];\n this.clearTimers();\n this.currentQuery.removeObserver(this);\n };\n\n _proto.setOptions = function setOptions(options, notifyOptions) {\n var prevOptions = this.options;\n var prevQuery = this.currentQuery;\n this.options = this.client.defaultQueryObserverOptions(options);\n\n if (typeof this.options.enabled !== 'undefined' && typeof this.options.enabled !== 'boolean') {\n throw new Error('Expected enabled to be a boolean');\n } // Keep previous query key if the user does not supply one\n\n\n if (!this.options.queryKey) {\n this.options.queryKey = prevOptions.queryKey;\n }\n\n this.updateQuery();\n var mounted = this.hasListeners(); // Fetch if there are subscribers\n\n if (mounted && shouldFetchOptionally(this.currentQuery, prevQuery, this.options, prevOptions)) {\n this.executeFetch();\n } // Update result\n\n\n this.updateResult(notifyOptions); // Update stale interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {\n this.updateStaleTimeout();\n }\n\n var nextRefetchInterval = this.computeRefetchInterval(); // Update refetch interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.currentRefetchInterval)) {\n this.updateRefetchInterval(nextRefetchInterval);\n }\n };\n\n _proto.getOptimisticResult = function getOptimisticResult(options) {\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return this.createResult(query, defaultedOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.trackResult = function trackResult(result, defaultedOptions) {\n var _this2 = this;\n\n var trackedResult = {};\n\n var trackProp = function trackProp(key) {\n if (!_this2.trackedProps.includes(key)) {\n _this2.trackedProps.push(key);\n }\n };\n\n Object.keys(result).forEach(function (key) {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: function get() {\n trackProp(key);\n return result[key];\n }\n });\n });\n\n if (defaultedOptions.useErrorBoundary || defaultedOptions.suspense) {\n trackProp('error');\n }\n\n return trackedResult;\n };\n\n _proto.getNextResult = function getNextResult(options) {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n var unsubscribe = _this3.subscribe(function (result) {\n if (!result.isFetching) {\n unsubscribe();\n\n if (result.isError && (options == null ? void 0 : options.throwOnError)) {\n reject(result.error);\n } else {\n resolve(result);\n }\n }\n });\n });\n };\n\n _proto.getCurrentQuery = function getCurrentQuery() {\n return this.currentQuery;\n };\n\n _proto.remove = function remove() {\n this.client.getQueryCache().remove(this.currentQuery);\n };\n\n _proto.refetch = function refetch(options) {\n return this.fetch((0,esm_extends/* default */.Z)({}, options, {\n meta: {\n refetchPage: options == null ? void 0 : options.refetchPage\n }\n }));\n };\n\n _proto.fetchOptimistic = function fetchOptimistic(options) {\n var _this4 = this;\n\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return query.fetch().then(function () {\n return _this4.createResult(query, defaultedOptions);\n });\n };\n\n _proto.fetch = function fetch(fetchOptions) {\n var _this5 = this;\n\n return this.executeFetch(fetchOptions).then(function () {\n _this5.updateResult();\n\n return _this5.currentResult;\n });\n };\n\n _proto.executeFetch = function executeFetch(fetchOptions) {\n // Make sure we reference the latest query as the current one might have been removed\n this.updateQuery(); // Fetch\n\n var promise = this.currentQuery.fetch(this.options, fetchOptions);\n\n if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {\n promise = promise.catch(utils/* noop */.ZT);\n }\n\n return promise;\n };\n\n _proto.updateStaleTimeout = function updateStaleTimeout() {\n var _this6 = this;\n\n this.clearStaleTimeout();\n\n if (utils/* isServer */.sk || this.currentResult.isStale || !(0,utils/* isValidTimeout */.PN)(this.options.staleTime)) {\n return;\n }\n\n var time = (0,utils/* timeUntilStale */.Kp)(this.currentResult.dataUpdatedAt, this.options.staleTime); // The timeout is sometimes triggered 1 ms before the stale time expiration.\n // To mitigate this issue we always add 1 ms to the timeout.\n\n var timeout = time + 1;\n this.staleTimeoutId = setTimeout(function () {\n if (!_this6.currentResult.isStale) {\n _this6.updateResult();\n }\n }, timeout);\n };\n\n _proto.computeRefetchInterval = function computeRefetchInterval() {\n var _this$options$refetch;\n\n return typeof this.options.refetchInterval === 'function' ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (_this$options$refetch = this.options.refetchInterval) != null ? _this$options$refetch : false;\n };\n\n _proto.updateRefetchInterval = function updateRefetchInterval(nextInterval) {\n var _this7 = this;\n\n this.clearRefetchInterval();\n this.currentRefetchInterval = nextInterval;\n\n if (utils/* isServer */.sk || this.options.enabled === false || !(0,utils/* isValidTimeout */.PN)(this.currentRefetchInterval) || this.currentRefetchInterval === 0) {\n return;\n }\n\n this.refetchIntervalId = setInterval(function () {\n if (_this7.options.refetchIntervalInBackground || focusManager/* focusManager.isFocused */.j.isFocused()) {\n _this7.executeFetch();\n }\n }, this.currentRefetchInterval);\n };\n\n _proto.updateTimers = function updateTimers() {\n this.updateStaleTimeout();\n this.updateRefetchInterval(this.computeRefetchInterval());\n };\n\n _proto.clearTimers = function clearTimers() {\n this.clearStaleTimeout();\n this.clearRefetchInterval();\n };\n\n _proto.clearStaleTimeout = function clearStaleTimeout() {\n if (this.staleTimeoutId) {\n clearTimeout(this.staleTimeoutId);\n this.staleTimeoutId = undefined;\n }\n };\n\n _proto.clearRefetchInterval = function clearRefetchInterval() {\n if (this.refetchIntervalId) {\n clearInterval(this.refetchIntervalId);\n this.refetchIntervalId = undefined;\n }\n };\n\n _proto.createResult = function createResult(query, options) {\n var prevQuery = this.currentQuery;\n var prevOptions = this.options;\n var prevResult = this.currentResult;\n var prevResultState = this.currentResultState;\n var prevResultOptions = this.currentResultOptions;\n var queryChange = query !== prevQuery;\n var queryInitialState = queryChange ? query.state : this.currentQueryInitialState;\n var prevQueryResult = queryChange ? this.currentResult : this.previousQueryResult;\n var state = query.state;\n var dataUpdatedAt = state.dataUpdatedAt,\n error = state.error,\n errorUpdatedAt = state.errorUpdatedAt,\n isFetching = state.isFetching,\n status = state.status;\n var isPreviousData = false;\n var isPlaceholderData = false;\n var data; // Optimistically set result in fetching state if needed\n\n if (options.optimisticResults) {\n var mounted = this.hasListeners();\n var fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n var fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\n if (fetchOnMount || fetchOptionally) {\n isFetching = true;\n\n if (!dataUpdatedAt) {\n status = 'loading';\n }\n }\n } // Keep previous data if needed\n\n\n if (options.keepPreviousData && !state.dataUpdateCount && (prevQueryResult == null ? void 0 : prevQueryResult.isSuccess) && status !== 'error') {\n data = prevQueryResult.data;\n dataUpdatedAt = prevQueryResult.dataUpdatedAt;\n status = prevQueryResult.status;\n isPreviousData = true;\n } // Select data if needed\n else if (options.select && typeof state.data !== 'undefined') {\n // Memoize select result\n if (prevResult && state.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === this.selectFn) {\n data = this.selectResult;\n } else {\n try {\n this.selectFn = options.select;\n data = options.select(state.data);\n\n if (options.structuralSharing !== false) {\n data = (0,utils/* replaceEqualDeep */.Q$)(prevResult == null ? void 0 : prevResult.data, data);\n }\n\n this.selectResult = data;\n this.selectError = null;\n } catch (selectError) {\n (0,logger/* getLogger */.j)().error(selectError);\n this.selectError = selectError;\n }\n }\n } // Use query data\n else {\n data = state.data;\n } // Show placeholder data if needed\n\n\n if (typeof options.placeholderData !== 'undefined' && typeof data === 'undefined' && (status === 'loading' || status === 'idle')) {\n var placeholderData; // Memoize placeholder data\n\n if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === 'function' ? options.placeholderData() : options.placeholderData;\n\n if (options.select && typeof placeholderData !== 'undefined') {\n try {\n placeholderData = options.select(placeholderData);\n\n if (options.structuralSharing !== false) {\n placeholderData = (0,utils/* replaceEqualDeep */.Q$)(prevResult == null ? void 0 : prevResult.data, placeholderData);\n }\n\n this.selectError = null;\n } catch (selectError) {\n (0,logger/* getLogger */.j)().error(selectError);\n this.selectError = selectError;\n }\n }\n }\n\n if (typeof placeholderData !== 'undefined') {\n status = 'success';\n data = placeholderData;\n isPlaceholderData = true;\n }\n }\n\n if (this.selectError) {\n error = this.selectError;\n data = this.selectResult;\n errorUpdatedAt = Date.now();\n status = 'error';\n }\n\n var result = {\n status: status,\n isLoading: status === 'loading',\n isSuccess: status === 'success',\n isError: status === 'error',\n isIdle: status === 'idle',\n data: data,\n dataUpdatedAt: dataUpdatedAt,\n error: error,\n errorUpdatedAt: errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n errorUpdateCount: state.errorUpdateCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching: isFetching,\n isRefetching: isFetching && status !== 'loading',\n isLoadingError: status === 'error' && state.dataUpdatedAt === 0,\n isPlaceholderData: isPlaceholderData,\n isPreviousData: isPreviousData,\n isRefetchError: status === 'error' && state.dataUpdatedAt !== 0,\n isStale: isStale(query, options),\n refetch: this.refetch,\n remove: this.remove\n };\n return result;\n };\n\n _proto.shouldNotifyListeners = function shouldNotifyListeners(result, prevResult) {\n if (!prevResult) {\n return true;\n }\n\n var _this$options = this.options,\n notifyOnChangeProps = _this$options.notifyOnChangeProps,\n notifyOnChangePropsExclusions = _this$options.notifyOnChangePropsExclusions;\n\n if (!notifyOnChangeProps && !notifyOnChangePropsExclusions) {\n return true;\n }\n\n if (notifyOnChangeProps === 'tracked' && !this.trackedProps.length) {\n return true;\n }\n\n var includedProps = notifyOnChangeProps === 'tracked' ? this.trackedProps : notifyOnChangeProps;\n return Object.keys(result).some(function (key) {\n var typedKey = key;\n var changed = result[typedKey] !== prevResult[typedKey];\n var isIncluded = includedProps == null ? void 0 : includedProps.some(function (x) {\n return x === key;\n });\n var isExcluded = notifyOnChangePropsExclusions == null ? void 0 : notifyOnChangePropsExclusions.some(function (x) {\n return x === key;\n });\n return changed && !isExcluded && (!includedProps || isIncluded);\n });\n };\n\n _proto.updateResult = function updateResult(notifyOptions) {\n var prevResult = this.currentResult;\n this.currentResult = this.createResult(this.currentQuery, this.options);\n this.currentResultState = this.currentQuery.state;\n this.currentResultOptions = this.options; // Only notify if something has changed\n\n if ((0,utils/* shallowEqualObjects */.VS)(this.currentResult, prevResult)) {\n return;\n } // Determine which callbacks to trigger\n\n\n var defaultNotifyOptions = {\n cache: true\n };\n\n if ((notifyOptions == null ? void 0 : notifyOptions.listeners) !== false && this.shouldNotifyListeners(this.currentResult, prevResult)) {\n defaultNotifyOptions.listeners = true;\n }\n\n this.notify((0,esm_extends/* default */.Z)({}, defaultNotifyOptions, notifyOptions));\n };\n\n _proto.updateQuery = function updateQuery() {\n var query = this.client.getQueryCache().build(this.client, this.options);\n\n if (query === this.currentQuery) {\n return;\n }\n\n var prevQuery = this.currentQuery;\n this.currentQuery = query;\n this.currentQueryInitialState = query.state;\n this.previousQueryResult = this.currentResult;\n\n if (this.hasListeners()) {\n prevQuery == null ? void 0 : prevQuery.removeObserver(this);\n query.addObserver(this);\n }\n };\n\n _proto.onQueryUpdate = function onQueryUpdate(action) {\n var notifyOptions = {};\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error' && !(0,retryer/* isCancelledError */.DV)(action.error)) {\n notifyOptions.onError = true;\n }\n\n this.updateResult(notifyOptions);\n\n if (this.hasListeners()) {\n this.updateTimers();\n }\n };\n\n _proto.notify = function notify(notifyOptions) {\n var _this8 = this;\n\n notifyManager/* notifyManager.batch */.V.batch(function () {\n // First trigger the configuration callbacks\n if (notifyOptions.onSuccess) {\n _this8.options.onSuccess == null ? void 0 : _this8.options.onSuccess(_this8.currentResult.data);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(_this8.currentResult.data, null);\n } else if (notifyOptions.onError) {\n _this8.options.onError == null ? void 0 : _this8.options.onError(_this8.currentResult.error);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(undefined, _this8.currentResult.error);\n } // Then trigger the listeners\n\n\n if (notifyOptions.listeners) {\n _this8.listeners.forEach(function (listener) {\n listener(_this8.currentResult);\n });\n } // Then the cache listeners\n\n\n if (notifyOptions.cache) {\n _this8.client.getQueryCache().notify({\n query: _this8.currentQuery,\n type: 'observerResultsUpdated'\n });\n }\n });\n };\n\n return QueryObserver;\n}(subscribable/* Subscribable */.l);\n\nfunction shouldLoadOnMount(query, options) {\n return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === 'error' && options.retryOnMount === false);\n}\n\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\n\nfunction shouldFetchOn(query, options, field) {\n if (options.enabled !== false) {\n var value = typeof field === 'function' ? field(query) : field;\n return value === 'always' || value !== false && isStale(query, options);\n }\n\n return false;\n}\n\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== 'error') && isStale(query, options);\n}\n\nfunction isStale(query, options) {\n return query.isStaleByTime(options.staleTime);\n}\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/QueryErrorResetBoundary.js\n // CONTEXT\n\nfunction createValue() {\n var _isReset = false;\n return {\n clearReset: function clearReset() {\n _isReset = false;\n },\n reset: function reset() {\n _isReset = true;\n },\n isReset: function isReset() {\n return _isReset;\n }\n };\n}\n\nvar QueryErrorResetBoundaryContext = /*#__PURE__*/react.createContext(createValue()); // HOOK\n\nvar useQueryErrorResetBoundary = function useQueryErrorResetBoundary() {\n return react.useContext(QueryErrorResetBoundaryContext);\n}; // COMPONENT\n\nvar QueryErrorResetBoundary = function QueryErrorResetBoundary(_ref) {\n var children = _ref.children;\n var value = React.useMemo(function () {\n return createValue();\n }, []);\n return /*#__PURE__*/React.createElement(QueryErrorResetBoundaryContext.Provider, {\n value: value\n }, typeof children === 'function' ? children(value) : children);\n};\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/useBaseQuery.js\n\n\n\n\n\nfunction useBaseQuery(options, Observer) {\n var mountedRef = react.useRef(false);\n\n var _React$useState = react.useState(0),\n forceUpdate = _React$useState[1];\n\n var queryClient = useQueryClient();\n var errorResetBoundary = useQueryErrorResetBoundary();\n var defaultedOptions = queryClient.defaultQueryObserverOptions(options); // Make sure results are optimistically set in fetching state before subscribing or updating options\n\n defaultedOptions.optimisticResults = true; // Include callbacks in batch renders\n\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager/* notifyManager.batchCalls */.V.batchCalls(defaultedOptions.onError);\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager/* notifyManager.batchCalls */.V.batchCalls(defaultedOptions.onSuccess);\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager/* notifyManager.batchCalls */.V.batchCalls(defaultedOptions.onSettled);\n }\n\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000;\n } // Set cache time to 1 if the option has been set to 0\n // when using suspense to prevent infinite loop of fetches\n\n\n if (defaultedOptions.cacheTime === 0) {\n defaultedOptions.cacheTime = 1;\n }\n }\n\n if (defaultedOptions.suspense || defaultedOptions.useErrorBoundary) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n defaultedOptions.retryOnMount = false;\n }\n }\n\n var _React$useState2 = react.useState(function () {\n return new Observer(queryClient, defaultedOptions);\n }),\n observer = _React$useState2[0];\n\n var result = observer.getOptimisticResult(defaultedOptions);\n react.useEffect(function () {\n mountedRef.current = true;\n errorResetBoundary.clearReset();\n var unsubscribe = observer.subscribe(notifyManager/* notifyManager.batchCalls */.V.batchCalls(function () {\n if (mountedRef.current) {\n forceUpdate(function (x) {\n return x + 1;\n });\n }\n })); // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n\n observer.updateResult();\n return function () {\n mountedRef.current = false;\n unsubscribe();\n };\n }, [errorResetBoundary, observer]);\n react.useEffect(function () {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, {\n listeners: false\n });\n }, [defaultedOptions, observer]); // Handle suspense\n\n if (defaultedOptions.suspense && result.isLoading) {\n throw observer.fetchOptimistic(defaultedOptions).then(function (_ref) {\n var data = _ref.data;\n defaultedOptions.onSuccess == null ? void 0 : defaultedOptions.onSuccess(data);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(data, null);\n }).catch(function (error) {\n errorResetBoundary.clearReset();\n defaultedOptions.onError == null ? void 0 : defaultedOptions.onError(error);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(undefined, error);\n });\n } // Handle error boundary\n\n\n if (result.isError && !errorResetBoundary.isReset() && !result.isFetching && shouldThrowError(defaultedOptions.suspense, defaultedOptions.useErrorBoundary, [result.error, observer.getCurrentQuery()])) {\n throw result.error;\n } // Handle result property usage tracking\n\n\n if (defaultedOptions.notifyOnChangeProps === 'tracked') {\n result = observer.trackResult(result, defaultedOptions);\n }\n\n return result;\n}\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/useQuery.js\n\n\n // HOOK\n\nfunction useQuery(arg1, arg2, arg3) {\n var parsedOptions = (0,utils/* parseQueryArgs */._v)(arg1, arg2, arg3);\n return useBaseQuery(parsedOptions, QueryObserver);\n}\n;// CONCATENATED MODULE: ./node_modules/react-query/es/core/hydration.js\n\n\n// TYPES\n// FUNCTIONS\nfunction dehydrateMutation(mutation) {\n return {\n mutationKey: mutation.options.mutationKey,\n state: mutation.state\n };\n} // Most config is not dehydrated but instead meant to configure again when\n// consuming the de/rehydrated data, typically with useQuery on the client.\n// Sometimes it might make sense to prefetch data on the server and include\n// in the html-payload, but not consume it on the initial render.\n\n\nfunction dehydrateQuery(query) {\n return {\n state: query.state,\n queryKey: query.queryKey,\n queryHash: query.queryHash\n };\n}\n\nfunction defaultShouldDehydrateMutation(mutation) {\n return mutation.state.isPaused;\n}\n\nfunction defaultShouldDehydrateQuery(query) {\n return query.state.status === 'success';\n}\n\nfunction dehydrate(client, options) {\n var _options, _options2;\n\n options = options || {};\n var mutations = [];\n var queries = [];\n\n if (((_options = options) == null ? void 0 : _options.dehydrateMutations) !== false) {\n var shouldDehydrateMutation = options.shouldDehydrateMutation || defaultShouldDehydrateMutation;\n client.getMutationCache().getAll().forEach(function (mutation) {\n if (shouldDehydrateMutation(mutation)) {\n mutations.push(dehydrateMutation(mutation));\n }\n });\n }\n\n if (((_options2 = options) == null ? void 0 : _options2.dehydrateQueries) !== false) {\n var shouldDehydrateQuery = options.shouldDehydrateQuery || defaultShouldDehydrateQuery;\n client.getQueryCache().getAll().forEach(function (query) {\n if (shouldDehydrateQuery(query)) {\n queries.push(dehydrateQuery(query));\n }\n });\n }\n\n return {\n mutations: mutations,\n queries: queries\n };\n}\nfunction hydrate(client, dehydratedState, options) {\n if (typeof dehydratedState !== 'object' || dehydratedState === null) {\n return;\n }\n\n var mutationCache = client.getMutationCache();\n var queryCache = client.getQueryCache();\n var mutations = dehydratedState.mutations || [];\n var queries = dehydratedState.queries || [];\n mutations.forEach(function (dehydratedMutation) {\n var _options$defaultOptio;\n\n mutationCache.build(client, (0,esm_extends/* default */.Z)({}, options == null ? void 0 : (_options$defaultOptio = options.defaultOptions) == null ? void 0 : _options$defaultOptio.mutations, {\n mutationKey: dehydratedMutation.mutationKey\n }), dehydratedMutation.state);\n });\n queries.forEach(function (dehydratedQuery) {\n var _options$defaultOptio2;\n\n var query = queryCache.get(dehydratedQuery.queryHash); // Do not hydrate if an existing query exists with newer data\n\n if (query) {\n if (query.state.dataUpdatedAt < dehydratedQuery.state.dataUpdatedAt) {\n query.setState(dehydratedQuery.state);\n }\n\n return;\n } // Restore query\n\n\n queryCache.build(client, (0,esm_extends/* default */.Z)({}, options == null ? void 0 : (_options$defaultOptio2 = options.defaultOptions) == null ? void 0 : _options$defaultOptio2.queries, {\n queryKey: dehydratedQuery.queryKey,\n queryHash: dehydratedQuery.queryHash\n }), dehydratedQuery.state);\n });\n}\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/Hydrate.js\n\n\n\nfunction useHydrate(state, options) {\n var queryClient = useQueryClient();\n var optionsRef = react.useRef(options);\n optionsRef.current = options; // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n\n react.useMemo(function () {\n if (state) {\n hydrate(queryClient, state, optionsRef.current);\n }\n }, [queryClient, state]);\n}\nvar Hydrate = function Hydrate(_ref) {\n var children = _ref.children,\n options = _ref.options,\n state = _ref.state;\n useHydrate(state, options);\n return children;\n};\n;// CONCATENATED MODULE: ./node_modules/react-query/es/react/index.js\n// Side effects\n\n\n\n\n\n\n\n\n\n\n // Types\n\n\n\n/***/ }),\n\n/***/ 4790:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif (true) {\n module.exports = EventEmitter;\n}\n\n\n/***/ }),\n\n/***/ 9509:\n/***/ (function(module, exports, __webpack_require__) {\n\n/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = __webpack_require__(8764)\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n\n\n/***/ }),\n\n/***/ 7771:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar GetIntrinsic = __webpack_require__(210);\nvar define = __webpack_require__(2296);\nvar hasDescriptors = __webpack_require__(1044)();\nvar gOPD = __webpack_require__(7296);\n\nvar $TypeError = __webpack_require__(4453);\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @type {import('.')} */\nmodule.exports = function setFunctionLength(fn, length) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tif (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n\t\tthrow new $TypeError('`length` must be a positive 32-bit integer');\n\t}\n\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\n\tvar functionLengthIsConfigurable = true;\n\tvar functionLengthIsWritable = true;\n\tif ('length' in fn && gOPD) {\n\t\tvar desc = gOPD(fn, 'length');\n\t\tif (desc && !desc.configurable) {\n\t\t\tfunctionLengthIsConfigurable = false;\n\t\t}\n\t\tif (desc && !desc.writable) {\n\t\t\tfunctionLengthIsWritable = false;\n\t\t}\n\t}\n\n\tif (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length, true, true);\n\t\t} else {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length);\n\t\t}\n\t}\n\treturn fn;\n};\n\n\n/***/ }),\n\n/***/ 6018:\n/***/ (function(module) {\n\n\"use strict\";\n\n\nvar isProduction = \"production\" === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\n\nmodule.exports = invariant;\n\n\n/***/ }),\n\n/***/ 384:\n/***/ (function(module) {\n\nmodule.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}\n\n/***/ }),\n\n/***/ 5955:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n\n\nvar isArgumentsObject = __webpack_require__(2584);\nvar isGeneratorFunction = __webpack_require__(8662);\nvar whichTypedArray = __webpack_require__(6430);\nvar isTypedArray = __webpack_require__(5692);\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\n// Store a copy of SharedArrayBuffer in case it's deleted elsewhere\nvar SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === 'undefined') {\n return false;\n }\n\n if (typeof isSharedArrayBufferToString.working === 'undefined') {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBufferCopy;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n\n\n/***/ }),\n\n/***/ 9539:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n/* provided dependency */ var process = __webpack_require__(4155);\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').slice(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, -1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = __webpack_require__(5955);\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = __webpack_require__(384);\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = __webpack_require__(5717);\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n\n\n/***/ }),\n\n/***/ 4880:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"v4\": function() { return /* reexport */ esm_browser_v4; }\n});\n\n// UNUSED EXPORTS: NIL, parse, stringify, v1, v3, v5, validate, version\n\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nfunction rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/regex.js\n/* harmony default export */ var regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i);\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/validate.js\n\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && regex.test(uuid);\n}\n\n/* harmony default export */ var esm_browser_validate = (validate);\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/stringify.js\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!esm_browser_validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\n/* harmony default export */ var esm_browser_stringify = (stringify);\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/v4.js\n\n\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return esm_browser_stringify(rnds);\n}\n\n/* harmony default export */ var esm_browser_v4 = (v4);\n;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/index.js\n\n\n\n\n\n\n\n\n\n\n/***/ }),\n\n/***/ 6430:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar forEach = __webpack_require__(4029);\nvar availableTypedArrays = __webpack_require__(3083);\nvar callBind = __webpack_require__(5559);\nvar callBound = __webpack_require__(1924);\nvar gOPD = __webpack_require__(7296);\n\n/** @type {(O: object) => string} */\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = __webpack_require__(6410)();\n\nvar g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\n\n/** @type {(array: readonly T[], value: unknown) => number} */\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n/** @typedef {(receiver: import('.').TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call} Getter */\n/** @type {{ [k in `\\$${import('.').TypedArrayName}`]?: Getter } & { __proto__: null }} */\nvar cache = { __proto__: null };\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr) {\n\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor) {\n\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(descriptor.get);\n\t\t}\n\t});\n} else {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tvar fn = arr.slice || arr.set;\n\t\tif (fn) {\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(fn);\n\t\t}\n\t});\n}\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\t/** @type {ReturnType} */ var found = false;\n\tforEach(\n\t\t// eslint-disable-next-line no-extra-parens\n\t\t/** @type {Record<`\\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache),\n\t\t/** @type {(getter: Getter, name: `\\$${import('.').TypedArrayName}`) => void} */\n\t\tfunction (getter, typedArray) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t// @ts-expect-error TODO: fix\n\t\t\t\t\tif ('$' + getter(value) === typedArray) {\n\t\t\t\t\t\tfound = $slice(typedArray, 1);\n\t\t\t\t\t}\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar trySlices = function tryAllSlices(value) {\n\t/** @type {ReturnType} */ var found = false;\n\tforEach(\n\t\t// eslint-disable-next-line no-extra-parens\n\t\t/** @type {Record<`\\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache),\n\t\t/** @type {(getter: typeof cache, name: `\\$${import('.').TypedArrayName}`) => void} */ function (getter, name) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t\t// @ts-expect-error TODO: fix\n\t\t\t\t\tgetter(value);\n\t\t\t\t\tfound = $slice(name, 1);\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {import('.')} */\nmodule.exports = function whichTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\t/** @type {string} */\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\tif ($indexOf(typedArrays, tag) > -1) {\n\t\t\treturn tag;\n\t\t}\n\t\tif (tag !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\t// node < 0.6 hits here on real Typed Arrays\n\t\treturn trySlices(value);\n\t}\n\tif (!gOPD) { return null; } // unknown engine\n\treturn tryTypedArrays(value);\n};\n\n\n/***/ }),\n\n/***/ 6793:\n/***/ (function() {\n\n/* (ignored) */\n\n/***/ }),\n\n/***/ 6601:\n/***/ (function() {\n\n/* (ignored) */\n\n/***/ }),\n\n/***/ 4836:\n/***/ (function(module) {\n\nfunction _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ 6578:\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.encodeDecode = void 0;\nconst encodeDecode = (layout) => {\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n return { decode, encode };\n};\nexports.encodeDecode = encodeDecode;\n//# sourceMappingURL=base.js.map\n\n/***/ }),\n\n/***/ 802:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* provided dependency */ var Buffer = __webpack_require__(8764)[\"Buffer\"];\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.u256be = exports.u256 = exports.u192be = exports.u192 = exports.u128be = exports.u128 = exports.u64be = exports.u64 = exports.bigIntBE = exports.bigInt = void 0;\nconst buffer_layout_1 = __webpack_require__(9386);\nconst bigint_buffer_1 = __webpack_require__(475);\nconst base_1 = __webpack_require__(6578);\nconst bigInt = (length) => (property) => {\n const layout = (0, buffer_layout_1.blob)(length, property);\n const { encode, decode } = (0, base_1.encodeDecode)(layout);\n const bigIntLayout = layout;\n bigIntLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset);\n return (0, bigint_buffer_1.toBigIntLE)(Buffer.from(src));\n };\n bigIntLayout.encode = (bigInt, buffer, offset) => {\n const src = (0, bigint_buffer_1.toBufferLE)(bigInt, length);\n return encode(src, buffer, offset);\n };\n return bigIntLayout;\n};\nexports.bigInt = bigInt;\nconst bigIntBE = (length) => (property) => {\n const layout = (0, buffer_layout_1.blob)(length, property);\n const { encode, decode } = (0, base_1.encodeDecode)(layout);\n const bigIntLayout = layout;\n bigIntLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset);\n return (0, bigint_buffer_1.toBigIntBE)(Buffer.from(src));\n };\n bigIntLayout.encode = (bigInt, buffer, offset) => {\n const src = (0, bigint_buffer_1.toBufferBE)(bigInt, length);\n return encode(src, buffer, offset);\n };\n return bigIntLayout;\n};\nexports.bigIntBE = bigIntBE;\nexports.u64 = (0, exports.bigInt)(8);\nexports.u64be = (0, exports.bigIntBE)(8);\nexports.u128 = (0, exports.bigInt)(16);\nexports.u128be = (0, exports.bigIntBE)(16);\nexports.u192 = (0, exports.bigInt)(24);\nexports.u192be = (0, exports.bigIntBE)(24);\nexports.u256 = (0, exports.bigInt)(32);\nexports.u256be = (0, exports.bigIntBE)(32);\n//# sourceMappingURL=bigint.js.map\n\n/***/ }),\n\n/***/ 4195:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.decimal = exports.WAD = void 0;\nconst bignumber_js_1 = __importDefault(__webpack_require__(4431));\nconst base_1 = __webpack_require__(6578);\nconst bigint_1 = __webpack_require__(802);\nexports.WAD = new bignumber_js_1.default('1e+18');\nconst decimal = (property) => {\n const layout = (0, bigint_1.u128)(property);\n const { encode, decode } = (0, base_1.encodeDecode)(layout);\n const decimalLayout = layout;\n decimalLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset).toString();\n return new bignumber_js_1.default(src).div(exports.WAD);\n };\n decimalLayout.encode = (decimal, buffer, offset) => {\n const src = BigInt(decimal.times(exports.WAD).integerValue().toString());\n return encode(src, buffer, offset);\n };\n return decimalLayout;\n};\nexports.decimal = decimal;\n//# sourceMappingURL=decimal.js.map\n\n/***/ }),\n\n/***/ 7278:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(6578), exports);\n__exportStar(__webpack_require__(802), exports);\n__exportStar(__webpack_require__(4195), exports);\n__exportStar(__webpack_require__(8670), exports);\n__exportStar(__webpack_require__(2885), exports);\n//# sourceMappingURL=index.js.map\n\n/***/ }),\n\n/***/ 8670:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.bool = void 0;\nconst buffer_layout_1 = __webpack_require__(9386);\nconst base_1 = __webpack_require__(6578);\nconst bool = (property) => {\n const layout = (0, buffer_layout_1.u8)(property);\n const { encode, decode } = (0, base_1.encodeDecode)(layout);\n const boolLayout = layout;\n boolLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset);\n return !!src;\n };\n boolLayout.encode = (bool, buffer, offset) => {\n const src = Number(bool);\n return encode(src, buffer, offset);\n };\n return boolLayout;\n};\nexports.bool = bool;\n//# sourceMappingURL=native.js.map\n\n/***/ }),\n\n/***/ 2885:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.publicKey = void 0;\nconst buffer_layout_1 = __webpack_require__(9386);\nconst web3_js_1 = __webpack_require__(6737);\nconst base_1 = __webpack_require__(6578);\nconst publicKey = (property) => {\n const layout = (0, buffer_layout_1.blob)(32, property);\n const { encode, decode } = (0, base_1.encodeDecode)(layout);\n const publicKeyLayout = layout;\n publicKeyLayout.decode = (buffer, offset) => {\n const src = decode(buffer, offset);\n return new web3_js_1.PublicKey(src);\n };\n publicKeyLayout.encode = (publicKey, buffer, offset) => {\n const src = publicKey.toBuffer();\n return encode(src, buffer, offset);\n };\n return publicKeyLayout;\n};\nexports.publicKey = publicKey;\n//# sourceMappingURL=web3.js.map\n\n/***/ }),\n\n/***/ 3083:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar possibleNames = __webpack_require__(9908);\n\nvar g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis;\n\n/** @type {import('.')} */\nmodule.exports = function availableTypedArrays() {\n\tvar /** @type {ReturnType} */ out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\t// @ts-expect-error\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n\n\n/***/ }),\n\n/***/ 7462:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Z\": function() { return /* binding */ _extends; }\n/* harmony export */ });\nfunction _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\n\n\n/***/ }),\n\n/***/ 5068:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"Z\": function() { return /* binding */ _inheritsLoose; }\n});\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\n\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);\n}\n\n\n/***/ }),\n\n/***/ 3366:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Z\": function() { return /* binding */ _objectWithoutPropertiesLoose; }\n/* harmony export */ });\nfunction _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.indexOf(n) >= 0) continue;\n t[n] = r[n];\n }\n return t;\n}\n\n\n/***/ }),\n\n/***/ 3527:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Gg\": function() { return /* binding */ exists; },\n/* harmony export */ \"J8\": function() { return /* binding */ output; },\n/* harmony export */ \"Rx\": function() { return /* binding */ number; },\n/* harmony export */ \"aI\": function() { return /* binding */ bytes; },\n/* harmony export */ \"vp\": function() { return /* binding */ hash; }\n/* harmony export */ });\n/* unused harmony exports isBytes, bool */\nfunction number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`positive integer expected, not ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`boolean expected, not ${b}`);\n}\n// copied from utils\nfunction isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nfunction bytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(h) {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(h.outputLen);\n number(h.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\n\nconst assert = { number, bool, bytes, hash, exists, output };\n/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (assert)));\n//# sourceMappingURL=_assert.js.map\n\n/***/ }),\n\n/***/ 4359:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"VR\": function() { return /* binding */ HashMD; },\n/* harmony export */ \"bc\": function() { return /* binding */ Chi; },\n/* harmony export */ \"l3\": function() { return /* binding */ Maj; }\n/* harmony export */ });\n/* harmony import */ var _assert_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3527);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6409);\n\n\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n */\nclass HashMD extends _utils_js__WEBPACK_IMPORTED_MODULE_0__/* .Hash */ .kb {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__/* .createView */ .GL)(this.buffer);\n }\n update(data) {\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_1__/* .exists */ .Gg)(this);\n const { view, buffer, blockLen } = this;\n data = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__/* .toBytes */ .O0)(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__/* .createView */ .GL)(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_1__/* .exists */ .Gg)(this);\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_1__/* .output */ .J8)(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in\n // current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__/* .createView */ .GL)(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_md.js.map\n\n/***/ }),\n\n/***/ 7748:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"J\": function() { return /* binding */ sha256; }\n/* harmony export */ });\n/* unused harmony export sha224 */\n/* harmony import */ var _md_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4359);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6409);\n\n\n// SHA2-256 need to try 2^128 hashes to execute birthday attack.\n// BTC network is doing 2^67 hashes/sec as per early 2023.\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state:\n// first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19\n// prettier-ignore\nconst SHA256_IV = /* @__PURE__ */ new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nclass SHA256 extends _md_js__WEBPACK_IMPORTED_MODULE_0__/* .HashMD */ .VR {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .rotr */ .np)(W15, 7) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .rotr */ .np)(W15, 18) ^ (W15 >>> 3);\n const s1 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .rotr */ .np)(W2, 17) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .rotr */ .np)(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .rotr */ .np)(E, 6) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .rotr */ .np)(E, 11) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .rotr */ .np)(E, 25);\n const T1 = (H + sigma1 + (0,_md_js__WEBPACK_IMPORTED_MODULE_0__/* .Chi */ .bc)(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .rotr */ .np)(A, 2) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .rotr */ .np)(A, 13) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .rotr */ .np)(A, 22);\n const T2 = (sigma0 + (0,_md_js__WEBPACK_IMPORTED_MODULE_0__/* .Maj */ .l3)(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends (/* unused pure expression or super */ null && (SHA256)) {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nconst sha256 = /* @__PURE__ */ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__/* .wrapConstructor */ .hE)(() => new SHA256());\nconst sha224 = /* @__PURE__ */ (/* unused pure expression or super */ null && (wrapConstructor(() => new SHA224())));\n//# sourceMappingURL=sha256.js.map\n\n/***/ }),\n\n/***/ 6409:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"kb\": function() { return /* binding */ Hash; },\n \"l1\": function() { return /* binding */ byteSwap32; },\n \"eV\": function() { return /* binding */ concatBytes; },\n \"GL\": function() { return /* binding */ createView; },\n \"iA\": function() { return /* binding */ isLE; },\n \"O6\": function() { return /* binding */ randomBytes; },\n \"np\": function() { return /* binding */ rotr; },\n \"O0\": function() { return /* binding */ toBytes; },\n \"Jq\": function() { return /* binding */ u32; },\n \"hE\": function() { return /* binding */ wrapConstructor; }\n});\n\n// UNUSED EXPORTS: asyncLoop, byteSwap, byteSwapIfBE, bytesToHex, checkOpts, hexToBytes, isBytes, nextTick, rotl, u8, utf8ToBytes, wrapConstructorWithOpts, wrapXOFConstructorWithOpts\n\n;// CONCATENATED MODULE: ./node_modules/@noble/hashes/esm/crypto.js\nconst crypto_crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map\n// EXTERNAL MODULE: ./node_modules/@noble/hashes/esm/_assert.js\nvar _assert = __webpack_require__(3527);\n;// CONCATENATED MODULE: ./node_modules/@noble/hashes/esm/utils.js\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\n\n\n// export { isBytes } from './_assert.js';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nfunction isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\n// Cast array to different type\nconst u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nconst u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nconst createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nconst rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// The rotate left (circular left shift) operation for uint32\nconst rotl = (word, shift) => (word << shift) | ((word >>> (32 - shift)) >>> 0);\nconst isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\n// The byte swap operation for uint32\nconst byteSwap = (word) => ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff);\n// Conditionally byte swap if on a big-endian platform\nconst byteSwapIfBE = (/* unused pure expression or super */ null && (isLE ? (n) => n : (n) => byteSwap(n)));\n// In place byte swap for Uint32Array\nfunction byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nfunction bytesToHex(bytes) {\n abytes(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nfunction hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nconst nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nasync function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nfunction utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nfunction toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n (0,_assert/* bytes */.aI)(data);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nfunction concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n (0,_assert/* bytes */.aI)(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// For runtime check if class implements interface\nclass Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nfunction checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nfunction wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nfunction wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nfunction wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nfunction randomBytes(bytesLength = 32) {\n if (crypto_crypto && typeof crypto_crypto.getRandomValues === 'function') {\n return crypto_crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map\n\n/***/ }),\n\n/***/ 3495:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"g\": function() { return /* binding */ WalletModalContext; },\n/* harmony export */ \"h\": function() { return /* binding */ useWalletModal; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294);\n\nconst DEFAULT_CONTEXT = {\n setVisible(_open) {\n console.error(constructMissingProviderErrorMessage('call', 'setVisible'));\n },\n visible: false,\n};\nObject.defineProperty(DEFAULT_CONTEXT, 'visible', {\n get() {\n console.error(constructMissingProviderErrorMessage('read', 'visible'));\n return false;\n },\n});\nfunction constructMissingProviderErrorMessage(action, valueName) {\n return ('You have tried to ' +\n ` ${action} \"${valueName}\"` +\n ' on a WalletModalContext without providing one.' +\n ' Make sure to render a WalletModalProvider' +\n ' as an ancestor of the component that uses ' +\n 'WalletModalContext');\n}\nconst WalletModalContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(DEFAULT_CONTEXT);\nfunction useWalletModal() {\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(WalletModalContext);\n}\n//# sourceMappingURL=useWalletModal.js.map\n\n/***/ }),\n\n/***/ 4306:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"O\": function() { return /* binding */ useWallet; },\n/* harmony export */ \"z\": function() { return /* binding */ WalletContext; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294);\n\nconst EMPTY_ARRAY = [];\nconst DEFAULT_CONTEXT = {\n autoConnect: false,\n connecting: false,\n connected: false,\n disconnecting: false,\n select() {\n logMissingProviderError('call', 'select');\n },\n connect() {\n return Promise.reject(logMissingProviderError('call', 'connect'));\n },\n disconnect() {\n return Promise.reject(logMissingProviderError('call', 'disconnect'));\n },\n sendTransaction() {\n return Promise.reject(logMissingProviderError('call', 'sendTransaction'));\n },\n signTransaction() {\n return Promise.reject(logMissingProviderError('call', 'signTransaction'));\n },\n signAllTransactions() {\n return Promise.reject(logMissingProviderError('call', 'signAllTransactions'));\n },\n signMessage() {\n return Promise.reject(logMissingProviderError('call', 'signMessage'));\n },\n signIn() {\n return Promise.reject(logMissingProviderError('call', 'signIn'));\n },\n};\nObject.defineProperty(DEFAULT_CONTEXT, 'wallets', {\n get() {\n logMissingProviderError('read', 'wallets');\n return EMPTY_ARRAY;\n },\n});\nObject.defineProperty(DEFAULT_CONTEXT, 'wallet', {\n get() {\n logMissingProviderError('read', 'wallet');\n return null;\n },\n});\nObject.defineProperty(DEFAULT_CONTEXT, 'publicKey', {\n get() {\n logMissingProviderError('read', 'publicKey');\n return null;\n },\n});\nfunction logMissingProviderError(action, property) {\n const error = new Error(`You have tried to ${action} \"${property}\" on a WalletContext without providing one. ` +\n 'Make sure to render a WalletProvider as an ancestor of the component that uses WalletContext.');\n console.error(error);\n return error;\n}\nconst WalletContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(DEFAULT_CONTEXT);\nfunction useWallet() {\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(WalletContext);\n}\n//# sourceMappingURL=useWallet.js.map\n\n/***/ }),\n\n/***/ 3149:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"G\": function() { return /* binding */ SolanaSignAndSendTransaction; }\n/* harmony export */ });\n/** Name of the feature. */\nconst SolanaSignAndSendTransaction = 'solana:signAndSendTransaction';\n//# sourceMappingURL=signAndSendTransaction.js.map\n\n/***/ }),\n\n/***/ 1999:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"g\": function() { return /* binding */ SolanaSignMessage; }\n/* harmony export */ });\n/** Name of the feature. */\nconst SolanaSignMessage = 'solana:signMessage';\n//# sourceMappingURL=signMessage.js.map\n\n/***/ }),\n\n/***/ 8112:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"R\": function() { return /* binding */ SolanaSignTransaction; }\n/* harmony export */ });\n/** Name of the feature. */\nconst SolanaSignTransaction = 'solana:signTransaction';\n//# sourceMappingURL=signTransaction.js.map\n\n/***/ }),\n\n/***/ 7885:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"rr\": function() { return /* binding */ inflate_1; }\n/* harmony export */ });\n/* unused harmony exports Deflate, Inflate, constants, default, deflate, deflateRaw, gzip, inflateRaw, ungzip */\n\n/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//const Z_FILTERED = 1;\n//const Z_HUFFMAN_ONLY = 2;\n//const Z_RLE = 3;\nconst Z_FIXED$1 = 4;\n//const Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nconst Z_BINARY = 0;\nconst Z_TEXT = 1;\n//const Z_ASCII = 1; // = Z_TEXT\nconst Z_UNKNOWN$1 = 2;\n\n/*============================================================================*/\n\n\nfunction zero$1(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n/* The three kinds of block type */\n\nconst MIN_MATCH$1 = 3;\nconst MAX_MATCH$1 = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nconst LENGTH_CODES$1 = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nconst LITERALS$1 = 256;\n/* number of literal bytes 0..255 */\n\nconst L_CODES$1 = LITERALS$1 + 1 + LENGTH_CODES$1;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nconst D_CODES$1 = 30;\n/* number of distance codes */\n\nconst BL_CODES$1 = 19;\n/* number of codes used to transfer the bit lengths */\n\nconst HEAP_SIZE$1 = 2 * L_CODES$1 + 1;\n/* maximum heap size */\n\nconst MAX_BITS$1 = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nconst MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nconst END_BLOCK = 256;\n/* end of block literal code */\n\nconst REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nconst REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nconst REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nconst extra_lbits = /* extra bits for each length code */\n new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]);\n\nconst extra_dbits = /* extra bits for each distance code */\n new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);\n\nconst extra_blbits = /* extra bits for each bit length code */\n new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);\n\nconst bl_order =\n new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nconst DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nconst static_ltree = new Array((L_CODES$1 + 2) * 2);\nzero$1(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nconst static_dtree = new Array(D_CODES$1 * 2);\nzero$1(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nconst _dist_code = new Array(DIST_CODE_LEN);\nzero$1(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nconst _length_code = new Array(MAX_MATCH$1 - MIN_MATCH$1 + 1);\nzero$1(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nconst base_length = new Array(LENGTH_CODES$1);\nzero$1(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nconst base_dist = new Array(D_CODES$1);\nzero$1(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nlet static_l_desc;\nlet static_d_desc;\nlet static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nconst d_code = (dist) => {\n\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n};\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nconst put_short = (s, w) => {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n};\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nconst send_bits = (s, value, length) => {\n\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n};\n\n\nconst send_code = (s, c, tree) => {\n\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n};\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nconst bi_reverse = (code, len) => {\n\n let res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nconst bi_flush = (s) => {\n\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n};\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nconst gen_bitlen = (s, desc) => {\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n\n const tree = desc.dyn_tree;\n const max_code = desc.max_code;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const extra = desc.stat_desc.extra_bits;\n const base = desc.stat_desc.extra_base;\n const max_length = desc.stat_desc.max_length;\n let h; /* heap index */\n let n, m; /* iterate over the tree elements */\n let bits; /* bit length */\n let xbits; /* extra bits */\n let f; /* frequency */\n let overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS$1; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE$1; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Tracev((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Tracev((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n};\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nconst gen_codes = (tree, max_code, bl_count) => {\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n\n const next_code = new Array(MAX_BITS$1 + 1); /* next code value for each bit length */\n let code = 0; /* running code value */\n let bits; /* bit index */\n let n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS$1; bits++) {\n code = (code + bl_count[bits - 1]) << 1;\n next_code[bits] = code;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< {\n\n let n; /* iterates over tree elements */\n let bits; /* bit counter */\n let length; /* length value */\n let code; /* code value */\n let dist; /* distance index */\n const bl_count = new Array(MAX_BITS$1 + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES$1 - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES$1; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS$1; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES$1 + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES$1; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS$1 + 1, L_CODES$1, MAX_BITS$1);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES$1, MAX_BITS$1);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES$1, MAX_BL_BITS);\n\n //static_init_done = true;\n};\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nconst init_block = (s) => {\n\n let n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES$1; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES$1; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES$1; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.sym_next = s.matches = 0;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nconst bi_windup = (s) =>\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n};\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nconst smaller = (tree, n, m, depth) => {\n\n const _n2 = n * 2;\n const _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n};\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nconst pqdownheap = (s, tree, k) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n\n const v = s.heap[k];\n let j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n};\n\n\n// inlined manually\n// const SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nconst compress_block = (s, ltree, dtree) => {\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n\n let dist; /* distance of matched string */\n let lc; /* match length or unmatched char (if dist == 0) */\n let sx = 0; /* running index in sym_buf */\n let code; /* the code to send */\n let extra; /* number of extra bits to send */\n\n if (s.sym_next !== 0) {\n do {\n dist = s.pending_buf[s.sym_buf + sx++] & 0xff;\n dist += (s.pending_buf[s.sym_buf + sx++] & 0xff) << 8;\n lc = s.pending_buf[s.sym_buf + sx++];\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS$1 + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and sym_buf is ok: */\n //Assert(s->pending < s->lit_bufsize + sx, \"pendingBuf overflow\");\n\n } while (sx < s.sym_next);\n }\n\n send_code(s, END_BLOCK, ltree);\n};\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nconst build_tree = (s, desc) => {\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n\n const tree = desc.dyn_tree;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const elems = desc.stat_desc.elems;\n let n, m; /* iterate over heap elements */\n let max_code = -1; /* largest code with non zero frequency */\n let node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE$1;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n};\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nconst scan_tree = (s, tree, max_code) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nconst send_tree = (s, tree, max_code) => {\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nconst build_bl_tree = (s) => {\n\n let max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES$1 - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n};\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nconst send_all_trees = (s, lcodes, dcodes, blcodes) => {\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n\n let rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n};\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"block list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"allow list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nconst detect_data_type = (s) => {\n /* block_mask is the bit mask of block-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n let block_mask = 0xf3ffc07f;\n let n;\n\n /* Check for non-textual (\"block-listed\") bytes. */\n for (n = 0; n <= 31; n++, block_mask >>>= 1) {\n if ((block_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"allow-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS$1; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"block-listed\" or \"allow-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n};\n\n\nlet static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nconst _tr_init$1 = (s) =>\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n};\n\n\n/* ===========================================================================\n * Send a stored block\n */\nconst _tr_stored_block$1 = (s, buf, stored_len, last) => {\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n bi_windup(s); /* align on byte boundary */\n put_short(s, stored_len);\n put_short(s, ~stored_len);\n if (stored_len) {\n s.pending_buf.set(s.window.subarray(buf, buf + stored_len), s.pending);\n }\n s.pending += stored_len;\n};\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nconst _tr_align$1 = (s) => {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n};\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and write out the encoded block.\n */\nconst _tr_flush_block$1 = (s, buf, stored_len, last) => {\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n\n let opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n let max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN$1) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->sym_next / 3));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block$1(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED$1 || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n};\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nconst _tr_tally$1 = (s, dist, lc) => {\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n\n s.pending_buf[s.sym_buf + s.sym_next++] = dist;\n s.pending_buf[s.sym_buf + s.sym_next++] = dist >> 8;\n s.pending_buf[s.sym_buf + s.sym_next++] = lc;\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS$1 + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n return (s.sym_next === s.sym_end);\n};\n\nvar _tr_init_1 = _tr_init$1;\nvar _tr_stored_block_1 = _tr_stored_block$1;\nvar _tr_flush_block_1 = _tr_flush_block$1;\nvar _tr_tally_1 = _tr_tally$1;\nvar _tr_align_1 = _tr_align$1;\n\nvar trees = {\n\t_tr_init: _tr_init_1,\n\t_tr_stored_block: _tr_stored_block_1,\n\t_tr_flush_block: _tr_flush_block_1,\n\t_tr_tally: _tr_tally_1,\n\t_tr_align: _tr_align_1\n};\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n};\n\n\nvar adler32_1 = adler32;\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nconst makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n};\n\n// Create table on load. Just 255 signed longs. Not a problem.\nconst crcTable = new Uint32Array(makeTable());\n\n\nconst crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n};\n\n\nvar crc32_1 = crc32;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar messages = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar constants$2 = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst { _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align } = trees;\n\n\n\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$2, Z_PARTIAL_FLUSH, Z_FULL_FLUSH: Z_FULL_FLUSH$1, Z_FINISH: Z_FINISH$3, Z_BLOCK: Z_BLOCK$1,\n Z_OK: Z_OK$3, Z_STREAM_END: Z_STREAM_END$3, Z_STREAM_ERROR: Z_STREAM_ERROR$2, Z_DATA_ERROR: Z_DATA_ERROR$2, Z_BUF_ERROR: Z_BUF_ERROR$1,\n Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1,\n Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED, Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1,\n Z_UNKNOWN,\n Z_DEFLATED: Z_DEFLATED$2\n} = constants$2;\n\n/*============================================================================*/\n\n\nconst MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nconst MAX_WBITS$1 = 15;\n/* 32K LZ77 window */\nconst DEF_MEM_LEVEL = 8;\n\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nconst D_CODES = 30;\n/* number of distance codes */\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42; /* zlib header -> BUSY_STATE */\n//#ifdef GZIP\nconst GZIP_STATE = 57; /* gzip header -> BUSY_STATE | EXTRA_STATE */\n//#endif\nconst EXTRA_STATE = 69; /* gzip extra block -> NAME_STATE */\nconst NAME_STATE = 73; /* gzip file name -> COMMENT_STATE */\nconst COMMENT_STATE = 91; /* gzip comment -> HCRC_STATE */\nconst HCRC_STATE = 103; /* gzip header CRC -> BUSY_STATE */\nconst BUSY_STATE = 113; /* deflate -> FINISH_STATE */\nconst FINISH_STATE = 666; /* stream complete */\n\nconst BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nconst BS_BLOCK_DONE = 2; /* block flush performed */\nconst BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nconst BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nconst OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nconst err = (strm, errorCode) => {\n strm.msg = messages[errorCode];\n return errorCode;\n};\n\nconst rank = (f) => {\n return ((f) * 2) - ((f) > 4 ? 9 : 0);\n};\n\nconst zero = (buf) => {\n let len = buf.length; while (--len >= 0) { buf[len] = 0; }\n};\n\n/* ===========================================================================\n * Slide the hash table when sliding the window down (could be avoided with 32\n * bit values at the expense of memory usage). We slide even when level == 0 to\n * keep the hash table consistent if we switch back to level > 0 later.\n */\nconst slide_hash = (s) => {\n let n, m;\n let p;\n let wsize = s.w_size;\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= wsize ? m - wsize : 0);\n } while (--n);\n n = wsize;\n//#ifndef FASTEST\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= wsize ? m - wsize : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n//#endif\n};\n\n/* eslint-disable new-cap */\nlet HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;\n// This hash causes less collisions, https://github.com/nodeca/pako/issues/135\n// But breaks binary compatibility\n//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;\nlet HASH = HASH_ZLIB;\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output, except for\n * some deflate_stored() output, goes through this function so some\n * applications may wish to modify it to avoid allocating a large\n * strm->next_out buffer and copying into it. (See also read_buf()).\n */\nconst flush_pending = (strm) => {\n const s = strm.state;\n\n //_tr_flush_bits(s);\n let len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n};\n\n\nconst flush_block_only = (s, last) => {\n _tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n};\n\n\nconst put_byte = (s, b) => {\n s.pending_buf[s.pending++] = b;\n};\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nconst putShortMSB = (s, b) => {\n\n // put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n};\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nconst read_buf = (strm, buf, start, size) => {\n\n let len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32_1(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32_1(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n};\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nconst longest_match = (s, cur_match) => {\n\n let chain_length = s.max_chain_length; /* max hash chain length */\n let scan = s.strstart; /* current string */\n let match; /* matched string */\n let len; /* length of current match */\n let best_len = s.prev_length; /* best match length so far */\n let nice_match = s.nice_match; /* stop if match long enough */\n const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n const _win = s.window; // shortcut\n\n const wmask = s.w_mask;\n const prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n const strend = s.strstart + MAX_MATCH;\n let scan_end1 = _win[scan + best_len - 1];\n let scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n};\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nconst fill_window = (s) => {\n\n const _w_size = s.w_size;\n let n, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n s.window.set(s.window.subarray(_w_size, _w_size + _w_size - more), 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n slide_hash(s);\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// const curr = s.strstart + s.lookahead;\n// let init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n};\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n *\n * In case deflateParams() is used to later switch to a non-zero compression\n * level, s->matches (otherwise unused when storing) keeps track of the number\n * of hash table slides to perform. If s->matches is 1, then one hash table\n * slide will be done when switching. If s->matches is 2, the maximum value\n * allowed here, then the hash table will be cleared, since two or more slides\n * is the same as a clear.\n *\n * deflate_stored() is written to minimize the number of times an input byte is\n * copied. It is most efficient with large input and output buffers, which\n * maximizes the opportunites to have a single copy from next_in to next_out.\n */\nconst deflate_stored = (s, flush) => {\n\n /* Smallest worthy block size when not flushing or finishing. By default\n * this is 32K. This can be as small as 507 bytes for memLevel == 1. For\n * large input and output buffers, the stored block size will be larger.\n */\n let min_block = s.pending_buf_size - 5 > s.w_size ? s.w_size : s.pending_buf_size - 5;\n\n /* Copy as many min_block or larger stored blocks directly to next_out as\n * possible. If flushing, copy the remaining available input to next_out as\n * stored blocks, if there is enough space.\n */\n let len, left, have, last = 0;\n let used = s.strm.avail_in;\n do {\n /* Set len to the maximum size block that we can copy directly with the\n * available input data and output space. Set left to how much of that\n * would be copied from what's left in the window.\n */\n len = 65535/* MAX_STORED */; /* maximum deflate stored block length */\n have = (s.bi_valid + 42) >> 3; /* number of header bytes */\n if (s.strm.avail_out < have) { /* need room for header */\n break;\n }\n /* maximum stored block length that will fit in avail_out: */\n have = s.strm.avail_out - have;\n left = s.strstart - s.block_start; /* bytes left in window */\n if (len > left + s.strm.avail_in) {\n len = left + s.strm.avail_in; /* limit len to the input */\n }\n if (len > have) {\n len = have; /* limit len to the output */\n }\n\n /* If the stored block would be less than min_block in length, or if\n * unable to copy all of the available input when flushing, then try\n * copying to the window and the pending buffer instead. Also don't\n * write an empty block when flushing -- deflate() does that.\n */\n if (len < min_block && ((len === 0 && flush !== Z_FINISH$3) ||\n flush === Z_NO_FLUSH$2 ||\n len !== left + s.strm.avail_in)) {\n break;\n }\n\n /* Make a dummy stored block in pending to get the header bytes,\n * including any pending bits. This also updates the debugging counts.\n */\n last = flush === Z_FINISH$3 && len === left + s.strm.avail_in ? 1 : 0;\n _tr_stored_block(s, 0, 0, last);\n\n /* Replace the lengths in the dummy stored block with len. */\n s.pending_buf[s.pending - 4] = len;\n s.pending_buf[s.pending - 3] = len >> 8;\n s.pending_buf[s.pending - 2] = ~len;\n s.pending_buf[s.pending - 1] = ~len >> 8;\n\n /* Write the stored block header bytes. */\n flush_pending(s.strm);\n\n//#ifdef ZLIB_DEBUG\n// /* Update debugging counts for the data about to be copied. */\n// s->compressed_len += len << 3;\n// s->bits_sent += len << 3;\n//#endif\n\n /* Copy uncompressed bytes from the window to next_out. */\n if (left) {\n if (left > len) {\n left = len;\n }\n //zmemcpy(s->strm->next_out, s->window + s->block_start, left);\n s.strm.output.set(s.window.subarray(s.block_start, s.block_start + left), s.strm.next_out);\n s.strm.next_out += left;\n s.strm.avail_out -= left;\n s.strm.total_out += left;\n s.block_start += left;\n len -= left;\n }\n\n /* Copy uncompressed bytes directly from next_in to next_out, updating\n * the check value.\n */\n if (len) {\n read_buf(s.strm, s.strm.output, s.strm.next_out, len);\n s.strm.next_out += len;\n s.strm.avail_out -= len;\n s.strm.total_out += len;\n }\n } while (last === 0);\n\n /* Update the sliding window with the last s->w_size bytes of the copied\n * data, or append all of the copied data to the existing window if less\n * than s->w_size bytes were copied. Also update the number of bytes to\n * insert in the hash tables, in the event that deflateParams() switches to\n * a non-zero compression level.\n */\n used -= s.strm.avail_in; /* number of input bytes directly copied */\n if (used) {\n /* If any input was used, then no unused input remains in the window,\n * therefore s->block_start == s->strstart.\n */\n if (used >= s.w_size) { /* supplant the previous history */\n s.matches = 2; /* clear hash */\n //zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size);\n s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0);\n s.strstart = s.w_size;\n s.insert = s.strstart;\n }\n else {\n if (s.window_size - s.strstart <= used) {\n /* Slide the window down. */\n s.strstart -= s.w_size;\n //zmemcpy(s->window, s->window + s->w_size, s->strstart);\n s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);\n if (s.matches < 2) {\n s.matches++; /* add a pending slide_hash() */\n }\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n }\n //zmemcpy(s->window + s->strstart, s->strm->next_in - used, used);\n s.window.set(s.strm.input.subarray(s.strm.next_in - used, s.strm.next_in), s.strstart);\n s.strstart += used;\n s.insert += used > s.w_size - s.insert ? s.w_size - s.insert : used;\n }\n s.block_start = s.strstart;\n }\n if (s.high_water < s.strstart) {\n s.high_water = s.strstart;\n }\n\n /* If the last block was written to next_out, then done. */\n if (last) {\n return BS_FINISH_DONE;\n }\n\n /* If flushing and all input has been consumed, then done. */\n if (flush !== Z_NO_FLUSH$2 && flush !== Z_FINISH$3 &&\n s.strm.avail_in === 0 && s.strstart === s.block_start) {\n return BS_BLOCK_DONE;\n }\n\n /* Fill the window with any remaining input. */\n have = s.window_size - s.strstart;\n if (s.strm.avail_in > have && s.block_start >= s.w_size) {\n /* Slide the window down. */\n s.block_start -= s.w_size;\n s.strstart -= s.w_size;\n //zmemcpy(s->window, s->window + s->w_size, s->strstart);\n s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0);\n if (s.matches < 2) {\n s.matches++; /* add a pending slide_hash() */\n }\n have += s.w_size; /* more space now */\n if (s.insert > s.strstart) {\n s.insert = s.strstart;\n }\n }\n if (have > s.strm.avail_in) {\n have = s.strm.avail_in;\n }\n if (have) {\n read_buf(s.strm, s.window, s.strstart, have);\n s.strstart += have;\n s.insert += have > s.w_size - s.insert ? s.w_size - s.insert : have;\n }\n if (s.high_water < s.strstart) {\n s.high_water = s.strstart;\n }\n\n /* There was not enough avail_out to write a complete worthy or flushed\n * stored block to next_out. Write a stored block to pending instead, if we\n * have enough input for a worthy block, or if flushing and there is enough\n * room for the remaining input as a stored block in the pending buffer.\n */\n have = (s.bi_valid + 42) >> 3; /* number of header bytes */\n /* maximum stored block length that will fit in pending: */\n have = s.pending_buf_size - have > 65535/* MAX_STORED */ ? 65535/* MAX_STORED */ : s.pending_buf_size - have;\n min_block = have > s.w_size ? s.w_size : have;\n left = s.strstart - s.block_start;\n if (left >= min_block ||\n ((left || flush === Z_FINISH$3) && flush !== Z_NO_FLUSH$2 &&\n s.strm.avail_in === 0 && left <= have)) {\n len = left > have ? have : left;\n last = flush === Z_FINISH$3 && s.strm.avail_in === 0 &&\n len === left ? 1 : 0;\n _tr_stored_block(s, s.block_start, len, last);\n s.block_start += len;\n flush_pending(s.strm);\n }\n\n /* We've done all we can with the available input and output. */\n return last ? BS_FINISH_STARTED : BS_NEED_MORE;\n};\n\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nconst deflate_fast = (s, flush) => {\n\n let hash_head; /* head of the hash chain */\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nconst deflate_slow = (s, flush) => {\n\n let hash_head; /* head of hash chain */\n let bflush; /* set if current block must be flushed */\n\n let max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n};\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nconst deflate_rle = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n let prev; /* byte at distance one to match */\n let scan, strend; /* scan goes up to strend for length of run */\n\n const _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nconst deflate_huff = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.sym_next) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nconst configuration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nconst lm_init = (s) => {\n\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n};\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED$2; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Uint16Array(HEAP_SIZE * 2);\n this.dyn_dtree = new Uint16Array((2 * D_CODES + 1) * 2);\n this.bl_tree = new Uint16Array((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Uint16Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Uint16Array(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new Uint16Array(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.sym_buf = 0; /* buffer for distances and literals/lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.sym_next = 0; /* running index in sym_buf */\n this.sym_end = 0; /* symbol table full when sym_next reaches this */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\n/* =========================================================================\n * Check for a valid deflate stream state. Return 0 if ok, 1 if not.\n */\nconst deflateStateCheck = (strm) => {\n\n if (!strm) {\n return 1;\n }\n const s = strm.state;\n if (!s || s.strm !== strm || (s.status !== INIT_STATE &&\n//#ifdef GZIP\n s.status !== GZIP_STATE &&\n//#endif\n s.status !== EXTRA_STATE &&\n s.status !== NAME_STATE &&\n s.status !== COMMENT_STATE &&\n s.status !== HCRC_STATE &&\n s.status !== BUSY_STATE &&\n s.status !== FINISH_STATE)) {\n return 1;\n }\n return 0;\n};\n\n\nconst deflateResetKeep = (strm) => {\n\n if (deflateStateCheck(strm)) {\n return err(strm, Z_STREAM_ERROR$2);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n const s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status =\n//#ifdef GZIP\n s.wrap === 2 ? GZIP_STATE :\n//#endif\n s.wrap ? INIT_STATE : BUSY_STATE;\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = -2;\n _tr_init(s);\n return Z_OK$3;\n};\n\n\nconst deflateReset = (strm) => {\n\n const ret = deflateResetKeep(strm);\n if (ret === Z_OK$3) {\n lm_init(strm.state);\n }\n return ret;\n};\n\n\nconst deflateSetHeader = (strm, head) => {\n\n if (deflateStateCheck(strm) || strm.state.wrap !== 2) {\n return Z_STREAM_ERROR$2;\n }\n strm.state.gzhead = head;\n return Z_OK$3;\n};\n\n\nconst deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {\n\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR$2;\n }\n let wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION$1) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED$2 ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED || (windowBits === 8 && wrap !== 1)) {\n return err(strm, Z_STREAM_ERROR$2);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n const s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n s.status = INIT_STATE; /* to pass state test in deflateReset() */\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new Uint8Array(s.w_size * 2);\n s.head = new Uint16Array(s.hash_size);\n s.prev = new Uint16Array(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n /* We overlay pending_buf and sym_buf. This works since the average size\n * for length/distance pairs over any compressed block is assured to be 31\n * bits or less.\n *\n * Analysis: The longest fixed codes are a length code of 8 bits plus 5\n * extra bits, for lengths 131 to 257. The longest fixed distance codes are\n * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest\n * possible fixed-codes length/distance pair is then 31 bits total.\n *\n * sym_buf starts one-fourth of the way into pending_buf. So there are\n * three bytes in sym_buf for every four bytes in pending_buf. Each symbol\n * in sym_buf is three bytes -- two for the distance and one for the\n * literal/length. As each symbol is consumed, the pointer to the next\n * sym_buf value to read moves forward three bytes. From that symbol, up to\n * 31 bits are written to pending_buf. The closest the written pending_buf\n * bits gets to the next sym_buf symbol to read is just before the last\n * code is written. At that time, 31*(n-2) bits have been written, just\n * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at\n * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1\n * symbols are written.) The closest the writing gets to what is unread is\n * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and\n * can range from 128 to 32768.\n *\n * Therefore, at a minimum, there are 142 bits of space between what is\n * written and what is read in the overlain buffers, so the symbols cannot\n * be overwritten by the compressed data. That space is actually 139 bits,\n * due to the three-bit fixed-code block header.\n *\n * That covers the case where either Z_FIXED is specified, forcing fixed\n * codes, or when the use of fixed codes is chosen, because that choice\n * results in a smaller compressed block than dynamic codes. That latter\n * condition then assures that the above analysis also covers all dynamic\n * blocks. A dynamic-code block will only be chosen to be emitted if it has\n * fewer bits than a fixed-code block would for the same set of symbols.\n * Therefore its average symbol length is assured to be less than 31. So\n * the compressed data for a dynamic block also cannot overwrite the\n * symbols from which it is being constructed.\n */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n s.pending_buf = new Uint8Array(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->sym_buf = s->pending_buf + s->lit_bufsize;\n s.sym_buf = s.lit_bufsize;\n\n //s->sym_end = (s->lit_bufsize - 1) * 3;\n s.sym_end = (s.lit_bufsize - 1) * 3;\n /* We avoid equality with lit_bufsize*3 because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n};\n\nconst deflateInit = (strm, level) => {\n\n return deflateInit2(strm, level, Z_DEFLATED$2, MAX_WBITS$1, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY$1);\n};\n\n\n/* ========================================================================= */\nconst deflate$2 = (strm, flush) => {\n\n if (deflateStateCheck(strm) || flush > Z_BLOCK$1 || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR$2) : Z_STREAM_ERROR$2;\n }\n\n const s = strm.state;\n\n if (!strm.output ||\n (strm.avail_in !== 0 && !strm.input) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH$3)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR$1 : Z_STREAM_ERROR$2);\n }\n\n const old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK$3;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH$3) {\n return err(strm, Z_BUF_ERROR$1);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR$1);\n }\n\n /* Write the header */\n if (s.status === INIT_STATE && s.wrap === 0) {\n s.status = BUSY_STATE;\n }\n if (s.status === INIT_STATE) {\n /* zlib header */\n let header = (Z_DEFLATED$2 + ((s.w_bits - 8) << 4)) << 8;\n let level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n }\n//#ifdef GZIP\n if (s.status === GZIP_STATE) {\n /* gzip header */\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let left = (s.gzhead.extra.length & 0xffff) - s.gzindex;\n while (s.pending + left > s.pending_buf_size) {\n let copy = s.pending_buf_size - s.pending;\n // zmemcpy(s.pending_buf + s.pending,\n // s.gzhead.extra + s.gzindex, copy);\n s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex, s.gzindex + copy), s.pending);\n s.pending = s.pending_buf_size;\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex += copy;\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n beg = 0;\n left -= copy;\n }\n // JS specific: s.gzhead.extra may be TypedArray or Array for backward compatibility\n // TypedArray.slice and TypedArray.from don't exist in IE10-IE11\n let gzhead_extra = new Uint8Array(s.gzhead.extra);\n // zmemcpy(s->pending_buf + s->pending,\n // s->gzhead->extra + s->gzindex, left);\n s.pending_buf.set(gzhead_extra.subarray(s.gzindex, s.gzindex + left), s.pending);\n s.pending += left;\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex = 0;\n }\n s.status = NAME_STATE;\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let val;\n do {\n if (s.pending === s.pending_buf_size) {\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n beg = 0;\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n s.gzindex = 0;\n }\n s.status = COMMENT_STATE;\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n let beg = s.pending; /* start of bytes to update crc */\n let val;\n do {\n if (s.pending === s.pending_buf_size) {\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n beg = 0;\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n //--- HCRC_UPDATE(beg) ---//\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n //---//\n }\n s.status = HCRC_STATE;\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n }\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n }\n s.status = BUSY_STATE;\n\n /* Compression must start with an empty pending buffer */\n flush_pending(strm);\n if (s.pending !== 0) {\n s.last_flush = -1;\n return Z_OK$3;\n }\n }\n//#endif\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH$2 && s.status !== FINISH_STATE)) {\n let bstate = s.level === 0 ? deflate_stored(s, flush) :\n s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :\n s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush);\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK$3;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align(s);\n }\n else if (flush !== Z_BLOCK$1) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH$1) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK$3;\n }\n }\n }\n\n if (flush !== Z_FINISH$3) { return Z_OK$3; }\n if (s.wrap <= 0) { return Z_STREAM_END$3; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK$3 : Z_STREAM_END$3;\n};\n\n\nconst deflateEnd = (strm) => {\n\n if (deflateStateCheck(strm)) {\n return Z_STREAM_ERROR$2;\n }\n\n const status = strm.state.status;\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR$2) : Z_OK$3;\n};\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nconst deflateSetDictionary = (strm, dictionary) => {\n\n let dictLength = dictionary.length;\n\n if (deflateStateCheck(strm)) {\n return Z_STREAM_ERROR$2;\n }\n\n const s = strm.state;\n const wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR$2;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32_1(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n let tmpDict = new Uint8Array(s.w_size);\n tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n const avail = strm.avail_in;\n const next = strm.next_in;\n const input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n let str = s.strstart;\n let n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK$3;\n};\n\n\nvar deflateInit_1 = deflateInit;\nvar deflateInit2_1 = deflateInit2;\nvar deflateReset_1 = deflateReset;\nvar deflateResetKeep_1 = deflateResetKeep;\nvar deflateSetHeader_1 = deflateSetHeader;\nvar deflate_2$1 = deflate$2;\nvar deflateEnd_1 = deflateEnd;\nvar deflateSetDictionary_1 = deflateSetDictionary;\nvar deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.deflateBound = deflateBound;\nmodule.exports.deflateCopy = deflateCopy;\nmodule.exports.deflateGetDictionary = deflateGetDictionary;\nmodule.exports.deflateParams = deflateParams;\nmodule.exports.deflatePending = deflatePending;\nmodule.exports.deflatePrime = deflatePrime;\nmodule.exports.deflateTune = deflateTune;\n*/\n\nvar deflate_1$2 = {\n\tdeflateInit: deflateInit_1,\n\tdeflateInit2: deflateInit2_1,\n\tdeflateReset: deflateReset_1,\n\tdeflateResetKeep: deflateResetKeep_1,\n\tdeflateSetHeader: deflateSetHeader_1,\n\tdeflate: deflate_2$1,\n\tdeflateEnd: deflateEnd_1,\n\tdeflateSetDictionary: deflateSetDictionary_1,\n\tdeflateInfo: deflateInfo\n};\n\nconst _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nvar assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// Join array of chunks to single array.\nvar flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n};\n\nvar common = {\n\tassign: assign,\n\tflattenChunks: flattenChunks\n};\n\n// String encode/decode helpers\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nlet STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nconst _utf8len = new Uint8Array(256);\nfor (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nvar string2buf = (str) => {\n if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {\n return new TextEncoder().encode(str);\n }\n\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper\nconst buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n};\n\n\n// convert array to string\nvar buf2string = (buf, max) => {\n const len = max || buf.length;\n\n if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {\n return new TextDecoder().decode(buf.subarray(0, max));\n }\n\n let i, out;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nvar utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\nvar strings = {\n\tstring2buf: string2buf,\n\tbuf2string: buf2string,\n\tutf8border: utf8border\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nvar zstream = ZStream;\n\nconst toString$1 = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$1, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH: Z_FINISH$2,\n Z_OK: Z_OK$2, Z_STREAM_END: Z_STREAM_END$2,\n Z_DEFAULT_COMPRESSION,\n Z_DEFAULT_STRATEGY,\n Z_DEFLATED: Z_DEFLATED$1\n} = constants$2;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate$1(options) {\n this.options = common.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED$1,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY\n }, options || {});\n\n let opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = deflate_1$2.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK$2) {\n throw new Error(messages[status]);\n }\n\n if (opt.header) {\n deflate_1$2.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n let dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString$1.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = deflate_1$2.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK$2) {\n throw new Error(messages[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must\n * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending\n * buffers and call [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate$1.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n let status, _flush_mode;\n\n if (this.ended) { return false; }\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH$2 : Z_NO_FLUSH$1;\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString$1.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n // Make sure avail_out > 6 to avoid repeating markers\n if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH) && strm.avail_out <= 6) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n status = deflate_1$2.deflate(strm, _flush_mode);\n\n // Ended => flush and finish\n if (status === Z_STREAM_END$2) {\n if (strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n }\n status = deflate_1$2.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK$2;\n }\n\n // Flush if out buffer full\n if (strm.avail_out === 0) {\n this.onData(strm.output);\n continue;\n }\n\n // Flush if requested and has data\n if (_flush_mode > 0 && strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array): output data.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate$1.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate$1.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK$2) {\n this.result = common.flattenChunks(this.chunks);\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate$1(input, options) {\n const deflator = new Deflate$1(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || messages[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw$1(input, options) {\n options = options || {};\n options.raw = true;\n return deflate$1(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array\n * - data (Uint8Array|ArrayBuffer|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip$1(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate$1(input, options);\n}\n\n\nvar Deflate_1$1 = Deflate$1;\nvar deflate_2 = deflate$1;\nvar deflateRaw_1$1 = deflateRaw$1;\nvar gzip_1$1 = gzip$1;\nvar constants$1 = constants$2;\n\nvar deflate_1$1 = {\n\tDeflate: Deflate_1$1,\n\tdeflate: deflate_2,\n\tdeflateRaw: deflateRaw_1$1,\n\tgzip: gzip_1$1,\n\tconstants: constants$1\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nconst BAD$1 = 16209; /* got a data error -- remain here until reset */\nconst TYPE$1 = 16191; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nvar inffast = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n//#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE$1;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst MAXBITS = 15;\nconst ENOUGH_LENS$1 = 852;\nconst ENOUGH_DISTS$1 = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst CODES$1 = 0;\nconst LENS$1 = 1;\nconst DISTS$1 = 2;\n\nconst lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n]);\n\nconst lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n]);\n\nconst dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n]);\n\nconst dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n]);\n\nconst inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n{\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n// let shoextra; /* extra bits table to use */\n let match; /* use base and extra for symbol >= match */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES$1 || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES$1) {\n base = extra = work; /* dummy value--not used */\n match = 20;\n\n } else if (type === LENS$1) {\n base = lbase;\n extra = lext;\n match = 257;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n match = 0;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] + 1 < match) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] >= match) {\n here_op = extra[work[sym] - match];\n here_val = base[work[sym] - match];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\nvar inftrees = inflate_table;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_FINISH: Z_FINISH$1, Z_BLOCK, Z_TREES,\n Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR: Z_MEM_ERROR$1, Z_BUF_ERROR,\n Z_DEFLATED\n} = constants$2;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nconst HEAD = 16180; /* i: waiting for magic header */\nconst FLAGS = 16181; /* i: waiting for method and flags (gzip) */\nconst TIME = 16182; /* i: waiting for modification time (gzip) */\nconst OS = 16183; /* i: waiting for extra flags and operating system (gzip) */\nconst EXLEN = 16184; /* i: waiting for extra length (gzip) */\nconst EXTRA = 16185; /* i: waiting for extra bytes (gzip) */\nconst NAME = 16186; /* i: waiting for end of file name (gzip) */\nconst COMMENT = 16187; /* i: waiting for end of comment (gzip) */\nconst HCRC = 16188; /* i: waiting for header crc (gzip) */\nconst DICTID = 16189; /* i: waiting for dictionary check value */\nconst DICT = 16190; /* waiting for inflateSetDictionary() call */\nconst TYPE = 16191; /* i: waiting for type bits, including last-flag bit */\nconst TYPEDO = 16192; /* i: same, but skip check to exit inflate on new block */\nconst STORED = 16193; /* i: waiting for stored size (length and complement) */\nconst COPY_ = 16194; /* i/o: same as COPY below, but only first time in */\nconst COPY = 16195; /* i/o: waiting for input or output to copy stored block */\nconst TABLE = 16196; /* i: waiting for dynamic block table lengths */\nconst LENLENS = 16197; /* i: waiting for code length code lengths */\nconst CODELENS = 16198; /* i: waiting for length/lit and distance code lengths */\nconst LEN_ = 16199; /* i: same as LEN below, but only first time in */\nconst LEN = 16200; /* i: waiting for length/lit/eob code */\nconst LENEXT = 16201; /* i: waiting for length extra bits */\nconst DIST = 16202; /* i: waiting for distance code */\nconst DISTEXT = 16203; /* i: waiting for distance extra bits */\nconst MATCH = 16204; /* o: waiting for output space to copy string */\nconst LIT = 16205; /* o: waiting for output space to write literal */\nconst CHECK = 16206; /* i: waiting for 32-bit check value */\nconst LENGTH = 16207; /* i: waiting for 32-bit length (gzip) */\nconst DONE = 16208; /* finished check, done -- remain here until reset */\nconst BAD = 16209; /* got a data error -- remain here until reset */\nconst MEM = 16210; /* got an inflate() memory error -- remain here until reset */\nconst SYNC = 16211; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_WBITS = MAX_WBITS;\n\n\nconst zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n};\n\n\nfunction InflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip,\n bit 2 true to validate check value */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib), or\n -1 if raw or no header yet */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\n\nconst inflateStateCheck = (strm) => {\n\n if (!strm) {\n return 1;\n }\n const state = strm.state;\n if (!state || state.strm !== strm ||\n state.mode < HEAD || state.mode > SYNC) {\n return 1;\n }\n return 0;\n};\n\n\nconst inflateResetKeep = (strm) => {\n\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.flags = -1;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK$1;\n};\n\n\nconst inflateReset = (strm) => {\n\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n};\n\n\nconst inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 5;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR$1;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n};\n\n\nconst inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR$1; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.strm = strm;\n state.window = null/*Z_NULL*/;\n state.mode = HEAD; /* to pass state test in inflateReset2() */\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK$1) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n};\n\n\nconst inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n};\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nlet virgin = true;\n\nlet lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\nconst fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inftrees(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inftrees(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n};\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nconst updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n};\n\n\nconst inflate$2 = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (inflateStateCheck(strm) || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR$1;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK$1;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n if (state.wbits === 0) {\n state.wbits = 15;\n }\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n if (len > 15 || len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n state.flags = 0; /* indicate zlib header */\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32_1(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if ((state.flags & 0x0200) && (state.wrap & 4)) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 4) && hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT$1;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inftrees(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inftrees(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inftrees(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inffast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if ((state.wrap & 4) && _out) {\n strm.adler = state.check =\n /*UPDATE_CHECK(state.check, put - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.wrap & 4) && (state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 4) && hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END$1;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR$1;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR$1;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR$1;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH$1))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if ((state.wrap & 4) && _out) {\n strm.adler = state.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH$1) && ret === Z_OK$1) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n};\n\n\nconst inflateEnd = (strm) => {\n\n if (inflateStateCheck(strm)) {\n return Z_STREAM_ERROR$1;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK$1;\n};\n\n\nconst inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK$1;\n};\n\n\nconst inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (inflateStateCheck(strm)) { return Z_STREAM_ERROR$1; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR$1;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32_1(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR$1;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR$1;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK$1;\n};\n\n\nvar inflateReset_1 = inflateReset;\nvar inflateReset2_1 = inflateReset2;\nvar inflateResetKeep_1 = inflateResetKeep;\nvar inflateInit_1 = inflateInit;\nvar inflateInit2_1 = inflateInit2;\nvar inflate_2$1 = inflate$2;\nvar inflateEnd_1 = inflateEnd;\nvar inflateGetHeader_1 = inflateGetHeader;\nvar inflateSetDictionary_1 = inflateSetDictionary;\nvar inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.inflateCodesUsed = inflateCodesUsed;\nmodule.exports.inflateCopy = inflateCopy;\nmodule.exports.inflateGetDictionary = inflateGetDictionary;\nmodule.exports.inflateMark = inflateMark;\nmodule.exports.inflatePrime = inflatePrime;\nmodule.exports.inflateSync = inflateSync;\nmodule.exports.inflateSyncPoint = inflateSyncPoint;\nmodule.exports.inflateUndermine = inflateUndermine;\nmodule.exports.inflateValidate = inflateValidate;\n*/\n\nvar inflate_1$2 = {\n\tinflateReset: inflateReset_1,\n\tinflateReset2: inflateReset2_1,\n\tinflateResetKeep: inflateResetKeep_1,\n\tinflateInit: inflateInit_1,\n\tinflateInit2: inflateInit2_1,\n\tinflate: inflate_2$1,\n\tinflateEnd: inflateEnd_1,\n\tinflateGetHeader: inflateGetHeader_1,\n\tinflateSetDictionary: inflateSetDictionary_1,\n\tinflateInfo: inflateInfo\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nvar gzheader = GZheader;\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR\n} = constants$2;\n\n/* ===========================================================================*/\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate$1(options) {\n this.options = common.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = inflate_1$2.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n\n this.header = new gzheader();\n\n inflate_1$2.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = inflate_1$2.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate$1.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = inflate_1$2.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT && dictionary) {\n status = inflate_1$2.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK) {\n status = inflate_1$2.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR) {\n // Replace code with more verbose\n status = Z_NEED_DICT;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n inflate_1$2.inflateReset(strm);\n status = inflate_1$2.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR:\n case Z_DATA_ERROR:\n case Z_NEED_DICT:\n case Z_MEM_ERROR:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END) {\n status = inflate_1$2.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate$1.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate$1.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = common.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err) {\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate$1(input, options) {\n const inflator = new Inflate$1(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || messages[inflator.err];\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw$1(input, options) {\n options = options || {};\n options.raw = true;\n return inflate$1(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array|ArrayBuffer): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nvar Inflate_1$1 = Inflate$1;\nvar inflate_2 = inflate$1;\nvar inflateRaw_1$1 = inflateRaw$1;\nvar ungzip$1 = inflate$1;\nvar constants = constants$2;\n\nvar inflate_1$1 = {\n\tInflate: Inflate_1$1,\n\tinflate: inflate_2,\n\tinflateRaw: inflateRaw_1$1,\n\tungzip: ungzip$1,\n\tconstants: constants\n};\n\nconst { Deflate, deflate, deflateRaw, gzip } = deflate_1$1;\n\nconst { Inflate, inflate, inflateRaw, ungzip } = inflate_1$1;\n\n\n\nvar Deflate_1 = Deflate;\nvar deflate_1 = deflate;\nvar deflateRaw_1 = deflateRaw;\nvar gzip_1 = gzip;\nvar Inflate_1 = Inflate;\nvar inflate_1 = inflate;\nvar inflateRaw_1 = inflateRaw;\nvar ungzip_1 = ungzip;\nvar constants_1 = constants$2;\n\nvar pako = {\n\tDeflate: Deflate_1,\n\tdeflate: deflate_1,\n\tdeflateRaw: deflateRaw_1,\n\tgzip: gzip_1,\n\tInflate: Inflate_1,\n\tinflate: inflate_1,\n\tinflateRaw: inflateRaw_1,\n\tungzip: ungzip_1,\n\tconstants: constants_1\n};\n\n\n\n\n/***/ }),\n\n/***/ 1127:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TextDecoder\": function() { return /* binding */ TextDecoder; },\n/* harmony export */ \"TextEncoder\": function() { return /* binding */ TextEncoder; }\n/* harmony export */ });\n\n\n// This is free and unencumbered software released into the public domain.\n// See LICENSE.md for more information.\n\n//\n// Utilities\n//\n\n/**\n * @param {number} a The number to test.\n * @param {number} min The minimum value in the range, inclusive.\n * @param {number} max The maximum value in the range, inclusive.\n * @return {boolean} True if a >= min and a <= max.\n */\nfunction inRange(a, min, max) {\n return min <= a && a <= max;\n}\n\n/**\n * @param {*} o\n * @return {Object}\n */\nfunction ToDictionary(o) {\n if (o === undefined) return {};\n if (o === Object(o)) return o;\n throw TypeError('Could not convert argument to dictionary');\n}\n\n/**\n * @param {string} string Input string of UTF-16 code units.\n * @return {!Array.} Code points.\n */\nfunction stringToCodePoints(string) {\n // https://heycam.github.io/webidl/#dfn-obtain-unicode\n\n // 1. Let S be the DOMString value.\n var s = String(string);\n\n // 2. Let n be the length of S.\n var n = s.length;\n\n // 3. Initialize i to 0.\n var i = 0;\n\n // 4. Initialize U to be an empty sequence of Unicode characters.\n var u = [];\n\n // 5. While i < n:\n while (i < n) {\n\n // 1. Let c be the code unit in S at index i.\n var c = s.charCodeAt(i);\n\n // 2. Depending on the value of c:\n\n // c < 0xD800 or c > 0xDFFF\n if (c < 0xD800 || c > 0xDFFF) {\n // Append to U the Unicode character with code point c.\n u.push(c);\n }\n\n // 0xDC00 ≤ c ≤ 0xDFFF\n else if (0xDC00 <= c && c <= 0xDFFF) {\n // Append to U a U+FFFD REPLACEMENT CHARACTER.\n u.push(0xFFFD);\n }\n\n // 0xD800 ≤ c ≤ 0xDBFF\n else if (0xD800 <= c && c <= 0xDBFF) {\n // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT\n // CHARACTER.\n if (i === n - 1) {\n u.push(0xFFFD);\n }\n // 2. Otherwise, i < n−1:\n else {\n // 1. Let d be the code unit in S at index i+1.\n var d = string.charCodeAt(i + 1);\n\n // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:\n if (0xDC00 <= d && d <= 0xDFFF) {\n // 1. Let a be c & 0x3FF.\n var a = c & 0x3FF;\n\n // 2. Let b be d & 0x3FF.\n var b = d & 0x3FF;\n\n // 3. Append to U the Unicode character with code point\n // 2^16+2^10*a+b.\n u.push(0x10000 + (a << 10) + b);\n\n // 4. Set i to i+1.\n i += 1;\n }\n\n // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a\n // U+FFFD REPLACEMENT CHARACTER.\n else {\n u.push(0xFFFD);\n }\n }\n }\n\n // 3. Set i to i+1.\n i += 1;\n }\n\n // 6. Return U.\n return u;\n}\n\n/**\n * @param {!Array.} code_points Array of code points.\n * @return {string} string String of UTF-16 code units.\n */\nfunction codePointsToString(code_points) {\n var s = '';\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 0xFFFF) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 0x10000;\n s += String.fromCharCode((cp >> 10) + 0xD800,\n (cp & 0x3FF) + 0xDC00);\n }\n }\n return s;\n}\n\n\n//\n// Implementation of Encoding specification\n// https://encoding.spec.whatwg.org/\n//\n\n//\n// 3. Terminology\n//\n\n/**\n * End-of-stream is a special token that signifies no more tokens\n * are in the stream.\n * @const\n */ var end_of_stream = -1;\n\n/**\n * A stream represents an ordered sequence of tokens.\n *\n * @constructor\n * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide the\n * stream.\n */\nfunction Stream(tokens) {\n /** @type {!Array.} */\n this.tokens = [].slice.call(tokens);\n}\n\nStream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n};\n\n//\n// 4. Encodings\n//\n\n// 4.1 Encoders and decoders\n\n/** @const */\nvar finished = -1;\n\n/**\n * @param {boolean} fatal If true, decoding errors raise an exception.\n * @param {number=} opt_code_point Override the standard fallback code point.\n * @return {number} The code point to insert on a decoding error.\n */\nfunction decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError('Decoder error');\n return opt_code_point || 0xFFFD;\n}\n\n/** @interface */\nfunction Decoder() {}\nDecoder.prototype = {\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point, or |finished|.\n */\n handler: function(stream, bite) {}\n};\n\n/** @interface */\nfunction Encoder() {}\nEncoder.prototype = {\n /**\n * @param {Stream} stream The stream of code points being encoded.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit, or |finished|.\n */\n handler: function(stream, code_point) {}\n};\n\n//\n// 7. API\n//\n\n/** @const */ var DEFAULT_ENCODING = 'utf-8';\n\n// 7.1 Interface TextDecoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextDecoder(encoding, options) {\n if (!(this instanceof TextDecoder)) {\n return new TextDecoder(encoding, options);\n }\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {boolean} */\n this._BOMseen = false;\n /** @private @type {?Decoder} */\n this._decoder = null;\n /** @private @type {boolean} */\n this._fatal = Boolean(options['fatal']);\n /** @private @type {boolean} */\n this._ignoreBOM = Boolean(options['ignoreBOM']);\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n Object.defineProperty(this, 'fatal', {value: this._fatal});\n Object.defineProperty(this, 'ignoreBOM', {value: this._ignoreBOM});\n}\n\nTextDecoder.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === 'object' && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === 'object' && 'buffer' in input &&\n input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(input.buffer,\n input.byteOffset,\n input.byteLength);\n } else {\n bytes = new Uint8Array(0);\n }\n\n options = ToDictionary(options);\n\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({fatal: this._fatal});\n this._BOMseen = false;\n }\n this._streaming = Boolean(options['stream']);\n\n var input_stream = new Stream(bytes);\n\n var code_points = [];\n\n /** @type {?(number|!Array.)} */\n var result;\n\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n\n if (code_points.length) {\n // If encoding is one of utf-8, utf-16be, and utf-16le, and\n // ignore BOM flag and BOM seen flag are unset, run these\n // subsubsteps:\n if (['utf-8'].indexOf(this.encoding) !== -1 &&\n !this._ignoreBOM && !this._BOMseen) {\n // If token is U+FEFF, set BOM seen flag.\n if (code_points[0] === 0xFEFF) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n // Otherwise, if token is not end-of-stream, set BOM seen\n // flag and append token to output.\n this._BOMseen = true;\n }\n }\n }\n\n return codePointsToString(code_points);\n }\n};\n\n// 7.2 Interface TextEncoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextEncoder(encoding, options) {\n if (!(this instanceof TextEncoder))\n return new TextEncoder(encoding, options);\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {?Encoder} */\n this._encoder = null;\n /** @private @type {{fatal: boolean}} */\n this._options = {fatal: Boolean(options['fatal'])};\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n}\n\nTextEncoder.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : '';\n options = ToDictionary(options);\n\n // NOTE: This option is nonstandard. None of the encodings\n // permitted for encoding (i.e. UTF-8, UTF-16) are stateful,\n // so streaming is not necessary.\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options['stream']);\n\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n /** @type {?(number|!Array.)} */\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n};\n\n//\n// 8. The encoding\n//\n\n// 8.1 utf-8\n\n/**\n * @constructor\n * @implements {Decoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Decoder(options) {\n var fatal = options.fatal;\n\n // utf-8's decoder's has an associated utf-8 code point, utf-8\n // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8\n // lower boundary (initially 0x80), and a utf-8 upper boundary\n // (initially 0xBF).\n var /** @type {number} */ utf8_code_point = 0,\n /** @type {number} */ utf8_bytes_seen = 0,\n /** @type {number} */ utf8_bytes_needed = 0,\n /** @type {number} */ utf8_lower_boundary = 0x80,\n /** @type {number} */ utf8_upper_boundary = 0xBF;\n\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point.\n */\n this.handler = function(stream, bite) {\n // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,\n // set utf-8 bytes needed to 0 and return error.\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n\n // 2. If byte is end-of-stream, return finished.\n if (bite === end_of_stream)\n return finished;\n\n // 3. If utf-8 bytes needed is 0, based on byte:\n if (utf8_bytes_needed === 0) {\n\n // 0x00 to 0x7F\n if (inRange(bite, 0x00, 0x7F)) {\n // Return a code point whose value is byte.\n return bite;\n }\n\n // 0xC2 to 0xDF\n if (inRange(bite, 0xC2, 0xDF)) {\n // Set utf-8 bytes needed to 1 and utf-8 code point to byte\n // − 0xC0.\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 0xC0;\n }\n\n // 0xE0 to 0xEF\n else if (inRange(bite, 0xE0, 0xEF)) {\n // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.\n if (bite === 0xE0)\n utf8_lower_boundary = 0xA0;\n // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.\n if (bite === 0xED)\n utf8_upper_boundary = 0x9F;\n // 3. Set utf-8 bytes needed to 2 and utf-8 code point to\n // byte − 0xE0.\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 0xE0;\n }\n\n // 0xF0 to 0xF4\n else if (inRange(bite, 0xF0, 0xF4)) {\n // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.\n if (bite === 0xF0)\n utf8_lower_boundary = 0x90;\n // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.\n if (bite === 0xF4)\n utf8_upper_boundary = 0x8F;\n // 3. Set utf-8 bytes needed to 3 and utf-8 code point to\n // byte − 0xF0.\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 0xF0;\n }\n\n // Otherwise\n else {\n // Return error.\n return decoderError(fatal);\n }\n\n // Then (byte is in the range 0xC2 to 0xF4) set utf-8 code\n // point to utf-8 code point << (6 × utf-8 bytes needed) and\n // return continue.\n utf8_code_point = utf8_code_point << (6 * utf8_bytes_needed);\n return null;\n }\n\n // 4. If byte is not in the range utf-8 lower boundary to utf-8\n // upper boundary, run these substeps:\n if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n\n // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8\n // bytes seen to 0, set utf-8 lower boundary to 0x80, and set\n // utf-8 upper boundary to 0xBF.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 2. Prepend byte to stream.\n stream.prepend(bite);\n\n // 3. Return error.\n return decoderError(fatal);\n }\n\n // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary\n // to 0xBF.\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 6. Increase utf-8 bytes seen by one and set utf-8 code point\n // to utf-8 code point + (byte − 0x80) << (6 × (utf-8 bytes\n // needed − utf-8 bytes seen)).\n utf8_bytes_seen += 1;\n utf8_code_point += (bite - 0x80) << (6 * (utf8_bytes_needed - utf8_bytes_seen));\n\n // 7. If utf-8 bytes seen is not equal to utf-8 bytes needed,\n // continue.\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n\n // 8. Let code point be utf-8 code point.\n var code_point = utf8_code_point;\n\n // 9. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes\n // seen to 0.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n\n // 10. Return a code point whose value is code point.\n return code_point;\n };\n}\n\n/**\n * @constructor\n * @implements {Encoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Encoder(options) {\n var fatal = options.fatal;\n /**\n * @param {Stream} stream Input stream.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit.\n */\n this.handler = function(stream, code_point) {\n // 1. If code point is end-of-stream, return finished.\n if (code_point === end_of_stream)\n return finished;\n\n // 2. If code point is in the range U+0000 to U+007F, return a\n // byte whose value is code point.\n if (inRange(code_point, 0x0000, 0x007f))\n return code_point;\n\n // 3. Set count and offset based on the range code point is in:\n var count, offset;\n // U+0080 to U+07FF: 1 and 0xC0\n if (inRange(code_point, 0x0080, 0x07FF)) {\n count = 1;\n offset = 0xC0;\n }\n // U+0800 to U+FFFF: 2 and 0xE0\n else if (inRange(code_point, 0x0800, 0xFFFF)) {\n count = 2;\n offset = 0xE0;\n }\n // U+10000 to U+10FFFF: 3 and 0xF0\n else if (inRange(code_point, 0x10000, 0x10FFFF)) {\n count = 3;\n offset = 0xF0;\n }\n\n // 4.Let bytes be a byte sequence whose first byte is (code\n // point >> (6 × count)) + offset.\n var bytes = [(code_point >> (6 * count)) + offset];\n\n // 5. Run these substeps while count is greater than 0:\n while (count > 0) {\n\n // 1. Set temp to code point >> (6 × (count − 1)).\n var temp = code_point >> (6 * (count - 1));\n\n // 2. Append to bytes 0x80 | (temp & 0x3F).\n bytes.push(0x80 | (temp & 0x3F));\n\n // 3. Decrease count by one.\n count -= 1;\n }\n\n // 6. Return bytes bytes, in order.\n return bytes;\n };\n}\n\n\n\n\n/***/ }),\n\n/***/ 7582:\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"__addDisposableResource\": function() { return /* binding */ __addDisposableResource; },\n/* harmony export */ \"__assign\": function() { return /* binding */ __assign; },\n/* harmony export */ \"__asyncDelegator\": function() { return /* binding */ __asyncDelegator; },\n/* harmony export */ \"__asyncGenerator\": function() { return /* binding */ __asyncGenerator; },\n/* harmony export */ \"__asyncValues\": function() { return /* binding */ __asyncValues; },\n/* harmony export */ \"__await\": function() { return /* binding */ __await; },\n/* harmony export */ \"__awaiter\": function() { return /* binding */ __awaiter; },\n/* harmony export */ \"__classPrivateFieldGet\": function() { return /* binding */ __classPrivateFieldGet; },\n/* harmony export */ \"__classPrivateFieldIn\": function() { return /* binding */ __classPrivateFieldIn; },\n/* harmony export */ \"__classPrivateFieldSet\": function() { return /* binding */ __classPrivateFieldSet; },\n/* harmony export */ \"__createBinding\": function() { return /* binding */ __createBinding; },\n/* harmony export */ \"__decorate\": function() { return /* binding */ __decorate; },\n/* harmony export */ \"__disposeResources\": function() { return /* binding */ __disposeResources; },\n/* harmony export */ \"__esDecorate\": function() { return /* binding */ __esDecorate; },\n/* harmony export */ \"__exportStar\": function() { return /* binding */ __exportStar; },\n/* harmony export */ \"__extends\": function() { return /* binding */ __extends; },\n/* harmony export */ \"__generator\": function() { return /* binding */ __generator; },\n/* harmony export */ \"__importDefault\": function() { return /* binding */ __importDefault; },\n/* harmony export */ \"__importStar\": function() { return /* binding */ __importStar; },\n/* harmony export */ \"__makeTemplateObject\": function() { return /* binding */ __makeTemplateObject; },\n/* harmony export */ \"__metadata\": function() { return /* binding */ __metadata; },\n/* harmony export */ \"__param\": function() { return /* binding */ __param; },\n/* harmony export */ \"__propKey\": function() { return /* binding */ __propKey; },\n/* harmony export */ \"__read\": function() { return /* binding */ __read; },\n/* harmony export */ \"__rest\": function() { return /* binding */ __rest; },\n/* harmony export */ \"__runInitializers\": function() { return /* binding */ __runInitializers; },\n/* harmony export */ \"__setFunctionName\": function() { return /* binding */ __setFunctionName; },\n/* harmony export */ \"__spread\": function() { return /* binding */ __spread; },\n/* harmony export */ \"__spreadArray\": function() { return /* binding */ __spreadArray; },\n/* harmony export */ \"__spreadArrays\": function() { return /* binding */ __spreadArrays; },\n/* harmony export */ \"__values\": function() { return /* binding */ __values; }\n/* harmony export */ });\n/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nfunction __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nfunction __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nfunction __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nfunction __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nfunction __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nfunction __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nfunction __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nfunction __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nvar __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nfunction __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nfunction __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nfunction __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nfunction __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nfunction __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nfunction __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nfunction __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nfunction __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nfunction __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nfunction __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nfunction __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nfunction __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nfunction __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nfunction __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nfunction __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n});\n\n\n/***/ }),\n\n/***/ 8616:\n/***/ (function(module) {\n\n\"use strict\";\nmodule.exports = JSON.parse('{\"version\":\"0.0.1\",\"name\":\"merkle_distributor\",\"instructions\":[{\"name\":\"newDistributor\",\"docs\":[\"READ THE FOLLOWING:\",\"\",\"This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.\",\"\",\"An attack could look like:\",\"- A legitimate user opens a new distributor.\",\"- Someone observes the call to this instruction.\",\"- They replace the clawback_receiver, admin, or time parameters with their own.\",\"\",\"One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own.\",\"Then the attacker can steal all funds from the distributor to their own clawback_receiver account.\",\"\",\"HOW TO AVOID:\",\"- When you call into this instruction, ensure your transaction succeeds.\",\"- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and\",\"assert the parameters are what you expect, most importantly the clawback_receiver and admin.\",\"- If your transaction fails, double check the value on-chain matches what you expect.\"],\"accounts\":[{\"name\":\"distributor\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"[MerkleDistributor].\"],\"pda\":{\"seeds\":[{\"kind\":\"const\",\"type\":\"string\",\"value\":\"MerkleDistributor\"},{\"kind\":\"account\",\"type\":\"publicKey\",\"account\":\"Mint\",\"path\":\"mint\"},{\"kind\":\"arg\",\"type\":\"u64\",\"path\":\"version\"}]}},{\"name\":\"clawbackReceiver\",\"isMut\":false,\"isSigner\":false,\"docs\":[\"Clawback receiver token account\"]},{\"name\":\"mint\",\"isMut\":false,\"isSigner\":false,\"docs\":[\"The mint to distribute.\"]},{\"name\":\"tokenVault\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"Token vault\"]},{\"name\":\"admin\",\"isMut\":true,\"isSigner\":true,\"docs\":[\"Admin wallet, responsible for creating the distributor and paying for the transaction.\",\"Also has the authority to set the clawback receiver and change itself.\"]},{\"name\":\"systemProgram\",\"isMut\":false,\"isSigner\":false,\"docs\":[\"The [System] program.\"]},{\"name\":\"associatedTokenProgram\",\"isMut\":false,\"isSigner\":false,\"docs\":[\"The [Associated Token] program.\"]},{\"name\":\"tokenProgram\",\"isMut\":false,\"isSigner\":false,\"docs\":[\"The [Token] program.\"]}],\"args\":[{\"name\":\"version\",\"type\":\"u64\"},{\"name\":\"root\",\"type\":{\"array\":[\"u8\",32]}},{\"name\":\"maxTotalClaim\",\"type\":\"u64\"},{\"name\":\"maxNumNodes\",\"type\":\"u64\"},{\"name\":\"startTs\",\"type\":\"i64\"},{\"name\":\"endTs\",\"type\":\"i64\"}]},{\"name\":\"newClaim\",\"accounts\":[{\"name\":\"distributor\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"The [MerkleDistributor].\"]},{\"name\":\"claimStatus\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"Claim status PDA\"],\"pda\":{\"seeds\":[{\"kind\":\"const\",\"type\":\"string\",\"value\":\"ClaimStatus\"},{\"kind\":\"account\",\"type\":\"publicKey\",\"path\":\"claimant\"},{\"kind\":\"account\",\"type\":\"publicKey\",\"account\":\"MerkleDistributor\",\"path\":\"distributor\"}]}},{\"name\":\"from\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"Distributor ATA containing the tokens to distribute.\"]},{\"name\":\"to\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"Account to send the claimed tokens to.\"]},{\"name\":\"claimant\",\"isMut\":true,\"isSigner\":true,\"docs\":[\"Who is claiming the tokens.\"]},{\"name\":\"tokenProgram\",\"isMut\":false,\"isSigner\":false,\"docs\":[\"SPL [Token] program.\"]},{\"name\":\"systemProgram\",\"isMut\":false,\"isSigner\":false,\"docs\":[\"The [System] program.\"]}],\"args\":[{\"name\":\"index\",\"type\":\"u64\"},{\"name\":\"amount\",\"type\":\"u64\"},{\"name\":\"proof\",\"type\":{\"vec\":{\"array\":[\"u8\",32]}}}]},{\"name\":\"clawback\",\"accounts\":[{\"name\":\"distributor\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"The [MerkleDistributor].\"]},{\"name\":\"from\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"Distributor ATA containing the tokens to distribute.\"]},{\"name\":\"to\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"The Clawback token account.\"]},{\"name\":\"admin\",\"isMut\":true,\"isSigner\":true,\"docs\":[\"Admin account\"]},{\"name\":\"systemProgram\",\"isMut\":false,\"isSigner\":false,\"docs\":[\"The [System] program.\"]},{\"name\":\"tokenProgram\",\"isMut\":false,\"isSigner\":false,\"docs\":[\"SPL [Token] program.\"]}],\"args\":[{\"name\":\"amount\",\"type\":\"u64\"}]},{\"name\":\"setClawbackReceiver\",\"accounts\":[{\"name\":\"distributor\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"The [MerkleDistributor].\"]},{\"name\":\"newClawbackAccount\",\"isMut\":false,\"isSigner\":false,\"docs\":[\"New clawback account\"]},{\"name\":\"admin\",\"isMut\":true,\"isSigner\":true,\"docs\":[\"Admin signer\"]}],\"args\":[]},{\"name\":\"setAdmin\",\"accounts\":[{\"name\":\"distributor\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"The [MerkleDistributor].\"]},{\"name\":\"admin\",\"isMut\":true,\"isSigner\":true,\"docs\":[\"Admin signer\"]},{\"name\":\"newAdmin\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"New admin account\"]}],\"args\":[]},{\"name\":\"setTimestamp\",\"accounts\":[{\"name\":\"distributor\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"The [MerkleDistributor].\"]},{\"name\":\"admin\",\"isMut\":true,\"isSigner\":true,\"docs\":[\"Admin signer\"]}],\"args\":[{\"name\":\"startTs\",\"type\":\"i64\"},{\"name\":\"endTs\",\"type\":\"i64\"}]},{\"name\":\"setMerkleRoot\",\"accounts\":[{\"name\":\"distributor\",\"isMut\":true,\"isSigner\":false,\"docs\":[\"The [MerkleDistributor].\"]},{\"name\":\"admin\",\"isMut\":true,\"isSigner\":true,\"docs\":[\"Admin signer\"]}],\"args\":[{\"name\":\"root\",\"type\":{\"array\":[\"u8\",32]}},{\"name\":\"maxTotalClaim\",\"type\":\"u64\"},{\"name\":\"maxNumNodes\",\"type\":\"u64\"}]}],\"accounts\":[{\"name\":\"ClaimStatus\",\"docs\":[\"Holds whether or not a claimant has claimed tokens.\"],\"type\":{\"kind\":\"struct\",\"fields\":[{\"name\":\"isClaimed\",\"docs\":[\"If true, the tokens have been claimed.\"],\"type\":\"bool\"},{\"name\":\"claimant\",\"docs\":[\"Authority that claimed the tokens.\"],\"type\":\"publicKey\"},{\"name\":\"claimedAt\",\"docs\":[\"When the tokens were claimed.\"],\"type\":\"i64\"},{\"name\":\"amount\",\"docs\":[\"Amount of tokens claimed.\"],\"type\":\"u64\"}]}},{\"name\":\"MerkleDistributor\",\"docs\":[\"State for the account which distributes tokens.\"],\"type\":{\"kind\":\"struct\",\"fields\":[{\"name\":\"bump\",\"docs\":[\"Bump seed.\"],\"type\":\"u8\"},{\"name\":\"version\",\"docs\":[\"Version of the airdrop\"],\"type\":\"u64\"},{\"name\":\"root\",\"docs\":[\"The 256-bit merkle root.\"],\"type\":{\"array\":[\"u8\",32]}},{\"name\":\"mint\",\"docs\":[\"[Mint] of the token to be distributed.\"],\"type\":\"publicKey\"},{\"name\":\"tokenVault\",\"docs\":[\"Token Address of the vault\"],\"type\":\"publicKey\"},{\"name\":\"maxTotalClaim\",\"docs\":[\"Maximum number of tokens that can ever be claimed from this [MerkleDistributor].\"],\"type\":\"u64\"},{\"name\":\"maxNumNodes\",\"docs\":[\"Maximum number of nodes in [MerkleDistributor].\"],\"type\":\"u64\"},{\"name\":\"totalAmountClaimed\",\"docs\":[\"Total amount of tokens that have been claimed.\"],\"type\":\"u64\"},{\"name\":\"numNodesClaimed\",\"docs\":[\"Number of nodes that have been claimed.\"],\"type\":\"u64\"},{\"name\":\"startTs\",\"docs\":[\"Claim time start (Unix Timestamp)\"],\"type\":\"i64\"},{\"name\":\"endTs\",\"docs\":[\"Claim time end (Unix Timestamp)\"],\"type\":\"i64\"},{\"name\":\"clawbackReceiver\",\"docs\":[\"Clawback receiver\"],\"type\":\"publicKey\"},{\"name\":\"admin\",\"docs\":[\"Admin wallet\"],\"type\":\"publicKey\"}]}}],\"events\":[{\"name\":\"NewClaimEvent\",\"fields\":[{\"name\":\"claimant\",\"type\":\"publicKey\",\"index\":false},{\"name\":\"timestamp\",\"type\":\"i64\",\"index\":false}]},{\"name\":\"ClaimedEvent\",\"fields\":[{\"name\":\"claimant\",\"type\":\"publicKey\",\"index\":false},{\"name\":\"amount\",\"type\":\"u64\",\"index\":false}]}],\"errors\":[{\"code\":6000,\"name\":\"InvalidProof\",\"msg\":\"Invalid Merkle proof\"},{\"code\":6001,\"name\":\"ExceededMaxClaim\",\"msg\":\"Exceeded maximum claim amount\"},{\"code\":6002,\"name\":\"MaxNodesExceeded\",\"msg\":\"Exceeded maximum node count\"},{\"code\":6003,\"name\":\"Unauthorized\",\"msg\":\"Account is not authorized to execute this instruction\"},{\"code\":6004,\"name\":\"OwnerMismatch\",\"msg\":\"Token account owner did not match intended owner\"},{\"code\":6005,\"name\":\"SameClawbackReceiver\",\"msg\":\"New and old Clawback receivers are identical\"},{\"code\":6006,\"name\":\"SameAdmin\",\"msg\":\"New and old admin are identical\"},{\"code\":6007,\"name\":\"ClaimExpired\",\"msg\":\"Claim window expired\"},{\"code\":6008,\"name\":\"ArithmeticError\",\"msg\":\"Arithmetic Error (overflow/underflow)\"},{\"code\":6009,\"name\":\"StartTimestampAfterEnd\",\"msg\":\"Start Timestamp cannot be after end Timestamp\"},{\"code\":6010,\"name\":\"TimestampsNotInFuture\",\"msg\":\"Timestamps cannot be in the past\"},{\"code\":6011,\"name\":\"DistributionAlreadyStarted\",\"msg\":\"Distribution already started\"},{\"code\":6012,\"name\":\"InsufficientClawbackAmount\",\"msg\":\"Insufficient clawback amount\"}]}');\n\n/***/ })\n\n},\n/******/ function(__webpack_require__) { // webpackRuntimeModules\n/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }\n/******/ __webpack_require__.O(0, [774,179], function() { return __webpack_exec__(6840), __webpack_exec__(880); });\n/******/ var __webpack_exports__ = __webpack_require__.O();\n/******/ _N_E = __webpack_exports__;\n/******/ }\n]);"],"names":["self","push","__unused_webpack_module","__webpack_exports__","__webpack_require__","d","bn_js__WEBPACK_IMPORTED_MODULE_2___default","a","module","exports","global","__self__","ctx","_solana_web3_js__WEBPACK_IMPORTED_MODULE_1__","bn_js__WEBPACK_IMPORTED_MODULE_2__","n","bs58__WEBPACK_IMPORTED_MODULE_3__","bs58__WEBPACK_IMPORTED_MODULE_3___default","_coral_xyz_borsh__WEBPACK_IMPORTED_MODULE_5__","Buffer","chunks","array","size","Array","apply","Math","ceil","length","map","_","index","slice","isVersionedTransaction","tx","encode$1","data","encode","struct","publicKey","vecU8","StructError","TypeError","constructor","failure","failures","cached","message","rest","path","msg","join","value","key","type","refinement","branch","Object","assign","name","_cached","isIterable","x","isObject","Symbol","iterator","print","JSON","stringify","shiftIterator","input","done","next","undefined","toFailure","result","context","toFailures","r","run","options","coerce","mask","coercer","schema","isArray","valid","validator","k","v","s","entries","ts","t","Map","set","Set","add","refiner","Struct","props","TYPE","assert","create","is","validate","tuples","tuple","error","define","any","Element","i","boolean","literal","constant","description","nullable","number","isNaN","optional","string","keys","union$1","Structs","firstMatch","find","e","unknown","S","first","condition","GET_MULTIPLE_ACCOUNTS_LIMIT","getMultipleAccountsAndContextCore","connection","publicKeys","commitmentOverride","commitment","accountInfos","getMultipleAccountsInfoAndContext","accounts","account","idx","simulateTransaction","transaction","signers","includeAccounts","_a","sign","_compile","signData","serialize","wireTransaction","_serialize","encodedTransaction","toString","config","encoding","addresses","nonProgramIds","toBase58","sigVerify","args","unsafeRes","_rpcRequest","res","SimulatedTransactionResponseStruct","logs","traceIndent","logTrace","console","SendTransactionError","jsonRpcResult","createRpcResult","UnknownRpcResult","jsonrpc","id","code","jsonRpcResultAndContext","slot","err","executable","owner","lamports","rentEpoch","unitsConsumed","AnchorProvider","wallet","opts","defaultOptions","preflightCommitment","local","url","env","sendAndConfirm","_b","_c","_d","feePayer","recentBlockhash","getLatestBlockhash","blockhash","signer","partialSign","signTransaction","rawTx","sendAndConfirmRawTransaction","ConfirmError","txSig","signatures","Uint8Array","signature","maxVer","failedTx","getTransaction","maxSupportedTransactionVersion","meta","logMessages","sendAll","txWithSigners","txs","forEach","kp","signedTxs","signAllTransactions","sigs","simulate","SimulateError","Error","simulationResponse","rawTransaction","sendOptions","skipPreflight","sendRawTransaction","status","confirmTransaction","_provider","commonjsGlobal","globalThis","window","g","getDefaultExportFromCjs","__esModule","prototype","hasOwnProperty","call","dist","defineProperty","ANCHOR_ERROR__REQUIRE_EQ_VIOLATED","ANCHOR_ERROR__REQUIRE_VIOLATED","ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_PROGRAM_ID","ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION_AUTHORITY","ANCHOR_ERROR__CONSTRAINT_MINT_TRANSFER_HOOK_EXTENSION","ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION_DELEGATE","ANCHOR_ERROR__CONSTRAINT_MINT_PERMANENT_DELEGATE_EXTENSION","ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION_AUTHORITY","ANCHOR_ERROR__CONSTRAINT_MINT_CLOSE_AUTHORITY_EXTENSION","ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_METADATA_ADDRESS","ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION_AUTHORITY","ANCHOR_ERROR__CONSTRAINT_MINT_METADATA_POINTER_EXTENSION","ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_MEMBER_ADDRESS","ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION_AUTHORITY","ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_MEMBER_POINTER_EXTENSION","ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_GROUP_ADDRESS","ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION_AUTHORITY","ANCHOR_ERROR__CONSTRAINT_MINT_GROUP_POINTER_EXTENSION","ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_TOKEN_TOKEN_PROGRAM","ANCHOR_ERROR__CONSTRAINT_MINT_TOKEN_PROGRAM","ANCHOR_ERROR__CONSTRAINT_TOKEN_TOKEN_PROGRAM","ANCHOR_ERROR__CONSTRAINT_ACCOUNT_IS_NONE","ANCHOR_ERROR__CONSTRAINT_SPACE","ANCHOR_ERROR__CONSTRAINT_MINT_DECIMALS","ANCHOR_ERROR__CONSTRAINT_MINT_FREEZE_AUTHORITY","ANCHOR_ERROR__CONSTRAINT_MINT_MINT_AUTHORITY","ANCHOR_ERROR__CONSTRAINT_TOKEN_OWNER","ANCHOR_ERROR__CONSTRAINT_TOKEN_MINT","ANCHOR_ERROR__CONSTRAINT_ZERO","ANCHOR_ERROR__CONSTRAINT_ADDRESS","ANCHOR_ERROR__CONSTRAINT_CLOSE","ANCHOR_ERROR__CONSTRAINT_ASSOCIATED_INIT","ANCHOR_ERROR__CONSTRAINT_ASSOCIATED","ANCHOR_ERROR__CONSTRAINT_STATE","ANCHOR_ERROR__CONSTRAINT_EXECUTABLE","ANCHOR_ERROR__CONSTRAINT_SEEDS","ANCHOR_ERROR__CONSTRAINT_RENT_EXEMPT","ANCHOR_ERROR__CONSTRAINT_OWNER","ANCHOR_ERROR__CONSTRAINT_RAW","ANCHOR_ERROR__CONSTRAINT_SIGNER","ANCHOR_ERROR__CONSTRAINT_HAS_ONE","ANCHOR_ERROR__CONSTRAINT_MUT","ANCHOR_ERROR__EVENT_INSTRUCTION_STUB","ANCHOR_ERROR__IDL_ACCOUNT_NOT_EMPTY","ANCHOR_ERROR__IDL_INSTRUCTION_INVALID_PROGRAM","ANCHOR_ERROR__IDL_INSTRUCTION_STUB","ANCHOR_ERROR__INSTRUCTION_DID_NOT_SERIALIZE","ANCHOR_ERROR__INSTRUCTION_DID_NOT_DESERIALIZE","ANCHOR_ERROR__INSTRUCTION_FALLBACK_NOT_FOUND","ANCHOR_ERROR__INSTRUCTION_MISSING","ANCHOR_ERROR__DEPRECATED","ANCHOR_ERROR__INVALID_NUMERIC_CONVERSION","ANCHOR_ERROR__TRYING_TO_INIT_PAYER_AS_PROGRAM_ACCOUNT","ANCHOR_ERROR__DECLARED_PROGRAM_ID_MISMATCH","ANCHOR_ERROR__ACCOUNT_DUPLICATE_REALLOCS","ANCHOR_ERROR__ACCOUNT_REALLOC_EXCEEDS_LIMIT","ANCHOR_ERROR__ACCOUNT_SYSVAR_MISMATCH","ANCHOR_ERROR__ACCOUNT_NOT_ASSOCIATED_TOKEN_ACCOUNT","ANCHOR_ERROR__ACCOUNT_NOT_PROGRAM_DATA","ANCHOR_ERROR__ACCOUNT_NOT_INITIALIZED","ANCHOR_ERROR__ACCOUNT_NOT_SYSTEM_OWNED","ANCHOR_ERROR__ACCOUNT_NOT_SIGNER","ANCHOR_ERROR__INVALID_PROGRAM_EXECUTABLE","ANCHOR_ERROR__INVALID_PROGRAM_ID","ANCHOR_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM","ANCHOR_ERROR__ACCOUNT_NOT_MUTABLE","ANCHOR_ERROR__ACCOUNT_NOT_ENOUGH_KEYS","ANCHOR_ERROR__ACCOUNT_DID_NOT_SERIALIZE","ANCHOR_ERROR__ACCOUNT_DID_NOT_DESERIALIZE","ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_MISMATCH","ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_NOT_FOUND","ANCHOR_ERROR__ACCOUNT_DISCRIMINATOR_ALREADY_SET","ANCHOR_ERROR__REQUIRE_GTE_VIOLATED","ANCHOR_ERROR__REQUIRE_GT_VIOLATED","ANCHOR_ERROR__REQUIRE_KEYS_NEQ_VIOLATED","ANCHOR_ERROR__REQUIRE_NEQ_VIOLATED","ANCHOR_ERROR__REQUIRE_KEYS_EQ_VIOLATED","LangErrorCode","InstructionMissing","InstructionFallbackNotFound","InstructionDidNotDeserialize","InstructionDidNotSerialize","IdlInstructionStub","IdlInstructionInvalidProgram","IdlAccountNotEmpty","EventInstructionStub","ConstraintMut","ConstraintHasOne","ConstraintSigner","ConstraintRaw","ConstraintOwner","ConstraintRentExempt","ConstraintSeeds","ConstraintExecutable","ConstraintState","ConstraintAssociated","ConstraintAssociatedInit","ConstraintClose","ConstraintAddress","ConstraintZero","ConstraintTokenMint","ConstraintTokenOwner","ConstraintMintMintAuthority","ConstraintMintFreezeAuthority","ConstraintMintDecimals","ConstraintSpace","ConstraintAccountIsNone","ConstraintTokenTokenProgram","ConstraintMintTokenProgram","ConstraintAssociatedTokenTokenProgram","ConstraintMintGroupPointerExtension","ConstraintMintGroupPointerExtensionAuthority","ConstraintMintGroupPointerExtensionGroupAddress","ConstraintMintGroupMemberPointerExtension","ConstraintMintGroupMemberPointerExtensionAuthority","ConstraintMintGroupMemberPointerExtensionMemberAddress","ConstraintMintMetadataPointerExtension","ConstraintMintMetadataPointerExtensionAuthority","ConstraintMintMetadataPointerExtensionMetadataAddress","ConstraintMintCloseAuthorityExtension","ConstraintMintCloseAuthorityExtensionAuthority","ConstraintMintPermanentDelegateExtension","ConstraintMintPermanentDelegateExtensionDelegate","ConstraintMintTransferHookExtension","ConstraintMintTransferHookExtensionAuthority","ConstraintMintTransferHookExtensionProgramId","RequireViolated","RequireEqViolated","RequireKeysEqViolated","RequireNeqViolated","RequireKeysNeqViolated","RequireGtViolated","RequireGteViolated","AccountDiscriminatorAlreadySet","AccountDiscriminatorNotFound","AccountDiscriminatorMismatch","AccountDidNotDeserialize","AccountDidNotSerialize","AccountNotEnoughKeys","AccountNotMutable","AccountOwnedByWrongProgram","InvalidProgramId","InvalidProgramExecutable","AccountNotSigner","AccountNotSystemOwned","AccountNotInitialized","AccountNotProgramData","AccountNotAssociatedTokenAccount","AccountSysvarMismatch","AccountReallocExceedsLimit","AccountDuplicateReallocs","DeclaredProgramIdMismatch","TryingToInitPayerAsProgramAccount","InvalidNumericConversion","Deprecated","Layout","span","property","Number","isInteger","makeDestinationObject","decode","b","offset","src","getSpan","replicate","rv","fromArray","values","Layout_2","nameWithProperty","lo","ExternalLayout","isCount","OffsetLayout","layout","UInt","UIntBE","readUIntLE","writeUIntLE","readUIntBE","writeUIntBE","V2E32","divmodInt64","hi32","floor","lo32","roundedInt64","NearUInt64","readUInt32LE","split","writeUInt32LE","NearInt64","readInt32LE","writeInt32LE","Structure","fields","decodePrefixes","reduce","acc","fd","fsp","dest","firstOffset","lastOffset","lastWrote","fv","shift","layoutFor","offsetOf","UnionDiscriminator","UnionLayoutDiscriminator","Union","discr","defaultLayout","upv","discriminator","usesPrefixDiscriminator","registry","boundGetSourceVariant","defaultGetSourceVariant","bind","getSourceVariant","configGetSourceVariant","gsv","vlo","getVariant","tag","dlo","clo","contentOffset","addVariant","variant","VariantLayout","vb","isBuffer","union","Blob$1","write","u8","u32","nu64","ns64","blob","RustStringLayout","chars","from","toNumber","rustStringLayout","publicKey$2","LAYOUT","WrappedLayout$1","decoder","encoder","publicKey$1","PublicKey","toBuffer","browserPonyfill","F","fetch","DOMException","support","searchParams","iterable","Blob","formData","arrayBuffer","isDataView","obj","DataView","isPrototypeOf","viewClasses","isArrayBufferView","ArrayBuffer","isView","indexOf","normalizeName","String","test","toLowerCase","normalizeValue","iteratorFor","items","Headers","headers","append","header","getOwnPropertyNames","consumed","body","bodyUsed","Promise","reject","fileReaderReady","reader","resolve","onload","onerror","readBlobAsArrayBuffer","FileReader","promise","readAsArrayBuffer","readBlobAsText","readAsText","readArrayBufferAsText","buf","view","fromCharCode","bufferClone","byteLength","buffer","Body","_initBody","_bodyInit","_bodyText","_bodyBlob","FormData","_bodyFormData","URLSearchParams","_bodyArrayBuffer","get","rejected","then","text","json","parse","oldValue","has","callback","thisArg","methods","normalizeMethod","method","upcased","toUpperCase","Request","credentials","mode","signal","referrer","form","trim","bytes","replace","decodeURIComponent","parseHeaders","rawHeaders","preProcessedHeaders","line","parts","Response","bodyInit","ok","statusText","clone","response","redirectStatuses","redirect","location","stack","init","request","aborted","xhr","XMLHttpRequest","abortXhr","abort","getAllResponseHeaders","responseURL","responseText","ontimeout","onabort","open","withCredentials","responseType","setRequestHeader","addEventListener","onreadystatechange","readyState","removeEventListener","send","polyfill","ponyfill","default","UPGRADEABLE_LOADER_STATE_LAYOUT","rustEnum","option","u64","decodeUpgradeableLoaderState","uint64","WrappedLayout","fromBuffer","coption","COptionLayout","toArray","reverse","zeroPad","alloc","copy","U","p","buffer_1","web3_js_1","common_js_1","NodeWallet","payer","process","ANCHOR_WALLET","Keypair","fromSecretKey","readFileSync","Z","isBrowser","ANCHOR_BROWSER","__unused_webpack_exports","basex","ALPHABET","UPPERCASE","LOWERCASE","LEADING_CAPITAL","IDENTIFIER","SEPARATORS","LEADING_SEPARATORS","source","SEPARATORS_AND_IDENTIFIER","NUMBERS_AND_IDENTIFIER","preserveCamelCase","isLastCharLower","isLastCharUpper","isLastLastCharUpper","character","preserveConsecutiveUppercase","lastIndex","m1","postProcess","identifier","m","camelCase","pascalCase","filter","locale","toLocaleLowerCase","toLocaleUpperCase","hasUpperCase","charAt","__importDefault","mod","str","tagged","vec","bool","i256","u256","i128","u128","i64","f64","f32","i32","i16","u16","i8","buffer_layout_1","bn_js_1","buffer_layout_2","enumerable","s8","s16","s32","BNLayout","signed","num","fromTwos","toTwos","toArrayLike","OptionLayout","decodeBool","encodeBool","elementLayout","seq","wrappedLayout","decodeTag","receivedTag","eq","variants","discriminant","unionLayout","MapEntryLayout","keyLayout","valueLayout","keyBytes","valueBytes","sheetForTag","sheet","document","styleSheets","ownerNode","createStyleElement","createElement","setAttribute","nonce","appendChild","createTextNode","createCache","StyleSheet","_this","_insertTag","before","tags","insertionPoint","nextSibling","prepend","container","firstChild","insertBefore","isSpeedy","speedy","ctr","_proto","hydrate","nodes","insert","rule","insertRule","cssRules","flush","parentNode","removeChild","abs","Utility_from","Utility_assign","hash","Utility_charat","Utility_match","pattern","exec","Utility_replace","replacement","indexof","search","charCodeAt","Utility_substr","begin","end","Utility_strlen","Utility_sizeof","Utility_append","Utility_combine","column","Tokenizer_length","position","characters","node","root","parent","children","return","Tokenizer_copy","Tokenizer_char","prev","peek","caret","token","dealloc","delimit","delimiter","whitespace","escaping","count","commenter","Enum_MS","Enum_MOZ","Enum_WEBKIT","COMMENT","Enum_RULESET","Enum_DECLARATION","IMPORT","Enum_KEYFRAMES","LAYER","Serializer_serialize","output","element","middleware","collection","rulesheet","compile","rules","rulesets","pseudo","points","declarations","atrule","previous","variable","scanning","ampersand","reference","comment","declaration","ruleset","post","j","y","z","identifierWithPointTracking","toRules","parsed","getRules","fixedElements","WeakMap","compat","isImplicitRule","parentRules","removeLabel","emotion_cache_browser_esm_prefix","defaultStylisPlugins","_insert","currentSheet","ssrStyles","querySelectorAll","dataEmotionAttribute","getAttribute","head","stylisPlugins","inserted","nodesToHydrate","attrib","serializer","omnipresentPlugins","concat","stylis","styles","selector","serialized","shouldCache","cache","registered","memoize","fn","arg","CacheProvider","ThemeContext","withEmotionCache","react__WEBPACK_IMPORTED_MODULE_0__","_emotion_cache__WEBPACK_IMPORTED_MODULE_1__","EmotionCacheContext","createContext","HTMLElement","Provider","func","forwardRef","ref","useContext","keyframes","css","Global","_emotion_element_43c6fea0_browser_esm_js__WEBPACK_IMPORTED_MODULE_5__","_emotion_utils__WEBPACK_IMPORTED_MODULE_6__","_emotion_use_insertion_effect_with_fallbacks__WEBPACK_IMPORTED_MODULE_1__","_emotion_serialize__WEBPACK_IMPORTED_MODULE_2__","w","O","T","_ref","serializedNames","serializedStyles","dangerouslySetInnerHTML","__html","sheetRef","useRef","rehydrating","querySelector","current","sheetRefCurrent","My","nextElementSibling","_len","arguments","_key","insertable","anim","murmur2","h","len","serializeStyles","cursor","unitlessKeys","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","emotion_memoize_esm","hyphenateRegex","animationRegex","isCustomProperty","isProcessableValue","processStyleName","styleName","processStyleValue","match","p1","p2","handleInterpolation","mergedProps","interpolation","__emotion_styles","createStringFromObject","previousCursor","_i","interpolated","labelPattern","stringMode","strings","raw","identifierName","useInsertionEffectAlwaysWithSyncFallback","useInsertionEffectWithLayoutFallback","react__WEBPACK_IMPORTED_MODULE_0___namespace_cache","syncFallback","useInsertionEffect","useLayoutEffect","insertStyles","getRegisteredStyles","registerStyles","registeredStyles","classNames","rawClassName","className","isStringTag","useDefaultProps","_mui_system_DefaultPropsProvider__WEBPACK_IMPORTED_MODULE_2__","params","material_GlobalStyles_GlobalStyles","esm_extends","GlobalStyles","useTheme","jsx_runtime","esm_GlobalStyles_GlobalStyles","themeId","defaultTheme","upperTheme","globalStyles","jsx","styles_createTheme","objectWithoutPropertiesLoose","formatMuiErrorMessage","deepmerge","defaultSxConfig","styleFunctionSx","createTheme","createMixins","breakpoints","mixins","toolbar","minHeight","up","colorManipulator","common","black","white","colors_common","grey","A100","A200","A400","A700","colors_grey","purple","colors_purple","red","colors_red","orange","colors_orange","blue","colors_blue","lightBlue","colors_lightBlue","green","colors_green","_excluded","light","primary","secondary","disabled","divider","background","paper","action","active","hover","hoverOpacity","selected","selectedOpacity","disabledBackground","disabledOpacity","focus","focusOpacity","activatedOpacity","dark","icon","addLightOrDark","intent","direction","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","$n","main","_j","getDefaultPrimary","getDefaultSecondary","getDefaultError","getDefaultInfo","getDefaultSuccess","getDefaultWarning","createPalette","palette","contrastThreshold","other","info","success","warning","getContrastText","contrastText","mi","augmentColor","color","mainShade","lightShade","darkShade","modes","paletteOutput","createTypography_excluded","round","caseAllCaps","textTransform","defaultFontFamily","createTypography","typography","fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem","pxToRem2","coef","buildVariant","letterSpacing","casing","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","button","caption","overline","inherit","shadowKeyUmbraOpacity","shadowKeyPenumbraOpacity","shadowAmbientShadowOpacity","createShadow","px","shadows","styles_shadows","createTransitions_excluded","easing","easeInOut","easeOut","easeIn","sharp","duration","shortest","shorter","short","standard","complex","enteringScreen","leavingScreen","formatMs","milliseconds","getAutoHeightDuration","height","createTransitions","inputTransitions","mergedEasing","mergedDuration","durationOption","easingOption","delay","animatedProp","mobileStepper","fab","speedDial","appBar","drawer","modal","snackbar","tooltip","styles_zIndex","createTheme_excluded","mixinsInput","paletteInput","transitions","transitionsInput","typographyInput","vars","systemTheme","muiTheme","argument","unstable_sxConfig","unstable_sx","sx","theme","_createTheme__WEBPACK_IMPORTED_MODULE_0__","_emotion_react__WEBPACK_IMPORTED_MODULE_2__","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__","isEmpty","themeInput","xB","_interopRequireDefault","Fq","alpha","darken","getContrastRatio","lighten","_formatMuiErrorMessage2","_clamp","clampWrapper","min","max","hexToRgb","re","colors","parseInt","decomposeColor","colorSpace","marker","substring","parseFloat","recomposeColor","hslToRgb","l","f","rgb","getLuminance","val","toFixed","foreground","lumA","lumB","coefficient","_mui_utils_resolveProps__WEBPACK_IMPORTED_MODULE_2__","PropsContext","DefaultPropsProvider","getThemeProps","components","defaultProps","styleOverrides","useRtl","_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__","_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_2__","RtlContext","RtlProvider","removeUnusedBreakpoints","resolveBreakpointValues","createEmptyBreakpointObject","mergeBreakpointsInOrder","handleBreakpoints","_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_0__","xs","sm","md","lg","xl","defaultBreakpoints","propValue","styleFromPropValue","themeBreakpoints","item","breakpoint","mediaKey","cssKey","breakpointsInput","_breakpointsInput$key","breakpointsInOrder","breakpointStyleKey","breakpointKeys","style","breakpointOutput","isBreakpointUnused","emptyBreakpoints","mergedOutput","computeBreakpointsBase","breakpointValues","base","breakpointsKeys","customBase","applyStyles","getColorSchemeSelector","createBreakpoints","_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__","_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__","sortBreakpointsValues","breakpointsAsArray","sort","breakpoint1","breakpoint2","unit","step","sortedValues","down","between","start","endIndex","only","not","keyIndex","createTheme_createTheme","shape","borderRadius","createTheme_shape","esm_spacing","createSpacing","spacingInput","mui","transform","hB","spacing","argsInput","shapeInput","merge","createUnarySpacing","createUnaryUnit","getValue","margin","padding","properties","directions","aliases","marginX","marginY","paddingX","paddingY","getCssProperties","prop","dir","marginKeys","paddingKeys","spacingKeys","themeKey","defaultValue","propName","_getPath","themeSpacing","DW","transformer","transformed","getStyleFromPropValue","cssProperties","cssProperty","resolveCssProperty","k9","spacing_style","propTypes","filterProps","getPath","getStyleValue","_mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_0__","_breakpoints__WEBPACK_IMPORTED_MODULE_1__","checkVars","themeMapping","propValueFinal","userValue","styleFunctionSx_defaultSxConfig","esm_compose","handlers","borderTransform","createBorderStyle","ZP","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outline","outlineColor","eI","NA","gap","columnGap","rowGap","gridAutoFlow","gridAutoColumns","gridAutoRows","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridArea","paletteTransform","bgcolor","backgroundColor","sizingTransform","width","maxWidth","_props$theme","_props$theme2","VO","minWidth","maxHeight","boxSizing","o3","pt","pr","pb","pl","py","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd","e6","mt","mr","mb","ml","mx","my","marginTop","marginRight","marginBottom","marginLeft","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd","displayPrint","display","overflow","textOverflow","visibility","whiteSpace","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignContent","alignSelf","justifyItems","justifySelf","top","right","bottom","left","boxShadow","fontStyle","textAlign","unstable_createStyleFunctionSx","_mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_1__","_merge__WEBPACK_IMPORTED_MODULE_4__","_style__WEBPACK_IMPORTED_MODULE_0__","_breakpoints__WEBPACK_IMPORTED_MODULE_2__","_defaultSxConfig__WEBPACK_IMPORTED_MODULE_3__","objectsHaveSameKeys","objects","allKeys","object","every","callIfFn","maybeFn","getThemeValue","Jq","_theme$unstable_sxCon","traverse","sxInput","sxObject","W8","styleKey","breakpointsValues","L7","_useThemeWithoutDefault__WEBPACK_IMPORTED_MODULE_1__","systemDefaultTheme","_mui_styled_engine__WEBPACK_IMPORTED_MODULE_1__","isObjectEmpty","contextTheme","capitalize","_mui_utils_formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_0__","clamp_clamp","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","isPlainObject","getPrototypeOf","toStringTag","deepClone","target","encodeURIComponent","_formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_0__","resolveProps","defaultSlotProps","slotProps","slotPropName","createWSOLAccountInstructions","spl_token_1","walletAddress","amountIn","rentExemptLamports","tempAccount","createAccountInstruction","SystemProgram","createAccount","fromPubkey","newAccountPubkey","space","AccountLayout","programId","TOKEN_PROGRAM_ID","initAccountInstruction","Token","createInitAccountInstruction","NATIVE_MINT","closeWSOLAccountInstruction","createCloseAccountInstruction","address","instructions","cleanupInstructions","__createBinding","o","k2","desc","getOwnPropertyDescriptor","writable","configurable","__exportStar","DecimalUtil","decimal_js_1","adjustDecimals","div","pow","fromU64","fromNumber","toU64","isNeg","shiftedValue","mul","zeroDecimalValue","trunc","MathUtil","U64_MAX","U128","TWO","ONE","ZERO","anchor_1","BN","sub","toX64_BN","toX64_Decimal","toX64","fromX64","fromX64_Decimal","fromX64_BN","shiftRightRoundUp","shrn","gt","divRoundUp","n0","n1","hasRemainder","subUnderflowU128","Percentage","numerator","denominator","fromDecimal","fromFraction","toDecimalPlaces","denom","toDecimal","denomGcd","gcd","denomLcm","p1DenomAdjustment","p2DenomAdjustment","p1NumeratorAdjusted","p2NumeratorAdjusted","newNumerator","AddressUtil","toPubKey","translateAddress","toPubKeys","toStrings","findProgramAddress","seeds","bump","utils","findProgramAddressSync","__awaiter","_arguments","P","generator","adopt","fulfilled","deriveATA","resolveOrCreateATAs","resolveOrCreateATA","token_instructions_1","token_util_1","types_1","ownerAddress","tokenMint","getAccountRentExempt","wrappedSolAmountIn","modeIdempotent","requests","nonNativeMints","equals","nativeMints","instructionMap","nonNativeAddresses","all","tokenAccountInfos","getMultipleAccountsInfo","tokenAccounts","TokenUtil","deserializeTokenAccount","tai","tokenAccount","resolvedInstruction","ataAddress","EMPTY_INSTRUCTION","createAtaInstruction","createAssociatedTokenAccountInstruction","ASSOCIATED_TOKEN_PROGRAM_ID","accountRentExempt","getAssociatedTokenAddress","associatedTokenProgramId","tokenProgramId","mint","associatedAccount","pubkey","isSigner","isWritable","instructionData","TransactionInstruction","getMultipleAccounts","getMultipleParsedAccounts","getParsedAccount","tiny_invariant_1","address_util_1","parser","getAccountInfo","results","responses","chunk","addressChunk","combinedResult","flat","__decorate","decorators","c","Reflect","decorate","staticImplements","ParsableMintInfo","ParsableTokenAccountInfo","MintLayout","mintInfo","mintAuthority","mintAuthorityOption","supply","decimals","isInitialized","freezeAuthority","freezeAuthorityOption","PublicKeyUtils","isBase58","orderKeys","comparePublicKeys","key1","key2","bytes1","toBytes","bytes2","byte1","byte2","__rest","getOwnPropertySymbols","propertyIsEnumerable","math_1","web3_1","isNativeMint","createSendTokensToWalletInstruction","sourceWallet","destinationWallet","tokenDecimals","amount","sendSolTxn","transfer","toPubkey","BigInt","sourceTokenAccount","destinationTokenAccount","destinationAtaIx","transferIx","createTransferCheckedInstruction","accountInfo","delegateOption","delegate","delegatedAmount","state","isFrozen","isNativeOption","rentExemptReserve","isNative","closeAuthorityOption","closeAuthority","TransactionBuilder","transactions_processor_1","addInstruction","instruction","addInstructions","prependInstruction","unshift","prependInstructions","addSigner","compressIx","compressPost","curr","txnSize","latestBlockhash","build","requireAllSignatures","Transaction","ix","buildAndExecute","tp","TransactionProcessor","execute","signAndConstructTransaction","provider","txns","txRequest","txBuilder","transactions","lastValidBlockHeight","signTransactions","txRequests","pSignedTxs","rewriteTransaction","sendTransaction","constructSendTransactions","ex","reason","parallel","executeTx","rawTxs","confirmTx","txId","allSettled","signedTx","signAndConstructTransactions","keypair","Dt","En","vt","st","Nt","Kt","Rt","Tt","Ut","xn","Pn","_t","St","Nn","Yn","Vn","bt","wt","Jn","Ne","_n","Qe","Vt","lt","M","dt","wn","jt","L","At","yn","ze","buffer__WEBPACK_IMPORTED_MODULE_0__","base64_js__WEBPACK_IMPORTED_MODULE_4__","camelcase__WEBPACK_IMPORTED_MODULE_5__","camelcase__WEBPACK_IMPORTED_MODULE_5___default","js_sha256__WEBPACK_IMPORTED_MODULE_6__","_project_serum_borsh__WEBPACK_IMPORTED_MODULE_7__","pako__WEBPACK_IMPORTED_MODULE_8__","eventemitter3__WEBPACK_IMPORTED_MODULE_9__","eventemitter3__WEBPACK_IMPORTED_MODULE_9___default","assert__WEBPACK_IMPORTED_MODULE_10__","TextDecoder","TextEncoder","E","toByteArray","freeze","__proto__","hex","padStart","substr","utf8","bs58","base64","fromByteArray","errors","C","B","D","u","N","R","V","$","K","q","W","G","H","J","X","Q","Y","rt","tt","nt","et","ot","it","invoke","getRecentBlockhash","ct","ut","at","ht","ft","yt","isSet","pop","errorLogs","errorCode","errorMessage","comparedValues","origin","_programErrorStack","findIndex","startsWith","file","program","programErrorStack","includes","log","Proxy","StateInvalidAddress","Et","It","kt","Mt","xt","RegExp","Pt","splitRegexp","stripRegexp","Lt","fieldLayout","defined","typeDefLayout","kind","idl","ixLayout","parseIxLayout","zt","sighashLayouts","_encode","encodeState","types","format","Ct","formatIdlType","formatIdlData","flattenIdlAccounts","formatIdlDataDefined","sha256","digest","Bt","Ot","accountLayouts","accountDiscriminator","compare","decodeUnchecked","memcmp","events","layouts","discriminators","$t","typeLayouts","qt","Ft","Wt","Gt","Ht","Jt","Zt","Xt","Qt","Yt","te","ee","ne","oe","ie","se","ae","ce","ue","de","le","he","pe","fe","me","ye","ge","be","initializeMint","initializeAccount","initializeMultisig","approve","revoke","authorityType","newAuthority","setAuthority","mintTo","burn","closeAccount","freezeAccount","thawAccount","transferChecked","approveChecked","mintToChecked","burnChecked","authority","initilaizeAccount2","syncNative","initializeAccount3","initializeMultisig2","encodeInitializeMint2","we","ve","Ae","_e","Se","ke","Le","Ee","Ie","Me","xe","Pe","Te","Be","Ce","dataSize","Oe","De","Re","Ke","seed","createAccountWithSeed","$e","authorized","advanceNonceAccount","withdrawNonceAccount","initializeNonceAccount","authorizeNonceAccount","allocate","allocateWithSeed","assignWithSeed","transferWithSeed","Ve","Ue","je","qe","Fe","We","NONCE_ACCOUNT_LENGTH","Je","Ge","He","Ze","Xe","Ye","tn","en","rn","isOnCurve","nn","byteOffset","on","sn","createWithSeedSync","createProgramAddressSync","associated","an","cn","un","ASSOCIATED_PROGRAM_ID","associatedAddress","dn","delete","A","ln","hn","programdataAddress","programData","pn","rpc","features","verifiedBuild","verified","verified_slot","fetchData","gn","vn","remainingAccounts","accountsArray","isMut","bn","An","preInstructions","postInstructions","coder","_idl","_programId","_address","Sn","_sub","subscribe","onAccountChange","emit","listener","unsubscribe","removeAccountChangeListener","catch","_idlAccount","_coder","_size","fetchNullable","fetchMultiple","getProgramAccounts","filters","In","warn","createInstruction","getMinimumBalanceForRentExemption","kn","Mn","_eventParser","_eventCallbacks","_eventListeners","_listenerIdCount","_onLogsSubscriptionId","onLogs","parseLogs","removeOnLogsListener","Tn","Ln","handleLog","handleProgramLog","handleSystemLog","Cn","zn","Bn","version","On","_args","_accounts","_idlIx","_accountStore","Dn","CONST_ACCOUNTS","pda","autoPopulatePda","parseProgramId","toBufferConst","argValue","accountValue","toBufferArg","toBufferAccount","toBufferValue","fetchAccount","parseAccountValue","writeUInt16LE","writeBigUInt64LE","associatedTokenProgram","rent","SYSVAR_RENT_PUBKEY","systemProgram","tokenProgram","_cache","Rn","_ixFn","_txFn","_rpcFn","_simulateFn","_viewFn","_remainingAccounts","_signers","_preInstructions","_postInstructions","_autoResolveAccounts","_accountsResolver","pubkeys","accountsStrict","_events","returns","views","fetchIdl","createWithSeed","rr","Un","jn","Kn","qn","Fn","Wn","Gn","Hn","associatedToken","Zn","Xn","Qn","system","IDL","DistributorClient","common_sdk_1","token_utils_1","utils_1","buffer_layout_utils_1","newDistributor","clawbackReceiver","maxTotalClaim","maxNumNodes","startTs","endTs","distributor","clawbackReceiverATA","getATAAddressSync","clawbackTokenAccountInfo","tokenVault","newDistributorIx","admin","inputs","toBytes32Array","setAdmin","newAdmin","distributorData","merkleDistributor","toTx","setClawbackReceiver","setClawbackReceiverIx","newClawbackAccount","setMerkleRoot","setTimestamp","deposit","fetcher","getOneMerkleDistributor","fromAssociatedTokenAccount","addSigners","transferInstructionData","TokenInstruction","Transfer","newClaim","proof","claimStatus","claim_status","to","toTokenAccountInfo","createATAInstruction","newClaimIx","claimant","clawback","MERKLE_DISTRIBUTOR_PROGRAM_ID","PROGRAM_ID","Context","fetcher_1","methods_1","AccountFetcher","anchorProvider","Program","MerkleDistributorIDL","fromWorkspace","withProvider","Methods","parsing_1","refreshAll","bulkRequest","cachedContent","entity","refresh","cachedValue","accountData","list","cachedValues","undefinedAccounts","cacheIndex","dataIndex","addressesSubset","ParsableMerkleDistributor","getOneClaimStatus","ParsableClaimStatus","parseAnchorAccount","accountName","BorshAccountsCoder","subarray","accountsCoder","AccountName","MerkleDistributor","ClaimStatus","__setModuleDefault","__importStar","ixs","PDA","constants_1","BalanceTree","js_sha3_1","merkle_tree_1","balances","_tree","MerkleTree","toNode","verifyProof","pair","combinedHash","keccak_256","LEAF_PREFIX","getHexRoot","getHexProof","getRoot","getProof","getOrCreateATAInstruction","deriveClaimStatus","web3","allowOwnerOffCurve","toAccount","INTERMEDIATE_PREFIX","getPairElement","layer","pairIdx","pairEl","bufDedup","elements","el","bufArrToHexArr","arr","some","sortAndConcat","sorted","_elements","_bufferElementPositionIndex","memo","_layers","getLayers","layers","nextLayerIndex","getNextLayer","second","initialIdx","pairElement","createMerkleDistributorProgram","merkle_distributor_1","ownerOrAuthority","multiSigners","AccountClient","AnchorError","BorshCoder","BorshEventCoder","BorshInstructionCoder","DISCRIMINATOR_SIZE","EventManager","EventParser","IdlError","LangErrorMessage","MethodsBuilderFactory","Native","ProgramError","ProgramErrorStack","SystemCoder","eventDiscriminator","getProvider","parseIdlErrors","setProvider","splitArgsAndCtx","toInstruction","translateError","validateAccounts","camelcase__WEBPACK_IMPORTED_MODULE_4__","camelcase__WEBPACK_IMPORTED_MODULE_4___default","_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_8__","pako__WEBPACK_IMPORTED_MODULE_6__","eventemitter3__WEBPACK_IMPORTED_MODULE_7__","eventemitter3__WEBPACK_IMPORTED_MODULE_7___default","decode$2","encode$2","index$1","byte","idlIx","ixArg","ixAccounts","getMultipleAccountsAndContext","batches","batch","_AVAILABLE_FEATURES","_FEATURES","programKeyRegex","successRegex","programStack","programKey","anchorErrorLogIndex","anchorErrorLog","pubkeyRegex","leftPubkey","rightPubkey","valueRegex","leftValue","rightValue","regexNoInfo","noInfoAnchorErrorLog","regexFileLine","fileLineAnchorErrorLog","regexAccountName","accountNameAnchorErrorLog","errorCodeString","errorNumber","fileLine","idlErrors","unparsedErrorCode","errString","matches","parseErr","errorMsg","anchorError","programError","handler","__assign$1","__assign","lowerCase","DEFAULT_SPLIT_REGEXP","DEFAULT_STRIP_REGEXP","noCase","dotCase","snakeCase","IdlCoder","field","fieldName","filtered","arrayTy","arrayLen","innerLayout","typeDef","fieldLayouts","SIGHASH_GLOBAL_NAMESPACE","sh","sighash","ixName","nameSpace","methodName","ixLayouts","accountMetas","InstructionFormatter","idlField","flatIdlAccounts","idlType","enumType","namedFields","fieldData","variantName","prefix","accName","sentenceCase","newPrefix","preimage","accountSize","idlAccount","typeSize","variantSizes","ty","arraySize","decodeAny","accountDescriminator","appendData","discriminatorPreimage","eventTypeDef","event","logArr","disc","eventName","BorshTypesCoder","typeName","typeData","SystemInstructionCoder","encodeCreateAccount","encodeAssign","encodeTransfer","encodeCreateAccountWithSeed","encodeAdvanceNonceAccount","encodeWithdrawNonceAccount","encodeInitializeNonceAccount","encodeAuthorizeNonceAccount","encodeAllocate","encodeAllocateWithSeed","encodeAssignWithSeed","encodeTransferWithSeed","_ixName","_ix","encodeData","maxSpan","instructionMaxSpan","SystemAccountsCoder","NONCE_ACCOUNT_LAYOUT","decodeNonceAccount","_appendData","SystemEventsCoder","_log","SystemTypesCoder","_name","_type","_typeData","assoc","fromPublicKey","limit","latestBuildsResp","latestBuilds","programdataAccountInfo","isIdlAccounts","accountItem","idlAddress","IDL_ACCOUNT_LAYOUT","decodeIdlAccount","inputLen","InstructionNamespaceFactory","encodeFn","ixArgs","validateInstruction","accs","nestedAccounts","rpcAccs","isOptional","TransactionFactory","ixFn","txFn","RpcFactory","AccountFactory","accountFns","fetchNullableAndContext","getAccountInfoAndContext","fetchAndContext","fetchMultipleAndContext","coderFilters","resp","subscriptions","sizeOverride","addr","PROGRAM_LOG","PROGRAM_DATA","PROGRAM_LOG_START_INDEX","PROGRAM_DATA_START_INDEX","allListeners","listenerCb","listeners","errorOnDecodeFailure","logScanner","LogScanner","execution","ExecutionContext","newProgram","didPop","logStr","logStart","SimulateFactory","TOKEN_ACCOUNT_LAYOUT","decodeTokenAccount","AccountsResolver","_accountNamespace","_idlTypes","_customResolver","AccountStore","resolveConst","_resolveEventCpi","resolvePdas","resolveRelations","resolveCustom","resolved","resolveOptionalsHelper","partialAccounts","accountItems","nestedAccountsGeneric","partialAccount","isPartialAccounts","flattenPartialAccounts","resolveOptionals","ret","subPath","isLast","accountDescOrAccounts","subAccounts","accountDesc","accountDescName","nextIndex","currentName","nextName","currentPath","nextPath","found","accountDescCasted","Boolean","relations","newPath","accountKey","matching","rel","relName","seedDesc","getType","subType","structType","seedArgName","idlArgPosition","argDesc","pathComponents","fieldPubkey","fieldValue","accountField","bU64","clock","SYSVAR_CLOCK_PUBKEY","_idls","ensureIdl","accountFetcher","firstAccountLayout","rpcFn","simulateFn","viewFn","accountNamespace","idlTypes","customResolver","MethodsBuilder","throwOnNull","toReturn","rpcAndKeys","prepare","ViewFactory","hasReturn","simulationResult","returnPrefix","returnLog","returnData","returnType","NamespaceFactory","getCustomResolver","ixItem","txItem","rpcItem","simulateItem","viewItem","methodItem","idlAddr","inflatedIdl","SYSTEM_PROGRAM_ID","getATAAddressesSync","getATAAddresses","getATAAddress","solana_contrib_1","getProgramAddress","mints","deduped","sleep","getTokenAccount","getMintInfo","createAccountRentExempt","createTokenAccountInstrs","createMintAndVault","createMintInstructions","createToken","createMint","SPL_SHARED_MEMORY_ID","DEFAULT_TOKEN_DECIMALS","tslib_1","index_js_1","generate","fromMint","createInitMintInstruction","vault","createMintToInstruction","depositorAccInfo","deserializeMint","deserializeAccount","ms","setTimeout","SPLToken","validateU256","validateU64","TEN","Rounding","Percent","parseBigintIsh","MAX_U256","MAX_U64","makeDecimalMultiplier","Fraction","token_math_1","buildCreateTokenAccountTX","createTokenAccount","layout_js_1","accountSigner","rentExemptAccountBalance","getMinBalanceRentForExemptAccount","TransactionEnvelope","TokenAccountLayout","getOrCreateATAs","getOrCreateATA","ata_js_1","mintKey","createAccountInstructions","createInitMintTX","createInitMintInstructions","mintKP","rentExemptMintBalance","getMinBalanceRentForExemptMint","mintAuthorityKP","mintNFT","mint_js_1","tempMintAuthority","createSetAuthorityInstruction","Uint64Layout","PublicKeyLayout","structLayout","TypedStructure","TypedLayout","BufferLayout","Price","baseCurrency","quoteCurrency","new","fromUPrice","price","ENV","ChainId","WRAPPED_SOL","RAW_SOL","chainIdToNetwork","networkToChainId","CHAIN_ID_TO_NETWORK","NETWORK_TO_CHAIN_ID","makeTokenForAllNetworks","tokensEqual","RAW_SOL_MINT","_mintAccount","network","chainId","mintAccount","isRawSOL","symbol","logoURI","toJSON","hasTag","Localnet","load","mintAccountInfo","rawSol","wrappedSol","MainnetBeta","devnet","Devnet","testnet","Testnet","localnet","TokenAmount","uiAmount","parseAmountFromString","divideByInteger","toExact","_isTA","dedupeTokens","makeTokenMap","ORIGIN_CHAINS","token_js_1","tokenList","tokens","seen","tokenID","TokenOwner","getATA","getATASync","createTransferInstruction","createATA","TokenAugmentedProvider","ata_js_2","SolanaAugmentedProvider","createTokenTX","walletKey","newTX","transferTo","destination","txEnv","sourceATA","toATA","confirm","loadToken","mintToAccount","fetchMint","fetchTokenAccount","tokenAccountInfo","fetchATA","taAddress","exists","isNotUndefined","isNotNull","mapSome","mapN","MultipleConnectionBroadcaster","SingleConnectionBroadcaster","DEFAULT_FALLBACK_RETRY_OPTIONS","DEFAULT_RETRY_OPTIONS","error_js_1","provider_js_1","index_js_2","simulateTransactionWithCommitment_js_1","sendAndSpamRawTx_js_1","retryTimes","retryInterval","sendConnection","DEFAULT_PROVIDER_OPTIONS","broadcast","printLogs","PendingTransaction","sendAndSpamRawTx","suppressConsoleErrorAsync","verifySigners","simulateTransactionWithCommitment","connections","conn","AggregateError","firstAggregateError","_sendRawTransaction","encoded","TieredBroadcaster","index_js_3","primaryConnection","fallbackConnections","premiumBroadcaster","pending","fc","fallbackRetryOptions","COMPUTE_BUDGET_PROGRAM","requestHeapFrameInstruction","requestComputeUnitsInstruction","layouts_js_1","units","additionalFee","RequestUnitsLayout","RequestHeapFrameLayout","DEFAULT_NETWORK_CONFIG_MAP","formatNetwork","endpoint","firstError","remErrors","SolanaProvider","SolanaTransactionSigner","doSignAndBroadcastTransaction","SolanaReadonlyProvider","DEFAULT_READONLY_PUBLIC_KEY","TransactionEnvelope_js_1","accountId","broadcaster","signAndBroadcastTransaction","signAll","reqs","broadcastConnections","firstBroadcastConnection","theTx","wait","simTX","requestAirdrop","withSigner","SignerWallet","promise_retry_1","txLink_js_1","TransactionReceipt_js_1","_receipt","receipt","useWebsocket","retryOpts","pollForReceipt","retry","TransactionReceipt","retries","minTimeout","awaitSignatureConfirmation","generateSolanaExplorerLink","cluster","generateTXLink","PACKET_DATA_SIZE","txSizer_js_1","utils_js_1","filterRequiredSigners","requiredSigners","flatMap","rs","estimateSizeUnsafe","builtTx","calculateTxSizeUnsafe","estimateSize","suppressConsoleError","EstimatedTXTooBigError","TXSizeEstimationError","buildPartition","partition","estimation","lastTXEnv","_filterRequiredSigners","lastEstimation","nextIXs","nextSigners","nextTXEnv","nextEstimation","generateInspectLink","RECENT_BLOCKHASH_STUB","serializeMessage","generateInspectLinkFromBase64","simulateUnchecked","simulateTable","simulation","printTXTable","combine","writableKeys","inst","instructionsJSON","debugStr","ser","sg","addMemos","addMemo","combineAll","pack","addedTX","combineAllAsync","firstTX","dedupeATAIXs","seenATAs","ataKey","splitATAIXs","ataIXs","newTx","getInstruction","createMemoInstruction","addAdditionalComputeBudget","addAdditionalHeapFrame","confirmTransactionLike","misc_js_1","PendingTransaction_js_1","ish","valueAsPromise","getEvents","eventParser","computeUnits","consumeLog","amtStr","formatInstructionLogs","formatLogEntry","parseTransactionLogs","programErr_js_1","prettyError","depth","prettyLogs","getTransactionInstructionError","regex","matchAll","programAddress","failed","instructionLog","failedIx","buildPrefix","fill","formatLogEntryString","entry","prefixString","innerError","instructionError","getInstructionError","out","BUILTIN_SOLANA_ERROR_MESSAGES","shortvecEncodeLength","rem_len","elem","hasFeePayerSigned","numSigners","signatureCount","generateUncheckedInspectLink","serializeToBase64Unchecked","buildStubbedTransaction","verifySignatures","base64TX","MEMO_PROGRAM_ID","formatPubkeyShort","noop","oldConsoleError","awaitable","leading","trailing","printAccountOwners","plainObj","relativePath","callStack","expectIndex","debugAccountOwnersIndex","versions","targetLine","cwd","targetLineAfterCwd","_transformAccountOwners","gracefulGetMultipleAccountsInfo","unknownConection","rpcRequest","plainObjWithAddressesAndBignums","base58ToResultKey","base58ToLookup","asyncKeys","asyncPromises","base58","pubKey","resultKey","lookupIndex","asyncValues","fakeSigner","estimateTransactionSize","transactionLogs","computeUnitLogStack","cpiLogStack","currentIndex","cpiMatch","cur","computeMatch","instructionTable","computeUnitLog","computeUnitMatch","quota","iso","isolatedInstructionSize","mar","marginalInstructionSize","cum","instructionsSize","used","CPI","table","underlyingError","txEnvelope","simpleInstruction","fs","getFakeSigner","randomProvider","previousInstructions","previousTxSize","biggerTxSize","instructionedTx","getPublicKey","CachedPublicKey","pubkeyCache","_base58","getOrCreatePublicKey","pk","gpaCache","concatSeeds","normalizedSeeds","cacheKey","isPublicKey","parsePublicKey","web3_js_2","isBN","connectionInner","tsToDate","dateToTs","date","getTime","Date","ExplorerType","explorerType","SOLANA_EXPLORER","SOLSCAN","createProvider","nu64be","u48be","u40be","u32be","u24be","u16be","u48","u40","u24","greedy","Constant","UTF8","CString","BitField","BitStructure","Sequence","DoubleBE","Double","FloatBE","Float","NearInt64BE","NearUInt64BE","IntBE","Int","GreedyCount","bindConstructorLayout","uint8ArrayToBuffer","checkUint8Array","cstr","unionLayoutDiscriminator","bits","f64be","f32be","ns64be","s48be","s40be","s32be","s24be","s16be","s48","s40","s24","Class","layout_","boundConstructor_","elementSpan","rem","readIntLE","writeIntLE","readIntBE","writeIntBE","readUInt32BE","writeUInt32BE","readInt32BE","writeInt32BE","readFloatLE","writeFloatLE","readFloatBE","writeFloatBE","readDoubleLE","writeDoubleLE","readDoubleBE","writeDoubleBE","elo","fixBitwiseResult","word","msb","_packedSetValue","_packedGetValue","addField","bf","addBoolean","fieldFor","totalBits","usedBits","sum","valueMask","wordMask","wordValue","srcBuffer","srcb","_typeof","toPrimitive","toPropertyKey","_defineProperty","inherits","_functionsHaveNames","bn_default","index_browser_esm","base64Js","lookup","revLookup","Arr","getLens","b64","validLen","placeHoldersLen","lens","_byteLength","tmp","curByte","tripletToBase64","encodeChunk","uint8","extraBytes","maxChunkLength","len2","ieee754","read","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","Infinity","LN2","ieee754$1","customInspectSymbol","SlowBuffer","INSPECT_MAX_BYTES","K_MAX_LENGTH","typedArraySupport","proto","foo","setPrototypeOf","createBuffer","encodingOrOffset","allocUnsafe","fromString","fromArrayView","isInstance","SharedArrayBuffer","fromArrayBuffer","valueOf","fromObject","assertSize","checked","isEncoding","actual","fromArrayLike","arrayView","numberIsNaN","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","hexWrite","remaining","strLen","utf8Write","blitBuffer","asciiWrite","asciiToBytes","base64Write","ucs2Write","utf16leToBytes","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","kMaxLength","TYPED_ARRAY_SUPPORT","poolSize","allocUnsafeSlow","_isBuffer","pos","swap16","swap32","swap64","toLocaleString","inspect","thisStart","thisEnd","thisCopy","targetCopy","isFinite","_arr","MAX_ARGUMENTS_LENGTH","codePoints","hexSliceLookupTable","checkOffset","ext","checkInt","wrtBigUInt64LE","checkIntBI","hi","wrtBigUInt64BE","checkIEEE754","writeFloat","littleEndian","noAssert","writeDouble","newBuf","readUintLE","readUintBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUint32BE","readBigUInt64LE","defineBigIntMethod","validateNumber","last","boundsError","readBigUInt64BE","readInt8","readInt16LE","readInt16BE","readBigInt64LE","readBigInt64BE","writeUintLE","maxBytes","writeUintBE","writeUint8","writeUInt8","writeUint16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUint32BE","writeBigUInt64BE","writeInt8","writeInt16LE","writeInt16BE","writeBigInt64LE","writeBigInt64BE","targetStart","copyWithin","sym","getMessage","Base","addNumericalSeparator","checkBounds","range","ERR_OUT_OF_RANGE","ERR_INVALID_ARG_TYPE","ERR_BUFFER_OUT_OF_BOUNDS","RangeError","received","INVALID_BASE64_RE","base64clean","leadSurrogate","byteArray","dst","alphabet","BufferBigIntNotDefined","global$1","inherits$1","ctor","superCtor","super_","TempCtor","inspect$1","stylize","stylizeNoColor","isBoolean","showHidden","_extend","isUndefined","customInspect","stylizeWithColor","formatValue","styleType","arrayToHash","recurseTimes","isFunction","isString","primitive","formatPrimitive","visibleKeys","isError","formatError","isRegExp","isDate","braces","toUTCString","formatArray","formatProperty","reduceToSingleString","simple","isNull","index_browser_esm_hasOwnProperty","ar","isNumber","objectToString","isPrimitive","hasOwn","objectKeys","pSlice","functionsHaveNames","pToString","arrbuf","fail","getName","AssertionError","expected","operator","generatedMessage","stackStartFunction","captureStackTrace","fn_name","next_line","truncate","something","rawname","equal","notEqual","deepEqual","_deepEqual","deepStrictEqual","strict","memos","multiline","ignoreCase","Float32Array","Float64Array","actualIndex","objEquiv","isArguments","actualVisitedObjects","aIsArgs","bIsArgs","ka","kb","notDeepEqual","notDeepStrictEqual","strictEqual","notStrictEqual","expectedException","_tryBlock","block","_throws","shouldThrow","userProvidedMessage","isUnwantedException","isUnexpectedException","index_browser_esm_throws","doesNotThrow","ifError","throws","Layout$1","const","sendAndConfirmTransaction","title","FAILED_TO_FIND_ACCOUNT","INVALID_ACCOUNT_OWNER","pubkeyToBuffer","isAccount","accountOrPublicKey","AuthorityTypeCodes","MintTokens","FreezeAccount","AccountOwner","CloseAccount","MultisigLayout","associatedProgramId","getMinBalanceRentForExemptMultisig","balanceNeeded","newAccount","mintPublicKey","createAssociatedTokenAccount","createAssociatedTokenAccountInternal","getOrCreateAssociatedAccountInfo","createWrappedNativeAccount","createMultisig","multisigAccount","dataLayout","getMultisigInfo","multisig","multisigInfo","signer1","signer2","signer3","signer4","signer5","signer6","signer7","signer8","signer9","signer10","signer11","ownerPublicKey","createApproveInstruction","createRevokeInstruction","currentAuthority","currentAuthorityPublicKey","createBurnInstruction","authorityPublicKey","createFreezeAccountInstruction","createThawAccountInstruction","createApproveCheckedInstruction","createMintToCheckedInstruction","createBurnCheckedInstruction","nativeAccount","createSyncNativeInstruction","commandDataLayout","encodeLength","Account","AddressLookupTableAccount","AddressLookupTableInstruction","AddressLookupTableProgram","Authorized","BLOCKHASH_CACHE_TIMEOUT_MS","BPF_LOADER_DEPRECATED_PROGRAM_ID","BPF_LOADER_PROGRAM_ID","BpfLoader","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","ComputeBudgetInstruction","ComputeBudgetProgram","Connection","Ed25519Program","Enum","EpochSchedule","FeeCalculatorLayout","LAMPORTS_PER_SOL","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","Loader","Lockup","MAX_SEED_LENGTH","Message","MessageAccountKeys","MessageV0","NonceAccount","PUBLIC_KEY_LENGTH","SIGNATURE_LENGTH_IN_BYTES","SOLANA_SCHEMA","STAKE_CONFIG_ID","STAKE_INSTRUCTION_LAYOUTS","SYSTEM_INSTRUCTION_LAYOUTS","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","Secp256k1Program","SolanaJSONRPCError","SolanaJSONRPCErrorCode","StakeAuthorizationLayout","StakeInstruction","StakeProgram","index_browser_esm_Struct","SystemInstruction","TransactionExpiredBlockheightExceededError","TransactionExpiredNonceInvalidError","TransactionExpiredTimeoutError","TransactionMessage","TransactionStatus","VALIDATOR_INFO_KEY","VERSION_PREFIX_MASK","VOTE_PROGRAM_ID","ValidatorInfo","VersionedMessage","VersionedTransaction","VoteAccount","VoteAuthorizationLayout","VoteInit","VoteInstruction","VoteProgram","clusterApiUrl","_PublicKey","_Lockup","utils_namespaceObject","abytes","bitGet","bitLen","bitMask","bitSet","utils_bytesToHex","utils_bytesToNumberBE","utils_bytesToNumberLE","utils_concatBytes","createHmacDrbg","utils_ensureBytes","utils_equalBytes","hexToBytes","hexToNumber","isBytes","utils_numberToBytesBE","utils_numberToBytesLE","numberToHexUnpadded","numberToVarBytesBE","utils_utf8ToBytes","validateObject","node_modules_buffer","_md","U32_MASK64","_32n","fromBig","lst","Ah","Uint32Array","Al","toBig","shrSH","_l","shrSL","rotrSH","rotrSL","rotrBH","rotrBL","rotr32H","_h","rotr32L","rotlSH","rotlSL","rotlBH","rotlBL","Bh","Bl","add3L","Cl","add3H","low","Ch","add4L","Dl","add4H","Dh","add5L","El","add5H","Eh","_u64","SHA512_Kh","SHA512_Kl","SHA512_W_H","SHA512_W_L","SHA512","VR","Fh","Fl","Gh","Gl","Hh","Hl","getUint32","W15h","W15l","s0h","s0l","W2h","W2l","s1h","s1l","SUMl","SUMh","sigma1h","sigma1l","CHIh","CHIl","T1ll","T1h","T1l","sigma0h","sigma0l","MAJh","MAJl","All","roundClean","destroy","sha512_sha512","hE","_0n","_1n","_2n","hexes","asciis","_0","_9","_A","_F","_f","asciiToBase16","char","hl","al","ai","n2","expectedLength","arrays","pad","diff","u8n","u8fr","hashLen","qByteLen","hmacFn","reset","reseed","gen","sl","genUntil","pred","validatorFns","bigint","function","stringOrUint8Array","isSafeInteger","Fp","isValid","outputLen","validators","optValidators","checkField","checkVal","modular_0n","modular_1n","modular_2n","_3n","_4n","_5n","_8n","modular_mod","power","modulo","modular_pow2","invert","tonelliShanks","legendreC","p1div4","eql","sqr","Q1div2","neg","t2","FpSqrt","c1","nv","modular_isNegativeLE","FIELD_FIELDS","validateField","initial","ORDER","MASK","BYTES","BITS","FpPow","FpInvertBatch","nums","lastMultiplied","is0","inverted","inv","reduceRight","nLength","nBitLength","_nBitLength","nByteLength","Field","redef","sqrtP","isOdd","lhs","rhs","sqrN","addN","subN","mulN","sqrt","invertBatch","cmov","getFieldBytesLength","fieldOrder","bitLength","getMinHashLength","mapHashToField","fieldLen","minLen","reduced","curve_0n","curve_1n","wNAF","constTimeNegate","negate","windows","windowSize","unsafeLadder","elm","double","precomputeWindow","precomputes","BASE","maxNumber","shiftBy","wbits","offset1","offset2","cond1","cond2","wNAFCached","precomputesMap","_WINDOW_SIZE","comp","validateBasic","curve","Gx","Gy","edwards_0n","edwards_1n","edwards_2n","edwards_8n","VERIFY_DEFAULT","zip215","validateOpts","randomBytes","adjustScalarBytes","domain","uvRatio","mapToCurve","edwards_twistedEdwards","curveDef","CURVE","CURVE_ORDER","prehash","cHash","cofactor","modP","phflag","inBig","inRange","in0MaskRange","assertInRange","assertGE0","pointPrecomputes","isPoint","Point","ey","ez","toAffine","fromAffine","normalizeZ","toInv","_setWindowSize","assertValidity","X2","Y2","Z2","Z4","aX2","XY","ZT","X1","Y1","Z1","X1Z2","X2Z1","Y1Z2","Y2Z1","x1y1","X3","Y3","T3","Z3","T1","T2","subtract","wnaf","multiply","scalar","multiplyUnsafe","I","isSmallOrder","isTorsionFree","iz","ax","ay","zz","clearCofactor","fromHex","normed","lastByte","y2","isXOdd","isLastByteOdd","fromPrivateKey","privKey","getExtendedPublicKey","point","toRawBytes","toHex","modN","modN_LE","hashed","pointBytes","hashDomainToScalar","msgs","verifyOpts","verify","sig","SB","RkA","randomPrivateKey","precompute","ExtendedPoint","ED25519_P","ED25519_SQRT_M1","ed25519_0n","ed25519_1n","ed25519_2n","ed25519_5n","ed25519_8n","ed25519_pow_2_252_3","_10n","_20n","_40n","_80n","x2","b2","b4","b5","b10","b20","b40","b80","b160","b240","b250","pow_p_5_8","v3","v7","vx2","root1","root2","useRoot1","useRoot2","noRoot","ed25519Defaults","O6","ed25519","assertRstPoint","RistPoint","SQRT_M1","SQRT_AD_MINUS_ONE","INVSQRT_A_MINUS_D","ONE_MINUS_D_SQ","D_MINUS_ONE_SQ","invertSqrt","MAX_255B","bytes255ToNumberLE","bytesToNumberLE","calcElligatorRistrettoMap","r0","Ns","Ns_D_is_sq","s_","isNegativeLE","s2","W0","W1","W2","W3","ep","ap","hashToCurve","ensureBytes","r1","R1","r2","R2","emsg","equalBytes","numberToBytesLE","u1","u2","u1_2","u2_2","Dx","Dy","u2sq","invsqrt","D1","D2","zInv","_x","_y","bytesToHex","one","two","bs58_default","esm_sha256","lib","browser","explanation","cause","isNonArrayObject","dist_define","dist_boolean","instance","never","record","Key","Value","Never","coerced","client_browser","browser_default","eventemitter3","WebSocketBrowserImpl","socket","protocols","WebSocket","onopen","onmessage","onclose","optionsOrCallback","cb","close","DefaultDataPack","CommonClient","rpc_id","queue","autoconnect","ready","reconnect","reconnect_timer_id","reconnect_interval","max_reconnects","rest_options","current_reconnects","generate_request_id","webSocketFactory","dataPack","_connect","connect","timeout","ws_opts","login","listMethods","notify","setAutoReconnect","setReconnectInterval","interval","setMaxReconnects","clearTimeout","notification","_assert","SHA3_PI","SHA3_ROTL","_SHA3_IOTA","sha3_0n","sha3_1n","sha3_2n","_7n","_256n","_0x71n","SHA3_IOTA_H","SHA3_IOTA_L","rotlH","rotlL","keccakP","rounds","idx1","idx0","B0","B1","Th","Tl","curH","curL","PI","Keccak","blockLen","suffix","enableXOF","posOut","finished","destroyed","Rx","state32","keccak","iA","l1","update","Gg","O0","take","finish","writeInto","aI","bufferOut","xofInto","xof","digestInto","J8","_cloneInto","HMAC","vp","iHash","oHash","hmac","validatePointOpts","allowedPrivateKeyLengths","wrapPrivateKey","allowInfinityPoint","fromBytes","endo","beta","splitScalar","bytesToNumberBE","b2n","h2b","DER","Err","_parseInt","toSig","sBytes","rBytesLeft","hexFromSig","shl","rhl","rl","weierstrass_0n","weierstrass_1n","weierstrass_3n","weierstrassPoints","_isCompressed","tail","weierstrassEquation","x3","isWithinCurveOrder","assertGE","normPrivateKeyToScalar","lengths","assertPrjPoint","pz","privateKey","hasEvenY","U1","U2","b3","t0","t1","t3","t4","t5","k1neg","k1","k2neg","k1p","k2p","fake","f1p","f2p","multiplyAndAddUnsafe","isCompressed","_bits","ProjectivePoint","weierstrass_validateOpts","bits2int","bits2int_modN","lowS","weierstrass","compressedLen","uncompressedLen","isValidFieldElement","invN","cat","sqrtError","isYOdd","isHeadOdd","numToNByteStr","isBiggerThanHalfOrder","HALF","normalizeS","slcNum","Signature","recovery","fromCompact","fromDER","addRecoveryBit","recoverPublicKey","msgHash","rec","radj","ir","hasHighS","toDERRawBytes","toDERHex","toCompactRawBytes","toCompactHex","isValidPrivateKey","isProbPub","getSharedSecret","privateA","publicB","delta","ORDER_MASK","int2octets","prepSig","defaultSigOpts","extraEntropy","ent","h1int","seedArgs","k2sig","kBytes","ik","normS","defaultVerOpts","drbg","_sig","derError","getHash","eV","createCurve","defHash","secp256k1P","secp256k1N","secp256k1_1n","secp256k1_2n","divNearest","sqrtMod","_6n","_11n","_22n","_23n","_44n","_88n","b6","b9","b11","b22","b44","b88","b176","b220","b223","secp256k1_Fp","secp256k1","a1","b1","a2","POW_2_128","c2","secp256k1_0n","TAGGED_HASH_PREFIXES","taggedHash","messages","tagP","tagH","concatBytes","generatePrivateKey","generateKeypair","privateScalar","secretKey","deserialize","deserializeUnchecked","enum","isPublicKeyData","_bn","uniquePublicKeyCounter","decoded","unique","publicKeyBytes","createProgramAddress","seedsWithNonce","pubkeyData","_publicKey","_secretKey","secretKeyBuffer","timeoutSeconds","staticAccountKeys","accountKeysFromLookups","keySegments","readonly","keySegment","compileInstructions","U8_MAX","keyIndexMap","findKeyIndex","programIdIndex","accountKeyIndexes","rustString","rsl","_decode","rslShim","lockup","voteInit","voteAuthorizeWithSeedArgs","getAlloc","getItemAlloc","decodeLength","index_browser_esm_assert","CompiledKeys","keyMetaMap","getOrInsertDefault","keyMeta","isInvoked","payerKeyMeta","accountMeta","getMessageComponents","mapEntries","writableSigners","readonlySigners","writableNonSigners","readonlyNonSigners","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","payerAddress","extractTableLookup","lookupTable","writableIndexes","drainedWritableKeys","drainKeysFoundInLookupTable","readonlyIndexes","drainedReadonlyKeys","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","lookupTableIndex","END_OF_BUFFER_ERROR_MESSAGE","guardedShift","guardedSplice","splice","accountKeys","indexToProgramIds","compiledInstructions","addressTableLookups","getAccountKeys","compiledKeys","payerKey","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","programIds","numKeys","keyCount","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","signDataLayout","accountCount","dataSlice","messageArgs","numAccountKeysFromLookups","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","tableLookup","tableAccount","lookupTableAccounts","extractResult","addressTableLookup","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","encodedAccountKeyIndexesLength","encodedDataLength","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","maskedPrefix","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","deserializeMessageVersion","DEFAULT_SIGNATURE","nonceInfo","minNonceContextSlot","_message","_json","minContextSlot","nonceInstruction","compileMessage","uniqueMetas","pubkeyString","uniqueIndex","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","payerMeta","signedKeys","unsignedKeys","getEstimatedFee","getFeeForMessage","setSigners","uniqueSigners","_partialSign","_addSignature","addSignature","sigpair","signatureErrors","_getMessageSignednessErrors","missing","invalid","sigErrors","transactionLength","keyObj","populate","sigPubkeyPair","decompile","compiledIx","compileToLegacyMessage","compileToV0Message","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","signaturesLength","messageData","signerPubkeys","signerIndex","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","transactionMessage","maybeLogsOutput","guideText","transactionError","cachedLogs","getLogs","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","customMessage","maxRetries","abortSignal","nonceAccountPubkey","nonceValue","allocLength","layoutFields","decodeData$1","NonceAccountLayout","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","encodeDecode","bigInt","bigIntLayout","toBigIntLE","toBufferLE","index_browser_esm_u64","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","ixType","decodeCreateAccount","checkKeyLength","Create","decodeTransfer","decodeTransferWithSeed","TransferWithSeed","basePubkey","decodeAllocate","Allocate","accountPubkey","decodeAllocateWithSeed","AllocateWithSeed","decodeAssign","Assign","decodeAssignWithSeed","AssignWithSeed","decodeCreateWithSeed","CreateWithSeed","decodeNonceInitialize","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","WithdrawNonceAccount","decodeNonceAuthorize","AuthorizeNonceAccount","newAuthorizedPubkey","UpgradeNonceAccount","createNonceAccount","initParams","nonceInitialize","nonceAdvance","nonceWithdraw","nonceAuthorize","CHUNK_SIZE","getMinNumSignatures","chunkSize","programInfo","bytesLength","bytesLengthPadding","_rpcEndpoint","REQUESTS_PER_SECOND","deployCommitment","finalizeSignature","currentSlot","getSlot","elf","loaderProgramId","objToString","objKeys","isArrayProp","propVal","toStr","fastStableStringify$1","returnVal","MINIMUM_SLOT_PER_EPOCH","trailingZeros","nextPowerOfTwo","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","getFirstSlotInEpoch","getLastSlotInEpoch","fetchImpl","RpcWebSocketClient","underlyingSocket","decodeData","LOOKUP_TABLE_META_SIZE","isActive","deactivationSlot","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","URL_RE","makeWebsocketUrl","hostish","portWithColon","protocol","startPort","websocketPort","PublicKeyFromString","RawAccountDataResult","BufferFromRawAccountData","assertEndpointUrl","putativeUrl","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","notificationResultAndContext","versionedMessageFromResponse","GetInflationGovernorResult","foundation","foundationTerm","taper","terminal","GetInflationRewardResult","effectiveSlot","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","GetLeaderScheduleResult","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","ParsedInstructionStruct","PartiallyDecodedInstructionStruct","innerInstructions","BlockProductionResponseStruct","byIdentity","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","agent","fetchWithMiddleware","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","COMMON_HTTP_HEADERS","too_many_requests_retries","waitTime","createRpcRequest","client","createRpcBatchRequest","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","inactive","GetConfirmedSignaturesForAddress2RpcResult","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","preBalances","postBalances","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetRecentBlockhashAndContextRpcResult","lamportsPerSignature","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","_commitmentOrConfig","wsEndpoint","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_buildArgs","requestHash","confirmTransactionInitialTimeout","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","rpcEndpoint","getBalanceAndContext","getBalance","getBlockTime","getMinimumLedgerSlot","getFirstAvailableBlock","getSupply","configArg","getTokenSupply","tokenMintAddress","getTokenAccountBalance","tokenAddress","getTokenAccountsByOwner","getParsedTokenAccountsByOwner","getLargestAccounts","getTokenLargestAccounts","mintAddress","getParsedAccountInfo","rawConfig","getStakeActivation","configOrCommitment","configWithoutEncoding","baseSchema","withContext","getParsedProgramAccounts","strategy","rawSignature","decodedSignature","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","getCancellationPromise","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","getSignatureStatus","abortConfirmation","removeSignatureListener","expiryPromise","checkBlockHeight","currentBlockHeight","BLOCKHEIGHT_EXCEEDED","cancellationPromise","outcome","race","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","getNonceAndContext","NONCE_INVALID","slotInWhichNonceDidAdvance","signatureStatus","commitmentForStatus","timeoutId","timeoutMs","TIMED_OUT","getClusterNodes","getVoteAccounts","getSlotLeader","getSlotLeaders","startSlot","getSignatureStatuses","getTransactionCount","getTotalSupply","excludeNonCirculatingAccountsList","getInflationGovernor","getInflationReward","getInflationRate","getEpochInfo","getEpochSchedule","epochSchedule","getLeaderSchedule","getRecentBlockhashAndContext","getRecentPerformanceSamples","getFeeCalculatorForBlockhash","wireMessage","getRecentPrioritizationFees","lockedWritableAccounts","getLatestBlockhashAndContext","isBlockhashValid","getVersion","getGenesisHash","getBlock","_buildArgsAtLeastConfirmed","transactionDetails","getParsedBlock","getBlockProduction","extra","getParsedTransaction","getParsedTransactions","getTransactions","getConfirmedBlock","getBlocks","endSlot","getBlockSignatures","getConfirmedBlockSignatures","getConfirmedTransaction","getParsedConfirmedTransaction","getParsedConfirmedTransactions","getConfirmedSignaturesForAddress","firstAvailableBlock","until","highestConfirmedRoot","confirmedSignatureInfo","getConfirmedSignaturesForAddress2","getSignaturesForAddress","getAddressLookupTable","getNonce","_blockhashWithExpiryBlockHeight","disableCache","timeSinceFetch","now","expired","_pollNewBlockhash","startTime","cachedLatestBlockhash","cachedBlockhash","getStakeMinimumDelegation","transactionOrMessage","configOrSigners","versionedTx","originalTx","signersOrOptions","sendEncodedTransaction","setInterval","_updateSubscriptions","clearInterval","_setSubscription","nextSubscription","prevState","stateChangeCallbacks","clientSubscriptionId","activeWebSocketGeneration","isCurrentConnectionStillActive","callbacks","serverSubscriptionId","unsubscribeMethod","_handleServerNotification","callbackArgs","_makeSubscription","subscriptionConfig","existingSubscription","_unsubscribeClientSubscription","onProgramAccountChange","maybeFilters","removeProgramAccountChangeListener","mentions","onSlotChange","removeSlotChangeListener","onSlotUpdate","removeSlotUpdateListener","subscriptionName","dispose","override","_err","onSignatureWithOptions","onRootChange","removeRootChangeListener","_keypair","skipValidation","computedPublicKey","ii","fromSeed","CreateLookupTable","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","createLookupTable","lookupTableAddress","bumpSeed","freezeLookupTable","extendLookupTable","deactivateLookupTable","closeLookupTable","decodeRequestUnits","RequestUnits","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","microLamports","SetComputeUnitPrice","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES$1","PUBLIC_KEY_BYTES$1","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","ecdsaSign","publicKeyCreate","PRIVATE_KEY_BYTES","ETHEREUM_ADDRESS_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","publicKeyToEthAddress","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","staker","withdrawer","unixTimestamp","custodian","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","newAuthorized","stakeAuthorizationType","Authorize","custodianPubkey","decodeAuthorizeWithSeed","authoritySeed","authorityOwner","AuthorizeWithSeed","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","Staker","Withdrawer","initialize","maybeLockup","authorize","authorizeWithSeed","splitInstruction","splitWithSeed","withdraw","deactivate","authorizedVoter","authorizedWithdrawer","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","UpdateValidatorIdentity","Voter","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","updateValidatorIdentity","InfoString","website","details","iconUrl","keybaseUsername","fromConfigData","configKeyCount","configKeys","rawInfo","VoteAccountLayout","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","http","https","tls","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","jsbi_1","formatBig","formatDecimal","DEFAULT_DISPLAY_NUMBER_FORMAT","DEFAULT_NUMBER_FORMAT","toSignificantRounding","big_js_1","decimal_js_light_1","constants_js_1","ROUND_DOWN","ROUND_HALF_UP","ROUND_UP","toFixedRounding","roundDown","roundHalfUp","roundUp","decimalSeparator","groupSeparator","groupSize","rounding","formatNum","isNegative","roundingMethod","decimalPlaces","decInternal","integerPart","fractionPart","displayIntegerPart","intd","nd","dec","fmt","big","fractionFromObject","format_js_1","tryParseFraction","isFraction","fractionish","numeratorStr","denominatorStr","compareTo","equalTo","greaterThan","multiplier","quotient","divide","remainder","otherParsed","lessThan","toSignificant","significantDigits","precision","toSignificantDigits","asFraction","asNumber","POSITIVE_INFINITY","NEGATIVE_INFINITY","isZero","EQ","NE","isNonZero","fraction_js_1","ONE_HUNDRED","toPercent","fraction","isPercent","frac","fromBPS","bps","adjusted","quote","tokenAmount","toFixedQuote","stripTrailingZeroes","TokenAmountUnderflow","TokenAmountOverflow","DEFAULT_GROUP_SEPARATOR","DEFAULT_DECIMAL_SEPARATOR","DEFAULT_LOCALE_GROUP_SEPARATOR","DEFAULT_LOCALE_DECIMAL_SEPARATOR","getGroupSeparator","getDecimalSeparator","getSeparator","percent_js_1","separatorType","numberWithDecimalSeparator","Intl","NumberFormat","formatToParts","part","wholeRaw","fractionRaw","whole","combined","greaterThanOrEqual","lessThanOrEqual","newTail","parsedAmount","withAmount","percentOf","divideBy","scale","reduceBy","percent","formatUnits","numberFormatOptions","isTokenAmount","divideByAmount","multiplyBy","BN_WORD_SIZE","wordSize","words","bigintIsh","decimalMultipliersCache","exponentiate","isDeepEqual","isDeepStrictEqual","_defineProperties","descriptor","_toPropertyKey","_createClass","Constructor","protoProps","staticProps","_toPrimitive","hint","prim","_classCallCheck","_require$codes","_require","codes","ERR_AMBIGUOUS_ARGUMENT","ERR_INVALID_ARG_VALUE","ERR_INVALID_RETURN_VALUE","ERR_MISSING_ARGS","_require2","_require$types","isPromise","objectAssign","objectIs","RegExpPrototypeTest","lazyLoadComparison","comparison","warned","NO_EXCEPTION_SENTINEL","innerFail","stackStartFn","internalMessage","argsLen","emitWarning","errArgs","innerOk","argLen","Comparison","compareExceptionKey","getActual","checkIsPromise","waitForActual","promiseFn","resultPromise","expectsError","fnType","expectsNoError","internalMatch","regexp","fnName","_len6","_key6","_len2","_key2","rejects","_len3","_key3","_len4","_key4","doesNotReject","_len5","_key5","newErr","origStack","tmp2","tmp1","doesNotMatch","ownKeys","_objectSpread","getOwnPropertyDescriptors","defineProperties","_inherits","subClass","superClass","_setPrototypeOf","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","construct","_possibleConstructorReturn","_assertThisInitialized","_wrapNativeSuper","_isNativeFunction","Wrapper","_construct","Parent","Function","sham","endsWith","this_len","repeat","maxCount","kReadableOperator","strictEqualObject","notStrictEqualObject","notIdentical","kMaxShortLength","copyError","inspectValue","compact","maxArrayLength","breakLength","showProxy","getters","createErrDiff","lastPos","skipped","actualInspected","actualLines","expectedLines","indicator","inputLength","stderr","isTTY","maxLines","_actualLines","printedLines","skippedMsg","expectedLine","actualLine","divergingLines","_Error","_inspect$custom","_super","stackTraceLimit","getColorDepth","_res","knownOperators","custom","util","createErrorType","arg1","arg2","arg3","NodeError","_Base","oneOf","thing","determiner","inspected","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_arrayLikeToArray","arr2","regexFlagsSupported","flags","arrayFromSet","arrayFromMap","objectGetOwnPropertySymbols","uncurryThis","isAnyArrayBuffer","isMap","isNativeError","isBoxedPrimitive","isNumberObject","isStringObject","isBooleanObject","isBigIntObject","isSymbolObject","isFloat32Array","isFloat64Array","isNonIndex","getOwnNonIndexProperties","ONLY_ENUMERABLE","kStrict","kLoose","kNoIterator","kIsArray","kIsSet","kIsMap","areSimilarRegExps","areSimilarFloatArrays","areSimilarTypedArrays","areEqualArrayBuffers","buf1","buf2","isEqualBoxedPrimitive","val1","val2","innerDeepEqual","val1Tag","keys1","keys2","keyCheck","_keys","_keys2","getEnumerables","iterationType","aKeys","bKeys","symbolKeysA","symbolKeysB","_symbolKeysB","val2MemoA","val2MemoB","areEq","setHasEqualElement","setValues","findLooseMatchingPrimitives","setMightHaveLoosePrim","altValue","mapMightHaveLoosePrim","curB","setEquiv","aValues","bValues","_val","mapHasEqualEntry","item1","mapEquiv","aEntries","_aEntries$i","item2","bEntries","_i2","_bEntries$_i","keysA","_Buffer","BASE_MAP","xc","LEADER","FACTOR","iFACTOR","decodeUnsafe","psz","zeroes","b256","carry","it3","it4","vch","pbegin","pend","b58","it1","it2","__WEBPACK_AMD_DEFINE_RESULT__","GLOBAL","Big","DP","RM","MAX_DP","MAX_POWER","PE","STRICT","NAME","INVALID","INVALID_DP","INVALID_RM","DIV_BY_ZERO","UNDEFINED","NUMERIC","_Big_","roundHalfEven","nl","sd","rm","more","doExponential","isNonzero","cmp","isneg","yc","dp","bl","ri","bz","qc","qi","gte","lte","minus","xlty","plus","ygtx","times","prec","half","toExponential","toPrecision","reversed","toBigIntBE","toBufferBE","globalObject","BigNumber","isNumeric","mathceil","mathfloor","bignumberError","tooManyDigits","LOG_BASE","POWS_TEN","SQRT_BASE","MAX","configObject","pow2_53","random53bitInt","basePrefix","dotAfter","dotBefore","isInfinityOrNaN","whitespaceOrPlus","convertBase","parseNumeric","DECIMAL_PLACES","ROUNDING_MODE","TO_EXP_NEG","TO_EXP_POS","MIN_EXP","MAX_EXP","CRYPTO","MODULO_MODE","POW_PRECISION","FORMAT","secondaryGroupSize","fractionGroupSize","fractionGroupSeparator","alphabetHasNormalDecimalDigits","caseChanged","isNum","_isBigNumber","intCheck","DEBUG","c0","coeffToString","toFixedPoint","maxOrMin","normalise","ni","rd","pows10","ROUND_CEIL","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_CEIL","ROUND_HALF_FLOOR","EUCLID","crypto","getRandomValues","EXPONENTIAL_AT","RANGE","isBigNumber","maximum","minimum","random","rand","decimal","toBaseOut","baseIn","baseOut","arrL","callerIsToString","temp","xlo","xhi","klo","khi","aL","bL","prod","prodL","remL","rem0","xi","xL","yc0","yL","yz","bitFloor","absoluteValue","comparedTo","dividedBy","dividedToIntegerBy","idiv","exponentiatedBy","isModExp","nIsBig","nIsNeg","nIsOdd","integerValue","isEqualTo","isGreaterThan","isGreaterThanOrEqualTo","isLessThan","isLessThanOrEqualTo","isPositive","xLTy","multipliedBy","xcL","ycL","ylo","yhi","zc","sqrtBase","negated","shiftedBy","squareRoot","rep","toFormat","g1","g2","intPart","intDigits","toFraction","d0","d1","d2","exp","zs","endian","negative","_init","parseHex4Bits","parseHexByte","lowerBound","parseBase","move","_initNumber","_initArray","_parseHex","_parseBase","off","_strip","parseLength","limbLen","limbPow","imuln","_iaddn","_move","_expand","_normSign","for","zeros","groupSizes","groupBases","groupBase","modrn","idivn","ArrayType","toBitArray","bit","wbit","smallMulTo","ncarry","rword","maxJ","reqLength","_toArrayLikeLE","_toArrayLikeBE","clz32","_countBits","_zeroBits","zeroBits","inotn","iaddn","testn","notn","ineg","iuor","ior","or","uor","iuand","iand","and","uand","iuxor","ixor","xor","uxor","bytesNeeded","bitsLeft","setn","iadd","isub","comb10MulTo","mid","a0","al0","ah0","al1","ah1","al2","ah2","a3","al3","ah3","a4","al4","ah4","a5","al5","ah5","a6","al6","ah6","a7","al7","ah7","a8","al8","ah8","a9","al9","ah9","b0","bl0","bh0","bl1","bh1","bl2","bh2","bl3","bh3","bl4","bh4","bl5","bh5","bl6","bh6","b7","bl7","bh7","b8","bl8","bh8","bl9","bh9","w0","imul","w1","w2","w3","w4","w5","w6","w7","w8","w9","w10","w11","w12","w13","w14","w15","w16","w17","w18","bigMulTo","hncarry","jumboMulTo","FFTM","mulTo","makeRBT","revBin","rb","permute","rbt","rws","iws","rtws","itws","rtwdf","cos","itwdf","sin","rtwdf_","itwdf_","ro","io","rx","guessLen13b","odd","conjugate","normalize13b","ws","convert13b","stub","ph","mulp","rwst","iwst","nrws","nrwst","niwst","rmws","mulf","isNegNum","muln","isqr","iushln","carryMask","newCarry","ishln","iushrn","extended","maskedWords","ishrn","shln","ushln","ushrn","imaskn","maskn","isubn","addn","subn","iabs","_ishlnsubmul","_wordDiv","bhi","qj","divmod","positive","divn","umod","divRound","dm","andln","modn","egcd","isEven","yp","xp","im","jm","_invmp","x1","cmpn","invm","bincn","ucmp","gtn","gten","ltn","lten","eqn","Red","toRed","convertTo","_forceRed","fromRed","convertFrom","forceRed","redAdd","redIAdd","redSub","redISub","redShl","redMul","_verify2","redIMul","redSqr","_verify1","redISqr","redSqrt","redInvm","redNeg","redPow","primes","k256","p224","p192","p25519","MPrime","_tmp","K256","P224","P192","P25519","prime","_prime","Mont","imod","rinv","minv","ireduce","rlen","imulK","strip","outLen","mod3","nOne","lpow","wnd","currentLen","mont","nmd","BinaryReader","BinaryWriter","BorshError","baseDecode","baseEncode","bs58_1","ResolvedTextDecoder","textDecoder","fatal","INITIAL_LENGTH","fieldPath","originalMessage","addToFieldPath","maybeResize","writeU8","writeU16","writeU32","writeU64","writeBuffer","writeU128","writeU256","writeU512","writeString","writeFixedArray","writeArray","handlingRangeError","propertyKey","propertyDescriptor","originalMethod","readU8","readU16","readU32","readU64","readBuffer","readU128","readU256","readU512","readString","readFixedArray","readArray","capitalizeFirstLetter","serializeField","fieldType","writer","serializeStruct","borshSerialize","structSchema","Writer","deserializeField","deserializeStruct","classType","borshDeserialize","Reader","GetIntrinsic","callBind","$indexOf","allowMissing","intrinsic","setFunctionLength","$TypeError","$apply","$call","$reflectApply","$defineProperty","$max","originalFunction","applyBind","globalScope","MAX_DIGITS","Decimal","toExpNeg","toExpPos","LN10","external","decimalError","invalidArgument","exponentOutOfRange","mathpow","isDecimal","MAX_E","xd","yd","Ctor","checkInt32","digitsToString","indexOfLastWord","getZeroString","xdL","ydL","exponent","getBase10Exponent","greaterThanOrEqualTo","isint","ispos","lessThanOrEqualTo","logarithm","wpr","naturalExponential","naturalLogarithm","rL","todp","toInteger","toint","toPower","yIsInt","guard","tosd","multiplyInteger","qd","yd0","getLn10","parseDecimal","doRound","xdi","isExp","ps","inexact","quadrant","EXP_LIMIT","NUMERALS","DEFAULTS","minE","maxE","precisionLimitExceeded","cryptoUnavailable","isBinary","isHex","isOctal","LN10_PRECISION","PI_PRECISION","checkRoundingDigits","repeating","di","strL","cosine","tinyPow","taylorSeries","cos2x","finalise","clampedTo","clamp","ys","toLessThanHalfPi","cubeRoot","cbrt","t3plusx","divToInt","hyperbolicCosine","cosh","cosh2_x","d8","hyperbolicSine","sinh","sinh2_x","d5","d16","d20","hyperbolicTangent","tanh","inverseCosine","acos","halfPi","getPi","asin","inverseHyperbolicCosine","acosh","inverseHyperbolicSine","asinh","inverseHyperbolicTangent","atanh","xsd","inverseSine","atan","inverseTangent","isInt","isPos","isBase10","inf","getPrecision","sine","tangent","tan","toBinary","toStringBinary","toDP","finiteToString","maxD","toHexadecimal","toNearest","toOctal","intPow","toSD","truncated","logBase","isTruncated","digits","nonFiniteToString","ltgt","parseOther","divisor","isFloat","sin2_x","isHyperbolic","pi","atan2","useDefaults","defaults","isDecimalInstance","hypot","log10","log2","$SyntaxError","gopd","nonEnumerable","nonWritable","nonConfigurable","loose","hasSymbols","defineDataProperty","supportsDescriptors","predicate","predicates","createError","ErrClass","EvalError","ReferenceError","SyntaxError","URIError","Events","EE","once","addListener","emitter","evt","_eventsCount","clearEvent","EventEmitter","eventNames","names","listenerCount","removeListener","removeAllListeners","prefixed","isCallable","forEachArray","receiver","forEachString","forEachObject","ERROR_MESSAGE","funcType","concatty","slicy","arrLike","joiny","joiner","that","bound","binder","boundLength","boundArgs","Empty","implementation","$Error","$EvalError","$RangeError","$ReferenceError","$URIError","$Function","getEvalledConstructor","expressionSyntax","$gOPD","throwTypeError","ThrowTypeError","callee","calleeThrows","gOPDthrows","hasProto","getProto","needsEval","TypedArray","INTRINSICS","Atomics","BigInt64Array","BigUint64Array","decodeURI","encodeURI","eval","FinalizationRegistry","Int8Array","Int16Array","Int32Array","Uint8ClampedArray","Uint16Array","WeakRef","WeakSet","errorProto","doEval","LEGACY_ALIASES","$concat","$spliceApply","$replace","$strSlice","$exec","rePropName","reEscapeChar","stringToPath","subString","getBaseIntrinsic","alias","intrinsicName","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","hasPropertyDescriptors","hasArrayLengthDefineBug","$Object","origSymbol","hasSymbolSham","symObj","symVal","syms","$hasOwn","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","displayName","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","KNOWN_STATICS","caller","arity","FORWARD_REF_STATICS","render","MEMO_STATICS","TYPE_STATICS","getStatics","component","isMemo","ForwardRef","Memo","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","targetStatics","sourceStatics","$$typeof","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Fragment","Lazy","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","hasToStringTag","$toString","callBound","isStandardArguments","isLegacyArguments","supportsStandardArguments","badArrayLike","isCallableMarker","fnToStr","reflectApply","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","objectClass","fnClass","genClass","ddaClass","ddaClass2","ddaClass3","isIE68","isDDA","strClass","GeneratorFunction","isFnRegex","getGeneratorFunc","generatorFunc","getPolyfill","shim","whichTypedArray","uuid","v4","generateRequest","ClientBrowser","callServer","reviver","replacer","notificationIdNull","isBatch","isRaw","hasCallback","_parseResponse","isNotError","ERROR","WINDOW","JS_SHA256_NO_WINDOW","WEB_WORKER","NODE_JS","JS_SHA256_NO_NODE_JS","COMMON_JS","JS_SHA256_NO_COMMON_JS","AMD","amdO","ARRAY_BUFFER","JS_SHA256_NO_ARRAY_BUFFER","HEX_CHARS","EXTRA","SHIFT","OUTPUT_TYPES","blocks","JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW","createOutputMethod","outputType","is224","Sha256","createMethod","nodeWrap","algorithm","nodeMethod","createHash","createHmacOutputMethod","HmacSha256","createHmacMethod","sharedMemory","h0","h7","hBytes","finalized","oKeyPad","iKeyPad","inner","notString","lastByteIndex","finalize","s0","s1","maj","ch","ab","da","cd","bc","dataView","setUint32","innerHash","sha224","INPUT_ERROR","FINALIZE_ERROR","JS_SHA3_NO_WINDOW","JS_SHA3_NO_NODE_JS","JS_SHA3_NO_COMMON_JS","JS_SHA3_NO_ARRAY_BUFFER","SHAKE_PADDING","CSHAKE_PADDING","KECCAK_PADDING","PADDING","RC","SHAKE_BITS","CSHAKE_BYTEPAD","JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW","formatMessage","empty","cloneArray","newArray","createShakeOutputMethod","outputBits","createCshakeOutputMethod","createKmacOutputMethod","createOutputMethods","algorithms","bytepad","Kmac","methodNames","newMethodName","blockCount","byteCount","outputBlocks","encodeString","strs","paddingBytes","c3","c4","c5","c6","c7","c8","c9","b12","b13","b14","b15","b16","b17","b18","b19","b21","b23","b24","b25","b26","b27","b28","b29","b30","b31","b32","b33","b34","b35","b36","b37","b38","b39","b41","b42","b43","b45","b46","b47","b48","b49","__kMaxLength","__zero","__isOneDigitInt","__oneDigit","__fromDouble","__fromString","__toPrimitive","toDebugString","__toStringBasePowerOfTwo","__toStringGeneric","__unsignedDigit","__digit","__clz30","__decideRounding","__kBitConversionInts","__kBitConversionDouble","unaryMinus","__copy","bitwiseNot","__absoluteSubOne","__trim","__absoluteAddOne","__kMaxLengthBits","__initializeDigits","__setDigit","__clzmsd","__multiplyAccumulate","__absoluteCompare","__absoluteDivSmall","__absoluteDivLarge","__absoluteModSmall","__absoluteAdd","__absoluteSub","leftShift","__rightShiftByAbsolute","__leftShiftByAbsolute","signedRightShift","unsignedRightShift","__compareToBigInt","bitwiseAnd","__absoluteAnd","__absoluteOr","__absoluteAndNot","bitwiseXor","__absoluteXor","bitwiseOr","asIntN","__truncateToNBits","__truncateAndSubFromPowerOfTwo","asUintN","ADD","__toNumeric","__isBigInt","LT","__compare","LE","GT","GE","__equalToNumber","__isWhitespace","__kMaxBitsPerChar","__kBitsPerCharTableMultiplier","__kBitsPerCharTableShift","__fillFromParts","__inplaceMultiplyAdd","__kConversionChars","__halfDigit","__setHalfDigit","__unequalSign","__absoluteGreater","__absoluteLess","__compareToNumber","__compareToDouble","__comparisonResultToBool","__setDigitGrow","__imul","__internalMultiplyAdd","__halfDigitLength","__clz15","__specialLeftShift","__inplaceSub","__inplaceAdd","__inplaceRightShift","__toShiftAmount","__rightShiftByMaximum","__digitPow","__kBitConversionBuffer","FUNC_ERROR_TEXT","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","freeSelf","objectProto","nativeMax","nativeMin","debounce","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","maxing","invokeFunc","time","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","shouldInvoke","trailingEdge","cancel","debounced","isInvoking","isObjectLike","isSymbol","__NEXT_P","_utf8Decoder","_userAgent","wallets","MyApp","WalletAdapterNetwork","WalletReadyState","Environment","_ReadonlyWalletAccount_address","_ReadonlyWalletAccount_publicKey","_ReadonlyWalletAccount_chains","_ReadonlyWalletAccount_features","_ReadonlyWalletAccount_label","_ReadonlyWalletAccount_icon","_StandardWalletAdapter_instances","_StandardWalletAdapter_account","_StandardWalletAdapter_publicKey","_StandardWalletAdapter_connecting","_StandardWalletAdapter_disconnecting","_StandardWalletAdapter_off","_StandardWalletAdapter_supportedTransactionVersions","_StandardWalletAdapter_wallet","_StandardWalletAdapter_readyState","_StandardWalletAdapter_connect","_StandardWalletAdapter_connected","_StandardWalletAdapter_disconnected","_StandardWalletAdapter_reset","_StandardWalletAdapter_changed","_StandardWalletAdapter_signTransaction","_StandardWalletAdapter_signAllTransactions","_StandardWalletAdapter_signMessage","_StandardWalletAdapter_signIn","_AppReadyEvent_detail","_RegisterWalletEvent_detail","_SolflareMetaMaskWallet_instances","_SolflareMetaMaskWallet_listeners","_SolflareMetaMaskWallet_version","_SolflareMetaMaskWallet_name","_SolflareMetaMaskWallet_icon","_SolflareMetaMaskWallet_solflareMetaMask","_SolflareMetaMaskWallet_on","_SolflareMetaMaskWallet_emit","_SolflareMetaMaskWallet_off","_SolflareMetaMaskWallet_connect","_SolflareMetaMaskWallet_disconnect","_SolflareMetaMaskWallet_signAndSendTransaction","_SolflareMetaMaskWallet_signTransaction","_SolflareMetaMaskWallet_signMessage","react","useIsomorphicLayoutEffect","useEffect","useIsMounted","isMounted","noop_noop","MotionGlobalConfig","skipAnimations","useManualTiming","Queue","scheduled","remove","clear","createRenderStep","runNextFrame","thisFrame","nextFrame","numToRun","isProcessing","flushNextFrame","toKeepAlive","keepAlive","immediate","addToCurrentFrame","frameData","schedule","stepsOrder","maxElapsed","createRenderBatcher","scheduleNextBatch","allowKeepAlive","useDefaultElapsed","steps","processStep","stepId","processBatch","performance","wake","frame_frame","cancelFrame","requestAnimationFrame","useForceUpdate","forcedRenderCount","setForcedRenderCount","useState","forceRender","useCallback","deferredForceRender","postRender","PresenceContext","useConstant","MotionConfigContext","transformPagePoint","isStatic","reducedMotion","PopChildMeasure","Component","getSnapshotBeforeUpdate","prevProps","childRef","isPresent","sizeRef","offsetHeight","offsetWidth","offsetTop","offsetLeft","componentDidUpdate","PopChild","useId","dataset","motionPopId","cloneElement","PresenceChild","onExitComplete","presenceAffectsLayout","presenceChildren","newChildrenMap","useMemo","childId","isComplete","register","LayoutGroupContext","useUnmountEffect","invariant","getChildKey","child","updateChildLookup","allChildren","onlyElements","Children","isValidElement","AnimatePresence","exitBeforeEnter","filteredChildren","childrenToRender","exitingChildren","presentChildren","isInitialRender","presentKeys","targetKeys","numPresent","insertionIndex","exitingComponent","onExit","leftOverKeys","childKey","leftOverKey","presentChildKey","presentChild","head_default","prop_types","prop_types_default","es","devtools","solana","dist_useIsomorphicLayoutEffect","useEventListener","savedHandler","targetElement","useEventCallback","use_local_storage","initialValue","readValue","localStorage","getItem","storedValue","setStoredValue","setValue","newValue","setItem","dispatchEvent","Event","handleStorageChange","useTheme_ThemeContext","hasSymbol","nested","mergeOuterLocalTheme","outerTheme","localTheme","mergedTheme","ThemeProvider_ThemeProvider","emotion_element_43c6fea0_browser_esm","useThemeWithoutDefault","EMPTY_THEME","useThemeScoping","isPrivate","resolvedTheme","esm_ThemeProvider_ThemeProvider","upperPrivateTheme","engineTheme","privateTheme","rtlValue","styles_ThemeProvider_ThemeProvider","scopedTheme","DefaultPropsProvider_DefaultPropsProvider","html","enableColorScheme","WebkitFontSmoothing","MozOsxFontSmoothing","WebkitTextSizeAdjust","colorScheme","_theme$components","colorSchemeStyles","colorSchemes","scheme","_scheme$palette","defaultStyles","themeOverrides","MuiCssBaseline","CssBaseline_CssBaseline","inProps","jsxs","settings","getThemeOptions","theme_ThemeContext","localStorageThemeModeKeyName","param","preferredMode","savedThemeMode","setSavedThemeMode","setMode","contextValues","themeOptions","themeMode","newMode","prevMode","documentElement","classList","ConnectionContext","useConnection","ConnectionProvider","WalletError","WalletNotReadyError","WalletLoadError","WalletConfigError","WalletConnectionError","WalletDisconnectedError","WalletDisconnectionError","WalletAccountError","WalletPublicKeyError","WalletNotConnectedError","WalletSendTransactionError","WalletSignTransactionError","WalletSignMessageError","WalletSignInError","BaseWalletAdapter","connected","autoConnect","prepareTransaction","scopePollingDetectionStrategy","detect","disposers","detectAndDispose","detected","isIosAndRedirectable","navigator","userAgent","isIos","isSafari","BaseSignerWalletAdapter","supportedTransactionVersions","signedTransactions","BaseMessageSignerWalletAdapter","BaseSignInMessageSignerWalletAdapter","DOMAIN","ADDRESS","STATEMENT","URI","VERSION","CHAIN_ID","NONCE","ISSUED_AT","EXPIRATION_TIME","NOT_BEFORE","REQUEST_ID","RESOURCES","FIELDS","createSignInMessageText","statement","uri","issuedAt","expirationTime","notBefore","requestId","resources","resource","SolanaMobileWalletAdapterErrorCode","ERROR_ASSOCIATION_PORT_OUT_OF_RANGE","ERROR_FORBIDDEN_WALLET_BASE_URL","ERROR_SECURE_CONTEXT_REQUIRED","ERROR_SESSION_CLOSED","ERROR_SESSION_TIMEOUT","ERROR_WALLET_NOT_FOUND","ERROR_INVALID_PROTOCOL_VERSION","SolanaMobileWalletAdapterError","SolanaMobileWalletAdapterProtocolError","jsonRpcMessageId","createHelloReq","ecdhPublicKey","associationKeypairPrivateKey","publicKeyBuffer","subtle","exportKey","signatureBuffer","btoa","createSIWSMessage","payload","createSIWSMessageBase64","SolanaSignTransactions","SolanaCloneAuthorization","createMobileWalletProxy","protocolVersion","protocolRequestHandler","inputParams","handleMobileWalletRequest","sign_in_payload","sign_in_result","signInFallback","handleMobileWalletResponse","deleteProperty","methodParams","letter","chain","auth_token","identity","capabilities","supports_clone_authorization","supports_sign_and_send_transactions","signInPayload","authorizationResult","host","siwsMessage","signMessageResult","payloads","signInResult","signed_message","signed_payloads","SEQUENCE_NUMBER_BYTES","createSequenceNumberVector","sequenceNumber","INITIALIZATION_VECTOR_BYTES","ENCODED_PUBLIC_KEY_LENGTH_BYTES","encryptMessage","plaintext","sharedSecret","sequenceNumberVector","initializationVector","ciphertext","encrypt","getAlgorithmParams","decryptMessage","plaintextBuffer","decrypt","getUtf8Decoder","additionalData","iv","tagLength","generateAssociationKeypair","generateKey","namedCurve","generateECDHKeypair","encryptJsonRpcMessage","jsonRpcMessage","decryptJsonRpcMessage","parseHelloRsp","payloadBuffer","associationPublicKey","ecdhPrivateKey","associationPublicKeyBuffer","walletPublicKey","importKey","deriveBits","public","ecdhSecretKey","aesKeyMaterialVal","deriveKey","salt","parseSessionProps","jsonProperties","protocol_version","getRandomAssociationPort","assertAssociationPort","port","arrayBufferToBase64String","binary","getStringWithURLUnsafeCharactersReplaced","unsafeBase64EncodedString","INTENT_NAME","getPathParts","pathString","getIntentURL","methodPathname","intentUrlBase","baseUrl","URL","pathname","getAssociateAndroidIntentURL","putativePort","associationURLBase","protocolVersions","associationPort","exportedKey","encodedKey","Browser","Firefox","Other","assertUnreachable","getBrowser","getDetectionPromise","cleanup","handleBlur","_frame","launchUrlThroughHiddenFrame","contentWindow","href","startSession","randomAssociationPort","associationUrl","detectionPromise","WEBSOCKET_CONNECTION_CONFIG","retryDelayScheduleMs","WEBSOCKET_PROTOCOL","assertSecureContext","isSecureContext","assertSecureEndpointSpecificURI","walletUriBase","getSequenceNumberFromByteArray","transact","connectionStartTime","associationKeypair","sessionPort","baseUri","websocketURL","getNextRetryDelayMs","nextJsonRpcMessageId","lastKnownInboundSequenceNumber","disposeSocket","retryWaitTimeoutId","jsonRpcResponsePromises","handleOpen","ecdhKeypair","handleClose","wasClean","closeEvent","handleError","retryDelayMs","attemptSocketConnection","handleMessage","responseBuffer","responsePromise","sessionPropertiesBuffer","sessionProperties","wallet_uri_base","esm_awaiter","fromUint8Array","toUint8Array","base64EncodedByteArray","atob","getPayloadFromTransaction","getTransactionFromWireMessage","messageOffset","esm_transact","augmentedCallback","augmentedAPI","waitForCommitmentToSendNextTransaction","min_context_slot","skip_preflight","max_retries","wait_for_commitment_to_send_next_transaction","base64EncodedSignatures","signAndSendTransactions","base64EncodedPayloads","base64EncodedSignedMessages","signMessages","signedMessages","base64EncodedCompiledTransactions","compiledTransactions","lib_esm_awaiter","esm_toUint8Array","getIsSupported","SolanaMobileWalletAdapterWalletName","getPublicKeyFromAddress","publicKeyByteArray","esm_isVersionedTransaction","SolanaMobileWalletAdapter","_connecting","_connectionGeneration","_readyState","Loadable","Unsupported","_authorizationResultCache","authorizationResultCache","_addressSelector","addressSelector","_appIdentity","appIdentity","_chain","_onWalletNotFound","onWalletNotFound","declareWalletAsInstalled","_selectedAddress","_authorizationResult","connecting","Installed","runWithGuard","autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cachedAuthorizationResult","handleAuthorizationResult","performAuthorization","didPublicKeysChange","nextSelectedAddress","select","performReauthorization","authToken","disconnect","currentConnectionGeneration","assertIsAuthorized","selectedAddress","performSignTransactions","getTargetCommitment","targetCommitment","targetPreflightCommitment","preflightCommitmentScore","targetCommitmentScore","_1","_2","getCapabilities","signedTransaction","signMessage","signedMessage","signIn","signedInAddress","signedInAccount","createDefaultAddressSelector","CACHE_KEY","createDefaultAuthorizationResultCache","storage","removeItem","defaultWalletNotFoundHandler","mobileWalletAdapter","createDefaultWalletNotFoundHandler","signAndSendTransaction","StandardConnect","StandardEvents","isWalletAdapterCompatibleStandardWallet","isWalletAdapterCompatibleWallet","SolanaSignIn","esm_SOLANA_MAINNET_CHAIN","esm_SOLANA_DEVNET_CHAIN","esm_SOLANA_TESTNET_CHAIN","esm_SOLANA_LOCALNET_CHAIN","MAINNET_ENDPOINT","getChainForEndpoint","getCommitment","StandardDisconnect","util_arraysEqual","adapter_classPrivateFieldSet","adapter_classPrivateFieldGet","StandardWalletAdapter","silent","feature","chains","wallets_classPrivateFieldSet","wallets_classPrivateFieldGet","getWallets","api","detail","AppReadyEvent","wallets_guard","existingListener","bubbles","cancelable","composed","preventDefault","stopImmediatePropagation","stopPropagation","DEPRECATED_getWallets","useStandardWalletAdapters","adapters","warnings","useStandardWalletAdapters_useConstant","standardAdapters","setStandardAdapters","wrapWalletsWithAdapters","standardAdapter","prevStandardAdapters","usePrevious","currentAdapters","removedAdapters","previousAdapter","adapter","isWebView","userAgentString","getEnvironment","DESKTOP_WEB","MOBILE_WEB","getInferredClusterFromEndpoint","useLocalStorage_useLocalStorage","defaultState","isFirstRenderRef","WalletNotSelectedError","useWallet","WalletProviderBase","isUnloadingRef","onAutoConnectRequest","onConnectError","onError","onSelectWallet","isConnectingRef","setConnecting","isDisconnectingRef","disconnecting","setDisconnecting","setPublicKey","setConnected","onErrorRef","handleErrorRef","setWallets","handleReadyStateChange","prevWallets","handleConnect","handleDisconnect","didAttemptAutoConnectRef","getUserAgent","getIsMobile","getUriForAppIdentity","WalletProvider","localStorageKey","adaptersWithStandardAdapters","existingMobileWalletAdapter","adaptersWithMobileWalletAdapter","walletName","setWalletName","changeWallet","nextWalletName","hasUserSelectedAWallet","handleAutoConnectRequest","handleBeforeUnload","handleConnectError","selectWallet","useWalletModal","react_dom","Collapse","expanded","instant","transition","openCollapse","scrollHeight","closeCollapse","handleComplete","handleTransitionEnd","propertyName","role","Button","onClick","tabIndex","startIcon","endIcon","WalletIcon","alt","WalletListItem","handleClick","WalletSVG","viewBox","xmlns","cx","cy","stroke","clipPath","y1","gradientUnits","stopColor","WalletModal","setVisible","setExpanded","fadeIn","setFadeIn","portal","setPortal","listedWallets","collapsedWallets","installed","notInstalled","hideModal","handleWalletClick","handleCollapseClick","handleTabKey","focusableElements","firstElement","lastElement","shiftKey","activeElement","handleKeyDown","getComputedStyle","createPortal","onMouseDown","WalletModalProvider","visible","PhantomWalletName","PhantomWalletAdapter","NotDetected","_disconnected","_wallet","_accountChanged","newPublicKey","phantom","isPhantom","isConnected","register_classPrivateFieldSet","register_classPrivateFieldGet","registerWallet","RegisterWalletEvent","wallet_classPrivateFieldGet","wallet_classPrivateFieldSet","SolflareMetaMaskWallet","SolflareMetaMaskClass","standardSignAndSendTransaction","standardSignTransaction","standardSignMessage","standardAccounts","detect_registered","detect_register","detectAndRegisterSolflareMetaMaskWallet","postMessage","onMessage","SolflareWalletName","SolflareWalletAdapter","_config","solflare","isSolflare","SolflareApp","SolflareClass","wallet_Provider","emotion_cache_browser_esm","create_emotion_cache_isBrowser","createEmotionCache","emotionInsertionPoint","clientSideEmotionCache","emotionCache","pageProps","queryClient","QueryClient","content","QueryClientProvider","Hydrate","dehydratedState","ReactQueryDevtools","initialIsOpen","elementType","isRequired","useSolana","docs","nodewallet","dist_browser","defaultSolanaContext","distributorClient","merkleTreeVersion","SolanaContext","_process_env_NEXT_PUBLIC_MERKLE_TREE_VERSION","userPublicKey","defaultKeypair","defaultWallet","connectionUrl","keysShim","isArgs","isEnumerable","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","equalsConstructorPrototypeIfNotBuggy","theKeys","skipProto","skipConstructor","origKeys","originalKeys","cachedSetTimeout","cachedClearTimeout","currentQueue","defaultSetTimout","defaultClearTimeout","runTimeout","fun","runClearTimeout","draining","queueIndex","cleanUpNextTick","drainQueue","Item","nextTick","argv","prependListener","prependOnceListener","binding","chdir","umask","errcode","isRetryError","promiseRetry","operation","attempt","retried","RetryOperation","timeouts","forever","unref","maxRetryTime","factor","maxTimeout","randomize","createTimeout","wrap","original","op","mainError","_originalTimeouts","_timeouts","_options","_maxRetryTime","_fn","_errors","_attempts","_operationTimeout","_operationTimeoutCb","_timeout","_operationStart","_cachedTimeouts","stop","currentTime","timer","timeoutOps","try","attempts","counts","mainErrorCount","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","componentName","propFullName","secret","getShim","ReactPropTypes","arrayOf","instanceOf","objectOf","oneOfType","exact","checkPropTypes","PropTypes","ReactQueryDevtoolsPanel","focusManager","_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__","_subscribable__WEBPACK_IMPORTED_MODULE_2__","_utils__WEBPACK_IMPORTED_MODULE_1__","_Subscribable","FocusManager","setup","onFocus","_window","sk","onSubscribe","setEventListener","onUnsubscribe","hasListeners","_this$cleanup","_this$cleanup2","_this2","focused","setFocused","isFocused","visibilityState","_queryClient__WEBPACK_IMPORTED_MODULE_0__","_types__WEBPACK_IMPORTED_MODULE_1__","useMutation","useQuery","setLogger","getLogger","logger","newLogger","getDefaultState","Mutation","_logger__WEBPACK_IMPORTED_MODULE_2__","_notifyManager__WEBPACK_IMPORTED_MODULE_4__","_retryer__WEBPACK_IMPORTED_MODULE_3__","mutationId","mutationCache","observers","setState","dispatch","addObserver","observer","removeObserver","retryer","continue","restored","variables","onMutate","executeMutation","onSuccess","onSettled","_this$options$retry","m4","mutationFn","onFail","onPause","onContinue","retryDelay","_this3","reducer","onMutationUpdate","failureCount","isPaused","notifyManager","_utils__WEBPACK_IMPORTED_MODULE_0__","NotifyManager","notifyFn","batchNotifyFn","A4","batchCalls","setNotifyFunction","setBatchNotifyFunction","onlineManager","OnlineManager","onOnline","online","setOnline","isOnline","onLine","inheritsLoose","Query","abortSignalConsumed","hadObservers","setOptions","queryKey","queryHash","initialState","scheduleGc","_this$options$cacheTi","cacheTime","setDefaultOptions","clearGcTimeout","PN","gcTimeout","optionalRemove","isFetching","setData","updater","_this$options$isDataE","_this$options","prevData","SE","isDataEqual","structuralSharing","Q$","dataUpdatedAt","updatedAt","setStateOptions","_this$retryer","enabled","isStale","isInvalidated","getCurrentResult","isStaleByTime","staleTime","Kp","_this$retryer2","shouldFetchOnWindowFocus","refetch","_this$retryer3","shouldFetchOnReconnect","query","isTransportCancelable","revert","cancelRetry","getObserversCount","invalidate","fetchOptions","_this$retryer4","_this$options$behavio2","_context$fetchOptions2","_this$options$behavio","_context$fetchOptions","_abortController$abor","cancelRefetch","continueRetry","queryFn","mc","abortController","G9","queryFnContext","pageParam","fetchFn","behavior","onFetch","revertState","fetchMeta","DV","onQueryUpdate","initialData","initialDataUpdatedAt","hasInitialData","hasData","dataUpdateCount","errorUpdateCount","errorUpdatedAt","fetchFailureCount","_action$meta","_action$dataUpdatedAt","subscribable","QueryCache","queries","queriesMap","_options$queryHash","Rm","defaultQueryOptions","getQueryDefaults","queryInMap","getAll","_parseFilterArgs","I6","findAll","_parseFilterArgs2","_this4","_this5","core_mutation","MutationCache","mutations","mutation","defaultMutationOptions","mutationKey","getMutationDefaults","X7","resumePausedMutations","pausedMutations","infiniteQueryBehavior","_context$fetchOptions3","_context$fetchOptions4","_context$state$data","_context$state$data2","refetchPage","fetchMore","isFetchingNextPage","isFetchingPreviousPage","oldPages","pages","oldPageParams","pageParams","newPageParams","cancelled","buildNewPages","page","fetchPage","manual","queryFnResult","promiseAsAny","getNextPageParam","_manual","_param","getPreviousPageParam","shouldFetchFirstPage","_loop","_param2","finalPromise","finalPromiseAsAny","queryCache","queryDefaults","mutationDefaults","mount","unsubscribeFocus","unsubscribeOnline","unmount","_this$unsubscribeFocu","_this$unsubscribeOnli","fetching","isMutating","getQueryData","_this$queryCache$find","getQueriesData","queryKeyOrFilters","getQueryCache","setQueryData","parsedOptions","_v","defaultedOptions","setQueriesData","_ref2","getQueryState","_this$queryCache$find2","removeQueries","resetQueries","_parseFilterArgs3","refetchFilters","refetchQueries","cancelQueries","_parseFilterArgs4","_parseFilterArgs4$","cancelOptions","invalidateQueries","_ref3","_filters$refetchActiv","_filters$refetchInact","_parseFilterArgs5","refetchActive","refetchInactive","_this6","_parseFilterArgs6","throwOnError","fetchQuery","prefetchQuery","fetchInfiniteQuery","prefetchInfiniteQuery","cancelMutations","_this7","getMutationCache","getDefaultOptions","setQueryDefaults","yF","_this$queryDefaults$f","setMutationDefaults","_this$mutationDefault","_defaulted","defaultQueryObserverOptions","isCancelledError","isCancelable","Retryer","_focusManager__WEBPACK_IMPORTED_MODULE_1__","_onlineManager__WEBPACK_IMPORTED_MODULE_2__","defaultRetryDelay","CancelledError","cancelFn","continueFn","promiseResolve","promiseReject","isResolved","outerResolve","outerReject","pause","continueResolve","promiseOrValue","_unused","_config$retry","_config$retryDelay","shouldRetry","Subscribable","scheduleMicrotask","getAbortController","parseFilterArgs","timeUntilStale","isValidTimeout","replaceEqualDeep","hashQueryKeyByOptions","functionalUpdate","shallowEqualObjects","matchMutation","parseQueryArgs","matchQuery","parseMutationArgs","ensureQueryKeyArray","isServer","partialMatchKey","hashQueryKey","isQueryKey","mapQueryStatusFilter","stale","queryStatusFilter","hashFn","queryKeyHashFn","stableValueHash","partialDeepEqual","aSize","bItems","bSize","equalItems","hasObjectPrototype","prot","AbortController","_react__WEBPACK_IMPORTED_MODULE_1__","_core__WEBPACK_IMPORTED_MODULE_0__","unstable_batchedUpdates","logger_logger","defaultContext","QueryClientSharingContext","getQueryClientContext","contextSharing","ReactQueryClientContext","useQueryClient","_ref$contextSharing","MutationObserver","bindMethods","updateResult","mutate","_this$currentMutation","currentMutation","notifyOptions","currentResult","mutateOptions","isLoading","isSuccess","isIdle","shouldThrowError","suspense","_useErrorBoundary","mountedRef","forceUpdate","_React$useState","lV","obsRef","useErrorBoundary","mutateAsync","QueryObserver","trackedProps","selectError","currentQuery","shouldFetchOnMount","executeFetch","updateTimers","shouldFetchOn","refetchOnReconnect","refetchOnWindowFocus","clearTimers","prevOptions","prevQuery","updateQuery","mounted","shouldFetchOptionally","updateStaleTimeout","nextRefetchInterval","computeRefetchInterval","currentRefetchInterval","updateRefetchInterval","getOptimisticResult","createResult","trackResult","trackedResult","trackProp","getNextResult","getCurrentQuery","fetchOptimistic","clearStaleTimeout","staleTimeoutId","_this$options$refetch","refetchInterval","nextInterval","clearRefetchInterval","refetchIntervalId","refetchIntervalInBackground","placeholderData","prevResult","prevResultState","currentResultState","prevResultOptions","currentResultOptions","queryChange","queryInitialState","currentQueryInitialState","prevQueryResult","previousQueryResult","isPreviousData","isPlaceholderData","optimisticResults","fetchOnMount","fetchOptionally","keepPreviousData","selectFn","selectResult","isFetched","isFetchedAfterMount","isRefetching","isLoadingError","isRefetchError","shouldNotifyListeners","notifyOnChangeProps","notifyOnChangePropsExclusions","includedProps","typedKey","changed","isIncluded","isExcluded","VS","defaultNotifyOptions","_this8","shouldLoadOnMount","retryOnMount","refetchOnMount","createValue","_isReset","clearReset","isReset","QueryErrorResetBoundaryContext","useQueryErrorResetBoundary","useBaseQuery","Observer","errorResetBoundary","_React$useState2","dehydratedMutation","_options$defaultOptio","dehydratedQuery","_options$defaultOptio2","useHydrate","optionsRef","copyProps","SafeBuffer","hasDescriptors","gOPD","$floor","functionLengthIsConfigurable","functionLengthIsWritable","isProduction","provided","isArgumentsObject","isGeneratorFunction","isTypedArray","BigIntSupported","SymbolSupported","ObjectToString","numberValue","stringValue","booleanValue","bigIntValue","symbolValue","checkBoxedPrimitive","prototypeValueOf","isUint8Array","isUint8ClampedArray","isUint16Array","isUint32Array","isInt8Array","isInt16Array","isInt32Array","isBigInt64Array","isBigUint64Array","isMapToString","working","isSetToString","isWeakMapToString","isWeakMap","isWeakSetToString","isWeakSet","isArrayBufferToString","isArrayBuffer","isDataViewToString","SharedArrayBufferCopy","isSharedArrayBufferToString","isSharedArrayBuffer","isAsyncFunction","isMapIterator","isSetIterator","isGeneratorObject","isWebAssemblyCompiledModule","descriptors","formatRegExp","deprecate","noDeprecation","throwDeprecation","traceDeprecation","trace","debugs","debugEnvRegex","NODE_DEBUG","debugEnv","numLinesEst","isNullOrUndefined","debuglog","pid","months","getHours","getMinutes","getSeconds","getDate","getMonth","kCustomPromisifiedSymbol","callbackifyOnRejected","newReason","callbackify","callbackified","maybeCb","rej","promisify","esm_browser_v4","rnds8","rng","msCrypto","esm_browser_validate","byteToHex","esm_browser_stringify","rnds","availableTypedArrays","typedArrays","$slice","typedArray","tryTypedArrays","getter","trySlices","u256be","u192be","u192","u128be","u64be","bigIntBE","bigint_buffer_1","base_1","WAD","bignumber_js_1","bigint_1","decimalLayout","boolLayout","publicKeyLayout","possibleNames","__unused_webpack___webpack_module__","_extends","_inheritsLoose","_objectWithoutPropertiesLoose","checkFinished","HashMD","Chi","Maj","_assert_js__WEBPACK_IMPORTED_MODULE_1__","_utils_js__WEBPACK_IMPORTED_MODULE_0__","setBigUint64","_u32_max","wh","wl","padOffset","GL","oview","_md_js__WEBPACK_IMPORTED_MODULE_0__","_utils_js__WEBPACK_IMPORTED_MODULE_1__","SHA256_K","SHA256_IV","SHA256_W","SHA256","W15","np","sigma1","sigma0","l3","Hash","byteSwap32","createView","rotr","wrapConstructor","crypto_crypto","byteSwap","hashCons","hashC","WalletModalContext","DEFAULT_CONTEXT","_open","constructMissingProviderErrorMessage","valueName","WalletContext","EMPTY_ARRAY","logMissingProviderError","SolanaSignAndSendTransaction","SolanaSignMessage","SolanaSignTransaction","static_l_desc","static_d_desc","static_bl_desc","lenfix","distfix","inflate_1","Z_FIXED$1","Z_BINARY","Z_TEXT","Z_UNKNOWN$1","zero$1","STORED_BLOCK","STATIC_TREES","DYN_TREES","MIN_MATCH$1","MAX_MATCH$1","LENGTH_CODES$1","LITERALS$1","L_CODES$1","D_CODES$1","BL_CODES$1","HEAP_SIZE$1","MAX_BITS$1","Buf_size","MAX_BL_BITS","END_BLOCK","REP_3_6","REPZ_3_10","REPZ_11_138","extra_lbits","extra_dbits","extra_blbits","bl_order","DIST_CODE_LEN","static_ltree","static_dtree","_dist_code","_length_code","base_length","base_dist","StaticTreeDesc","static_tree","extra_bits","extra_base","elems","max_length","has_stree","TreeDesc","dyn_tree","stat_desc","max_code","d_code","put_short","pending_buf","send_bits","bi_valid","bi_buf","send_code","tree","bi_reverse","bi_flush","gen_bitlen","xbits","stree","bl_count","heap","heap_max","opt_len","static_len","gen_codes","next_code","tr_static_init","init_block","dyn_ltree","dyn_dtree","bl_tree","sym_next","bi_windup","smaller","_n2","_m2","pqdownheap","heap_len","compress_block","ltree","dtree","lc","sym_buf","build_tree","scan_tree","curlen","prevlen","nextlen","max_count","min_count","send_tree","build_bl_tree","max_blindex","l_desc","d_desc","bl_desc","send_all_trees","lcodes","dcodes","blcodes","rank","detect_data_type","block_mask","static_init_done","_tr_init$1","_tr_stored_block$1","stored_len","_tr_align$1","_tr_flush_block$1","opt_lenb","static_lenb","level","strm","data_type","_tr_tally$1","sym_end","trees","_tr_init","_tr_stored_block","_tr_flush_block","_tr_tally","_tr_align","adler32","adler","adler32_1","makeTable","crcTable","crc32","crc","crc32_1","constants$2","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_SYNC_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_BLOCK","Z_TREES","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_ERRNO","Z_STREAM_ERROR","Z_DATA_ERROR","Z_MEM_ERROR","Z_BUF_ERROR","Z_NO_COMPRESSION","Z_BEST_SPEED","Z_BEST_COMPRESSION","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_FIXED","Z_DEFAULT_STRATEGY","Z_UNKNOWN","Z_DEFLATED","Z_NO_FLUSH$2","Z_FULL_FLUSH$1","Z_FINISH$3","Z_BLOCK$1","Z_OK$3","Z_STREAM_END$3","Z_STREAM_ERROR$2","Z_DATA_ERROR$2","Z_BUF_ERROR$1","Z_DEFAULT_COMPRESSION$1","Z_DEFAULT_STRATEGY$1","Z_DEFLATED$2","MAX_MEM_LEVEL","MAX_WBITS$1","DEF_MEM_LEVEL","LENGTH_CODES","LITERALS","L_CODES","D_CODES","BL_CODES","HEAP_SIZE","MAX_BITS","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","PRESET_DICT","INIT_STATE","GZIP_STATE","EXTRA_STATE","NAME_STATE","COMMENT_STATE","HCRC_STATE","BUSY_STATE","FINISH_STATE","BS_NEED_MORE","BS_BLOCK_DONE","BS_FINISH_STARTED","BS_FINISH_DONE","OS_CODE","zero","slide_hash","wsize","w_size","hash_size","HASH","hash_shift","hash_mask","flush_pending","avail_out","pending_out","next_out","total_out","flush_block_only","block_start","strstart","put_byte","putShortMSB","read_buf","avail_in","next_in","total_in","longest_match","cur_match","chain_length","max_chain_length","scan","best_len","prev_length","nice_match","_win","wmask","w_mask","strend","scan_end1","scan_end","good_match","lookahead","match_start","fill_window","_w_size","window_size","ins_h","deflate_stored","min_block","pending_buf_size","have","high_water","deflate_fast","hash_head","bflush","match_length","max_lazy_match","deflate_slow","max_insert","prev_match","match_available","deflate_rle","deflate_huff","Config","good_length","max_lazy","nice_length","max_chain","configuration_table","lm_init","DeflateState","gzhead","gzindex","last_flush","w_bits","hash_bits","lit_bufsize","deflateStateCheck","deflateResetKeep","deflateReset","deflateSetHeader","deflateInit2","windowBits","memLevel","deflateInit","deflate$2","old_flush","level_flags","hcrc","os","beg","gzhead_extra","bstate","deflateEnd","deflateSetDictionary","dictionary","dictLength","tmpDict","avail","deflate_1$2","deflate","deflateInfo","_has","sources","STR_APPLY_UIA_OK","__","_utf8len","string2buf","m_pos","str_len","buf_len","buf2binstring","utf16buf","c_len","zstream","toString$1","Z_NO_FLUSH$1","Z_FINISH$2","Z_OK$2","Z_STREAM_END$2","Z_DEFLATED$1","Deflate$1","opt","gzip","ended","dict","_dict_set","deflate$1","deflator","deflateRaw$1","gzip$1","flush_mode","_flush_mode","onData","onEnd","flattenChunks","deflate_2","deflate_1$1","Deflate","deflateRaw","constants","BAD$1","TYPE$1","inffast","_in","_out","dmax","whave","wnext","s_window","hold","lcode","dcode","lmask","dmask","here","from_source","lencode","distcode","lenbits","distbits","dolen","dodist","sane","MAXBITS","ENOUGH_LENS$1","ENOUGH_DISTS$1","CODES$1","LENS$1","DISTS$1","lbase","lext","dbase","dext","inflate_table","lens_index","table_index","work","incr","here_bits","here_op","here_val","drop","huff","offs","inftrees","CODES","LENS","DISTS","Z_FINISH$1","Z_OK$1","Z_STREAM_END$1","Z_NEED_DICT$1","Z_STREAM_ERROR$1","Z_DATA_ERROR$1","Z_MEM_ERROR$1","HEAD","FLAGS","TIME","OS","EXLEN","HCRC","DICTID","DICT","TYPEDO","STORED","COPY_","COPY","TABLE","LENLENS","CODELENS","LEN_","LEN","LENEXT","DIST","DISTEXT","MATCH","LIT","CHECK","LENGTH","DONE","BAD","MEM","SYNC","ENOUGH_LENS","ENOUGH_DISTS","MAX_WBITS","DEF_WBITS","zswap32","InflateState","havedict","check","ncode","nlen","ndist","lendyn","distdyn","back","was","inflateStateCheck","inflateResetKeep","inflateReset","inflateReset2","inflateInit2","inflateInit","virgin","fixedtables","updatewindow","inflate$2","put","last_bits","last_op","last_val","hbuf","inf_leave","xflags","extra_len","inflateEnd","inflateGetHeader","inflateSetDictionary","dictid","inflate_1$2","inflate","inflateInfo","gzheader","Inflate$1","inflate$1","inflator","inflateRaw$1","last_avail_out","next_out_utf8","utf8border","utf8str","buf2string","inflate_2","ungzip$1","inflate_1$1","Inflate","inflateRaw","ungzip","ToDictionary","stringToCodePoints","codePointsToString","code_points","cp","end_of_stream","Stream","endOfStream","decoderError","opt_code_point","DEFAULT_ENCODING","_streaming","_BOMseen","_decoder","_fatal","_ignoreBOM","_encoder","UTF8Decoder","utf8_code_point","utf8_bytes_seen","utf8_bytes_needed","utf8_lower_boundary","utf8_upper_boundary","stream","bite","code_point","UTF8Encoder","input_stream","opt_string","__addDisposableResource","__asyncDelegator","__asyncGenerator","__asyncValues","__await","__classPrivateFieldGet","__classPrivateFieldIn","__classPrivateFieldSet","__disposeResources","__esDecorate","__extends","__generator","__makeTemplateObject","__metadata","__param","__propKey","__read","__runInitializers","__setFunctionName","__spread","__spreadArray","__spreadArrays","__values","extendStatics","paramIndex","decorator","descriptorIn","contextIn","initializers","extraInitializers","accept","access","addInitializer","useValue","metadataKey","metadataValue","metadata","label","sent","trys","ops","verb","il","jl","asyncIterator","awaitReturn","resume","settle","fulfill","cooked","async","asyncDispose","_SuppressedError","SuppressedError","suppressed","hasError","__webpack_exec__","moduleId","_N_E"],"sourceRoot":""}