@cfxjs/sirius-next-common 0.0.8 → 0.0.9-patch.1

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 (606) hide show
  1. package/dist/chunk-26BGPSLL.js +141 -0
  2. package/dist/chunk-26BGPSLL.js.map +1 -0
  3. package/dist/chunk-2D3FHQMA.js +212 -0
  4. package/dist/chunk-2D3FHQMA.js.map +1 -0
  5. package/dist/chunk-2GMSPXII.js +212 -0
  6. package/dist/chunk-2GMSPXII.js.map +1 -0
  7. package/dist/chunk-2KKN5I7Z.js +108 -0
  8. package/dist/chunk-2KKN5I7Z.js.map +1 -0
  9. package/dist/chunk-2KZQEDWJ.js +63 -0
  10. package/dist/chunk-2KZQEDWJ.js.map +1 -0
  11. package/dist/chunk-2LXJPD6E.js +141 -0
  12. package/dist/chunk-2LXJPD6E.js.map +1 -0
  13. package/dist/chunk-2MQDR6YX.js +63 -0
  14. package/dist/chunk-2MQDR6YX.js.map +1 -0
  15. package/dist/chunk-2NX2L2RI.js +875 -0
  16. package/dist/chunk-2NX2L2RI.js.map +1 -0
  17. package/dist/chunk-2Q4BOUN5.js +143 -0
  18. package/dist/chunk-2Q4BOUN5.js.map +1 -0
  19. package/dist/chunk-2QCODSHF.js +108 -0
  20. package/dist/chunk-2QCODSHF.js.map +1 -0
  21. package/dist/chunk-363U57H2.js +108 -0
  22. package/dist/chunk-363U57H2.js.map +1 -0
  23. package/dist/chunk-37YTMWL5.js +127 -0
  24. package/dist/chunk-37YTMWL5.js.map +1 -0
  25. package/dist/chunk-3AVURPM5.js +108 -0
  26. package/dist/chunk-3AVURPM5.js.map +1 -0
  27. package/dist/chunk-3D4DD2UA.js +141 -0
  28. package/dist/chunk-3D4DD2UA.js.map +1 -0
  29. package/dist/chunk-3DSBII47.js +58 -0
  30. package/dist/chunk-3DSBII47.js.map +1 -0
  31. package/dist/chunk-3EYF446K.js +3629 -0
  32. package/dist/chunk-3EYF446K.js.map +1 -0
  33. package/dist/chunk-3FE7I3KQ.js +101 -0
  34. package/dist/chunk-3FE7I3KQ.js.map +1 -0
  35. package/dist/chunk-3Z26LHYR.js +128 -0
  36. package/dist/chunk-3Z26LHYR.js.map +1 -0
  37. package/dist/chunk-43RJJ6FE.js +3629 -0
  38. package/dist/chunk-43RJJ6FE.js.map +1 -0
  39. package/dist/chunk-4A3R7D6E.js +127 -0
  40. package/dist/chunk-4A3R7D6E.js.map +1 -0
  41. package/dist/chunk-4CHUPYY3.js +108 -0
  42. package/dist/chunk-4CHUPYY3.js.map +1 -0
  43. package/dist/chunk-4DOOVZYQ.js +127 -0
  44. package/dist/chunk-4DOOVZYQ.js.map +1 -0
  45. package/dist/chunk-4EWR72ZL.js +127 -0
  46. package/dist/chunk-4EWR72ZL.js.map +1 -0
  47. package/dist/chunk-4GX5DBPW.js +108 -0
  48. package/dist/chunk-4GX5DBPW.js.map +1 -0
  49. package/dist/chunk-4K7JRPVX.js +108 -0
  50. package/dist/chunk-4K7JRPVX.js.map +1 -0
  51. package/dist/chunk-4LUXUY33.js +212 -0
  52. package/dist/chunk-4LUXUY33.js.map +1 -0
  53. package/dist/chunk-4PRRUA3K.js +212 -0
  54. package/dist/chunk-4PRRUA3K.js.map +1 -0
  55. package/dist/chunk-4VMXIEIU.js +63 -0
  56. package/dist/chunk-4VMXIEIU.js.map +1 -0
  57. package/dist/chunk-4VU6H4HE.js +141 -0
  58. package/dist/chunk-4VU6H4HE.js.map +1 -0
  59. package/dist/chunk-4WGHU5GK.js +211 -0
  60. package/dist/chunk-4WGHU5GK.js.map +1 -0
  61. package/dist/chunk-4XIFV7FM.js +212 -0
  62. package/dist/chunk-4XIFV7FM.js.map +1 -0
  63. package/dist/chunk-4ZV6PYNB.js +100 -0
  64. package/dist/chunk-4ZV6PYNB.js.map +1 -0
  65. package/dist/chunk-52AANUOT.js +108 -0
  66. package/dist/chunk-52AANUOT.js.map +1 -0
  67. package/dist/chunk-557Y4PWU.js +100 -0
  68. package/dist/chunk-557Y4PWU.js.map +1 -0
  69. package/dist/chunk-5HDGGTJ6.js +127 -0
  70. package/dist/chunk-5HDGGTJ6.js.map +1 -0
  71. package/dist/chunk-5IPKZP5U.js +108 -0
  72. package/dist/chunk-5IPKZP5U.js.map +1 -0
  73. package/dist/chunk-5KZCV745.js +213 -0
  74. package/dist/chunk-5KZCV745.js.map +1 -0
  75. package/dist/chunk-5N2JN63A.js +213 -0
  76. package/dist/chunk-5N2JN63A.js.map +1 -0
  77. package/dist/chunk-5NS2U723.js +108 -0
  78. package/dist/chunk-5NS2U723.js.map +1 -0
  79. package/dist/chunk-5TRFE737.js +127 -0
  80. package/dist/chunk-5TRFE737.js.map +1 -0
  81. package/dist/chunk-65X53DMW.js +47 -0
  82. package/dist/chunk-65X53DMW.js.map +1 -0
  83. package/dist/chunk-6DOIQYVP.js +223 -0
  84. package/dist/chunk-6DOIQYVP.js.map +1 -0
  85. package/dist/chunk-6IYWU6KW.js +141 -0
  86. package/dist/chunk-6IYWU6KW.js.map +1 -0
  87. package/dist/chunk-6MM34SOW.js +108 -0
  88. package/dist/chunk-6MM34SOW.js.map +1 -0
  89. package/dist/chunk-6R3YL2BS.js +211 -0
  90. package/dist/chunk-6R3YL2BS.js.map +1 -0
  91. package/dist/chunk-6U2DN3LG.js +141 -0
  92. package/dist/chunk-6U2DN3LG.js.map +1 -0
  93. package/dist/chunk-6VG6W7P4.js +126 -0
  94. package/dist/chunk-6VG6W7P4.js.map +1 -0
  95. package/dist/chunk-7CRUFCGX.js +211 -0
  96. package/dist/chunk-7CRUFCGX.js.map +1 -0
  97. package/dist/chunk-7HT2BVQG.js +127 -0
  98. package/dist/chunk-7HT2BVQG.js.map +1 -0
  99. package/dist/chunk-7JJQSXBV.js +141 -0
  100. package/dist/chunk-7JJQSXBV.js.map +1 -0
  101. package/dist/chunk-7NJ4VOJB.js +108 -0
  102. package/dist/chunk-7NJ4VOJB.js.map +1 -0
  103. package/dist/chunk-7OAWG2IZ.js +44 -0
  104. package/dist/chunk-7OAWG2IZ.js.map +1 -0
  105. package/dist/chunk-7QSEQLE4.js +212 -0
  106. package/dist/chunk-7QSEQLE4.js.map +1 -0
  107. package/dist/chunk-7S3BOXGS.js +212 -0
  108. package/dist/chunk-7S3BOXGS.js.map +1 -0
  109. package/dist/chunk-7SH3YCJ7.js +875 -0
  110. package/dist/chunk-7SH3YCJ7.js.map +1 -0
  111. package/dist/chunk-7Z3HADG2.js +141 -0
  112. package/dist/chunk-7Z3HADG2.js.map +1 -0
  113. package/dist/chunk-A7RMNSCW.js +250 -0
  114. package/dist/chunk-A7RMNSCW.js.map +1 -0
  115. package/dist/chunk-AAQMTCV5.js +875 -0
  116. package/dist/chunk-AAQMTCV5.js.map +1 -0
  117. package/dist/chunk-ABXVKRIH.js +63 -0
  118. package/dist/chunk-ABXVKRIH.js.map +1 -0
  119. package/dist/chunk-ACLZEBHM.js +251 -0
  120. package/dist/chunk-ACLZEBHM.js.map +1 -0
  121. package/dist/chunk-AEF5YUNM.js +212 -0
  122. package/dist/chunk-AEF5YUNM.js.map +1 -0
  123. package/dist/chunk-AHY4G53B.js +212 -0
  124. package/dist/chunk-AHY4G53B.js.map +1 -0
  125. package/dist/chunk-AIEBC7N6.js +211 -0
  126. package/dist/chunk-AIEBC7N6.js.map +1 -0
  127. package/dist/chunk-AMXXTGCE.js +143 -0
  128. package/dist/chunk-AMXXTGCE.js.map +1 -0
  129. package/dist/chunk-ANXMM5LH.js +2296 -0
  130. package/dist/chunk-ANXMM5LH.js.map +1 -0
  131. package/dist/chunk-ASADUYXC.js +141 -0
  132. package/dist/chunk-ASADUYXC.js.map +1 -0
  133. package/dist/chunk-BDSJ5P63.js +49 -0
  134. package/dist/chunk-BDSJ5P63.js.map +1 -0
  135. package/dist/chunk-BGTUC3AF.js +141 -0
  136. package/dist/chunk-BGTUC3AF.js.map +1 -0
  137. package/dist/chunk-BJ5IIEVM.js +141 -0
  138. package/dist/chunk-BJ5IIEVM.js.map +1 -0
  139. package/dist/chunk-BPRHSATO.js +127 -0
  140. package/dist/chunk-BPRHSATO.js.map +1 -0
  141. package/dist/chunk-BSSE7DI3.js +257 -0
  142. package/dist/chunk-BSSE7DI3.js.map +1 -0
  143. package/dist/chunk-C2TFELML.js +257 -0
  144. package/dist/chunk-C2TFELML.js.map +1 -0
  145. package/dist/chunk-CBLGPZ6N.js +108 -0
  146. package/dist/chunk-CBLGPZ6N.js.map +1 -0
  147. package/dist/chunk-CDRAINRR.js +143 -0
  148. package/dist/chunk-CDRAINRR.js.map +1 -0
  149. package/dist/chunk-CDYJDIZL.js +100 -0
  150. package/dist/chunk-CDYJDIZL.js.map +1 -0
  151. package/dist/chunk-CKLBKRDB.js +212 -0
  152. package/dist/chunk-CKLBKRDB.js.map +1 -0
  153. package/dist/chunk-CNBENNSA.js +141 -0
  154. package/dist/chunk-CNBENNSA.js.map +1 -0
  155. package/dist/chunk-CTAGQUXS.js +213 -0
  156. package/dist/chunk-CTAGQUXS.js.map +1 -0
  157. package/dist/chunk-CZNTYDII.js +141 -0
  158. package/dist/chunk-CZNTYDII.js.map +1 -0
  159. package/dist/chunk-D246WRFL.js +108 -0
  160. package/dist/chunk-D246WRFL.js.map +1 -0
  161. package/dist/chunk-D3CVJAPF.js +143 -0
  162. package/dist/chunk-D3CVJAPF.js.map +1 -0
  163. package/dist/chunk-DBEZZTKI.js +63 -0
  164. package/dist/chunk-DBEZZTKI.js.map +1 -0
  165. package/dist/chunk-DI4EC4C5.js +108 -0
  166. package/dist/chunk-DI4EC4C5.js.map +1 -0
  167. package/dist/chunk-DMYFV67U.js +108 -0
  168. package/dist/chunk-DMYFV67U.js.map +1 -0
  169. package/dist/chunk-DOTVUBGL.js +37 -0
  170. package/dist/chunk-DOTVUBGL.js.map +1 -0
  171. package/dist/chunk-DOYWQVTM.js +2296 -0
  172. package/dist/chunk-DOYWQVTM.js.map +1 -0
  173. package/dist/chunk-DPSCMWIB.js +49 -0
  174. package/dist/chunk-DPSCMWIB.js.map +1 -0
  175. package/dist/chunk-DRM4YQL3.js +108 -0
  176. package/dist/chunk-DRM4YQL3.js.map +1 -0
  177. package/dist/chunk-DVZP6PO3.js +257 -0
  178. package/dist/chunk-DVZP6PO3.js.map +1 -0
  179. package/dist/chunk-EE5JCC2N.js +3629 -0
  180. package/dist/chunk-EE5JCC2N.js.map +1 -0
  181. package/dist/chunk-EED2CWB3.js +141 -0
  182. package/dist/chunk-EED2CWB3.js.map +1 -0
  183. package/dist/chunk-EOMPNXYW.js +141 -0
  184. package/dist/chunk-EOMPNXYW.js.map +1 -0
  185. package/dist/chunk-ESE4IOXB.js +101 -0
  186. package/dist/chunk-ESE4IOXB.js.map +1 -0
  187. package/dist/chunk-EVCNR7M7.js +150 -0
  188. package/dist/chunk-EVCNR7M7.js.map +1 -0
  189. package/dist/chunk-EXVWVGQ3.js +108 -0
  190. package/dist/chunk-EXVWVGQ3.js.map +1 -0
  191. package/dist/chunk-EY4IMAYQ.js +108 -0
  192. package/dist/chunk-EY4IMAYQ.js.map +1 -0
  193. package/dist/chunk-F4H73EBR.js +2296 -0
  194. package/dist/chunk-F4H73EBR.js.map +1 -0
  195. package/dist/chunk-F5GW75SB.js +37 -0
  196. package/dist/chunk-F5GW75SB.js.map +1 -0
  197. package/dist/chunk-FB2DC3ZK.js +250 -0
  198. package/dist/chunk-FB2DC3ZK.js.map +1 -0
  199. package/dist/chunk-FF7ZGRIB.js +108 -0
  200. package/dist/chunk-FF7ZGRIB.js.map +1 -0
  201. package/dist/chunk-FGNBG722.js +108 -0
  202. package/dist/chunk-FGNBG722.js.map +1 -0
  203. package/dist/chunk-FJ4YMYZH.js +257 -0
  204. package/dist/chunk-FJ4YMYZH.js.map +1 -0
  205. package/dist/chunk-FJNLD4NH.js +150 -0
  206. package/dist/chunk-FJNLD4NH.js.map +1 -0
  207. package/dist/chunk-FLS3MUW7.js +252 -0
  208. package/dist/chunk-FLS3MUW7.js.map +1 -0
  209. package/dist/chunk-FPG5UDK3.js +212 -0
  210. package/dist/chunk-FPG5UDK3.js.map +1 -0
  211. package/dist/chunk-FPPTWXIF.js +108 -0
  212. package/dist/chunk-FPPTWXIF.js.map +1 -0
  213. package/dist/chunk-G5EM47DR.js +127 -0
  214. package/dist/chunk-G5EM47DR.js.map +1 -0
  215. package/dist/chunk-G6DGYERB.js +108 -0
  216. package/dist/chunk-G6DGYERB.js.map +1 -0
  217. package/dist/chunk-GFXXZQRQ.js +150 -0
  218. package/dist/chunk-GFXXZQRQ.js.map +1 -0
  219. package/dist/chunk-GIG7IMSP.js +141 -0
  220. package/dist/chunk-GIG7IMSP.js.map +1 -0
  221. package/dist/chunk-GSJZA53J.js +213 -0
  222. package/dist/chunk-GSJZA53J.js.map +1 -0
  223. package/dist/chunk-GUCQ4F2G.js +49 -0
  224. package/dist/chunk-GUCQ4F2G.js.map +1 -0
  225. package/dist/chunk-GX6VTQVX.js +211 -0
  226. package/dist/chunk-GX6VTQVX.js.map +1 -0
  227. package/dist/chunk-GZNIZX63.js +108 -0
  228. package/dist/chunk-GZNIZX63.js.map +1 -0
  229. package/dist/chunk-H4SQSFJ7.js +63 -0
  230. package/dist/chunk-H4SQSFJ7.js.map +1 -0
  231. package/dist/chunk-HFFYGGBO.js +252 -0
  232. package/dist/chunk-HFFYGGBO.js.map +1 -0
  233. package/dist/chunk-HGM2CICP.js +212 -0
  234. package/dist/chunk-HGM2CICP.js.map +1 -0
  235. package/dist/chunk-HLR7FF2K.js +211 -0
  236. package/dist/chunk-HLR7FF2K.js.map +1 -0
  237. package/dist/chunk-HP3DEVBA.js +141 -0
  238. package/dist/chunk-HP3DEVBA.js.map +1 -0
  239. package/dist/chunk-HTAWLIFJ.js +3629 -0
  240. package/dist/chunk-HTAWLIFJ.js.map +1 -0
  241. package/dist/chunk-HTZUI3AR.js +212 -0
  242. package/dist/chunk-HTZUI3AR.js.map +1 -0
  243. package/dist/chunk-HZGDXEM3.js +63 -0
  244. package/dist/chunk-HZGDXEM3.js.map +1 -0
  245. package/dist/chunk-ICBCEIZZ.js +212 -0
  246. package/dist/chunk-ICBCEIZZ.js.map +1 -0
  247. package/dist/chunk-IEJJYHZZ.js +108 -0
  248. package/dist/chunk-IEJJYHZZ.js.map +1 -0
  249. package/dist/chunk-IEXGTZFG.js +37 -0
  250. package/dist/chunk-IEXGTZFG.js.map +1 -0
  251. package/dist/chunk-ILJFYWLB.js +353 -0
  252. package/dist/chunk-ILJFYWLB.js.map +1 -0
  253. package/dist/chunk-IM3YUUBE.js +257 -0
  254. package/dist/chunk-IM3YUUBE.js.map +1 -0
  255. package/dist/chunk-IODNITVN.js +127 -0
  256. package/dist/chunk-IODNITVN.js.map +1 -0
  257. package/dist/chunk-IRJC5VRG.js +212 -0
  258. package/dist/chunk-IRJC5VRG.js.map +1 -0
  259. package/dist/chunk-ISLACP6M.js +63 -0
  260. package/dist/chunk-ISLACP6M.js.map +1 -0
  261. package/dist/chunk-ITM2OXYW.js +143 -0
  262. package/dist/chunk-ITM2OXYW.js.map +1 -0
  263. package/dist/chunk-IWOZXJJF.js +108 -0
  264. package/dist/chunk-IWOZXJJF.js.map +1 -0
  265. package/dist/chunk-IZG7VX7U.js +3629 -0
  266. package/dist/chunk-IZG7VX7U.js.map +1 -0
  267. package/dist/chunk-IZPKXC5T.js +108 -0
  268. package/dist/chunk-IZPKXC5T.js.map +1 -0
  269. package/dist/chunk-J77O43SY.js +263 -0
  270. package/dist/chunk-J77O43SY.js.map +1 -0
  271. package/dist/chunk-JDIUA4L5.js +141 -0
  272. package/dist/chunk-JDIUA4L5.js.map +1 -0
  273. package/dist/chunk-JFXEBKE5.js +141 -0
  274. package/dist/chunk-JFXEBKE5.js.map +1 -0
  275. package/dist/chunk-JKFK7BHM.js +108 -0
  276. package/dist/chunk-JKFK7BHM.js.map +1 -0
  277. package/dist/chunk-JLDIEGDJ.js +38 -0
  278. package/dist/chunk-JLDIEGDJ.js.map +1 -0
  279. package/dist/chunk-JO5SBPNS.js +109 -0
  280. package/dist/chunk-JO5SBPNS.js.map +1 -0
  281. package/dist/chunk-JOQA6SDG.js +38 -0
  282. package/dist/chunk-JOQA6SDG.js.map +1 -0
  283. package/dist/chunk-JUKLHM7G.js +108 -0
  284. package/dist/chunk-JUKLHM7G.js.map +1 -0
  285. package/dist/chunk-K7DXQUWY.js +141 -0
  286. package/dist/chunk-K7DXQUWY.js.map +1 -0
  287. package/dist/chunk-KBVUDACJ.js +212 -0
  288. package/dist/chunk-KBVUDACJ.js.map +1 -0
  289. package/dist/chunk-KC2DY22D.js +141 -0
  290. package/dist/chunk-KC2DY22D.js.map +1 -0
  291. package/dist/chunk-KDYHX27X.js +108 -0
  292. package/dist/chunk-KDYHX27X.js.map +1 -0
  293. package/dist/chunk-KGJUIHQK.js +127 -0
  294. package/dist/chunk-KGJUIHQK.js.map +1 -0
  295. package/dist/chunk-KIKGZIYW.js +63 -0
  296. package/dist/chunk-KIKGZIYW.js.map +1 -0
  297. package/dist/chunk-KJU5OLS3.js +150 -0
  298. package/dist/chunk-KJU5OLS3.js.map +1 -0
  299. package/dist/chunk-KM2ZAN4M.js +257 -0
  300. package/dist/chunk-KM2ZAN4M.js.map +1 -0
  301. package/dist/chunk-KY2ZDGIF.js +141 -0
  302. package/dist/chunk-KY2ZDGIF.js.map +1 -0
  303. package/dist/chunk-KYCICVKS.js +141 -0
  304. package/dist/chunk-KYCICVKS.js.map +1 -0
  305. package/dist/chunk-KZZPBI6J.js +108 -0
  306. package/dist/chunk-KZZPBI6J.js.map +1 -0
  307. package/dist/chunk-L5CUEXS7.js +108 -0
  308. package/dist/chunk-L5CUEXS7.js.map +1 -0
  309. package/dist/chunk-L6SPTHRK.js +63 -0
  310. package/dist/chunk-L6SPTHRK.js.map +1 -0
  311. package/dist/chunk-L7CPEX5Q.js +212 -0
  312. package/dist/chunk-L7CPEX5Q.js.map +1 -0
  313. package/dist/chunk-L7LRX5XU.js +2296 -0
  314. package/dist/chunk-L7LRX5XU.js.map +1 -0
  315. package/dist/chunk-LKVGVLCW.js +844 -0
  316. package/dist/chunk-LKVGVLCW.js.map +1 -0
  317. package/dist/chunk-LQYA5NK2.js +108 -0
  318. package/dist/chunk-LQYA5NK2.js.map +1 -0
  319. package/dist/chunk-M2YX7FI7.js +141 -0
  320. package/dist/chunk-M2YX7FI7.js.map +1 -0
  321. package/dist/chunk-M2ZETO4K.js +127 -0
  322. package/dist/chunk-M2ZETO4K.js.map +1 -0
  323. package/dist/chunk-M6MAOPX3.js +108 -0
  324. package/dist/chunk-M6MAOPX3.js.map +1 -0
  325. package/dist/chunk-M7IWXN2K.js +211 -0
  326. package/dist/chunk-M7IWXN2K.js.map +1 -0
  327. package/dist/chunk-MEOSGIZR.js +127 -0
  328. package/dist/chunk-MEOSGIZR.js.map +1 -0
  329. package/dist/chunk-MFUFGYIO.js +127 -0
  330. package/dist/chunk-MFUFGYIO.js.map +1 -0
  331. package/dist/chunk-MRTDMFMC.js +257 -0
  332. package/dist/chunk-MRTDMFMC.js.map +1 -0
  333. package/dist/chunk-MRUU7EZF.js +212 -0
  334. package/dist/chunk-MRUU7EZF.js.map +1 -0
  335. package/dist/chunk-MV35VQI2.js +37 -0
  336. package/dist/chunk-MV35VQI2.js.map +1 -0
  337. package/dist/chunk-MWUMNQPB.js +63 -0
  338. package/dist/chunk-MWUMNQPB.js.map +1 -0
  339. package/dist/chunk-MZXB5IJP.js +141 -0
  340. package/dist/chunk-MZXB5IJP.js.map +1 -0
  341. package/dist/chunk-N4GMCDSM.js +224 -0
  342. package/dist/chunk-N4GMCDSM.js.map +1 -0
  343. package/dist/chunk-NB7U63VS.js +141 -0
  344. package/dist/chunk-NB7U63VS.js.map +1 -0
  345. package/dist/chunk-NF5DG7TF.js +3629 -0
  346. package/dist/chunk-NF5DG7TF.js.map +1 -0
  347. package/dist/chunk-NGAB4S4A.js +63 -0
  348. package/dist/chunk-NGAB4S4A.js.map +1 -0
  349. package/dist/chunk-NJ3KYZJZ.js +141 -0
  350. package/dist/chunk-NJ3KYZJZ.js.map +1 -0
  351. package/dist/chunk-NPOOQ65V.js +127 -0
  352. package/dist/chunk-NPOOQ65V.js.map +1 -0
  353. package/dist/chunk-NQNVZ2Y2.js +127 -0
  354. package/dist/chunk-NQNVZ2Y2.js.map +1 -0
  355. package/dist/chunk-NRTH44GV.js +63 -0
  356. package/dist/chunk-NRTH44GV.js.map +1 -0
  357. package/dist/chunk-NSN2ONFI.js +212 -0
  358. package/dist/chunk-NSN2ONFI.js.map +1 -0
  359. package/dist/chunk-NW5PDW5B.js +143 -0
  360. package/dist/chunk-NW5PDW5B.js.map +1 -0
  361. package/dist/chunk-NZFOINXV.js +212 -0
  362. package/dist/chunk-NZFOINXV.js.map +1 -0
  363. package/dist/chunk-O4IEY4EN.js +876 -0
  364. package/dist/chunk-O4IEY4EN.js.map +1 -0
  365. package/dist/chunk-O6RHDLE7.js +141 -0
  366. package/dist/chunk-O6RHDLE7.js.map +1 -0
  367. package/dist/chunk-OGSXDW7D.js +108 -0
  368. package/dist/chunk-OGSXDW7D.js.map +1 -0
  369. package/dist/chunk-OHYGCU53.js +141 -0
  370. package/dist/chunk-OHYGCU53.js.map +1 -0
  371. package/dist/chunk-OLV63UML.js +127 -0
  372. package/dist/chunk-OLV63UML.js.map +1 -0
  373. package/dist/chunk-ORR54EIG.js +212 -0
  374. package/dist/chunk-ORR54EIG.js.map +1 -0
  375. package/dist/chunk-OUK5KBFP.js +129 -0
  376. package/dist/chunk-OUK5KBFP.js.map +1 -0
  377. package/dist/chunk-OWG2UJNF.js +150 -0
  378. package/dist/chunk-OWG2UJNF.js.map +1 -0
  379. package/dist/chunk-OXSSHXEW.js +875 -0
  380. package/dist/chunk-OXSSHXEW.js.map +1 -0
  381. package/dist/chunk-P53JJSIX.js +212 -0
  382. package/dist/chunk-P53JJSIX.js.map +1 -0
  383. package/dist/chunk-PJOGAA4H.js +141 -0
  384. package/dist/chunk-PJOGAA4H.js.map +1 -0
  385. package/dist/chunk-PTADNY4J.js +212 -0
  386. package/dist/chunk-PTADNY4J.js.map +1 -0
  387. package/dist/chunk-Q3VVCDVP.js +127 -0
  388. package/dist/chunk-Q3VVCDVP.js.map +1 -0
  389. package/dist/chunk-QF5ASUBG.js +3629 -0
  390. package/dist/chunk-QF5ASUBG.js.map +1 -0
  391. package/dist/chunk-QFZXB4CD.js +108 -0
  392. package/dist/chunk-QFZXB4CD.js.map +1 -0
  393. package/dist/chunk-QJN22YYL.js +128 -0
  394. package/dist/chunk-QJN22YYL.js.map +1 -0
  395. package/dist/chunk-QKA7H4EX.js +37 -0
  396. package/dist/chunk-QKA7H4EX.js.map +1 -0
  397. package/dist/chunk-QKQG47IV.js +82 -0
  398. package/dist/chunk-QKQG47IV.js.map +1 -0
  399. package/dist/chunk-QMBWCVMY.js +108 -0
  400. package/dist/chunk-QMBWCVMY.js.map +1 -0
  401. package/dist/chunk-QS2I4PG7.js +212 -0
  402. package/dist/chunk-QS2I4PG7.js.map +1 -0
  403. package/dist/chunk-QTN7QLML.js +63 -0
  404. package/dist/chunk-QTN7QLML.js.map +1 -0
  405. package/dist/chunk-QYKEGDLO.js +224 -0
  406. package/dist/chunk-QYKEGDLO.js.map +1 -0
  407. package/dist/chunk-RDJOMUZH.js +211 -0
  408. package/dist/chunk-RDJOMUZH.js.map +1 -0
  409. package/dist/chunk-RGPLJJ2Y.js +141 -0
  410. package/dist/chunk-RGPLJJ2Y.js.map +1 -0
  411. package/dist/chunk-RJTRSA4P.js +49 -0
  412. package/dist/chunk-RJTRSA4P.js.map +1 -0
  413. package/dist/chunk-RQXQFLB4.js +63 -0
  414. package/dist/chunk-RQXQFLB4.js.map +1 -0
  415. package/dist/chunk-RS3YOF5F.js +108 -0
  416. package/dist/chunk-RS3YOF5F.js.map +1 -0
  417. package/dist/chunk-RTUI55OW.js +212 -0
  418. package/dist/chunk-RTUI55OW.js.map +1 -0
  419. package/dist/chunk-RVARUZVC.js +27 -0
  420. package/dist/chunk-RVARUZVC.js.map +1 -0
  421. package/dist/chunk-RVFAWL3I.js +141 -0
  422. package/dist/chunk-RVFAWL3I.js.map +1 -0
  423. package/dist/chunk-RYKWAX5X.js +63 -0
  424. package/dist/chunk-RYKWAX5X.js.map +1 -0
  425. package/dist/chunk-S5CR7IEA.js +2296 -0
  426. package/dist/chunk-S5CR7IEA.js.map +1 -0
  427. package/dist/chunk-S6N5P5OD.js +212 -0
  428. package/dist/chunk-S6N5P5OD.js.map +1 -0
  429. package/dist/chunk-SA2LSZDP.js +252 -0
  430. package/dist/chunk-SA2LSZDP.js.map +1 -0
  431. package/dist/chunk-SGICH6RI.js +213 -0
  432. package/dist/chunk-SGICH6RI.js.map +1 -0
  433. package/dist/chunk-SIX7XLAC.js +49 -0
  434. package/dist/chunk-SIX7XLAC.js.map +1 -0
  435. package/dist/chunk-SIZI2YWP.js +212 -0
  436. package/dist/chunk-SIZI2YWP.js.map +1 -0
  437. package/dist/chunk-SKRS6PSA.js +141 -0
  438. package/dist/chunk-SKRS6PSA.js.map +1 -0
  439. package/dist/chunk-SLWMHHRZ.js +141 -0
  440. package/dist/chunk-SLWMHHRZ.js.map +1 -0
  441. package/dist/chunk-SSOJ2LOM.js +141 -0
  442. package/dist/chunk-SSOJ2LOM.js.map +1 -0
  443. package/dist/chunk-SVU7AMXV.js +141 -0
  444. package/dist/chunk-SVU7AMXV.js.map +1 -0
  445. package/dist/chunk-THZXOHDJ.js +141 -0
  446. package/dist/chunk-THZXOHDJ.js.map +1 -0
  447. package/dist/chunk-TLC6WXQ6.js +37 -0
  448. package/dist/chunk-TLC6WXQ6.js.map +1 -0
  449. package/dist/chunk-TOTKLZTZ.js +49 -0
  450. package/dist/chunk-TOTKLZTZ.js.map +1 -0
  451. package/dist/chunk-TSAG437R.js +49 -0
  452. package/dist/chunk-TSAG437R.js.map +1 -0
  453. package/dist/chunk-TTEMP3QU.js +108 -0
  454. package/dist/chunk-TTEMP3QU.js.map +1 -0
  455. package/dist/chunk-TXNXFHTS.js +63 -0
  456. package/dist/chunk-TXNXFHTS.js.map +1 -0
  457. package/dist/chunk-U7OZK37L.js +63 -0
  458. package/dist/chunk-U7OZK37L.js.map +1 -0
  459. package/dist/chunk-UB7MM3A3.js +108 -0
  460. package/dist/chunk-UB7MM3A3.js.map +1 -0
  461. package/dist/chunk-UBBJF27D.js +127 -0
  462. package/dist/chunk-UBBJF27D.js.map +1 -0
  463. package/dist/chunk-UF4HNAIE.js +108 -0
  464. package/dist/chunk-UF4HNAIE.js.map +1 -0
  465. package/dist/chunk-UF7UWXSC.js +127 -0
  466. package/dist/chunk-UF7UWXSC.js.map +1 -0
  467. package/dist/chunk-UHLTNS5S.js +2296 -0
  468. package/dist/chunk-UHLTNS5S.js.map +1 -0
  469. package/dist/chunk-ULTQZ5FS.js +63 -0
  470. package/dist/chunk-ULTQZ5FS.js.map +1 -0
  471. package/dist/chunk-URVGL7OD.js +2296 -0
  472. package/dist/chunk-URVGL7OD.js.map +1 -0
  473. package/dist/chunk-USQFD6IR.js +63 -0
  474. package/dist/chunk-USQFD6IR.js.map +1 -0
  475. package/dist/chunk-UVPSXDVG.js +100 -0
  476. package/dist/chunk-UVPSXDVG.js.map +1 -0
  477. package/dist/chunk-UVURDTXJ.js +212 -0
  478. package/dist/chunk-UVURDTXJ.js.map +1 -0
  479. package/dist/chunk-V2QIYGY7.js +127 -0
  480. package/dist/chunk-V2QIYGY7.js.map +1 -0
  481. package/dist/chunk-VCE2DP4V.js +100 -0
  482. package/dist/chunk-VCE2DP4V.js.map +1 -0
  483. package/dist/chunk-VGCTU7HB.js +127 -0
  484. package/dist/chunk-VGCTU7HB.js.map +1 -0
  485. package/dist/chunk-VR7OODCZ.js +150 -0
  486. package/dist/chunk-VR7OODCZ.js.map +1 -0
  487. package/dist/chunk-VVJ7Z3KU.js +143 -0
  488. package/dist/chunk-VVJ7Z3KU.js.map +1 -0
  489. package/dist/chunk-VVVHFBW7.js +127 -0
  490. package/dist/chunk-VVVHFBW7.js.map +1 -0
  491. package/dist/chunk-VXOIIFIY.js +37 -0
  492. package/dist/chunk-VXOIIFIY.js.map +1 -0
  493. package/dist/chunk-W3A6JEOD.js +224 -0
  494. package/dist/chunk-W3A6JEOD.js.map +1 -0
  495. package/dist/chunk-W4BQSWJN.js +212 -0
  496. package/dist/chunk-W4BQSWJN.js.map +1 -0
  497. package/dist/chunk-WJK2VUHR.js +65 -0
  498. package/dist/chunk-WJK2VUHR.js.map +1 -0
  499. package/dist/chunk-WPBZEYKB.js +212 -0
  500. package/dist/chunk-WPBZEYKB.js.map +1 -0
  501. package/dist/chunk-WV2RUP2Y.js +141 -0
  502. package/dist/chunk-WV2RUP2Y.js.map +1 -0
  503. package/dist/chunk-WXVV7KLP.js +127 -0
  504. package/dist/chunk-WXVV7KLP.js.map +1 -0
  505. package/dist/chunk-X3BV2HV3.js +212 -0
  506. package/dist/chunk-X3BV2HV3.js.map +1 -0
  507. package/dist/chunk-X6E5Y3LR.js +141 -0
  508. package/dist/chunk-X6E5Y3LR.js.map +1 -0
  509. package/dist/chunk-X6FBYNQG.js +108 -0
  510. package/dist/chunk-X6FBYNQG.js.map +1 -0
  511. package/dist/chunk-X73K44QV.js +49 -0
  512. package/dist/chunk-X73K44QV.js.map +1 -0
  513. package/dist/chunk-XC4OHJZG.js +250 -0
  514. package/dist/chunk-XC4OHJZG.js.map +1 -0
  515. package/dist/chunk-XDDZHBM4.js +101 -0
  516. package/dist/chunk-XDDZHBM4.js.map +1 -0
  517. package/dist/chunk-XEPPP6D4.js +252 -0
  518. package/dist/chunk-XEPPP6D4.js.map +1 -0
  519. package/dist/chunk-XG6O7CXO.js +141 -0
  520. package/dist/chunk-XG6O7CXO.js.map +1 -0
  521. package/dist/chunk-XN5HKZNZ.js +63 -0
  522. package/dist/chunk-XN5HKZNZ.js.map +1 -0
  523. package/dist/chunk-XPL5VFRD.js +224 -0
  524. package/dist/chunk-XPL5VFRD.js.map +1 -0
  525. package/dist/chunk-XSIVI53W.js +212 -0
  526. package/dist/chunk-XSIVI53W.js.map +1 -0
  527. package/dist/chunk-XU42NMC2.js +37 -0
  528. package/dist/chunk-XU42NMC2.js.map +1 -0
  529. package/dist/chunk-XWKRVTOF.js +141 -0
  530. package/dist/chunk-XWKRVTOF.js.map +1 -0
  531. package/dist/chunk-XWZ4TDO5.js +108 -0
  532. package/dist/chunk-XWZ4TDO5.js.map +1 -0
  533. package/dist/chunk-XX4L6GVN.js +63 -0
  534. package/dist/chunk-XX4L6GVN.js.map +1 -0
  535. package/dist/chunk-XXGZMUVM.js +63 -0
  536. package/dist/chunk-XXGZMUVM.js.map +1 -0
  537. package/dist/chunk-Y4HM4Z3B.js +108 -0
  538. package/dist/chunk-Y4HM4Z3B.js.map +1 -0
  539. package/dist/chunk-Y5QJD3KW.js +108 -0
  540. package/dist/chunk-Y5QJD3KW.js.map +1 -0
  541. package/dist/chunk-YNFLM23N.js +108 -0
  542. package/dist/chunk-YNFLM23N.js.map +1 -0
  543. package/dist/chunk-YPRAHGPU.js +150 -0
  544. package/dist/chunk-YPRAHGPU.js.map +1 -0
  545. package/dist/chunk-YURQ7MSJ.js +108 -0
  546. package/dist/chunk-YURQ7MSJ.js.map +1 -0
  547. package/dist/chunk-YVSUXU5I.js +141 -0
  548. package/dist/chunk-YVSUXU5I.js.map +1 -0
  549. package/dist/chunk-YXEH4FU4.js +141 -0
  550. package/dist/chunk-YXEH4FU4.js.map +1 -0
  551. package/dist/chunk-Z4Q3W7CZ.js +868 -0
  552. package/dist/chunk-Z4Q3W7CZ.js.map +1 -0
  553. package/dist/chunk-ZAKHKJLN.js +65 -0
  554. package/dist/chunk-ZAKHKJLN.js.map +1 -0
  555. package/dist/chunk-ZE2A3A2S.js +224 -0
  556. package/dist/chunk-ZE2A3A2S.js.map +1 -0
  557. package/dist/chunk-ZFHH2EIQ.js +126 -0
  558. package/dist/chunk-ZFHH2EIQ.js.map +1 -0
  559. package/dist/chunk-ZL4VSCCE.js +224 -0
  560. package/dist/chunk-ZL4VSCCE.js.map +1 -0
  561. package/dist/chunk-ZN3N7CZK.js +141 -0
  562. package/dist/chunk-ZN3N7CZK.js.map +1 -0
  563. package/dist/chunk-ZOZ75ANX.js +2296 -0
  564. package/dist/chunk-ZOZ75ANX.js.map +1 -0
  565. package/dist/chunk-ZPSNQP7M.js +141 -0
  566. package/dist/chunk-ZPSNQP7M.js.map +1 -0
  567. package/dist/chunk-ZW4AXQU4.js +141 -0
  568. package/dist/chunk-ZW4AXQU4.js.map +1 -0
  569. package/dist/chunk-ZX3CUM6K.js +212 -0
  570. package/dist/chunk-ZX3CUM6K.js.map +1 -0
  571. package/dist/components/AddressContainer/CoreAddressContainer.js +11 -11
  572. package/dist/components/AddressContainer/EVMAddressContainer.js +9 -9
  573. package/dist/components/AddressContainer/addressSwitcher.js +7 -7
  574. package/dist/components/AddressContainer/addressView.js +6 -6
  575. package/dist/components/AddressContainer/label.js +3 -3
  576. package/dist/components/Charts/PreviewChartTemplate.js +2 -2
  577. package/dist/components/Charts/StockChartTemplate.js +2 -2
  578. package/dist/components/CopyButton/index.js +2 -2
  579. package/dist/components/CountDown/index.js +3 -3
  580. package/dist/components/DownloadCSV/index.js +3 -3
  581. package/dist/components/GasPriceDropdown/index.d.ts +5 -2
  582. package/dist/components/GasPriceDropdown/index.js +9 -7
  583. package/dist/components/GasPriceDropdown/index.js.map +1 -1
  584. package/dist/components/IncreasePercent/Icons.d.ts +6 -0
  585. package/dist/components/IncreasePercent/Icons.js +9 -0
  586. package/dist/components/IncreasePercent/Icons.js.map +1 -0
  587. package/dist/components/IncreasePercent/index.d.ts +20 -0
  588. package/dist/components/IncreasePercent/index.js +42 -0
  589. package/dist/components/IncreasePercent/index.js.map +1 -0
  590. package/dist/components/InfoIconWithTooltip/index.js +2 -2
  591. package/dist/components/Modal/index.js +2 -2
  592. package/dist/components/Price/index.js +2 -2
  593. package/dist/components/Select/index.js +2 -2
  594. package/dist/components/Select/select.js +2 -2
  595. package/dist/components/Text/index.js +3 -3
  596. package/dist/components/Tooltip/index.js +2 -2
  597. package/dist/components/TransactionAction/coreTransactionAction.js +11 -11
  598. package/dist/components/TransactionAction/evmTransactionAction.js +10 -10
  599. package/dist/utils/address.d.ts +23 -20
  600. package/dist/utils/address.js +7 -3
  601. package/dist/utils/hooks/useENS.js +5 -5
  602. package/dist/utils/index.d.ts +1 -1
  603. package/dist/utils/index.js +1 -1
  604. package/dist/utils/request.js +2 -2
  605. package/dist/utils/rpcRequest.js +2 -2
  606. package/package.json +1 -1
@@ -0,0 +1,143 @@
1
+ import {
2
+ publishRequestError
3
+ } from "./chunk-O4IEY4EN.js";
4
+
5
+ // src/utils/request.ts
6
+ import qs from "qs";
7
+ var TIMEOUT_TIMESTAMP = 6e4;
8
+ var checkStatus = (response) => {
9
+ if (response.status >= 200 && response.status < 300 || response.status === 600) {
10
+ return response;
11
+ } else {
12
+ const error = new Error(response.statusText);
13
+ error.name = "HttpError";
14
+ error.status = response.status;
15
+ error.response = response;
16
+ throw error;
17
+ }
18
+ };
19
+ var parseJSON = async (response) => {
20
+ const contentType = response.headers.get("content-type");
21
+ if (contentType && contentType.includes("application/json")) {
22
+ return response.json();
23
+ } else {
24
+ return response;
25
+ }
26
+ };
27
+ var fetchWithAbort = (url, options = {}) => {
28
+ const controller = new AbortController();
29
+ const opts = { ...options, signal: controller.signal };
30
+ const timeout = options.timeout || TIMEOUT_TIMESTAMP;
31
+ let timeoutId;
32
+ const promise = new Promise((resolve, reject) => {
33
+ timeoutId = setTimeout(() => {
34
+ controller.abort();
35
+ publishRequestError(
36
+ { url, code: 408, message: "Request timeout" },
37
+ "http"
38
+ );
39
+ reject(new Error("Request timeout"));
40
+ }, timeout);
41
+ window.fetch(url, opts).then(checkStatus).then(parseJSON).then((data) => resolve(data)).catch((error) => {
42
+ if (error.name === "AbortError") {
43
+ publishRequestError(
44
+ { url, code: 0, message: "Fetch aborted" },
45
+ "http"
46
+ );
47
+ reject(new Error("Fetch aborted"));
48
+ } else {
49
+ publishRequestError(
50
+ { url, code: error.status, message: error.message },
51
+ "http"
52
+ );
53
+ reject(error);
54
+ }
55
+ }).finally(() => clearTimeout(timeoutId));
56
+ });
57
+ return {
58
+ promise,
59
+ abort: () => {
60
+ clearTimeout(timeoutId);
61
+ controller.abort();
62
+ }
63
+ };
64
+ };
65
+ var fetch = (url, options = {}) => {
66
+ const { promise } = fetchWithAbort(url, options);
67
+ return promise;
68
+ };
69
+ var compatibleResult = (res) => {
70
+ return res.data || res.result || {};
71
+ };
72
+ var queryAddress = (address) => {
73
+ return address.reduce((prev, curr, index) => {
74
+ return !index ? `address=${curr}` : `${prev}&address=${curr}`;
75
+ }, "");
76
+ };
77
+ var sendRequestChart = async (config) => {
78
+ try {
79
+ const res = await fetch(
80
+ `${config.url}?${qs.stringify(config.query)}`,
81
+ {
82
+ method: config.type || "GET",
83
+ body: config.body,
84
+ headers: config.headers,
85
+ signal: config.signal
86
+ }
87
+ );
88
+ const data = compatibleResult(res);
89
+ data.list = [...data.list || []].reverse();
90
+ return data;
91
+ } catch (error) {
92
+ console.error("Request failed", error);
93
+ throw error;
94
+ }
95
+ };
96
+ var sendRequestENSInfo = async (url) => {
97
+ if (!url)
98
+ return {};
99
+ try {
100
+ const res = await fetch(url, {
101
+ method: "GET"
102
+ });
103
+ return compatibleResult(res)?.map;
104
+ } catch (error) {
105
+ console.error("Request failed", error);
106
+ throw error;
107
+ }
108
+ };
109
+ var sendRequestGasPrice = async () => {
110
+ try {
111
+ const res = await fetch(`/stat/gasprice/tracker`, {
112
+ method: "GET"
113
+ });
114
+ return compatibleResult(res);
115
+ } catch (error) {
116
+ console.error("Request failed", error);
117
+ throw error;
118
+ }
119
+ };
120
+ var reqNametag = async (address) => {
121
+ const query = queryAddress(address);
122
+ const res = await fetch(`/v1/nametag?${query}`, {
123
+ method: "GET"
124
+ });
125
+ return compatibleResult(res)?.map;
126
+ };
127
+ var reqContractAndToken = async (address) => {
128
+ const query = queryAddress(address);
129
+ const res = await fetch(`/v1/contract-and-token?${query}`, {
130
+ method: "GET"
131
+ });
132
+ return compatibleResult(res)?.map;
133
+ };
134
+
135
+ export {
136
+ fetch,
137
+ sendRequestChart,
138
+ sendRequestENSInfo,
139
+ sendRequestGasPrice,
140
+ reqNametag,
141
+ reqContractAndToken
142
+ };
143
+ //# sourceMappingURL=chunk-CDRAINRR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/request.ts"],"sourcesContent":["import qs from 'qs';\nimport { publishRequestError } from './index';\n\ninterface FetchWithAbortType<T> {\n promise: Promise<T>;\n abort: () => void;\n}\n\ninterface FetchOptions extends RequestInit {\n timeout?: number;\n}\n\nconst TIMEOUT_TIMESTAMP = 60000;\n\nconst checkStatus = (response: Response) => {\n if (\n (response.status >= 200 && response.status < 300) ||\n response.status === 600\n ) {\n return response;\n } else {\n const error = new Error(response.statusText);\n error.name = 'HttpError';\n (error as any).status = response.status;\n (error as any).response = response;\n throw error;\n }\n};\n\nconst parseJSON = async (response: Response) => {\n const contentType = response.headers.get('content-type');\n if (contentType && contentType.includes('application/json')) {\n return response.json();\n } else {\n return response;\n }\n};\n\nconst fetchWithAbort = <T>(\n url: string,\n options: FetchOptions = {},\n): FetchWithAbortType<T> => {\n const controller = new AbortController();\n const opts: FetchOptions = { ...options, signal: controller.signal };\n const timeout = options.timeout || TIMEOUT_TIMESTAMP;\n\n let timeoutId: ReturnType<typeof setTimeout>;\n const promise: Promise<T> = new Promise((resolve, reject) => {\n timeoutId = setTimeout(() => {\n controller.abort();\n publishRequestError(\n { url, code: 408, message: 'Request timeout' },\n 'http',\n );\n reject(new Error('Request timeout'));\n }, timeout);\n\n window\n .fetch(url, opts)\n .then(checkStatus)\n .then(parseJSON)\n .then(data => resolve(data as T))\n .catch(error => {\n if (error.name === 'AbortError') {\n publishRequestError(\n { url, code: 0, message: 'Fetch aborted' },\n 'http',\n );\n reject(new Error('Fetch aborted'));\n } else {\n publishRequestError(\n { url, code: (error as any).status, message: error.message },\n 'http',\n );\n reject(error);\n }\n })\n .finally(() => clearTimeout(timeoutId));\n });\n\n return {\n promise,\n abort: () => {\n clearTimeout(timeoutId);\n controller.abort();\n },\n };\n};\n\nexport const fetch = <T>(\n url: string,\n options: FetchOptions = {},\n): Promise<T> => {\n const { promise } = fetchWithAbort<T>(url, options);\n return promise;\n};\n\ntype RequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD';\ninterface QueryParams {\n [key: string]: string;\n}\ninterface Config {\n url: string;\n query: QueryParams;\n type?: RequestMethod;\n body?: any;\n headers?: Headers;\n signal?: AbortSignal;\n}\n\ninterface CustomResponse {\n code: number;\n data: any;\n result: any;\n message: string;\n status: string;\n}\n\nconst compatibleResult = (res: CustomResponse) => {\n return res.data || res.result || {};\n};\n\nconst queryAddress = (address: string[]) => {\n return address.reduce((prev, curr, index) => {\n return !index ? `address=${curr}` : `${prev}&address=${curr}`;\n }, '');\n};\n\nexport const sendRequestChart = async (config: Config) => {\n try {\n const res: CustomResponse = await fetch(\n `${config.url}?${qs.stringify(config.query)}`,\n {\n method: config.type || 'GET',\n body: config.body,\n headers: config.headers,\n signal: config.signal,\n },\n );\n const data = compatibleResult(res);\n data.list = [...(data.list || [])].reverse();\n return data;\n } catch (error) {\n console.error('Request failed', error);\n throw error;\n }\n};\n\nexport const sendRequestENSInfo = async (url?: string | null) => {\n if (!url) return {};\n try {\n const res: CustomResponse = await fetch(url, {\n method: 'GET',\n });\n\n return compatibleResult(res)?.map;\n } catch (error) {\n console.error('Request failed', error);\n throw error;\n }\n};\n\nexport const sendRequestGasPrice = async () => {\n try {\n const res: CustomResponse = await fetch(`/stat/gasprice/tracker`, {\n method: 'GET',\n });\n return compatibleResult(res);\n } catch (error) {\n console.error('Request failed', error);\n throw error;\n }\n};\n\nexport const reqNametag = async (address: string[]) => {\n const query = queryAddress(address);\n\n const res: CustomResponse = await fetch(`/v1/nametag?${query}`, {\n method: 'GET',\n });\n return compatibleResult(res)?.map;\n};\n\nexport const reqContractAndToken = async (address: string[]) => {\n const query = queryAddress(address);\n\n const res: CustomResponse = await fetch(`/v1/contract-and-token?${query}`, {\n method: 'GET',\n });\n return compatibleResult(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M,KAAK;AAAA,MAC3C,QAAQ;AAAA,IACV,CAAC;AAED,WAAO,iBAAiB,GAAG,GAAG;AAAA,EAChC,SAAS,OAAP;AACA,YAAQ,MAAM,kBAAkB,KAAK;AACrC,UAAM;AAAA,EACR;AACF;AAEO,IAAM,sBAAsB,YAAY;AAC7C,MAAI;AACF,UAAM,MAAsB,MAAM,MAAM,0BAA0B;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC;AACD,WAAO,iBAAiB,GAAG;AAAA,EAC7B,SAAS,OAAP;AACA,YAAQ,MAAM,kBAAkB,KAAK;AACrC,UAAM;AAAA,EACR;AACF;AAEO,IAAM,aAAa,OAAO,YAAsB;AACrD,QAAM,QAAQ,aAAa,OAAO;AAElC,QAAM,MAAsB,MAAM,MAAM,eAAe,SAAS;AAAA,IAC9D,QAAQ;AAAA,EACV,CAAC;AACD,SAAO,iBAAiB,GAAG,GAAG;AAChC;AAEO,IAAM,sBAAsB,OAAO,YAAsB;AAC9D,QAAM,QAAQ,aAAa,OAAO;AAElC,QAAM,MAAsB,MAAM,MAAM,0BAA0B,SAAS;AAAA,IACzE,QAAQ;AAAA,EACV,CAAC;AACD,SAAO,iBAAiB,GAAG,GAAG;AAChC;","names":[]}
@@ -0,0 +1,100 @@
1
+ import {
2
+ useBreakpoint
3
+ } from "./chunk-TOKKKTFG.js";
4
+ import {
5
+ Tooltip
6
+ } from "./chunk-DOYWQVTM.js";
7
+ import {
8
+ selectText
9
+ } from "./chunk-LKVGVLCW.js";
10
+
11
+ // src/components/Text/index.tsx
12
+ import React from "react";
13
+ import clsx from "clsx";
14
+ import { jsx } from "react/jsx-runtime";
15
+ var getTypeColor = (type) => {
16
+ const colors = {
17
+ default: "inherit",
18
+ primary: "#7cd77b",
19
+ secondary: "#666",
20
+ success: "#7cd77b",
21
+ warning: "#ffc438",
22
+ error: "#e15c56"
23
+ };
24
+ return colors[type] || colors.default;
25
+ };
26
+ var Text = React.memo(
27
+ ({
28
+ className,
29
+ children,
30
+ maxWidth,
31
+ maxCount,
32
+ hoverValue,
33
+ hoverValueMaxCount: outerHoverValueMaxCount,
34
+ tag = "p",
35
+ type = "default",
36
+ ...props
37
+ }) => {
38
+ const Component = tag;
39
+ const bp = useBreakpoint();
40
+ let child = children;
41
+ if (maxWidth === void 0 && maxCount && typeof children === "string") {
42
+ child = String.prototype.substr.call(children, 0, maxCount) + "...";
43
+ }
44
+ let textContent = hoverValue || children;
45
+ if (bp === "s" && typeof textContent === "string") {
46
+ const hoverValueMaxCount = outerHoverValueMaxCount || 34;
47
+ let textContentCopy = textContent;
48
+ let newTextContent = [];
49
+ let count = 0;
50
+ while (textContentCopy.length > hoverValueMaxCount) {
51
+ newTextContent.push(
52
+ /* @__PURE__ */ jsx("span", { children: textContentCopy.substr(0, hoverValueMaxCount) }, count)
53
+ );
54
+ newTextContent.push(/* @__PURE__ */ jsx("br", {}, `br${count}`));
55
+ textContentCopy = textContentCopy.substr(hoverValueMaxCount);
56
+ if (count > 3) {
57
+ textContentCopy = textContentCopy.substr(0, hoverValueMaxCount - 3) + "...";
58
+ }
59
+ }
60
+ newTextContent.push(/* @__PURE__ */ jsx("span", { children: textContentCopy }, ++count));
61
+ textContent = newTextContent;
62
+ }
63
+ const tooltipText = React.createElement(
64
+ "div",
65
+ {
66
+ onClick: (e) => {
67
+ e.preventDefault();
68
+ e.stopPropagation();
69
+ selectText(e.currentTarget);
70
+ }
71
+ },
72
+ textContent
73
+ );
74
+ const p = { title: tooltipText };
75
+ return React.createElement(Tooltip, p, [
76
+ /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(
77
+ Component,
78
+ {
79
+ className: clsx(
80
+ "sirius-text truncate vertical-bottom",
81
+ "all-[a]:truncate all-[a]:vertical-bottom all-[a]:cursor-pointer all-[a:hover]:text-#0626ae",
82
+ className
83
+ ),
84
+ style: {
85
+ maxWidth,
86
+ display: maxWidth === void 0 ? "inherit" : "inline-block",
87
+ color: getTypeColor(type)
88
+ },
89
+ ...props,
90
+ children: child
91
+ }
92
+ ) }, "text")
93
+ ]);
94
+ }
95
+ );
96
+
97
+ export {
98
+ Text
99
+ };
100
+ //# sourceMappingURL=chunk-CDYJDIZL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Text/index.tsx"],"sourcesContent":["import React from 'react';\nimport clsx from 'clsx';\nimport { Tooltip } from '../Tooltip';\nimport { selectText } from '../../utils';\nimport { useBreakpoint } from '../../utils/media';\n\ntype NormalTypes =\n | 'default'\n | 'secondary'\n | 'success'\n | 'warning'\n | 'error'\n | 'primary';\n\ntype TextProps = {\n children?: React.ReactNode;\n maxWidth?: string;\n maxCount?: number;\n hoverValue?: React.ReactNode;\n hoverValueMaxCount?: number;\n tag?: 'p' | 'span';\n type?: NormalTypes;\n};\ntype NativeAttrs = Omit<React.HTMLAttributes<any>, keyof TextProps>;\n\nconst getTypeColor = (type: NormalTypes) => {\n const colors: { [key in NormalTypes]: string } = {\n default: 'inherit',\n primary: '#7cd77b',\n secondary: '#666',\n success: '#7cd77b',\n warning: '#ffc438',\n error: '#e15c56',\n };\n\n return colors[type] || colors.default;\n};\n\n// note:\n// 1. maxWidth priority is higher than maxCount\n// 2. maxCount only apply to string\n// 3. if hoverValue is provided, use hoverValue as Tooltip text, otherwise use children\n// if text of prop tooltip is provided, use as Tooltip text\nexport const Text = React.memo(\n ({\n className,\n children,\n maxWidth,\n maxCount,\n hoverValue,\n hoverValueMaxCount: outerHoverValueMaxCount,\n tag = 'p',\n type = 'default',\n ...props\n }: NativeAttrs & TextProps) => {\n const Component = tag;\n const bp = useBreakpoint();\n let child: React.ReactNode = children;\n if (maxWidth === undefined && maxCount && typeof children === 'string') {\n child = String.prototype.substr.call(children, 0, maxCount) + '...';\n }\n\n let textContent = hoverValue || children;\n // 控制移动端字符串类型 tooltip 的长度\n // 这里有个问题,就是截断的位置可能是一个完整的单词,暂时没有办法处理,如果为了避免这种情况,需要由外面传入前对内容进行处理,比如设置固定宽度小于 24rem\n // @todo 后续可以试下读取文本长度,动态设置容器宽度值的方式,可以避免截断位置的问题\n if (bp === 's' && typeof textContent === 'string') {\n const hoverValueMaxCount = outerHoverValueMaxCount || 34; // default text count is 36\n let textContentCopy: string = textContent;\n let newTextContent: Array<React.ReactNode> = [];\n let count = 0;\n while (textContentCopy.length > hoverValueMaxCount) {\n newTextContent.push(\n <span key={count}>\n {textContentCopy.substr(0, hoverValueMaxCount)}\n </span>,\n );\n newTextContent.push(<br key={`br${count}`} />);\n textContentCopy = textContentCopy.substr(hoverValueMaxCount);\n // 防止文本过长的情况\n if (count > 3) {\n textContentCopy =\n textContentCopy.substr(0, hoverValueMaxCount - 3) + '...';\n }\n }\n newTextContent.push(<span key={++count}>{textContentCopy}</span>);\n textContent = newTextContent;\n }\n const tooltipText = React.createElement(\n 'div',\n {\n onClick: e => {\n e.preventDefault();\n e.stopPropagation();\n selectText(e.currentTarget);\n },\n },\n textContent,\n );\n\n const p = { title: tooltipText };\n return React.createElement(Tooltip, p, [\n <span key=\"text\">\n <Component\n className={clsx(\n 'sirius-text truncate vertical-bottom',\n 'all-[a]:truncate all-[a]:vertical-bottom all-[a]:cursor-pointer all-[a:hover]:text-#0626ae',\n className,\n )}\n style={{\n maxWidth,\n display: maxWidth === undefined ? 'inherit' : 'inline-block',\n color: getTypeColor(type),\n }}\n {...props}\n >\n {child}\n </Component>\n </span>,\n ]);\n },\n);\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AAwEP;AAhDV,IAAM,eAAe,CAAC,SAAsB;AAC1C,QAAM,SAA2C;AAAA,IAC/C,SAAS;AAAA,IACT,SAAS;AAAA,IACT,WAAW;AAAA,IACX,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AAEA,SAAO,OAAO,IAAI,KAAK,OAAO;AAChC;AAOO,IAAM,OAAO,MAAM;AAAA,EACxB,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,I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AAa,SAAY,YAAY;AAAA,YAC9C,OAAO,aAAa,IAAI;AAAA,UAC1B;AAAA,UACC,GAAG;AAAA,UAEH;AAAA;AAAA,MACH,KAfQ,MAgBV;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -0,0 +1,212 @@
1
+ import {
2
+ RenderAddress
3
+ } from "./chunk-WXVV7KLP.js";
4
+ import {
5
+ formatAddress,
6
+ isInnerContractAddress
7
+ } from "./chunk-XC4OHJZG.js";
8
+ import {
9
+ Tooltip
10
+ } from "./chunk-ZOZ75ANX.js";
11
+ import {
12
+ coreCorrespondsToEspace,
13
+ formatString,
14
+ getNetwork
15
+ } from "./chunk-Z4Q3W7CZ.js";
16
+ import {
17
+ getEnvConfig,
18
+ getTranslations,
19
+ useGlobalData
20
+ } from "./chunk-QKQG47IV.js";
21
+
22
+ // src/components/AddressContainer/addressSwitcher.tsx
23
+ import { AlertTriangle, File } from "@zeit-ui/react-icons";
24
+ import InternalContractIcon from "./internal-contract-icon-ZH2RG3CU.png";
25
+ import ContractIcon from "./contract-icon-P3W2HUAA.png";
26
+ import VerifiedIcon from "./verified-VJRHZNN7.png";
27
+ import isMeIcon from "./me-SIV36SR7.png";
28
+ import { isPosAddress } from "@cfx-kit/dapp-utils/dist/address";
29
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
30
+ var ContractCreatedAddress = (props) => {
31
+ const { contractCreated = "", outputType, t, isFull } = props;
32
+ const translations = getTranslations();
33
+ const contractAddress = formatAddress(contractCreated, outputType);
34
+ const customProps = {
35
+ content: t(translations.transaction.contractCreation),
36
+ alias: t(translations.transaction.contractCreation),
37
+ hrefAddress: contractAddress,
38
+ cfxAddress: contractAddress,
39
+ maxWidth: 160
40
+ };
41
+ const mergedProps = { ...props, ...customProps };
42
+ return RenderAddress({
43
+ ...mergedProps,
44
+ prefix: /* @__PURE__ */ jsx("div", { className: `mr-[2px] flex-shrink-0 ${isFull ? "icon" : ""}`, children: /* @__PURE__ */ jsx(Tooltip, { title: mergedProps.content, children: /* @__PURE__ */ jsx("div", { className: "relative w-[16px] h-[16px]", children: /* @__PURE__ */ jsx(
45
+ "img",
46
+ {
47
+ className: "w-[16px] h-[16px] align-bottom mb-[3px]",
48
+ src: ContractIcon,
49
+ alt: mergedProps.content
50
+ }
51
+ ) }) }) })
52
+ });
53
+ };
54
+ var CoreHexAddress = (props) => {
55
+ const { value, t, isFull, maxWidth } = props;
56
+ const { globalData } = useGlobalData();
57
+ const ENV_CONFIG = getEnvConfig();
58
+ const translations = getTranslations();
59
+ const hexAddress = formatAddress(value, "hex");
60
+ const network = getNetwork(
61
+ globalData?.networks,
62
+ coreCorrespondsToEspace(ENV_CONFIG.ENV_NETWORK_ID)
63
+ );
64
+ const url = `${window.location.protocol}${network.url}/address/${hexAddress}`;
65
+ return RenderAddress({
66
+ cfxAddress: hexAddress,
67
+ hoverValue: hexAddress,
68
+ link: url,
69
+ isFull,
70
+ maxWidth,
71
+ suffixSize: 0,
72
+ prefix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(Tooltip, { title: t(translations.general.eSpaceAddress), children: /* @__PURE__ */ jsx(File, { size: 16, color: "#17B38A" }) }) })
73
+ });
74
+ };
75
+ var InvalidAddress = (props) => {
76
+ const {
77
+ value,
78
+ alias,
79
+ t,
80
+ isFull,
81
+ maxWidth,
82
+ isFullNameTag,
83
+ hideAliasPrefixInHover
84
+ } = props;
85
+ const translations = getTranslations();
86
+ const tip = t(translations.general.invalidAddress);
87
+ return RenderAddress({
88
+ cfxAddress: value,
89
+ alias,
90
+ hoverValue: `${tip}: ${value}`,
91
+ content: alias ? formatString(alias, "tag") : value,
92
+ link: false,
93
+ isFull,
94
+ isFullNameTag,
95
+ maxWidth,
96
+ style: { color: "#e00909" },
97
+ prefix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(Tooltip, { title: tip, children: /* @__PURE__ */ jsx(AlertTriangle, { size: 16, color: "#e00909" }) }) }),
98
+ hideAliasPrefixInHover
99
+ });
100
+ };
101
+ var ContractAddress = (props) => {
102
+ const { showIcon, verify, t, cfxAddress, isFull } = props;
103
+ const translations = getTranslations();
104
+ const isInnerContract = cfxAddress && isInnerContractAddress(cfxAddress);
105
+ const typeText = t(
106
+ isInnerContract ? translations.general.internalContract : verify ? translations.general.verifiedContract : translations.general.unverifiedContract
107
+ );
108
+ return RenderAddress({
109
+ ...props,
110
+ prefix: showIcon ? /* @__PURE__ */ jsx("div", { className: `mr-[2px] flex-shrink-0 ${isFull ? "icon" : ""}`, children: /* @__PURE__ */ jsx(Tooltip, { title: typeText, children: /* @__PURE__ */ jsx("div", { className: "relative w-[16px] h-[16px]", children: isInnerContract ? /* @__PURE__ */ jsx(
111
+ "img",
112
+ {
113
+ className: "w-[16px] h-[16px] align-bottom mb-[5px]",
114
+ src: InternalContractIcon,
115
+ alt: typeText
116
+ }
117
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
118
+ /* @__PURE__ */ jsx(
119
+ "img",
120
+ {
121
+ className: "w-[16px] h-[16px] align-bottom mb-[5px]",
122
+ src: ContractIcon,
123
+ alt: typeText
124
+ }
125
+ ),
126
+ verify ? /* @__PURE__ */ jsx(
127
+ "img",
128
+ {
129
+ className: "w-[8px] h-[8px] absolute bottom-[-1px] right-[1px]",
130
+ src: VerifiedIcon,
131
+ alt: ""
132
+ }
133
+ ) : /* @__PURE__ */ jsx(Fragment, {})
134
+ ] }) }) }) }) : /* @__PURE__ */ jsx(Fragment, {})
135
+ });
136
+ };
137
+ var MyAddress = (props) => {
138
+ const { isFull } = props;
139
+ return RenderAddress({
140
+ ...props,
141
+ suffix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(
142
+ "img",
143
+ {
144
+ className: "w-[38.5px] h-[16px] ml-[3px] align-bottom",
145
+ src: isMeIcon,
146
+ alt: "is me",
147
+ style: {
148
+ marginBottom: isFull ? "6px" : "4px"
149
+ }
150
+ }
151
+ ) })
152
+ });
153
+ };
154
+ var PosAddress = (props) => {
155
+ const {
156
+ alias,
157
+ isFull,
158
+ isFullNameTag,
159
+ maxWidth,
160
+ t,
161
+ link,
162
+ isMe,
163
+ hideAliasPrefixInHover
164
+ } = props;
165
+ const value = props.value;
166
+ if (!value) {
167
+ return /* @__PURE__ */ jsx(Fragment, { children: "--" });
168
+ }
169
+ if (isMe) {
170
+ return MyAddress(props);
171
+ }
172
+ const translations = getTranslations();
173
+ const content = alias ? formatString(alias, "tag") : formatString(value, "posAddress");
174
+ if (!isPosAddress(value)) {
175
+ const tip = t(translations.general.invalidPosAddress);
176
+ return RenderAddress({
177
+ cfxAddress: value,
178
+ alias,
179
+ hoverValue: `${tip}: ${value}`,
180
+ content,
181
+ link: false,
182
+ isFull,
183
+ isFullNameTag,
184
+ maxWidth,
185
+ style: { color: "#e00909" },
186
+ prefix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(Tooltip, { title: tip, children: /* @__PURE__ */ jsx(AlertTriangle, { size: 16, color: "#e00909" }) }) }),
187
+ type: "pos",
188
+ hideAliasPrefixInHover
189
+ });
190
+ }
191
+ return RenderAddress({
192
+ cfxAddress: value,
193
+ alias,
194
+ link,
195
+ isFull,
196
+ isFullNameTag,
197
+ maxWidth,
198
+ type: "pos",
199
+ content,
200
+ hideAliasPrefixInHover
201
+ });
202
+ };
203
+
204
+ export {
205
+ ContractCreatedAddress,
206
+ CoreHexAddress,
207
+ InvalidAddress,
208
+ ContractAddress,
209
+ MyAddress,
210
+ PosAddress
211
+ };
212
+ //# sourceMappingURL=chunk-CKLBKRDB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/AddressContainer/addressSwitcher.tsx"],"sourcesContent":["import { WithTranslation } from 'react-i18next';\nimport { AlertTriangle, File } from '@zeit-ui/react-icons';\nimport InternalContractIcon from '../../images/internal-contract-icon.png';\nimport ContractIcon from '../../images/contract-icon.png';\nimport VerifiedIcon from '../../images/verified.png';\nimport isMeIcon from '../../images/me.png';\nimport { Tooltip } from '../Tooltip';\nimport { isPosAddress } from '@cfx-kit/dapp-utils/dist/address';\nimport { formatAddress, isInnerContractAddress } from '../../utils/address';\nimport { getTranslations, getEnvConfig, useGlobalData } from '../../store';\nimport { getNetwork, formatString, coreCorrespondsToEspace } from 'src/utils';\nimport { Props } from './types';\nimport { RenderAddress } from './addressView';\n\n// common\nexport const ContractCreatedAddress = (\n props: Props & WithTranslation & { outputType: 'hex' | 'base32' },\n) => {\n const { contractCreated = '', outputType, t, isFull } = props;\n\n const translations = getTranslations();\n\n const contractAddress = formatAddress(contractCreated, outputType);\n\n const customProps = {\n content: t(translations.transaction.contractCreation),\n alias: t(translations.transaction.contractCreation),\n hrefAddress: contractAddress,\n cfxAddress: contractAddress,\n maxWidth: 160,\n };\n\n const mergedProps = { ...props, ...customProps };\n return RenderAddress({\n ...mergedProps,\n prefix: (\n <div className={`mr-[2px] flex-shrink-0 ${isFull ? 'icon' : ''}`}>\n <Tooltip title={mergedProps.content}>\n <div className=\"relative w-[16px] h-[16px]\">\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[3px]\"\n src={ContractIcon}\n alt={mergedProps.content}\n />\n </div>\n </Tooltip>\n </div>\n ),\n });\n};\n\n// core\nexport const CoreHexAddress = (props: Props & WithTranslation) => {\n const { value, t, isFull, maxWidth } = props;\n const { globalData } = useGlobalData();\n\n const ENV_CONFIG = getEnvConfig();\n const translations = getTranslations();\n const hexAddress = formatAddress(value, 'hex');\n const network = getNetwork(\n globalData?.networks,\n coreCorrespondsToEspace(ENV_CONFIG.ENV_NETWORK_ID),\n );\n const url = `${window.location.protocol}${network.url}/address/${hexAddress}`;\n\n return RenderAddress({\n cfxAddress: hexAddress,\n hoverValue: hexAddress,\n link: url,\n isFull,\n maxWidth,\n suffixSize: 0,\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={t((translations as any).general.eSpaceAddress)}>\n <File size={16} color=\"#17B38A\" />\n </Tooltip>\n </div>\n ),\n });\n};\n\n// common\nexport const InvalidAddress = (props: Props & WithTranslation) => {\n const {\n value,\n alias,\n t,\n isFull,\n maxWidth,\n isFullNameTag,\n hideAliasPrefixInHover,\n } = props;\n\n const translations = getTranslations();\n\n const tip = t(translations.general.invalidAddress);\n\n return RenderAddress({\n cfxAddress: value,\n alias,\n hoverValue: `${tip}: ${value}`,\n content: alias ? formatString(alias, 'tag') : value,\n link: false,\n isFull,\n isFullNameTag,\n maxWidth,\n style: { color: '#e00909' },\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={tip}>\n <AlertTriangle size={16} color=\"#e00909\" />\n </Tooltip>\n </div>\n ),\n hideAliasPrefixInHover,\n });\n};\n\n// common\nexport const ContractAddress = (props: Props & WithTranslation) => {\n const { showIcon, verify, t, cfxAddress, isFull } = props;\n\n const translations = getTranslations();\n\n const isInnerContract = cfxAddress && isInnerContractAddress(cfxAddress);\n\n const typeText = t(\n isInnerContract\n ? translations.general.internalContract\n : verify\n ? translations.general.verifiedContract\n : translations.general.unverifiedContract,\n );\n\n return RenderAddress({\n ...props,\n prefix: showIcon ? (\n <div className={`mr-[2px] flex-shrink-0 ${isFull ? 'icon' : ''}`}>\n <Tooltip title={typeText}>\n <div className=\"relative w-[16px] h-[16px]\">\n {isInnerContract ? (\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[5px]\"\n src={InternalContractIcon}\n alt={typeText}\n />\n ) : (\n <>\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[5px]\"\n src={ContractIcon}\n alt={typeText}\n />\n {verify ? (\n <img\n className=\"w-[8px] h-[8px] absolute bottom-[-1px] right-[1px]\"\n src={VerifiedIcon}\n alt={''}\n />\n ) : (\n <></>\n )}\n </>\n )}\n </div>\n </Tooltip>\n </div>\n ) : (\n <></>\n ),\n });\n};\n\n// common\nexport const MyAddress = (props: Props & WithTranslation) => {\n const { isFull } = props;\n return RenderAddress({\n ...props,\n suffix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <img\n className=\"w-[38.5px] h-[16px] ml-[3px] align-bottom\"\n src={isMeIcon}\n alt=\"is me\"\n style={{\n marginBottom: isFull ? '6px' : '4px',\n }}\n />\n </div>\n ),\n });\n};\n\n// core\nexport const PosAddress = (props: Props & WithTranslation) => {\n const {\n alias,\n isFull,\n isFullNameTag,\n maxWidth,\n t,\n link,\n isMe,\n hideAliasPrefixInHover,\n } = props;\n const value = props.value;\n if (!value) {\n return <>--</>;\n }\n if (isMe) {\n return MyAddress(props);\n }\n const translations = getTranslations();\n const content = alias\n ? formatString(alias, 'tag')\n : formatString(value, 'posAddress');\n if (!isPosAddress(value)) {\n const tip = t(translations.general.invalidPosAddress);\n return RenderAddress({\n cfxAddress: value,\n alias,\n hoverValue: `${tip}: ${value}`,\n content,\n link: false,\n isFull,\n isFullNameTag,\n maxWidth,\n style: { color: '#e00909' },\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={tip}>\n <AlertTriangle size={16} color=\"#e00909\" />\n </Tooltip>\n </div>\n ),\n type: 'pos',\n hideAliasPrefixInHover,\n });\n }\n\n return RenderAddress({\n cfxAddress: value,\n alias,\n link,\n isFull,\n isFullNameTag,\n maxWidth,\n type: 'pos',\n content,\n hideAliasPrefixInHover,\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,eAAe,YAAY;AACpC,OAAO,0BAA0B;AACjC,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,cAAc;AAErB,SAAS,oBAAoB;AAgCjB,SA0HM,UA1HN,KA6GE,YA7GF;AAxBL,IAAM,yBAAyB,CACpC,UACG;AACH,QAAM,EAAE,kBAAkB,IAAI,YAAY,GAAG,OAAO,IAAI;AAExD,QAAM,eAAe,gBAAgB;AAErC,QAAM,kBAAkB,cAAc,iBAAiB,UAAU;AAEjE,QAAM,cAAc;A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A,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -0,0 +1,141 @@
1
+ import {
2
+ useENS
3
+ } from "./chunk-2KZQEDWJ.js";
4
+ import {
5
+ ContractAddress,
6
+ ContractCreatedAddress,
7
+ CoreHexAddress,
8
+ InvalidAddress,
9
+ MyAddress,
10
+ PosAddress
11
+ } from "./chunk-L7CPEX5Q.js";
12
+ import {
13
+ RenderAddress
14
+ } from "./chunk-OLV63UML.js";
15
+ import {
16
+ formatAddress,
17
+ isCoreAddress,
18
+ isCoreContractAddress,
19
+ isZeroAddress
20
+ } from "./chunk-DVZP6PO3.js";
21
+ import {
22
+ getLabelInfo
23
+ } from "./chunk-RJTRSA4P.js";
24
+ import {
25
+ getTranslations,
26
+ useGlobalData
27
+ } from "./chunk-QKQG47IV.js";
28
+
29
+ // src/components/AddressContainer/CoreAddressContainer.tsx
30
+ import { memo } from "react";
31
+ import { withTranslation } from "react-i18next";
32
+ import _ from "lodash";
33
+ import { Fragment, jsx } from "react/jsx-runtime";
34
+ var parseProps = (props, globalData) => {
35
+ const {
36
+ alias,
37
+ ensInfo,
38
+ t,
39
+ showAddressLabel,
40
+ showNametag,
41
+ nametagInfo,
42
+ showENSLabel
43
+ } = props;
44
+ const value = props.value || "";
45
+ const cfxAddress = formatAddress(value, "base32");
46
+ let ENSMap = ensInfo || {};
47
+ const translations = getTranslations();
48
+ let aliasLabel = alias;
49
+ if (!alias && isZeroAddress(cfxAddress)) {
50
+ aliasLabel = t(translations.general.zeroAddress);
51
+ }
52
+ let prefixIcon = null;
53
+ let officalNametag = null;
54
+ let addressLabel = null;
55
+ let ENSLabel = null;
56
+ const gENSLabel = cfxAddress && ENSMap[cfxAddress]?.name;
57
+ if (cfxAddress && showAddressLabel) {
58
+ const addressLabels = globalData?.["CONFLUX_SCAN_ADDRESS_LABELS" /* addressLabel */];
59
+ const gAddressLabel = addressLabels?.[cfxAddress];
60
+ if (gAddressLabel) {
61
+ const { label } = getLabelInfo(gAddressLabel, "tag");
62
+ addressLabel = label;
63
+ }
64
+ }
65
+ if (cfxAddress && showNametag) {
66
+ const nametags = nametagInfo?.[cfxAddress];
67
+ if (nametags) {
68
+ const nametag = nametags?.nametag ?? "";
69
+ const { label } = getLabelInfo(nametag, "nametag");
70
+ officalNametag = label;
71
+ }
72
+ }
73
+ if (showENSLabel && gENSLabel) {
74
+ const { label, icon } = getLabelInfo(gENSLabel, "ens");
75
+ ENSLabel = label;
76
+ prefixIcon = icon;
77
+ }
78
+ return {
79
+ alias: aliasLabel,
80
+ prefix: prefixIcon,
81
+ nametag: officalNametag,
82
+ addressLabel,
83
+ ENSLabel,
84
+ cfxAddress
85
+ };
86
+ };
87
+ var CoreAddressContainer = withTranslation()(
88
+ memo((props) => {
89
+ const { globalData } = useGlobalData();
90
+ const unnecessaryEns = props.ensInfo || props.showENSLabel === false;
91
+ const { ens } = useENS(unnecessaryEns ? null : props.value);
92
+ if (!props.value && !props.contractCreated) {
93
+ return /* @__PURE__ */ jsx(Fragment, { children: "--" });
94
+ }
95
+ const defaultProps = {
96
+ isFull: false,
97
+ isFullNameTag: false,
98
+ link: true,
99
+ isMe: false,
100
+ showIcon: true,
101
+ verify: false,
102
+ showAddressLabel: true,
103
+ showENSLabel: true,
104
+ showNametag: true,
105
+ ensInfo: ens
106
+ };
107
+ const mergeDefaultProps = _.assign({}, defaultProps, props);
108
+ const mergeParseProps = _.merge(
109
+ {},
110
+ mergeDefaultProps,
111
+ parseProps(mergeDefaultProps, globalData)
112
+ );
113
+ if (mergeParseProps.isPosAddress) {
114
+ return PosAddress(mergeParseProps);
115
+ }
116
+ if (!mergeParseProps.value && mergeParseProps.contractCreated) {
117
+ return ContractCreatedAddress({
118
+ ...mergeParseProps,
119
+ outputType: "base32"
120
+ });
121
+ }
122
+ if (mergeParseProps.isEspaceAddress) {
123
+ return CoreHexAddress(mergeParseProps);
124
+ }
125
+ if (!isCoreAddress(mergeParseProps.value)) {
126
+ return InvalidAddress(mergeParseProps);
127
+ }
128
+ if (isCoreContractAddress(mergeParseProps.cfxAddress)) {
129
+ return ContractAddress(mergeParseProps);
130
+ }
131
+ if (mergeParseProps.isMe) {
132
+ return MyAddress(mergeParseProps);
133
+ }
134
+ return RenderAddress(mergeParseProps);
135
+ })
136
+ );
137
+
138
+ export {
139
+ CoreAddressContainer
140
+ };
141
+ //# sourceMappingURL=chunk-CNBENNSA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/AddressContainer/CoreAddressContainer.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { WithTranslation, withTranslation } from 'react-i18next';\nimport _ from 'lodash';\nimport {\n formatAddress,\n isCoreAddress,\n isCoreContractAddress,\n isZeroAddress,\n convertCheckSum,\n} from '../../utils/address';\nimport { useGlobalData, getTranslations } from '../../store';\nimport { LOCALSTORAGE_KEYS_MAP } from '../../utils/constants';\nimport { getLabelInfo } from './label';\nimport { useENS } from '../../utils/hooks/useENS';\n\nimport { RenderAddress } from './addressView';\nimport {\n ContractCreatedAddress,\n CoreHexAddress,\n InvalidAddress,\n ContractAddress,\n MyAddress,\n PosAddress,\n} from './addressSwitcher';\nimport { GlobalDataType } from 'src/store/types';\nimport { CoreAddressContainerProps } from './types';\n\nconst parseProps = (\n props: CoreAddressContainerProps & WithTranslation,\n globalData: GlobalDataType,\n) => {\n const {\n alias,\n ensInfo,\n t,\n showAddressLabel,\n showNametag,\n nametagInfo,\n showENSLabel,\n } = props;\n const value: string = props.value || '';\n const cfxAddress = formatAddress(value, 'base32');\n\n let ENSMap = ensInfo || {};\n\n const translations = getTranslations();\n\n let aliasLabel = alias;\n if (!alias && isZeroAddress(cfxAddress)) {\n aliasLabel = t(translations.general.zeroAddress);\n }\n\n let prefixIcon: React.ReactNode = null;\n // official name tag\n let officalNametag: React.ReactNode = null;\n // private name tag\n let addressLabel: React.ReactNode = null;\n // ens name tag\n let ENSLabel: React.ReactNode = null;\n // global ens name tag\n const gENSLabel = cfxAddress && ENSMap[cfxAddress]?.name;\n\n if (cfxAddress && showAddressLabel) {\n // global private name tag\n const addressLabels = globalData?.[LOCALSTORAGE_KEYS_MAP.addressLabel];\n const gAddressLabel = addressLabels?.[cfxAddress];\n\n if (gAddressLabel) {\n const { label } = getLabelInfo(gAddressLabel, 'tag');\n addressLabel = label;\n }\n }\n\n if (cfxAddress && showNametag) {\n const nametags = nametagInfo?.[cfxAddress];\n\n if (nametags) {\n const nametag = nametags?.nametag ?? '';\n const { label } = getLabelInfo(nametag, 'nametag');\n officalNametag = label;\n }\n }\n\n if (showENSLabel && gENSLabel) {\n const { label, icon } = getLabelInfo(gENSLabel, 'ens');\n ENSLabel = label;\n prefixIcon = icon;\n }\n\n return {\n alias: aliasLabel,\n prefix: prefixIcon,\n nametag: officalNametag,\n addressLabel,\n ENSLabel,\n cfxAddress,\n };\n};\n\nexport const CoreAddressContainer = withTranslation()(\n memo((props: CoreAddressContainerProps & WithTranslation) => {\n const { globalData } = useGlobalData();\n\n // If the interface returns Ens content, there is no need to obtain it separately, or disable the display of Ens content (in most cases on the list page).\n const unnecessaryEns = props.ensInfo || props.showENSLabel === false;\n const { ens } = useENS(unnecessaryEns ? null : props.value);\n\n // If a txn receipt has no 'to' address or 'contractCreated', show -- for temp\n if (!props.value && !props.contractCreated) {\n return <>--</>;\n }\n\n const defaultProps = {\n isFull: false,\n isFullNameTag: false,\n link: true,\n isMe: false,\n showIcon: true,\n verify: false,\n showAddressLabel: true,\n showENSLabel: true,\n showNametag: true,\n ensInfo: ens,\n };\n\n const mergeDefaultProps = _.assign({}, defaultProps, props);\n\n const mergeParseProps = _.merge(\n {},\n mergeDefaultProps,\n parseProps(mergeDefaultProps, globalData),\n );\n\n if (mergeParseProps.isPosAddress) {\n return PosAddress(mergeParseProps);\n }\n\n if (!mergeParseProps.value && mergeParseProps.contractCreated) {\n return ContractCreatedAddress({\n ...mergeParseProps,\n outputType: 'base32',\n });\n }\n\n if (mergeParseProps.isEspaceAddress) {\n return CoreHexAddress(mergeParseProps);\n }\n\n if (!isCoreAddress(mergeParseProps.value)) {\n return InvalidAddress(mergeParseProps);\n }\n\n if (isCoreContractAddress(mergeParseProps.cfxAddress)) {\n return ContractAddress(mergeParseProps);\n }\n\n if (mergeParseProps.isMe) {\n return MyAddress(mergeParseProps);\n }\n\n return RenderAddress(mergeParseProps);\n }),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY;AACrB,SAA0B,uBAAuB;AACjD,OAAO,OAAO;AA2GD;AAlFb,IAAM,aAAa,CACjB,OACA,eACG;AACH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,QAAgB,MAAM,SAAS;AACrC,QAAM,aAAa,cAAc,OAAO,QAAQ;AAEhD,MAAI,SAAS,WAAW,CAAC;AAEzB,QAAM,eAAe,gBAAgB;AAErC,MAAI,aAAa;AACjB,MAAI,CAAC,SAAS,cAAc,UAAU,GAAG;AACvC,iBAAa,EAAE,aAAa,QAAQ,WAAW;AAAA,EACjD;AAEA,MAAI,aAA8B;AAElC,MAAI,iBAAkC;AAEtC,MAAI,eAAgC;AAEpC,MAAI,WAA4B;AAEhC,QAAM,YAAY,cAAc,OAAO,UAAU,GAAG;AAEpD,MAAI,cAAc,kBAAkB;AAElC,UAAM,gBAAgB,6DAA+C;AACrE,UAAM,gBAAgB,gBAAgB,UAAU;AAEhD,QAAI,eAAe;AACjB,YAAM,EAAE,MAAM,IAAI,aAAa,eAAe,KAAK;AACnD,qBAAe;AAAA,IACjB;AAAA,EACF;AAEA,MAAI,cAAc,aAAa;AAC7B,UAAM,WAAW,cAAc,UAAU;AAEzC,QAAI,UAAU;AACZ,YAAM,UAAU,UAAU,WAAW;AACrC,YAAM,EAAE,MAAM,IAAI,aAAa,SAAS,SAAS;AACjD,uBAAiB;AAAA,IACnB;AAAA,EACF;AAEA,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