@multiversx/sdk-dapp 5.0.0-alpha.12 → 5.0.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/out/__chunks__/chunk-2ZNIPYEV.mjs +2 -0
  2. package/out/__chunks__/chunk-35ED7YL2.mjs +2 -0
  3. package/out/__chunks__/{chunk-MPJPXMH6.mjs → chunk-3ATEIVW3.mjs} +2 -2
  4. package/out/__chunks__/chunk-3ATEIVW3.mjs.map +7 -0
  5. package/out/__chunks__/{chunk-YQX4YY3Y.mjs → chunk-3RBYJZII.mjs} +2 -2
  6. package/out/__chunks__/{chunk-JLBB5YDB.mjs → chunk-3UIJI5YR.mjs} +2 -2
  7. package/out/__chunks__/{chunk-ZSQBHCKL.mjs → chunk-3XCB5CEW.mjs} +2 -2
  8. package/out/__chunks__/chunk-47CCSYQY.mjs +2 -0
  9. package/out/__chunks__/{chunk-YKGDBIKG.mjs → chunk-53JZ6ZBD.mjs} +2 -2
  10. package/out/__chunks__/{chunk-2CXFNHMW.mjs → chunk-57B6Q67I.mjs} +2 -2
  11. package/out/__chunks__/{chunk-SO272J6E.mjs → chunk-5V5MG3BL.mjs} +2 -2
  12. package/out/__chunks__/{chunk-LOP4GEJR.mjs → chunk-65RXDHRY.mjs} +2 -2
  13. package/out/__chunks__/{chunk-VXH564B3.mjs → chunk-6H5TKCEW.mjs} +2 -2
  14. package/out/__chunks__/{chunk-NS6Y27VZ.mjs → chunk-77IZTIMY.mjs} +2 -2
  15. package/out/__chunks__/chunk-7ZW5EZFP.mjs +2 -0
  16. package/out/__chunks__/{chunk-OWAJLFLR.mjs → chunk-A343RP4X.mjs} +2 -2
  17. package/out/__chunks__/chunk-AGHFAZ7O.mjs +2 -0
  18. package/out/__chunks__/{chunk-N4HH72RP.mjs → chunk-AKFSBZ46.mjs} +2 -2
  19. package/out/__chunks__/{chunk-U5RJWYZ7.mjs → chunk-AM6BSOYA.mjs} +2 -2
  20. package/out/__chunks__/{chunk-AGRHW2AI.mjs → chunk-AQ3VAQH3.mjs} +2 -2
  21. package/out/__chunks__/chunk-AQ3VAQH3.mjs.map +7 -0
  22. package/out/__chunks__/chunk-CTW5DICC.mjs +2 -0
  23. package/out/__chunks__/chunk-DCCGXGUQ.mjs +2 -0
  24. package/out/__chunks__/chunk-DDXGTNBZ.mjs +2 -0
  25. package/out/__chunks__/{chunk-ENELZMUN.mjs → chunk-ED5SQUAW.mjs} +2 -2
  26. package/out/__chunks__/{chunk-5Y7B5HHE.mjs → chunk-EGU5LABV.mjs} +2 -2
  27. package/out/__chunks__/chunk-EKMRPW2A.mjs +2 -0
  28. package/out/__chunks__/chunk-EKMRPW2A.mjs.map +7 -0
  29. package/out/__chunks__/{chunk-GNOORHJ4.mjs → chunk-ER735UVF.mjs} +2 -2
  30. package/out/__chunks__/{chunk-6MFBHFCH.mjs → chunk-EUXN5BLO.mjs} +2 -2
  31. package/out/__chunks__/{chunk-5KMPEHOK.mjs → chunk-FFEFZVCC.mjs} +2 -2
  32. package/out/__chunks__/{chunk-QK4ZSYK2.mjs → chunk-GOL32UNC.mjs} +2 -2
  33. package/out/__chunks__/{chunk-JHWFB3CV.mjs → chunk-GXUJBKWY.mjs} +2 -2
  34. package/out/__chunks__/{chunk-QATXGQVV.mjs → chunk-HIODLP5F.mjs} +2 -2
  35. package/out/__chunks__/{chunk-QSDBTVWI.mjs → chunk-HPLSDK5V.mjs} +2 -2
  36. package/out/__chunks__/{chunk-ZD477RWI.mjs → chunk-HTAH342B.mjs} +2 -2
  37. package/out/__chunks__/{chunk-V3IKJKPE.mjs → chunk-HVUNMCAO.mjs} +2 -2
  38. package/out/__chunks__/{chunk-S3YBBGUM.mjs → chunk-IEWH5GDM.mjs} +2 -2
  39. package/out/__chunks__/{chunk-7RLPFF24.mjs → chunk-ISB4SC4L.mjs} +2 -2
  40. package/out/__chunks__/chunk-IYAIXP65.mjs +2 -0
  41. package/out/__chunks__/{chunk-WEFIYM62.mjs → chunk-JF4GVWO4.mjs} +2 -2
  42. package/out/__chunks__/{chunk-OJCIOVNO.mjs → chunk-JGFDKHG2.mjs} +2 -2
  43. package/out/__chunks__/{chunk-JBHDOEYV.mjs → chunk-KGASLT4P.mjs} +2 -2
  44. package/out/__chunks__/{chunk-GD2ZQIV4.mjs → chunk-KWJVDPCC.mjs} +2 -2
  45. package/out/__chunks__/{chunk-XGKAQORR.mjs → chunk-L4762ZRT.mjs} +2 -2
  46. package/out/__chunks__/{chunk-HBIIVJA5.mjs → chunk-LDETTRYB.mjs} +2 -2
  47. package/out/__chunks__/{chunk-ZKOPXJGO.mjs → chunk-LEBVS2YF.mjs} +2 -2
  48. package/out/__chunks__/chunk-LIFPBQTL.mjs +2 -0
  49. package/out/__chunks__/{chunk-P6YSSNVX.mjs → chunk-LYXQ3FWU.mjs} +2 -2
  50. package/out/__chunks__/{chunk-ALFFCAUL.mjs → chunk-NJMYFDLA.mjs} +2 -2
  51. package/out/__chunks__/chunk-NONAAAZC.mjs +2 -0
  52. package/out/__chunks__/{chunk-BIRGGRKG.mjs.map → chunk-NONAAAZC.mjs.map} +1 -1
  53. package/out/__chunks__/chunk-NQQQKXT2.mjs +2 -0
  54. package/out/__chunks__/{chunk-QNZHDBC6.mjs → chunk-PGOE5XGR.mjs} +2 -2
  55. package/out/__chunks__/{chunk-O4S5EU7O.mjs → chunk-Q56GIIOP.mjs} +2 -2
  56. package/out/__chunks__/{chunk-WBDC2GLI.mjs → chunk-Q6NDAYER.mjs} +2 -2
  57. package/out/__chunks__/chunk-QNKYH6KO.mjs +2 -0
  58. package/out/__chunks__/chunk-QNKYH6KO.mjs.map +7 -0
  59. package/out/__chunks__/{chunk-BO7PXEGF.mjs → chunk-QPXVUJSC.mjs} +2 -2
  60. package/out/__chunks__/{chunk-GDGOPAMC.mjs → chunk-QVLQCJFN.mjs} +2 -2
  61. package/out/__chunks__/{chunk-TUZQU7RJ.mjs → chunk-RIH7QM6W.mjs} +2 -2
  62. package/out/__chunks__/{chunk-OSAKWW5K.mjs → chunk-RJSL5ONQ.mjs} +2 -2
  63. package/out/__chunks__/chunk-RNYSLFYZ.mjs +2 -0
  64. package/out/__chunks__/chunk-RNYSLFYZ.mjs.map +7 -0
  65. package/out/__chunks__/chunk-RUG7JMMB.mjs +2 -0
  66. package/out/__chunks__/{chunk-BAZ6PY3Q.mjs → chunk-S4LN2NQH.mjs} +2 -2
  67. package/out/__chunks__/chunk-SBZ2AN3R.mjs +2 -0
  68. package/out/__chunks__/{chunk-K6SCL5VH.mjs → chunk-SHFT3OJY.mjs} +2 -2
  69. package/out/__chunks__/chunk-T3VFM2QO.mjs +2 -0
  70. package/out/__chunks__/{chunk-YYQJVGEO.mjs → chunk-TXQO3M7J.mjs} +2 -2
  71. package/out/__chunks__/{chunk-L2IEDKML.mjs → chunk-U5IR3XBA.mjs} +2 -2
  72. package/out/__chunks__/{chunk-CZ2S4JFJ.mjs → chunk-UZUI4AP5.mjs} +2 -2
  73. package/out/__chunks__/{chunk-LPSWJPIF.mjs → chunk-VO4DXDYI.mjs} +2 -2
  74. package/out/__chunks__/chunk-VO4DXDYI.mjs.map +7 -0
  75. package/out/__chunks__/chunk-VYWLQ5T7.mjs +2 -0
  76. package/out/__chunks__/{chunk-QZTCVQOW.mjs → chunk-W46BAMEI.mjs} +2 -2
  77. package/out/__chunks__/chunk-XBVPYKPZ.mjs +2 -0
  78. package/out/__chunks__/{chunk-3L2CZT3K.mjs → chunk-XDH23MRS.mjs} +2 -2
  79. package/out/__chunks__/{chunk-QZ4CDIVO.mjs → chunk-XSJE7M77.mjs} +2 -2
  80. package/out/__chunks__/{chunk-T2ROT5W4.mjs → chunk-Y5Y2WOCZ.mjs} +2 -2
  81. package/out/__chunks__/{chunk-VFMUFBPH.mjs → chunk-YILGIHY5.mjs} +2 -2
  82. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  83. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  84. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  85. package/out/apiCalls/index.mjs +1 -1
  86. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  87. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  88. package/out/apiCalls/tokens/index.mjs +1 -1
  89. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  90. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  91. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  92. package/out/constants/browser.constants.mjs +1 -1
  93. package/out/constants/index.mjs +1 -1
  94. package/out/constants/storage.constants.mjs +1 -1
  95. package/out/constants/window.constants.mjs +1 -1
  96. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  97. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  98. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  99. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  100. package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs +1 -1
  101. package/out/index.mjs +1 -1
  102. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  103. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  104. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  105. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  106. package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
  107. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  108. package/out/managers/TransactionManager/index.mjs +1 -1
  109. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  110. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  111. package/out/managers/index.mjs +1 -1
  112. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  113. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  114. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  115. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  116. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  117. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.d.ts +1 -1
  118. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  119. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  120. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  121. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  122. package/out/managers/internal/ToastManager/ToastManager.d.ts +2 -2
  123. package/out/managers/internal/ToastManager/ToastManager.js +2 -2
  124. package/out/managers/internal/ToastManager/ToastManager.js.map +1 -1
  125. package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
  126. package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
  127. package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  128. package/out/managers/internal/UIBaseManager/UIBaseManager.d.ts +1 -1
  129. package/out/managers/internal/UIBaseManager/UIBaseManager.js +2 -2
  130. package/out/managers/internal/UIBaseManager/UIBaseManager.js.map +1 -1
  131. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  132. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  133. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  134. package/out/managers/internal/index.mjs +1 -1
  135. package/out/methods/account/getAccount.mjs +1 -1
  136. package/out/methods/account/getAccountInfo.mjs +1 -1
  137. package/out/methods/account/getAddress.mjs +1 -1
  138. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  139. package/out/methods/account/getLatestNonce.mjs +1 -1
  140. package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
  141. package/out/methods/initApp/initApp.js +1 -1
  142. package/out/methods/initApp/initApp.js.map +1 -1
  143. package/out/methods/initApp/initApp.mjs +1 -1
  144. package/out/methods/initApp/initApp.mjs.map +2 -2
  145. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  146. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  147. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  148. package/out/methods/network/getEgldLabel.mjs +1 -1
  149. package/out/methods/network/getExplorerAddress.mjs +1 -1
  150. package/out/methods/network/getNetworkConfig.mjs +1 -1
  151. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
  152. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  153. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  154. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
  155. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  156. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  157. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  158. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  159. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  160. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  161. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  162. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  163. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  164. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  165. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  166. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  167. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  168. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  169. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  170. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  171. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  172. package/out/providers/DappProvider/index.mjs +1 -1
  173. package/out/providers/ProviderFactory.js +5 -6
  174. package/out/providers/ProviderFactory.js.map +1 -1
  175. package/out/providers/ProviderFactory.mjs +1 -1
  176. package/out/providers/helpers/accountProvider.mjs +1 -1
  177. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  178. package/out/providers/helpers/restoreProvider.mjs +1 -1
  179. package/out/providers/index.mjs +1 -1
  180. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  181. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  182. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  183. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  184. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  185. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  186. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  187. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  188. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
  189. package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
  190. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
  191. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
  192. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
  193. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
  194. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  195. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  196. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
  197. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  198. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  199. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  200. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  201. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  202. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  203. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  204. package/out/providers/strategies/helpers/index.mjs +1 -1
  205. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  206. package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
  207. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  208. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  209. package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
  210. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  211. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  212. package/out/providers/strategies/index.mjs +1 -1
  213. package/out/react/account/useGetAccount.mjs +1 -1
  214. package/out/react/account/useGetAccountInfo.mjs +1 -1
  215. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  216. package/out/react/account/useGetLatestNonce.mjs +1 -1
  217. package/out/react/index.mjs +1 -1
  218. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  219. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  220. package/out/react/store/getReactStore.mjs +1 -1
  221. package/out/react/store/useSelector.mjs +1 -1
  222. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  223. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  224. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  225. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  226. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  227. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  228. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  229. package/out/store/actions/account/accountActions.mjs +1 -1
  230. package/out/store/actions/account/index.mjs +1 -1
  231. package/out/store/actions/cache/cacheActions.mjs +1 -1
  232. package/out/store/actions/cache/index.mjs +1 -1
  233. package/out/store/actions/config/configActions.mjs +1 -1
  234. package/out/store/actions/config/index.mjs +1 -1
  235. package/out/store/actions/index.mjs +1 -1
  236. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  237. package/out/store/actions/network/index.mjs +1 -1
  238. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  239. package/out/store/actions/network/networkActions.mjs +1 -1
  240. package/out/store/actions/sharedActions/index.mjs +1 -1
  241. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  242. package/out/store/actions/toasts/index.mjs +1 -1
  243. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  244. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  245. package/out/store/actions/ui/index.mjs +1 -1
  246. package/out/store/actions/ui/uiActions.mjs +1 -1
  247. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  248. package/out/store/middleware/index.mjs +1 -1
  249. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  250. package/out/store/storage/index.mjs +1 -1
  251. package/out/store/storage/storageCallback.mjs +1 -1
  252. package/out/store/store.mjs +1 -1
  253. package/out/utils/ComponentFactory.d.ts +14 -0
  254. package/out/utils/{createUIElement.js → ComponentFactory.js} +14 -4
  255. package/out/utils/ComponentFactory.js.map +1 -0
  256. package/out/utils/{createUIElement.mjs → ComponentFactory.mjs} +2 -2
  257. package/out/utils/account/index.mjs +1 -1
  258. package/out/utils/account/refreshAccount.mjs +1 -1
  259. package/out/utils/index.mjs +1 -1
  260. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  261. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  262. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  263. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  264. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  265. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  266. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  267. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  268. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  269. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  270. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  271. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  272. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  273. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  274. package/out/utils/transactions/index.mjs +1 -1
  275. package/out/utils/visual/index.mjs +1 -1
  276. package/out/utils/visual/switchTheme.js +6 -3
  277. package/out/utils/visual/switchTheme.js.map +1 -1
  278. package/out/utils/visual/switchTheme.mjs +1 -1
  279. package/out/utils/window/getIsInIframe.mjs +1 -1
  280. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  281. package/out/utils/window/index.mjs +1 -1
  282. package/package.json +1 -1
  283. package/out/__chunks__/chunk-3VI66CBG.mjs +0 -2
  284. package/out/__chunks__/chunk-5ZQDBRII.mjs +0 -2
  285. package/out/__chunks__/chunk-6BCIJI43.mjs +0 -2
  286. package/out/__chunks__/chunk-6BCIJI43.mjs.map +0 -7
  287. package/out/__chunks__/chunk-7K23CDCE.mjs +0 -2
  288. package/out/__chunks__/chunk-7ZFOLOLG.mjs +0 -2
  289. package/out/__chunks__/chunk-AGRHW2AI.mjs.map +0 -7
  290. package/out/__chunks__/chunk-AKQGMP4F.mjs +0 -2
  291. package/out/__chunks__/chunk-BIRGGRKG.mjs +0 -2
  292. package/out/__chunks__/chunk-EFI72HRK.mjs +0 -2
  293. package/out/__chunks__/chunk-ELXMMX5P.mjs +0 -2
  294. package/out/__chunks__/chunk-FHXQ6S6U.mjs +0 -2
  295. package/out/__chunks__/chunk-KEGXCGMM.mjs +0 -2
  296. package/out/__chunks__/chunk-LFLDZBSM.mjs +0 -2
  297. package/out/__chunks__/chunk-LJ6QBENT.mjs +0 -2
  298. package/out/__chunks__/chunk-LJ6QBENT.mjs.map +0 -7
  299. package/out/__chunks__/chunk-LPSWJPIF.mjs.map +0 -7
  300. package/out/__chunks__/chunk-MPJPXMH6.mjs.map +0 -7
  301. package/out/__chunks__/chunk-PCKOMQPW.mjs +0 -2
  302. package/out/__chunks__/chunk-TYS33KHK.mjs +0 -2
  303. package/out/__chunks__/chunk-UFI4T62Y.mjs +0 -2
  304. package/out/__chunks__/chunk-UUN37EQT.mjs +0 -2
  305. package/out/__chunks__/chunk-VVN3GJHO.mjs +0 -2
  306. package/out/__chunks__/chunk-WBO5SBMK.mjs +0 -2
  307. package/out/__chunks__/chunk-WBO5SBMK.mjs.map +0 -7
  308. package/out/__chunks__/chunk-YJCCKVIF.mjs +0 -2
  309. package/out/utils/createUIElement.d.ts +0 -9
  310. package/out/utils/createUIElement.js.map +0 -1
  311. /package/out/__chunks__/{chunk-7K23CDCE.mjs.map → chunk-2ZNIPYEV.mjs.map} +0 -0
  312. /package/out/__chunks__/{chunk-AKQGMP4F.mjs.map → chunk-35ED7YL2.mjs.map} +0 -0
  313. /package/out/__chunks__/{chunk-YQX4YY3Y.mjs.map → chunk-3RBYJZII.mjs.map} +0 -0
  314. /package/out/__chunks__/{chunk-JLBB5YDB.mjs.map → chunk-3UIJI5YR.mjs.map} +0 -0
  315. /package/out/__chunks__/{chunk-ZSQBHCKL.mjs.map → chunk-3XCB5CEW.mjs.map} +0 -0
  316. /package/out/__chunks__/{chunk-5ZQDBRII.mjs.map → chunk-47CCSYQY.mjs.map} +0 -0
  317. /package/out/__chunks__/{chunk-YKGDBIKG.mjs.map → chunk-53JZ6ZBD.mjs.map} +0 -0
  318. /package/out/__chunks__/{chunk-2CXFNHMW.mjs.map → chunk-57B6Q67I.mjs.map} +0 -0
  319. /package/out/__chunks__/{chunk-SO272J6E.mjs.map → chunk-5V5MG3BL.mjs.map} +0 -0
  320. /package/out/__chunks__/{chunk-LOP4GEJR.mjs.map → chunk-65RXDHRY.mjs.map} +0 -0
  321. /package/out/__chunks__/{chunk-VXH564B3.mjs.map → chunk-6H5TKCEW.mjs.map} +0 -0
  322. /package/out/__chunks__/{chunk-NS6Y27VZ.mjs.map → chunk-77IZTIMY.mjs.map} +0 -0
  323. /package/out/__chunks__/{chunk-YJCCKVIF.mjs.map → chunk-7ZW5EZFP.mjs.map} +0 -0
  324. /package/out/__chunks__/{chunk-OWAJLFLR.mjs.map → chunk-A343RP4X.mjs.map} +0 -0
  325. /package/out/__chunks__/{chunk-7ZFOLOLG.mjs.map → chunk-AGHFAZ7O.mjs.map} +0 -0
  326. /package/out/__chunks__/{chunk-N4HH72RP.mjs.map → chunk-AKFSBZ46.mjs.map} +0 -0
  327. /package/out/__chunks__/{chunk-U5RJWYZ7.mjs.map → chunk-AM6BSOYA.mjs.map} +0 -0
  328. /package/out/__chunks__/{chunk-3VI66CBG.mjs.map → chunk-CTW5DICC.mjs.map} +0 -0
  329. /package/out/__chunks__/{chunk-LFLDZBSM.mjs.map → chunk-DCCGXGUQ.mjs.map} +0 -0
  330. /package/out/__chunks__/{chunk-PCKOMQPW.mjs.map → chunk-DDXGTNBZ.mjs.map} +0 -0
  331. /package/out/__chunks__/{chunk-ENELZMUN.mjs.map → chunk-ED5SQUAW.mjs.map} +0 -0
  332. /package/out/__chunks__/{chunk-5Y7B5HHE.mjs.map → chunk-EGU5LABV.mjs.map} +0 -0
  333. /package/out/__chunks__/{chunk-GNOORHJ4.mjs.map → chunk-ER735UVF.mjs.map} +0 -0
  334. /package/out/__chunks__/{chunk-6MFBHFCH.mjs.map → chunk-EUXN5BLO.mjs.map} +0 -0
  335. /package/out/__chunks__/{chunk-5KMPEHOK.mjs.map → chunk-FFEFZVCC.mjs.map} +0 -0
  336. /package/out/__chunks__/{chunk-QK4ZSYK2.mjs.map → chunk-GOL32UNC.mjs.map} +0 -0
  337. /package/out/__chunks__/{chunk-JHWFB3CV.mjs.map → chunk-GXUJBKWY.mjs.map} +0 -0
  338. /package/out/__chunks__/{chunk-QATXGQVV.mjs.map → chunk-HIODLP5F.mjs.map} +0 -0
  339. /package/out/__chunks__/{chunk-QSDBTVWI.mjs.map → chunk-HPLSDK5V.mjs.map} +0 -0
  340. /package/out/__chunks__/{chunk-ZD477RWI.mjs.map → chunk-HTAH342B.mjs.map} +0 -0
  341. /package/out/__chunks__/{chunk-V3IKJKPE.mjs.map → chunk-HVUNMCAO.mjs.map} +0 -0
  342. /package/out/__chunks__/{chunk-S3YBBGUM.mjs.map → chunk-IEWH5GDM.mjs.map} +0 -0
  343. /package/out/__chunks__/{chunk-7RLPFF24.mjs.map → chunk-ISB4SC4L.mjs.map} +0 -0
  344. /package/out/__chunks__/{chunk-UFI4T62Y.mjs.map → chunk-IYAIXP65.mjs.map} +0 -0
  345. /package/out/__chunks__/{chunk-WEFIYM62.mjs.map → chunk-JF4GVWO4.mjs.map} +0 -0
  346. /package/out/__chunks__/{chunk-OJCIOVNO.mjs.map → chunk-JGFDKHG2.mjs.map} +0 -0
  347. /package/out/__chunks__/{chunk-JBHDOEYV.mjs.map → chunk-KGASLT4P.mjs.map} +0 -0
  348. /package/out/__chunks__/{chunk-GD2ZQIV4.mjs.map → chunk-KWJVDPCC.mjs.map} +0 -0
  349. /package/out/__chunks__/{chunk-XGKAQORR.mjs.map → chunk-L4762ZRT.mjs.map} +0 -0
  350. /package/out/__chunks__/{chunk-HBIIVJA5.mjs.map → chunk-LDETTRYB.mjs.map} +0 -0
  351. /package/out/__chunks__/{chunk-ZKOPXJGO.mjs.map → chunk-LEBVS2YF.mjs.map} +0 -0
  352. /package/out/__chunks__/{chunk-KEGXCGMM.mjs.map → chunk-LIFPBQTL.mjs.map} +0 -0
  353. /package/out/__chunks__/{chunk-P6YSSNVX.mjs.map → chunk-LYXQ3FWU.mjs.map} +0 -0
  354. /package/out/__chunks__/{chunk-ALFFCAUL.mjs.map → chunk-NJMYFDLA.mjs.map} +0 -0
  355. /package/out/__chunks__/{chunk-TYS33KHK.mjs.map → chunk-NQQQKXT2.mjs.map} +0 -0
  356. /package/out/__chunks__/{chunk-QNZHDBC6.mjs.map → chunk-PGOE5XGR.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-O4S5EU7O.mjs.map → chunk-Q56GIIOP.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-WBDC2GLI.mjs.map → chunk-Q6NDAYER.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-BO7PXEGF.mjs.map → chunk-QPXVUJSC.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-GDGOPAMC.mjs.map → chunk-QVLQCJFN.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-TUZQU7RJ.mjs.map → chunk-RIH7QM6W.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-OSAKWW5K.mjs.map → chunk-RJSL5ONQ.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-ELXMMX5P.mjs.map → chunk-RUG7JMMB.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-BAZ6PY3Q.mjs.map → chunk-S4LN2NQH.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-UUN37EQT.mjs.map → chunk-SBZ2AN3R.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-K6SCL5VH.mjs.map → chunk-SHFT3OJY.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-FHXQ6S6U.mjs.map → chunk-T3VFM2QO.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-YYQJVGEO.mjs.map → chunk-TXQO3M7J.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-L2IEDKML.mjs.map → chunk-U5IR3XBA.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-CZ2S4JFJ.mjs.map → chunk-UZUI4AP5.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-VVN3GJHO.mjs.map → chunk-VYWLQ5T7.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-QZTCVQOW.mjs.map → chunk-W46BAMEI.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-EFI72HRK.mjs.map → chunk-XBVPYKPZ.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-3L2CZT3K.mjs.map → chunk-XDH23MRS.mjs.map} +0 -0
  375. /package/out/__chunks__/{chunk-QZ4CDIVO.mjs.map → chunk-XSJE7M77.mjs.map} +0 -0
  376. /package/out/__chunks__/{chunk-T2ROT5W4.mjs.map → chunk-Y5Y2WOCZ.mjs.map} +0 -0
  377. /package/out/__chunks__/{chunk-VFMUFBPH.mjs.map → chunk-YILGIHY5.mjs.map} +0 -0
  378. /package/out/utils/{createUIElement.mjs.map → ComponentFactory.mjs.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{u as t}from"./chunk-PGOE5XGR.mjs";import{c as r}from"./chunk-QJSB5NX4.mjs";function m(e=t()){return r(e)}export{m as a};
2
+ //# sourceMappingURL=chunk-2ZNIPYEV.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-SBZ2AN3R.mjs";function S(e){return t()(e)}export{S as a};
2
+ //# sourceMappingURL=chunk-35ED7YL2.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-AGRHW2AI.mjs";import{a as t}from"./chunk-PCKOMQPW.mjs";var s=class extends n{constructor({uiDataUpdateEvent:e,uiTag:i}){super({uiDataUpdateEvent:e,uiTag:i});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}async destroy(){this.setIsSidePanelOpen(!1),await this.uiElement?.closeWithAnimation?.(),super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{s as a};
2
- //# sourceMappingURL=chunk-MPJPXMH6.mjs.map
1
+ import{a as n}from"./chunk-AQ3VAQH3.mjs";import{a as t}from"./chunk-DDXGTNBZ.mjs";var s=class extends n{constructor({uiDataUpdateEvent:e,uiTag:i}){super({uiDataUpdateEvent:e,uiTag:i});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}async destroy(){this.setIsSidePanelOpen(!1),await this.uiElement?.closeWithAnimation?.(),super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{s as a};
2
+ //# sourceMappingURL=chunk-3ATEIVW3.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/managers/internal/SidePanelBaseManager/SidePanelBaseManager.ts"],
4
+ "sourcesContent": ["import { UITagsEnum } from 'constants/UITags.enum';\nimport { setIsSidePanelOpen } from 'store/actions/ui/uiActions';\nimport { CreateEventBusUIElementType } from 'utils/ComponentFactory';\nimport { UIBaseManager } from '../UIBaseManager/UIBaseManager';\n\ninterface ISideManagerUIElement extends CreateEventBusUIElementType {\n closeWithAnimation?: () => Promise<unknown>;\n}\n\nexport abstract class SidePanelBaseManager<\n TElement extends ISideManagerUIElement,\n TData extends Record<string, any> | null,\n TEventEnum extends string\n> extends UIBaseManager<TElement, TData, TEventEnum> {\n protected isOpen = false;\n\n constructor({\n uiDataUpdateEvent,\n uiTag\n }: {\n uiTag: UITagsEnum;\n uiDataUpdateEvent: TEventEnum;\n }) {\n super({\n uiDataUpdateEvent,\n uiTag\n });\n this.data = this.getInitialData();\n }\n\n public async openUI() {\n if (this.isOpen && this.uiElement) {\n // UI element is already open\n return;\n }\n\n await super.init();\n this.setIsSidePanelOpen(true);\n }\n\n public async destroy() {\n this.setIsSidePanelOpen(false);\n await this.uiElement?.closeWithAnimation?.();\n\n super.destroy();\n }\n\n public closeUI(): void {\n this.resetData();\n this.destroy();\n }\n\n private setIsSidePanelOpen(isOpen: boolean): void {\n this.isOpen = isOpen;\n setIsSidePanelOpen(isOpen);\n }\n}\n"],
5
+ "mappings": "kFASO,IAAeA,EAAf,cAIGC,CAA2C,CAGnD,YAAY,CACV,kBAAAC,EACA,MAAAC,CACF,EAGG,CACD,MAAM,CACJ,kBAAAD,EACA,MAAAC,CACF,CAAC,EAZH,KAAU,OAAS,GAajB,KAAK,KAAO,KAAK,eAAe,CAClC,CAEA,MAAa,QAAS,CAChB,KAAK,QAAU,KAAK,YAKxB,MAAM,MAAM,KAAK,EACjB,KAAK,mBAAmB,EAAI,EAC9B,CAEA,MAAa,SAAU,CACrB,KAAK,mBAAmB,EAAK,EAC7B,MAAM,KAAK,WAAW,qBAAqB,EAE3C,MAAM,QAAQ,CAChB,CAEO,SAAgB,CACrB,KAAK,UAAU,EACf,KAAK,QAAQ,CACf,CAEQ,mBAAmBC,EAAuB,CAChD,KAAK,OAASA,EACdC,EAAmBD,CAAM,CAC3B,CACF",
6
+ "names": ["SidePanelBaseManager", "UIBaseManager", "uiDataUpdateEvent", "uiTag", "isOpen", "setIsSidePanelOpen"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-ZKOPXJGO.mjs";import{a as p}from"./chunk-S3YBBGUM.mjs";import{a as d}from"./chunk-EFI72HRK.mjs";import{a as T}from"./chunk-LUDF7ZUR.mjs";var f=a=>a.sort((i,o)=>o.timestamp-i.timestamp),H=async({transactions:a,address:i,explorerAddress:o,egldLabel:g})=>{let e=[],r=[];if(a.forEach(s=>{let t=d(s.hash);t?e.push(t):r.push(s.hash)}),r.length===0)return f(e);let c=await h(r),I=c.map(s=>s.txHash),m=r.filter(s=>!I.includes(s));if(m.length>0){let t=a.filter(n=>m.includes(n.hash)).map(n=>({...n,txHash:n.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...t)}return c.forEach(s=>{let t=T({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&p({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
2
- //# sourceMappingURL=chunk-YQX4YY3Y.mjs.map
1
+ import{a as h}from"./chunk-LEBVS2YF.mjs";import{a as p}from"./chunk-IEWH5GDM.mjs";import{a as d}from"./chunk-XBVPYKPZ.mjs";import{a as T}from"./chunk-LUDF7ZUR.mjs";var f=a=>a.sort((i,o)=>o.timestamp-i.timestamp),H=async({transactions:a,address:i,explorerAddress:o,egldLabel:g})=>{let e=[],r=[];if(a.forEach(s=>{let t=d(s.hash);t?e.push(t):r.push(s.hash)}),r.length===0)return f(e);let c=await h(r),I=c.map(s=>s.txHash),m=r.filter(s=>!I.includes(s));if(m.length>0){let t=a.filter(n=>m.includes(n.hash)).map(n=>({...n,txHash:n.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...t)}return c.forEach(s=>{let t=T({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&p({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
2
+ //# sourceMappingURL=chunk-3RBYJZII.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-SPSO2A53.mjs";import{a}from"./chunk-FKBLKOLI.mjs";import{a as t}from"./chunk-LFLDZBSM.mjs";import{u as n}from"./chunk-QNZHDBC6.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var S=async r=>{let{isGuarded:i}=t();if(!a({isGuarded:i,transactions:r}))return r;let d=r[0].getSender().bech32().toString(),{walletAddress:c}=e(n()),o=await s({address:d,walletUrl:c});return o?.setShouldShowConsentPopup(!1),await o?.guardTransactions(r)||[]};export{S as a};
2
- //# sourceMappingURL=chunk-JLBB5YDB.mjs.map
1
+ import{a as s}from"./chunk-SPSO2A53.mjs";import{a}from"./chunk-FKBLKOLI.mjs";import{a as t}from"./chunk-DCCGXGUQ.mjs";import{u as n}from"./chunk-PGOE5XGR.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var S=async r=>{let{isGuarded:i}=t();if(!a({isGuarded:i,transactions:r}))return r;let d=r[0].getSender().bech32().toString(),{walletAddress:c}=e(n()),o=await s({address:d,walletUrl:c});return o?.setShouldShowConsentPopup(!1),await o?.guardTransactions(r)||[]};export{S as a};
2
+ //# sourceMappingURL=chunk-3UIJI5YR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-XGKAQORR.mjs";import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as f}from"./chunk-Y3BNMQFP.mjs";import{h as l}from"./chunk-LJ6QBENT.mjs";import{h as d}from"./chunk-CAA4VJRH.mjs";import{b as g}from"./chunk-3ZEUVYQF.mjs";import{a as y}from"./chunk-LFLDZBSM.mjs";import{a as u}from"./chunk-JHWFB3CV.mjs";import{a as m}from"./chunk-L3MWDI6J.mjs";import{u as p}from"./chunk-QNZHDBC6.mjs";import{b as c}from"./chunk-SAAOQW7P.mjs";import{e as T}from"./chunk-R53MCZI6.mjs";import b from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:a,onFail:t})=>{g({onSuccess:a,onFail:t})};this.send=async a=>{if(a.length===0)throw new Error("No transactions to send");try{if(!S(a))return await this.sendSignedTransactions(a);let t=await this.sendSignedBatchTransactions(a);if(!t.data||t.data.error)throw new Error(t.data?.error??"Failed to send transactions");return t.data.transactions}catch(t){throw t.response?.data?.message??t.message}};this.track=async(a,t={disableToasts:!1})=>{let n=this.sequentialToFlatArray(a).map(i=>({...i,status:i.status??"pending"})),e=m(n),o=u({transactions:n,transactionsDisplayInfo:t.transactionsDisplayInfo,status:e??"sent",sessionInformation:t.sessionInformation});if(t.disableToasts===!0)return o;let s=h(a);return l({toastId:o,totalDuration:s}),o};this.sendSignedTransactions=async a=>{let{apiAddress:t,apiTimeout:n}=c(p()),e=a.map(s=>b.post(`${t}/transactions`,s.toPlainObject(),{timeout:Number(n)}));return(await Promise.all(e)).map(({data:s})=>({...s,status:"pending",hash:s.txHash}))};this.sendSignedBatchTransactions=async a=>{let{address:t}=y(),{apiAddress:n,apiTimeout:e}=c(p());if(!t)return{error:"Invalid address provided. You need to be logged in to send transactions"};let o=this.buildBatchId(t),i={transactions:a.map(w=>w.map(v=>this.parseSignedTransaction(v))),id:o},{data:A}=await b.post(`${n}/batch`,i,{timeout:Number(e)});return{data:A}};this.buildBatchId=a=>`${Date.now().toString()}${d}${a}`;this.sequentialToFlatArray=(a=[])=>this.getIsSequential(a)?a.flat():a;this.getIsSequential=a=>a?.every(t=>Array.isArray(t));this.parseSignedTransaction=a=>{let t=new T,n={...a.toPlainObject(),hash:t.computeTransactionHash(a),status:"pending"};return f({data:n.data})&&(delete n.senderUsername,delete n.receiverUsername),n}}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var I=r;export{I as a};
2
- //# sourceMappingURL=chunk-ZSQBHCKL.mjs.map
1
+ import{a as h}from"./chunk-L4762ZRT.mjs";import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as f}from"./chunk-Y3BNMQFP.mjs";import{h as l}from"./chunk-QNKYH6KO.mjs";import{h as d}from"./chunk-CAA4VJRH.mjs";import{b as g}from"./chunk-3ZEUVYQF.mjs";import{a as y}from"./chunk-DCCGXGUQ.mjs";import{a as u}from"./chunk-GXUJBKWY.mjs";import{a as m}from"./chunk-L3MWDI6J.mjs";import{u as p}from"./chunk-PGOE5XGR.mjs";import{b as c}from"./chunk-SAAOQW7P.mjs";import{e as T}from"./chunk-R53MCZI6.mjs";import b from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:a,onFail:t})=>{g({onSuccess:a,onFail:t})};this.send=async a=>{if(a.length===0)throw new Error("No transactions to send");try{if(!S(a))return await this.sendSignedTransactions(a);let t=await this.sendSignedBatchTransactions(a);if(!t.data||t.data.error)throw new Error(t.data?.error??"Failed to send transactions");return t.data.transactions}catch(t){throw t.response?.data?.message??t.message}};this.track=async(a,t={disableToasts:!1})=>{let n=this.sequentialToFlatArray(a).map(i=>({...i,status:i.status??"pending"})),e=m(n),o=u({transactions:n,transactionsDisplayInfo:t.transactionsDisplayInfo,status:e??"sent",sessionInformation:t.sessionInformation});if(t.disableToasts===!0)return o;let s=h(a);return l({toastId:o,totalDuration:s}),o};this.sendSignedTransactions=async a=>{let{apiAddress:t,apiTimeout:n}=c(p()),e=a.map(s=>b.post(`${t}/transactions`,s.toPlainObject(),{timeout:Number(n)}));return(await Promise.all(e)).map(({data:s})=>({...s,status:"pending",hash:s.txHash}))};this.sendSignedBatchTransactions=async a=>{let{address:t}=y(),{apiAddress:n,apiTimeout:e}=c(p());if(!t)return{error:"Invalid address provided. You need to be logged in to send transactions"};let o=this.buildBatchId(t),i={transactions:a.map(w=>w.map(v=>this.parseSignedTransaction(v))),id:o},{data:A}=await b.post(`${n}/batch`,i,{timeout:Number(e)});return{data:A}};this.buildBatchId=a=>`${Date.now().toString()}${d}${a}`;this.sequentialToFlatArray=(a=[])=>this.getIsSequential(a)?a.flat():a;this.getIsSequential=a=>a?.every(t=>Array.isArray(t));this.parseSignedTransaction=a=>{let t=new T,n={...a.toPlainObject(),hash:t.computeTransactionHash(a),status:"pending"};return f({data:n.data})&&(delete n.senderUsername,delete n.receiverUsername),n}}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var I=r;export{I as a};
2
+ //# sourceMappingURL=chunk-3XCB5CEW.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as o}from"./chunk-PGOE5XGR.mjs";import{a as t}from"./chunk-SAAOQW7P.mjs";function f(r=o()){return t(r)}export{f as a};
2
+ //# sourceMappingURL=chunk-47CCSYQY.mjs.map
@@ -1,2 +1,2 @@
1
- import{u as r}from"./chunk-QNZHDBC6.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
- //# sourceMappingURL=chunk-YKGDBIKG.mjs.map
1
+ import{u as r}from"./chunk-PGOE5XGR.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
+ //# sourceMappingURL=chunk-53JZ6ZBD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-YQX4YY3Y.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
2
- //# sourceMappingURL=chunk-2CXFNHMW.mjs.map
1
+ import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-3RBYJZII.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
2
+ //# sourceMappingURL=chunk-57B6Q67I.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as s}from"./chunk-LPSWJPIF.mjs";import{a as p}from"./chunk-MPJPXMH6.mjs";import{u as c}from"./chunk-QNZHDBC6.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-REI3WYXH.mjs";import{a}from"./chunk-OJV6XRG5.mjs";var n=class n extends p{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&n.onClose&&n.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!n.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(n.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),n.loginHandler()):n.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(r){console.error(r),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,r=[...Object.values(a).filter(i=>i!==a.none&&i!==a.webview),...e.map(i=>i.type)],P=e.reduce((i,t)=>(i[t.type]=t.name,i),{}),l={...v,...P};return(n.allowedProviders?n?.allowedProviders.map(i=>i.type).filter(i=>r.includes(i)):r).map(i=>{let t=e.find(g=>g.type===i);return t||{name:i in l?l[i]:i,type:i}})}};n.loginHandler=null,n.onClose=null,n.allowedProviders=null;var u=n;export{u as a};
2
- //# sourceMappingURL=chunk-SO272J6E.mjs.map
1
+ import{d as s}from"./chunk-VO4DXDYI.mjs";import{a as p}from"./chunk-3ATEIVW3.mjs";import{u as c}from"./chunk-PGOE5XGR.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-REI3WYXH.mjs";import{a}from"./chunk-OJV6XRG5.mjs";var n=class n extends p{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&n.onClose&&n.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!n.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(n.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),n.loginHandler()):n.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(r){console.error(r),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,r=[...Object.values(a).filter(i=>i!==a.none&&i!==a.webview),...e.map(i=>i.type)],P=e.reduce((i,t)=>(i[t.type]=t.name,i),{}),l={...v,...P};return(n.allowedProviders?n?.allowedProviders.map(i=>i.type).filter(i=>r.includes(i)):r).map(i=>{let t=e.find(g=>g.type===i);return t||{name:i in l?l[i]:i,type:i}})}};n.loginHandler=null,n.onClose=null,n.allowedProviders=null;var u=n;export{u as a};
2
+ //# sourceMappingURL=chunk-5V5MG3BL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-6MFBHFCH.mjs";var t={closeConnectionRef:void 0};async function c(n){let{closeConnection:o}=await e(n);t.closeConnectionRef=o}export{t as a,c as b};
2
- //# sourceMappingURL=chunk-LOP4GEJR.mjs.map
1
+ import{a as e}from"./chunk-EUXN5BLO.mjs";var t={closeConnectionRef:void 0};async function c(n){let{closeConnection:o}=await e(n);t.closeConnectionRef=o}export{t as a,c as b};
2
+ //# sourceMappingURL=chunk-65RXDHRY.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-7ZFOLOLG.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{t as c}from"./chunk-LJ6QBENT.mjs";import{u as n}from"./chunk-QNZHDBC6.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{g as a}from"./chunk-QJSB5NX4.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=g(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=c(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
2
- //# sourceMappingURL=chunk-VXH564B3.mjs.map
1
+ import{a as g}from"./chunk-AGHFAZ7O.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{t as c}from"./chunk-QNKYH6KO.mjs";import{u as n}from"./chunk-PGOE5XGR.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{g as a}from"./chunk-QJSB5NX4.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=g(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=c(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
2
+ //# sourceMappingURL=chunk-6H5TKCEW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-7K23CDCE.mjs";import{c as o,g as n}from"./chunk-R53MCZI6.mjs";import{a as r}from"./chunk-OJV6XRG5.mjs";async function M({message:i,provider:s,options:e}){let t=a(),d=new n({address:new o(t),data:i.data});return e?.hasConsentPopup&&s.getType()===r.crossWindow&&s.setShouldShowConsentPopup(!0),await s.signMessage(d,e)}export{M as a};
2
- //# sourceMappingURL=chunk-NS6Y27VZ.mjs.map
1
+ import{a}from"./chunk-2ZNIPYEV.mjs";import{c as o,g as n}from"./chunk-R53MCZI6.mjs";import{a as r}from"./chunk-OJV6XRG5.mjs";async function M({message:i,provider:s,options:e}){let t=a(),d=new n({address:new o(t),data:i.data});return e?.hasConsentPopup&&s.getType()===r.crossWindow&&s.setShouldShowConsentPopup(!0),await s.signMessage(d,e)}export{M as a};
2
+ //# sourceMappingURL=chunk-77IZTIMY.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as e}from"./chunk-PGOE5XGR.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";function d(t=e()){return r(t).explorerAddress}export{d as a};
2
+ //# sourceMappingURL=chunk-7ZW5EZFP.mjs.map
@@ -1,2 +1,2 @@
1
- import{s as c}from"./chunk-QNZHDBC6.mjs";import{a as o}from"./chunk-BRBIUWAW.mjs";var r=e=>{c().setState(({account:t})=>{let s=t.address===e.address;t.accounts={[t.address]:s?e:o}},!1,"setAccount")},u=e=>c().setState(({account:t})=>{t.ledgerAccount=e},!1,"setLedgerAccount"),p=e=>c().setState(({account:t})=>{t.walletConnectAccount=e},!1,"setWalletConnectAccount"),l=e=>c().setState(({account:t})=>{t.websocketEvent={timestamp:Date.now(),message:e}},!1,"setWebsocketEvent"),m=e=>c().setState(({account:t})=>{t.websocketBatchEvent={timestamp:Date.now(),data:e}},!1,"setWebsocketBatchEvent"),A=e=>{c().setState(({account:t})=>{t.accounts[t.address].nonce=e},!1,"setAccountNonce")};export{r as a,u as b,p as c,l as d,m as e,A as f};
2
- //# sourceMappingURL=chunk-OWAJLFLR.mjs.map
1
+ import{s as c}from"./chunk-PGOE5XGR.mjs";import{a as o}from"./chunk-BRBIUWAW.mjs";var r=e=>{c().setState(({account:t})=>{let s=t.address===e.address;t.accounts={[t.address]:s?e:o}},!1,"setAccount")},u=e=>c().setState(({account:t})=>{t.ledgerAccount=e},!1,"setLedgerAccount"),p=e=>c().setState(({account:t})=>{t.walletConnectAccount=e},!1,"setWalletConnectAccount"),l=e=>c().setState(({account:t})=>{t.websocketEvent={timestamp:Date.now(),message:e}},!1,"setWebsocketEvent"),m=e=>c().setState(({account:t})=>{t.websocketBatchEvent={timestamp:Date.now(),data:e}},!1,"setWebsocketBatchEvent"),A=e=>{c().setState(({account:t})=>{t.accounts[t.address].nonce=e},!1,"setAccountNonce")};export{r as a,u as b,p as c,l as d,m as e,A as f};
2
+ //# sourceMappingURL=chunk-A343RP4X.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as e}from"./chunk-PGOE5XGR.mjs";import{f as t}from"./chunk-QJSB5NX4.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-AGHFAZ7O.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-MPJPXMH6.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
- //# sourceMappingURL=chunk-N4HH72RP.mjs.map
1
+ import{a as s}from"./chunk-3ATEIVW3.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
+ //# sourceMappingURL=chunk-AKFSBZ46.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-MPJPXMH6.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
- //# sourceMappingURL=chunk-U5RJWYZ7.mjs.map
1
+ import{a as t}from"./chunk-3ATEIVW3.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
+ //# sourceMappingURL=chunk-AM6BSOYA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-6BCIJI43.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
2
- //# sourceMappingURL=chunk-AGRHW2AI.mjs.map
1
+ import{a as s}from"./chunk-EKMRPW2A.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
2
+ //# sourceMappingURL=chunk-AQ3VAQH3.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/managers/internal/UIBaseManager/UIBaseManager.ts"],
4
+ "sourcesContent": ["import { UITagsEnum } from 'constants/UITags.enum';\nimport { IEventBus } from 'lib/sdkDappUi';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport {\n ComponentFactory,\n CreateEventBusUIElementType\n} from 'utils/ComponentFactory';\n\nexport abstract class UIBaseManager<\n TElement extends CreateEventBusUIElementType,\n TData extends Record<string, any> | null,\n TEventEnum extends string\n> {\n protected eventBus: IEventBus | null = null;\n protected uiElement: TElement | null = null;\n protected isCreatingElement = false;\n protected anchor?: HTMLElement;\n protected uiTag: UITagsEnum;\n protected uiDataUpdateEvent: TEventEnum;\n protected unsubscribeFunctions: Map<TEventEnum, (() => void)[]> = new Map();\n protected abstract initialData: TData;\n protected data: TData;\n\n constructor({\n uiDataUpdateEvent,\n uiTag\n }: {\n uiTag: UITagsEnum;\n uiDataUpdateEvent: TEventEnum;\n }) {\n this.uiDataUpdateEvent = uiDataUpdateEvent;\n this.uiTag = uiTag;\n this.data = this.getInitialData();\n }\n\n public async init(anchor?: HTMLElement) {\n this.anchor = anchor;\n await this.createUIElement(anchor);\n await this.setupEventListeners();\n }\n\n public updateData(newData: Partial<TData>) {\n this.data = { ...this.data, ...newData };\n this.notifyDataUpdate();\n }\n\n public subscribeToEventBus(event: TEventEnum, callback: Function) {\n if (!this.eventBus) {\n throw new Error(ProviderErrorsEnum.eventBusError);\n }\n\n const unsubscribe = this.eventBus?.subscribe(event, callback);\n if (unsubscribe) {\n const existing = this.unsubscribeFunctions.get(event) || [];\n existing.push(unsubscribe);\n this.unsubscribeFunctions.set(event, existing);\n }\n }\n\n public notifyDataUpdate() {\n this.eventBus?.publish(this.uiDataUpdateEvent, this.data);\n }\n\n protected destroy() {\n this.unsubscribeFunctions.forEach((unsubList) =>\n unsubList.forEach((unsubscribe) => unsubscribe())\n );\n this.unsubscribeFunctions.clear();\n this.eventBus = null;\n this.uiElement?.remove();\n this.uiElement = null;\n }\n\n protected getInitialData(): TData {\n return this.initialData;\n }\n\n protected resetData() {\n this.data = this.getInitialData();\n }\n\n protected abstract setupEventListeners(): Promise<void>;\n\n private async createUIElement(\n anchor: HTMLElement | undefined = this.anchor\n ): Promise<TElement | null> {\n if (this.isCreatingElement || this.uiElement) {\n return this.uiElement;\n }\n\n this.isCreatingElement = true;\n\n this.uiElement = await ComponentFactory.create<TElement>({\n name: this.uiTag,\n anchor\n });\n\n this.isCreatingElement = false;\n\n if (!this.uiElement) {\n throw new Error(`Failed to create ${this.uiTag} element`);\n }\n\n if (!this.eventBus) {\n this.eventBus = await this.uiElement.getEventBus();\n }\n\n if (!this.eventBus) {\n throw new Error(ProviderErrorsEnum.eventBusError);\n }\n\n return this.uiElement;\n }\n}\n"],
5
+ "mappings": "yCAQO,IAAeA,EAAf,KAIL,CAWA,YAAY,CACV,kBAAAC,EACA,MAAAC,CACF,EAGG,CAhBH,KAAU,SAA6B,KACvC,KAAU,UAA6B,KACvC,KAAU,kBAAoB,GAI9B,KAAU,qBAAwD,IAAI,IAWpE,KAAK,kBAAoBD,EACzB,KAAK,MAAQC,EACb,KAAK,KAAO,KAAK,eAAe,CAClC,CAEA,MAAa,KAAKC,EAAsB,CACtC,KAAK,OAASA,EACd,MAAM,KAAK,gBAAgBA,CAAM,EACjC,MAAM,KAAK,oBAAoB,CACjC,CAEO,WAAWC,EAAyB,CACzC,KAAK,KAAO,CAAE,GAAG,KAAK,KAAM,GAAGA,CAAQ,EACvC,KAAK,iBAAiB,CACxB,CAEO,oBAAoBC,EAAmBC,EAAoB,CAChE,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,mCAAsC,EAGlD,IAAMC,EAAc,KAAK,UAAU,UAAUF,EAAOC,CAAQ,EAC5D,GAAIC,EAAa,CACf,IAAMC,EAAW,KAAK,qBAAqB,IAAIH,CAAK,GAAK,CAAC,EAC1DG,EAAS,KAAKD,CAAW,EACzB,KAAK,qBAAqB,IAAIF,EAAOG,CAAQ,CAC/C,CACF,CAEO,kBAAmB,CACxB,KAAK,UAAU,QAAQ,KAAK,kBAAmB,KAAK,IAAI,CAC1D,CAEU,SAAU,CAClB,KAAK,qBAAqB,QAASC,GACjCA,EAAU,QAASF,GAAgBA,EAAY,CAAC,CAClD,EACA,KAAK,qBAAqB,MAAM,EAChC,KAAK,SAAW,KAChB,KAAK,WAAW,OAAO,EACvB,KAAK,UAAY,IACnB,CAEU,gBAAwB,CAChC,OAAO,KAAK,WACd,CAEU,WAAY,CACpB,KAAK,KAAO,KAAK,eAAe,CAClC,CAIA,MAAc,gBACZJ,EAAkC,KAAK,OACb,CAC1B,GAAI,KAAK,mBAAqB,KAAK,UACjC,OAAO,KAAK,UAYd,GATA,KAAK,kBAAoB,GAEzB,KAAK,UAAY,MAAMO,EAAiB,OAAiB,CACvD,KAAM,KAAK,MACX,OAAAP,CACF,CAAC,EAED,KAAK,kBAAoB,GAErB,CAAC,KAAK,UACR,MAAM,IAAI,MAAM,oBAAoB,KAAK,KAAK,UAAU,EAO1D,GAJK,KAAK,WACR,KAAK,SAAW,MAAM,KAAK,UAAU,YAAY,GAG/C,CAAC,KAAK,SACR,MAAM,IAAI,mCAAsC,EAGlD,OAAO,KAAK,SACd,CACF",
6
+ "names": ["UIBaseManager", "uiDataUpdateEvent", "uiTag", "anchor", "newData", "event", "callback", "unsubscribe", "existing", "unsubList", "ComponentFactory"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-57B6Q67I.mjs";var o={async getTransactionsHistory(s){return await t(s)}};export{o as a};
2
+ //# sourceMappingURL=chunk-CTW5DICC.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as o}from"./chunk-PGOE5XGR.mjs";import{a as t}from"./chunk-QJSB5NX4.mjs";function n(r=o()){return t(r)}export{n as a};
2
+ //# sourceMappingURL=chunk-DCCGXGUQ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-PGOE5XGR.mjs";var o=t=>e().setState(({ui:n})=>{n.isSidePanelOpen=t},!1,"setIsSidePanelOpen");export{o as a};
2
+ //# sourceMappingURL=chunk-DDXGTNBZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-5Y7B5HHE.mjs";import{b as r}from"./chunk-YYQJVGEO.mjs";import{u as i}from"./chunk-QNZHDBC6.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
- //# sourceMappingURL=chunk-ENELZMUN.mjs.map
1
+ import{a as n}from"./chunk-EGU5LABV.mjs";import{b as r}from"./chunk-TXQO3M7J.mjs";import{u as i}from"./chunk-PGOE5XGR.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
+ //# sourceMappingURL=chunk-ED5SQUAW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-YKGDBIKG.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
2
- //# sourceMappingURL=chunk-5Y7B5HHE.mjs.map
1
+ import{a as e}from"./chunk-53JZ6ZBD.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
2
+ //# sourceMappingURL=chunk-EGU5LABV.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as r}from"./chunk-VMFJUT3G.mjs";import{a as e}from"./chunk-NONAAAZC.mjs";var n=class{static get create(){return this.createComponent}static set create(t){this.createComponent=t}};n.createComponent=async({name:t,anchor:o})=>{if(await r(e),!e.document)return{};let m=e.document.createElement(t);return(o||e.document.body).appendChild(m),await customElements.whenDefined(t),m};export{n as a};
2
+ //# sourceMappingURL=chunk-EKMRPW2A.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/ComponentFactory.ts"],
4
+ "sourcesContent": ["import { IEventBus } from '@multiversx/sdk-dapp-ui/dist/loader';\nimport { safeWindow } from 'constants/index';\nimport { UITagsEnum } from 'constants/UITags.enum';\nimport { defineCustomElements } from 'lib/sdkDappUi';\n\nexport interface CreateEventBusUIElementType extends HTMLElement {\n getEventBus: () => Promise<IEventBus | null>;\n}\n\nexport type CreateComponentType = <T = CreateEventBusUIElementType>({\n name,\n anchor\n}: {\n name: `${UITagsEnum}`;\n anchor?: HTMLElement;\n}) => Promise<T>;\n\nexport class ComponentFactory {\n private static createComponent: CreateComponentType = async <\n T = CreateEventBusUIElementType\n >({\n name,\n anchor\n }: {\n name: `${UITagsEnum}`;\n anchor?: HTMLElement;\n }) => {\n await defineCustomElements(safeWindow);\n\n if (!safeWindow.document) {\n return {} as T;\n }\n\n const element = safeWindow.document.createElement(name);\n const rootElement = anchor || safeWindow.document.body;\n rootElement.appendChild(element);\n await customElements.whenDefined(name);\n\n return element as T;\n };\n\n static get create() {\n return this.createComponent;\n }\n\n static set create(customCreateFunction: CreateComponentType) {\n this.createComponent = customCreateFunction;\n }\n}\n"],
5
+ "mappings": "kFAiBO,IAAMA,EAAN,KAAuB,CAwB5B,WAAW,QAAS,CAClB,OAAO,KAAK,eACd,CAEA,WAAW,OAAOC,EAA2C,CAC3D,KAAK,gBAAkBA,CACzB,CACF,EA/BaD,EACI,gBAAuC,MAEpD,CACA,KAAAE,EACA,OAAAC,CACF,IAGM,CAGJ,GAFA,MAAMC,EAAqBC,CAAU,EAEjC,CAACA,EAAW,SACd,MAAO,CAAC,EAGV,IAAMC,EAAUD,EAAW,SAAS,cAAcH,CAAI,EAEtD,OADoBC,GAAUE,EAAW,SAAS,MACtC,YAAYC,CAAO,EAC/B,MAAM,eAAe,YAAYJ,CAAI,EAE9BI,CACT",
6
+ "names": ["ComponentFactory", "customCreateFunction", "name", "anchor", "defineCustomElements", "safeWindow", "element"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-QK4ZSYK2.mjs";import{a as o}from"./chunk-OJV6XRG5.mjs";import{a as e,b as t}from"./chunk-BIRGGRKG.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
2
- //# sourceMappingURL=chunk-GNOORHJ4.mjs.map
1
+ import{a as s}from"./chunk-GOL32UNC.mjs";import{a as o}from"./chunk-OJV6XRG5.mjs";import{a as e,b as t}from"./chunk-NONAAAZC.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
2
+ //# sourceMappingURL=chunk-ER735UVF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-VFMUFBPH.mjs";import{d as C,e as I}from"./chunk-OWAJLFLR.mjs";import{s as p}from"./chunk-QNZHDBC6.mjs";import{b as E}from"./chunk-SAAOQW7P.mjs";import{a as y}from"./chunk-MGQ373AO.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as L}from"socket.io-client";var U=3e3,d=3,k=500,W=1e3,M=1e3,S="batchUpdated",w="connect",O="connect_error",A="disconnect";async function K(l){let{apiAddress:_,websocketUrl:g}=E(p().getState());if(!l)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,b(e)},R=e=>{o&&clearTimeout(o),o=setTimeout(()=>{C(e)},W)},h=e=>{n&&clearTimeout(n),n=setTimeout(()=>{I(e)},W)},D=()=>{let e=t.instance;e&&(e.off(O),e.off(w),e.off(S),e.off(A),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},m=y(async()=>{let e=async(i=d,a=k)=>{let f=0,r=null,s=null,T=async()=>{if(f>=i){console.warn("WebSocket reconnection failed after max attempts."),c("not_initialized");return}f++,t.instance?.off(),t.instance?.close(),t.instance=null;try{await m(),r=setTimeout(()=>{t.instance?.connected||(s=setTimeout(T,a))},M)}catch{s=setTimeout(T,a)}};return T(),()=>{r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null)}};c("pending");let u=g??await N(_);if(!u){c("not_initialized");return}t.instance=L(u,{forceNew:!0,reconnection:!0,reconnectionAttempts:d,timeout:U,query:{address:l}}),t.instance.onAny(R),t.instance.on(S,h),t.instance.on(w,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(O,async i=>{console.warn("Websocket connect error: ",i.message),(await e())()}),t.instance.on(A,async()=>{console.warn("Websocket disconnected. Trying to reconnect..."),(await e())()})},{retries:2,delay:k});return t.status==="not_initialized"&&!t.instance?.active&&await m(),{closeConnection:D}}export{K as a};
2
- //# sourceMappingURL=chunk-6MFBHFCH.mjs.map
1
+ import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-YILGIHY5.mjs";import{d as C,e as I}from"./chunk-A343RP4X.mjs";import{s as p}from"./chunk-PGOE5XGR.mjs";import{b as E}from"./chunk-SAAOQW7P.mjs";import{a as y}from"./chunk-MGQ373AO.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as L}from"socket.io-client";var U=3e3,d=3,k=500,W=1e3,M=1e3,S="batchUpdated",w="connect",O="connect_error",A="disconnect";async function K(l){let{apiAddress:_,websocketUrl:g}=E(p().getState());if(!l)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,b(e)},R=e=>{o&&clearTimeout(o),o=setTimeout(()=>{C(e)},W)},h=e=>{n&&clearTimeout(n),n=setTimeout(()=>{I(e)},W)},D=()=>{let e=t.instance;e&&(e.off(O),e.off(w),e.off(S),e.off(A),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},m=y(async()=>{let e=async(i=d,a=k)=>{let f=0,r=null,s=null,T=async()=>{if(f>=i){console.warn("WebSocket reconnection failed after max attempts."),c("not_initialized");return}f++,t.instance?.off(),t.instance?.close(),t.instance=null;try{await m(),r=setTimeout(()=>{t.instance?.connected||(s=setTimeout(T,a))},M)}catch{s=setTimeout(T,a)}};return T(),()=>{r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null)}};c("pending");let u=g??await N(_);if(!u){c("not_initialized");return}t.instance=L(u,{forceNew:!0,reconnection:!0,reconnectionAttempts:d,timeout:U,query:{address:l}}),t.instance.onAny(R),t.instance.on(S,h),t.instance.on(w,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(O,async i=>{console.warn("Websocket connect error: ",i.message),(await e())()}),t.instance.on(A,async()=>{console.warn("Websocket disconnected. Trying to reconnect..."),(await e())()})},{retries:2,delay:k});return t.status==="not_initialized"&&!t.instance?.active&&await m(),{closeConnection:D}}export{K as a};
2
+ //# sourceMappingURL=chunk-EUXN5BLO.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-UFI4T62Y.mjs";import{a as k}from"./chunk-KEGXCGMM.mjs";import{s as f}from"./chunk-QNZHDBC6.mjs";import{d as b}from"./chunk-QJSB5NX4.mjs";import{c as n}from"./chunk-WBDC2GLI.mjs";import{b as i}from"./chunk-GGBMHKR4.mjs";async function N(){let o=f(),I=g(),s=null,t=null,l=b(o.getState())?.timestamp,c=()=>{k()},u=()=>{s??=setInterval(c,I)},m=()=>{s&&(clearInterval(s),s=null)},p=()=>{m();let a=o.subscribe(({account:{websocketEvent:e}})=>{e?.message&&l!==e.timestamp&&(l=e.timestamp,c())});n.set("websocketEventReceived",a)},S=()=>{i.status!=="not_initialized"||t||(t=setInterval(()=>{i.status==="completed"&&(clearInterval(t),t=null,p())},1e3))};c();let r=()=>{m(),t&&(clearInterval(t),t=null)},v=o.subscribe(({account:{address:a},config:{websocketStatus:e}},T)=>{if(T.config.websocketStatus!==e)switch(e){case"completed":p();break;case"pending":u(),S();break;default:a?u():r();break}});return n.set("websocketStatusChanged",v),n.set("websocketEventReceived",r),{stopTransactionsTracking:r}}export{N as a};
2
- //# sourceMappingURL=chunk-5KMPEHOK.mjs.map
1
+ import{a as g}from"./chunk-IYAIXP65.mjs";import{a as k}from"./chunk-LIFPBQTL.mjs";import{s as f}from"./chunk-PGOE5XGR.mjs";import{d as b}from"./chunk-QJSB5NX4.mjs";import{c as n}from"./chunk-Q6NDAYER.mjs";import{b as i}from"./chunk-GGBMHKR4.mjs";async function N(){let o=f(),I=g(),s=null,t=null,l=b(o.getState())?.timestamp,c=()=>{k()},u=()=>{s??=setInterval(c,I)},m=()=>{s&&(clearInterval(s),s=null)},p=()=>{m();let a=o.subscribe(({account:{websocketEvent:e}})=>{e?.message&&l!==e.timestamp&&(l=e.timestamp,c())});n.set("websocketEventReceived",a)},S=()=>{i.status!=="not_initialized"||t||(t=setInterval(()=>{i.status==="completed"&&(clearInterval(t),t=null,p())},1e3))};c();let r=()=>{m(),t&&(clearInterval(t),t=null)},v=o.subscribe(({account:{address:a},config:{websocketStatus:e}},T)=>{if(T.config.websocketStatus!==e)switch(e){case"completed":p();break;case"pending":u(),S();break;default:a?u():r();break}});return n.set("websocketStatusChanged",v),n.set("websocketEventReceived",r),{stopTransactionsTracking:r}}export{N as a};
2
+ //# sourceMappingURL=chunk-FFEFZVCC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-GD2ZQIV4.mjs";import{a as e}from"./chunk-7K23CDCE.mjs";import{a as i}from"./chunk-REI3WYXH.mjs";var a=class{constructor(o){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async o=>{if(!this._login)throw new Error("Provider is not initialized.");let r=await this._login(o);if(!r?.address)throw new Error("Provider is not initialized.");return{...r,address:r.address,signature:r.signature??""}};this.initializeAddress=()=>{if(this.address)return;let o=e();o&&(this.address=o)};this.cancelAction=void 0;this.address=o??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(o,r){throw new Error("Method not implemented.")}async login(o){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let r=new AbortController;this.loginAbortController=r;let t=r.signal;try{let n=new Promise((p,c)=>{t.addEventListener("abort",()=>{c(new Error("Login cancelled"))})}),l=await Promise.race([this.loginOperation(o),n]);return this.loginAbortController=null,l}catch(n){throw this.loginAbortController=null,n}}async initSignState(){let{onClose:o,manager:r}=await s({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return r.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),r.updateData({name:i[t],type:t}),{onClose:o,manager:r}}};export{a};
2
- //# sourceMappingURL=chunk-QK4ZSYK2.mjs.map
1
+ import{a as s}from"./chunk-KWJVDPCC.mjs";import{a as e}from"./chunk-2ZNIPYEV.mjs";import{a as i}from"./chunk-REI3WYXH.mjs";var a=class{constructor(o){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async o=>{if(!this._login)throw new Error("Provider is not initialized.");let r=await this._login(o);if(!r?.address)throw new Error("Provider is not initialized.");return{...r,address:r.address,signature:r.signature??""}};this.initializeAddress=()=>{if(this.address)return;let o=e();o&&(this.address=o)};this.cancelAction=void 0;this.address=o??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(o,r){throw new Error("Method not implemented.")}async login(o){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let r=new AbortController;this.loginAbortController=r;let t=r.signal;try{let n=new Promise((p,c)=>{t.addEventListener("abort",()=>{c(new Error("Login cancelled"))})}),l=await Promise.race([this.loginOperation(o),n]);return this.loginAbortController=null,l}catch(n){throw this.loginAbortController=null,n}}async initSignState(){let{onClose:o,manager:r}=await s({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return r.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),r.updateData({name:i[t],type:t}),{onClose:o,manager:r}}};export{a};
2
+ //# sourceMappingURL=chunk-GOL32UNC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-L3MWDI6J.mjs";import{s as i}from"./chunk-QNZHDBC6.mjs";var g=({transactions:s,transactionsDisplayInfo:a,status:e,sessionInformation:t})=>{let o=Date.now().toString();return i().setState(({transactions:n})=>{n[o]={transactions:s,status:e,transactionsDisplayInfo:a,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),o},T=({sessionId:s,status:a,errorMessage:e})=>{i().setState(({transactions:t})=>{t[s].status=a,t[s].errorMessage=e},!1,"updateTransactionsSession")},y=({sessionId:s,transaction:a})=>{let e=null;return i().setState(({transactions:t})=>{let o=t[s]?.transactions;if(o!=null){t[s].transactions=o.map(r=>r.hash===a.hash?{...r,...a??{}}:r);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},h=()=>{i().setState(({transactions:s,toasts:a})=>{let t=Object.keys(s).filter(n=>{let r=s[n];if(!r)return!1;let{status:c}=r;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let o=a.transactionToasts.filter(n=>!t.includes(n.toastId));a.transactionToasts=o},!1,"clearCompletedTransactions")};export{g as a,T as b,y as c,h as d};
2
- //# sourceMappingURL=chunk-JHWFB3CV.mjs.map
1
+ import{a as u}from"./chunk-L3MWDI6J.mjs";import{s as i}from"./chunk-PGOE5XGR.mjs";var g=({transactions:s,transactionsDisplayInfo:a,status:e,sessionInformation:t})=>{let o=Date.now().toString();return i().setState(({transactions:n})=>{n[o]={transactions:s,status:e,transactionsDisplayInfo:a,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),o},T=({sessionId:s,status:a,errorMessage:e})=>{i().setState(({transactions:t})=>{t[s].status=a,t[s].errorMessage=e},!1,"updateTransactionsSession")},y=({sessionId:s,transaction:a})=>{let e=null;return i().setState(({transactions:t})=>{let o=t[s]?.transactions;if(o!=null){t[s].transactions=o.map(r=>r.hash===a.hash?{...r,...a??{}}:r);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},h=()=>{i().setState(({transactions:s,toasts:a})=>{let t=Object.keys(s).filter(n=>{let r=s[n];if(!r)return!1;let{status:c}=r;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let o=a.transactionToasts.filter(n=>!t.includes(n.toastId));a.transactionToasts=o},!1,"clearCompletedTransactions")};export{g as a,T as b,y as c,h as d};
2
+ //# sourceMappingURL=chunk-GXUJBKWY.mjs.map
@@ -1,2 +1,2 @@
1
- import{l as p,s as e}from"./chunk-QNZHDBC6.mjs";import{c as i}from"./chunk-R53MCZI6.mjs";var T=()=>e().setState(p),m=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).hex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,m as b};
2
- //# sourceMappingURL=chunk-QATXGQVV.mjs.map
1
+ import{l as p,s as e}from"./chunk-PGOE5XGR.mjs";import{c as i}from"./chunk-R53MCZI6.mjs";var T=()=>e().setState(p),m=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).hex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,m as b};
2
+ //# sourceMappingURL=chunk-HIODLP5F.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-BIRGGRKG.mjs";function t(){if(!e)return"";try{if(e.document.referrer)return new URL(e.document.referrer).origin;let r=e.location.ancestorOrigins;return r.length<1?"":new URL(r[r.length-1]).origin}catch(r){return console.error(r),""}}export{t as a};
2
- //# sourceMappingURL=chunk-QSDBTVWI.mjs.map
1
+ import{a as e}from"./chunk-NONAAAZC.mjs";function t(){if(!e)return"";try{if(e.document.referrer)return new URL(e.document.referrer).origin;let r=e.location.ancestorOrigins;return r.length<1?"":new URL(r[r.length-1]).origin}catch(r){return console.error(r),""}}export{t as a};
2
+ //# sourceMappingURL=chunk-HPLSDK5V.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-V3IKJKPE.mjs";import{a as S}from"./chunk-TUZQU7RJ.mjs";import{a as o}from"./chunk-FMQYLMTU.mjs";import{a as y}from"./chunk-MFUQ5NBC.mjs";import{b as i,c as f}from"./chunk-JHWFB3CV.mjs";import{l}from"./chunk-65L5EBBL.mjs";var u={};async function d({serverTransaction:e,sessionId:t,isSequential:c}){let{hash:a,status:r,results:m,invalidTransaction:n,hasStatusChanged:p}=e;try{if(u[a]>30){i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"});return}if(n&&!c||r==="sent"){u[a]=u[a]?u[a]+1:1;return}if(c&&!r){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s});return}if(p){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s})}l(r)&&await S({sessionId:t,hash:a,results:m})}catch(T){console.error(T),i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"})}}async function R({sessionId:e,transactionBatch:t,isSequential:c}){try{if(t==null)return;let a=y(t),r=await h(a);for(let n of r)await d({serverTransaction:n,sessionId:e,isSequential:c});if(r.every(n=>n.status!=="pending")){if(r.every(s=>s.status==="success"))return i({sessionId:e,status:"success"});if(r.some(s=>s.status==="fail"))return i({sessionId:e,status:"fail"});if(r.every(s=>s.invalidTransaction))return i({sessionId:e,status:"invalid"})}}catch(a){console.error(a)}}export{R as a};
2
- //# sourceMappingURL=chunk-ZD477RWI.mjs.map
1
+ import{a as h}from"./chunk-HVUNMCAO.mjs";import{a as S}from"./chunk-RIH7QM6W.mjs";import{a as o}from"./chunk-FMQYLMTU.mjs";import{a as y}from"./chunk-MFUQ5NBC.mjs";import{b as i,c as f}from"./chunk-GXUJBKWY.mjs";import{l}from"./chunk-65L5EBBL.mjs";var u={};async function d({serverTransaction:e,sessionId:t,isSequential:c}){let{hash:a,status:r,results:m,invalidTransaction:n,hasStatusChanged:p}=e;try{if(u[a]>30){i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"});return}if(n&&!c||r==="sent"){u[a]=u[a]?u[a]+1:1;return}if(c&&!r){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s});return}if(p){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s})}l(r)&&await S({sessionId:t,hash:a,results:m})}catch(T){console.error(T),i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"})}}async function R({sessionId:e,transactionBatch:t,isSequential:c}){try{if(t==null)return;let a=y(t),r=await h(a);for(let n of r)await d({serverTransaction:n,sessionId:e,isSequential:c});if(r.every(n=>n.status!=="pending")){if(r.every(s=>s.status==="success"))return i({sessionId:e,status:"success"});if(r.some(s=>s.status==="fail"))return i({sessionId:e,status:"fail"});if(r.every(s=>s.invalidTransaction))return i({sessionId:e,status:"invalid"})}}catch(a){console.error(a)}}export{R as a};
2
+ //# sourceMappingURL=chunk-HTAH342B.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-ZKOPXJGO.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
2
- //# sourceMappingURL=chunk-V3IKJKPE.mjs.map
1
+ import{a as e}from"./chunk-LEBVS2YF.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
2
+ //# sourceMappingURL=chunk-HVUNMCAO.mjs.map
@@ -1,2 +1,2 @@
1
- import{s as a}from"./chunk-QNZHDBC6.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
2
- //# sourceMappingURL=chunk-S3YBBGUM.mjs.map
1
+ import{s as a}from"./chunk-PGOE5XGR.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
2
+ //# sourceMappingURL=chunk-IEWH5GDM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as B}from"./chunk-VVN3GJHO.mjs";import{a as b}from"./chunk-O4S5EU7O.mjs";import{a as k}from"./chunk-QXC4D3AC.mjs";import{a as R}from"./chunk-OD4ANAAQ.mjs";import{a as D}from"./chunk-GDGOPAMC.mjs";import{a as I}from"./chunk-AV4HSXYZ.mjs";import{a as j}from"./chunk-YTFYVPZO.mjs";import{a as _}from"./chunk-JLBB5YDB.mjs";import{a as O}from"./chunk-N4HH72RP.mjs";import{a as x}from"./chunk-ELXMMX5P.mjs";import{u as A}from"./chunk-QNZHDBC6.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-J4CPYFK6.mjs";import{a as w}from"./chunk-R53MCZI6.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:C,username:E}}=B(),g=v(A()),h=x(),{allTransactions:e,parsedTransactionsByDataField:L}=R(z),p=[],n=O.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await k({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(e.map(t=>t.transaction));let l=Y?.price,a=0,T=async()=>{let r=e[a]?.transaction,i=Number(r.nonce);n.updateIsLoading(!0);let{commonData:c,tokenTransaction:o,fungibleTransaction:s}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});n.updateIsLoading(!1),o&&n.updateTokenTransaction(o),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(c)},q=()=>{a>0&&(a--,T())},J=(t=0)=>{let i=e[a].transaction,c=Number(i.nonce);n.updateGasPriceMap({nonce:c,ppu:t}),n.updateCommonData({ppu:t});let o=i.toPlainObject(),s=I({transaction:o,gasPriceData:n.ppuMap[c]}),P=w.newFromPlainObject({...o,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:t})},Q=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{a<n.transactionsCount-1&&(a++,T())},V=async()=>{let r=e[a].transaction,i=Number(r.nonce),{commonData:c}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});if(!c.needsSigning)return p.push(a),f();let o=r.toPlainObject(),s=o.nonce,P=I({transaction:o,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...o,gasPrice:P});try{let m=await H([u]);m&&(p.push(a),d.push(m[0]));let nn=a===e.length-1,an=e.filter(S=>S.needsSigning),tn=d.length===an.length;if(nn&&tn){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},Z=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",V],["CLOSE_SIGN_TRANSACTIONS",Q],["BACK_SIGN_TRANSACTIONS",q],["SET_PPU_SIGN_TRANSACTIONS",J]]);function $(){for(let[t,r]of Z)n.subscribeToEventBus(t,r)}$(),await T()})}export{Dn as a};
2
- //# sourceMappingURL=chunk-7RLPFF24.mjs.map
1
+ import{a as B}from"./chunk-VYWLQ5T7.mjs";import{a as b}from"./chunk-Q56GIIOP.mjs";import{a as k}from"./chunk-QXC4D3AC.mjs";import{a as R}from"./chunk-OD4ANAAQ.mjs";import{a as D}from"./chunk-QVLQCJFN.mjs";import{a as I}from"./chunk-AV4HSXYZ.mjs";import{a as j}from"./chunk-YTFYVPZO.mjs";import{a as _}from"./chunk-3UIJI5YR.mjs";import{a as O}from"./chunk-AKFSBZ46.mjs";import{a as x}from"./chunk-RUG7JMMB.mjs";import{u as A}from"./chunk-PGOE5XGR.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-J4CPYFK6.mjs";import{a as w}from"./chunk-R53MCZI6.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:C,username:E}}=B(),g=v(A()),h=x(),{allTransactions:e,parsedTransactionsByDataField:L}=R(z),p=[],n=O.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await k({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(e.map(t=>t.transaction));let l=Y?.price,a=0,T=async()=>{let r=e[a]?.transaction,i=Number(r.nonce);n.updateIsLoading(!0);let{commonData:c,tokenTransaction:o,fungibleTransaction:s}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});n.updateIsLoading(!1),o&&n.updateTokenTransaction(o),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(c)},q=()=>{a>0&&(a--,T())},J=(t=0)=>{let i=e[a].transaction,c=Number(i.nonce);n.updateGasPriceMap({nonce:c,ppu:t}),n.updateCommonData({ppu:t});let o=i.toPlainObject(),s=I({transaction:o,gasPriceData:n.ppuMap[c]}),P=w.newFromPlainObject({...o,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:t})},Q=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{a<n.transactionsCount-1&&(a++,T())},V=async()=>{let r=e[a].transaction,i=Number(r.nonce),{commonData:c}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:h,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:C,signedIndexes:p,parsedTransactionsByDataField:L});if(!c.needsSigning)return p.push(a),f();let o=r.toPlainObject(),s=o.nonce,P=I({transaction:o,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...o,gasPrice:P});try{let m=await H([u]);m&&(p.push(a),d.push(m[0]));let nn=a===e.length-1,an=e.filter(S=>S.needsSigning),tn=d.length===an.length;if(nn&&tn){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},Z=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",V],["CLOSE_SIGN_TRANSACTIONS",Q],["BACK_SIGN_TRANSACTIONS",q],["SET_PPU_SIGN_TRANSACTIONS",J]]);function $(){for(let[t,r]of Z)n.subscribeToEventBus(t,r)}$(),await T()})}export{Dn as a};
2
+ //# sourceMappingURL=chunk-ISB4SC4L.mjs.map
@@ -0,0 +1,2 @@
1
+ import{e}from"./chunk-CAA4VJRH.mjs";import{u as o}from"./chunk-PGOE5XGR.mjs";import{e as t}from"./chunk-SAAOQW7P.mjs";function m(){let r=t(o());return r?Math.max(1e3,r/2):9e4}export{m as a};
2
+ //# sourceMappingURL=chunk-IYAIXP65.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-VXH564B3.mjs";import{a as c}from"./chunk-7ZFOLOLG.mjs";import{a}from"./chunk-YUFPUG5O.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
2
- //# sourceMappingURL=chunk-WEFIYM62.mjs.map
1
+ import{a as l}from"./chunk-6H5TKCEW.mjs";import{a as c}from"./chunk-AGHFAZ7O.mjs";import{a}from"./chunk-YUFPUG5O.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
2
+ //# sourceMappingURL=chunk-JF4GVWO4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-JBHDOEYV.mjs";import{a as s}from"./chunk-BO7PXEGF.mjs";import{a as k}from"./chunk-3OKWBJFM.mjs";import{a as L}from"./chunk-YJCCKVIF.mjs";import{b as A}from"./chunk-OWAJLFLR.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{g as p}from"./chunk-QNZHDBC6.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-OJV6XRG5.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=h.getInstance(),T=L(),b=k({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:I({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),A({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
- //# sourceMappingURL=chunk-OJCIOVNO.mjs.map
1
+ import{a as h}from"./chunk-KGASLT4P.mjs";import{a as s}from"./chunk-QPXVUJSC.mjs";import{a as k}from"./chunk-3OKWBJFM.mjs";import{a as L}from"./chunk-7ZW5EZFP.mjs";import{b as A}from"./chunk-A343RP4X.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{g as p}from"./chunk-PGOE5XGR.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-OJV6XRG5.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=h.getInstance(),T=L(),b=k({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:I({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),A({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
+ //# sourceMappingURL=chunk-JGFDKHG2.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-AGRHW2AI.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
- //# sourceMappingURL=chunk-JBHDOEYV.mjs.map
1
+ import{a as i}from"./chunk-AQ3VAQH3.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
+ //# sourceMappingURL=chunk-KGASLT4P.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-U5RJWYZ7.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
2
- //# sourceMappingURL=chunk-GD2ZQIV4.mjs.map
1
+ import{a as e}from"./chunk-AM6BSOYA.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
2
+ //# sourceMappingURL=chunk-KWJVDPCC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-CAA4VJRH.mjs";import{u as e}from"./chunk-QNZHDBC6.mjs";import{a as n}from"./chunk-QJSB5NX4.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
2
- //# sourceMappingURL=chunk-XGKAQORR.mjs.map
1
+ import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-CAA4VJRH.mjs";import{u as e}from"./chunk-PGOE5XGR.mjs";import{a as n}from"./chunk-QJSB5NX4.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
2
+ //# sourceMappingURL=chunk-L4762ZRT.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-HBQQS6GA.mjs";import{u as m}from"./chunk-QNZHDBC6.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
- //# sourceMappingURL=chunk-HBIIVJA5.mjs.map
1
+ import{a as g}from"./chunk-HBQQS6GA.mjs";import{u as m}from"./chunk-PGOE5XGR.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
+ //# sourceMappingURL=chunk-LDETTRYB.mjs.map
@@ -1,2 +1,2 @@
1
- import{u as e}from"./chunk-QNZHDBC6.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
2
- //# sourceMappingURL=chunk-ZKOPXJGO.mjs.map
1
+ import{u as e}from"./chunk-PGOE5XGR.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
2
+ //# sourceMappingURL=chunk-LEBVS2YF.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-HTAH342B.mjs";import{b as s}from"./chunk-TQA3JDNV.mjs";import{u as n}from"./chunk-PGOE5XGR.mjs";async function f(){let t=s(n());if(Object.keys(t).length>0)for(let[e,{transactions:c}]of Object.entries(t))await o({sessionId:e,transactionBatch:c})}export{f as a};
2
+ //# sourceMappingURL=chunk-LIFPBQTL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-LOP4GEJR.mjs";import{a as u}from"./chunk-7K23CDCE.mjs";import{a as g}from"./chunk-QATXGQVV.mjs";import{c as n}from"./chunk-WBDC2GLI.mjs";import{a}from"./chunk-OJV6XRG5.mjs";import{a as s}from"./chunk-BIRGGRKG.mjs";var c=(o,r)=>{let t=`sdk-dapp-logout-event-${o}`,e=r.getItem(t);e&&o!==e||(r.setItem(t,o),r.removeItem(t))};async function h({provider:o,options:r={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}}){let t=u();r.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(t,s.localStorage);try{return g(),r.hasConsentPopup&&o.getType()===a.crossWindow&&o.setShouldShowConsentPopup(!0),n.forEach(p=>p()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{h as a};
2
- //# sourceMappingURL=chunk-P6YSSNVX.mjs.map
1
+ import{a as i}from"./chunk-65RXDHRY.mjs";import{a as u}from"./chunk-2ZNIPYEV.mjs";import{a as g}from"./chunk-HIODLP5F.mjs";import{c as n}from"./chunk-Q6NDAYER.mjs";import{a}from"./chunk-OJV6XRG5.mjs";import{a as s}from"./chunk-NONAAAZC.mjs";var c=(o,r)=>{let t=`sdk-dapp-logout-event-${o}`,e=r.getItem(t);e&&o!==e||(r.setItem(t,o),r.removeItem(t))};async function h({provider:o,options:r={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}}){let t=u();r.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(t,s.localStorage);try{return g(),r.hasConsentPopup&&o.getType()===a.crossWindow&&o.setShouldShowConsentPopup(!0),n.forEach(p=>p()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{h as a};
2
+ //# sourceMappingURL=chunk-LYXQ3FWU.mjs.map
@@ -1,2 +1,2 @@
1
- import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{u as c}from"./chunk-QNZHDBC6.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
2
- //# sourceMappingURL=chunk-ALFFCAUL.mjs.map
1
+ import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{u as c}from"./chunk-PGOE5XGR.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
2
+ //# sourceMappingURL=chunk-NJMYFDLA.mjs.map
@@ -0,0 +1,2 @@
1
+ var o=typeof window<"u"?window:{},n="5.0.0-alpha.13";export{o as a,n as b};
2
+ //# sourceMappingURL=chunk-NONAAAZC.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/window.constants.ts"],
4
- "sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.0.0-alpha.12'; // will be replaced at build time\n"],
4
+ "sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.0.0-alpha.13'; // will be replaced at build time\n"],
5
5
  "mappings": "AAAO,IAAMA,EACX,OAAO,OAAW,IAAc,OAAU,CAAC,EAEhCC,EAAU",
6
6
  "names": ["safeWindow", "version"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-NONAAAZC.mjs";var o=()=>a.localStorage;export{o as a};
2
+ //# sourceMappingURL=chunk-NQQQKXT2.mjs.map
@@ -1,2 +1,2 @@
1
- import{f as a}from"./chunk-VNLGNNIL.mjs";import{b as s,f as l}from"./chunk-QJSB5NX4.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{a as g,b as c}from"./chunk-7BP53CXF.mjs";import{a as f,b as m}from"./chunk-X4XULIVT.mjs";import{a as T}from"./chunk-SUN3MVLZ.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-TYS33KHK.mjs";import{c as p}from"./chunk-R53MCZI6.mjs";import{createJSONStorage as h,devtools as O,persist as V}from"zustand/middleware";import{immer as H}from"zustand/middleware/immer";import{createStore as N}from"zustand/vanilla";var A=e=>{e.account=g,e.loginInfo=f,e.transactions=d,e.toasts=S};function R(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),n=a(e),{address:i,publicKey:M}=s(e);if(i&&M!==new p(i).hex()&&A(e),!t)return;if(n==null){w(R());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=N(O(V(H((...n)=>({network:x(...n),account:c(...n),loginInfo:m(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:h(e)})));return t.subscribe(W),t},r,D=e=>{r=e},o=()=>(r||D(z(()=>new v)),r),ae=(e=k)=>D(z(e)),pe=()=>o().getState();var fe=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),me=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletLogin=e},!1,"setWalletLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),Te=e=>o().setState(({loginInfo:t})=>{t.logoutRoute=e},!1,"setLogoutRoute"),ye=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{fe as a,me as b,Se as c,ue as d,de as e,Le as f,xe as g,Te as h,ye as i,E as j,b as k,A as l,R as m,w as n,C as o,W as p,z as q,D as r,o as s,ae as t,pe as u};
2
- //# sourceMappingURL=chunk-QNZHDBC6.mjs.map
1
+ import{f as a}from"./chunk-VNLGNNIL.mjs";import{b as s,f as l}from"./chunk-QJSB5NX4.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{a as g,b as c}from"./chunk-7BP53CXF.mjs";import{a as f,b as m}from"./chunk-X4XULIVT.mjs";import{a as T}from"./chunk-SUN3MVLZ.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-NQQQKXT2.mjs";import{c as p}from"./chunk-R53MCZI6.mjs";import{createJSONStorage as h,devtools as O,persist as V}from"zustand/middleware";import{immer as H}from"zustand/middleware/immer";import{createStore as N}from"zustand/vanilla";var A=e=>{e.account=g,e.loginInfo=f,e.transactions=d,e.toasts=S};function R(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),n=a(e),{address:i,publicKey:M}=s(e);if(i&&M!==new p(i).hex()&&A(e),!t)return;if(n==null){w(R());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=N(O(V(H((...n)=>({network:x(...n),account:c(...n),loginInfo:m(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:h(e)})));return t.subscribe(W),t},r,D=e=>{r=e},o=()=>(r||D(z(()=>new v)),r),ae=(e=k)=>D(z(e)),pe=()=>o().getState();var fe=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),me=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletLogin=e},!1,"setWalletLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),Te=e=>o().setState(({loginInfo:t})=>{t.logoutRoute=e},!1,"setLogoutRoute"),ye=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{fe as a,me as b,Se as c,ue as d,de as e,Le as f,xe as g,Te as h,ye as i,E as j,b as k,A as l,R as m,w as n,C as o,W as p,z as q,D as r,o as s,ae as t,pe as u};
2
+ //# sourceMappingURL=chunk-PGOE5XGR.mjs.map
@@ -1,2 +1,2 @@
1
- import{t as n}from"./chunk-LJ6QBENT.mjs";import{a as i}from"./chunk-OJV6XRG5.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
- //# sourceMappingURL=chunk-O4S5EU7O.mjs.map
1
+ import{t as n}from"./chunk-QNKYH6KO.mjs";import{a as i}from"./chunk-OJV6XRG5.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
+ //# sourceMappingURL=chunk-Q56GIIOP.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-BIRGGRKG.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map;export{r as a,i as b,p as c};
2
- //# sourceMappingURL=chunk-WBDC2GLI.mjs.map
1
+ import{a as e}from"./chunk-NONAAAZC.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map;export{r as a,i as b,p as c};
2
+ //# sourceMappingURL=chunk-Q6NDAYER.mjs.map