@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.
- package/dist/chunk-26BGPSLL.js +141 -0
- package/dist/chunk-26BGPSLL.js.map +1 -0
- package/dist/chunk-2D3FHQMA.js +212 -0
- package/dist/chunk-2D3FHQMA.js.map +1 -0
- package/dist/chunk-2GMSPXII.js +212 -0
- package/dist/chunk-2GMSPXII.js.map +1 -0
- package/dist/chunk-2KKN5I7Z.js +108 -0
- package/dist/chunk-2KKN5I7Z.js.map +1 -0
- package/dist/chunk-2KZQEDWJ.js +63 -0
- package/dist/chunk-2KZQEDWJ.js.map +1 -0
- package/dist/chunk-2LXJPD6E.js +141 -0
- package/dist/chunk-2LXJPD6E.js.map +1 -0
- package/dist/chunk-2MQDR6YX.js +63 -0
- package/dist/chunk-2MQDR6YX.js.map +1 -0
- package/dist/chunk-2NX2L2RI.js +875 -0
- package/dist/chunk-2NX2L2RI.js.map +1 -0
- package/dist/chunk-2Q4BOUN5.js +143 -0
- package/dist/chunk-2Q4BOUN5.js.map +1 -0
- package/dist/chunk-2QCODSHF.js +108 -0
- package/dist/chunk-2QCODSHF.js.map +1 -0
- package/dist/chunk-363U57H2.js +108 -0
- package/dist/chunk-363U57H2.js.map +1 -0
- package/dist/chunk-37YTMWL5.js +127 -0
- package/dist/chunk-37YTMWL5.js.map +1 -0
- package/dist/chunk-3AVURPM5.js +108 -0
- package/dist/chunk-3AVURPM5.js.map +1 -0
- package/dist/chunk-3D4DD2UA.js +141 -0
- package/dist/chunk-3D4DD2UA.js.map +1 -0
- package/dist/chunk-3DSBII47.js +58 -0
- package/dist/chunk-3DSBII47.js.map +1 -0
- package/dist/chunk-3EYF446K.js +3629 -0
- package/dist/chunk-3EYF446K.js.map +1 -0
- package/dist/chunk-3FE7I3KQ.js +101 -0
- package/dist/chunk-3FE7I3KQ.js.map +1 -0
- package/dist/chunk-3Z26LHYR.js +128 -0
- package/dist/chunk-3Z26LHYR.js.map +1 -0
- package/dist/chunk-43RJJ6FE.js +3629 -0
- package/dist/chunk-43RJJ6FE.js.map +1 -0
- package/dist/chunk-4A3R7D6E.js +127 -0
- package/dist/chunk-4A3R7D6E.js.map +1 -0
- package/dist/chunk-4CHUPYY3.js +108 -0
- package/dist/chunk-4CHUPYY3.js.map +1 -0
- package/dist/chunk-4DOOVZYQ.js +127 -0
- package/dist/chunk-4DOOVZYQ.js.map +1 -0
- package/dist/chunk-4EWR72ZL.js +127 -0
- package/dist/chunk-4EWR72ZL.js.map +1 -0
- package/dist/chunk-4GX5DBPW.js +108 -0
- package/dist/chunk-4GX5DBPW.js.map +1 -0
- package/dist/chunk-4K7JRPVX.js +108 -0
- package/dist/chunk-4K7JRPVX.js.map +1 -0
- package/dist/chunk-4LUXUY33.js +212 -0
- package/dist/chunk-4LUXUY33.js.map +1 -0
- package/dist/chunk-4PRRUA3K.js +212 -0
- package/dist/chunk-4PRRUA3K.js.map +1 -0
- package/dist/chunk-4VMXIEIU.js +63 -0
- package/dist/chunk-4VMXIEIU.js.map +1 -0
- package/dist/chunk-4VU6H4HE.js +141 -0
- package/dist/chunk-4VU6H4HE.js.map +1 -0
- package/dist/chunk-4WGHU5GK.js +211 -0
- package/dist/chunk-4WGHU5GK.js.map +1 -0
- package/dist/chunk-4XIFV7FM.js +212 -0
- package/dist/chunk-4XIFV7FM.js.map +1 -0
- package/dist/chunk-4ZV6PYNB.js +100 -0
- package/dist/chunk-4ZV6PYNB.js.map +1 -0
- package/dist/chunk-52AANUOT.js +108 -0
- package/dist/chunk-52AANUOT.js.map +1 -0
- package/dist/chunk-557Y4PWU.js +100 -0
- package/dist/chunk-557Y4PWU.js.map +1 -0
- package/dist/chunk-5HDGGTJ6.js +127 -0
- package/dist/chunk-5HDGGTJ6.js.map +1 -0
- package/dist/chunk-5IPKZP5U.js +108 -0
- package/dist/chunk-5IPKZP5U.js.map +1 -0
- package/dist/chunk-5KZCV745.js +213 -0
- package/dist/chunk-5KZCV745.js.map +1 -0
- package/dist/chunk-5N2JN63A.js +213 -0
- package/dist/chunk-5N2JN63A.js.map +1 -0
- package/dist/chunk-5NS2U723.js +108 -0
- package/dist/chunk-5NS2U723.js.map +1 -0
- package/dist/chunk-5TRFE737.js +127 -0
- package/dist/chunk-5TRFE737.js.map +1 -0
- package/dist/chunk-65X53DMW.js +47 -0
- package/dist/chunk-65X53DMW.js.map +1 -0
- package/dist/chunk-6DOIQYVP.js +223 -0
- package/dist/chunk-6DOIQYVP.js.map +1 -0
- package/dist/chunk-6IYWU6KW.js +141 -0
- package/dist/chunk-6IYWU6KW.js.map +1 -0
- package/dist/chunk-6MM34SOW.js +108 -0
- package/dist/chunk-6MM34SOW.js.map +1 -0
- package/dist/chunk-6R3YL2BS.js +211 -0
- package/dist/chunk-6R3YL2BS.js.map +1 -0
- package/dist/chunk-6U2DN3LG.js +141 -0
- package/dist/chunk-6U2DN3LG.js.map +1 -0
- package/dist/chunk-6VG6W7P4.js +126 -0
- package/dist/chunk-6VG6W7P4.js.map +1 -0
- package/dist/chunk-7CRUFCGX.js +211 -0
- package/dist/chunk-7CRUFCGX.js.map +1 -0
- package/dist/chunk-7HT2BVQG.js +127 -0
- package/dist/chunk-7HT2BVQG.js.map +1 -0
- package/dist/chunk-7JJQSXBV.js +141 -0
- package/dist/chunk-7JJQSXBV.js.map +1 -0
- package/dist/chunk-7NJ4VOJB.js +108 -0
- package/dist/chunk-7NJ4VOJB.js.map +1 -0
- package/dist/chunk-7OAWG2IZ.js +44 -0
- package/dist/chunk-7OAWG2IZ.js.map +1 -0
- package/dist/chunk-7QSEQLE4.js +212 -0
- package/dist/chunk-7QSEQLE4.js.map +1 -0
- package/dist/chunk-7S3BOXGS.js +212 -0
- package/dist/chunk-7S3BOXGS.js.map +1 -0
- package/dist/chunk-7SH3YCJ7.js +875 -0
- package/dist/chunk-7SH3YCJ7.js.map +1 -0
- package/dist/chunk-7Z3HADG2.js +141 -0
- package/dist/chunk-7Z3HADG2.js.map +1 -0
- package/dist/chunk-A7RMNSCW.js +250 -0
- package/dist/chunk-A7RMNSCW.js.map +1 -0
- package/dist/chunk-AAQMTCV5.js +875 -0
- package/dist/chunk-AAQMTCV5.js.map +1 -0
- package/dist/chunk-ABXVKRIH.js +63 -0
- package/dist/chunk-ABXVKRIH.js.map +1 -0
- package/dist/chunk-ACLZEBHM.js +251 -0
- package/dist/chunk-ACLZEBHM.js.map +1 -0
- package/dist/chunk-AEF5YUNM.js +212 -0
- package/dist/chunk-AEF5YUNM.js.map +1 -0
- package/dist/chunk-AHY4G53B.js +212 -0
- package/dist/chunk-AHY4G53B.js.map +1 -0
- package/dist/chunk-AIEBC7N6.js +211 -0
- package/dist/chunk-AIEBC7N6.js.map +1 -0
- package/dist/chunk-AMXXTGCE.js +143 -0
- package/dist/chunk-AMXXTGCE.js.map +1 -0
- package/dist/chunk-ANXMM5LH.js +2296 -0
- package/dist/chunk-ANXMM5LH.js.map +1 -0
- package/dist/chunk-ASADUYXC.js +141 -0
- package/dist/chunk-ASADUYXC.js.map +1 -0
- package/dist/chunk-BDSJ5P63.js +49 -0
- package/dist/chunk-BDSJ5P63.js.map +1 -0
- package/dist/chunk-BGTUC3AF.js +141 -0
- package/dist/chunk-BGTUC3AF.js.map +1 -0
- package/dist/chunk-BJ5IIEVM.js +141 -0
- package/dist/chunk-BJ5IIEVM.js.map +1 -0
- package/dist/chunk-BPRHSATO.js +127 -0
- package/dist/chunk-BPRHSATO.js.map +1 -0
- package/dist/chunk-BSSE7DI3.js +257 -0
- package/dist/chunk-BSSE7DI3.js.map +1 -0
- package/dist/chunk-C2TFELML.js +257 -0
- package/dist/chunk-C2TFELML.js.map +1 -0
- package/dist/chunk-CBLGPZ6N.js +108 -0
- package/dist/chunk-CBLGPZ6N.js.map +1 -0
- package/dist/chunk-CDRAINRR.js +143 -0
- package/dist/chunk-CDRAINRR.js.map +1 -0
- package/dist/chunk-CDYJDIZL.js +100 -0
- package/dist/chunk-CDYJDIZL.js.map +1 -0
- package/dist/chunk-CKLBKRDB.js +212 -0
- package/dist/chunk-CKLBKRDB.js.map +1 -0
- package/dist/chunk-CNBENNSA.js +141 -0
- package/dist/chunk-CNBENNSA.js.map +1 -0
- package/dist/chunk-CTAGQUXS.js +213 -0
- package/dist/chunk-CTAGQUXS.js.map +1 -0
- package/dist/chunk-CZNTYDII.js +141 -0
- package/dist/chunk-CZNTYDII.js.map +1 -0
- package/dist/chunk-D246WRFL.js +108 -0
- package/dist/chunk-D246WRFL.js.map +1 -0
- package/dist/chunk-D3CVJAPF.js +143 -0
- package/dist/chunk-D3CVJAPF.js.map +1 -0
- package/dist/chunk-DBEZZTKI.js +63 -0
- package/dist/chunk-DBEZZTKI.js.map +1 -0
- package/dist/chunk-DI4EC4C5.js +108 -0
- package/dist/chunk-DI4EC4C5.js.map +1 -0
- package/dist/chunk-DMYFV67U.js +108 -0
- package/dist/chunk-DMYFV67U.js.map +1 -0
- package/dist/chunk-DOTVUBGL.js +37 -0
- package/dist/chunk-DOTVUBGL.js.map +1 -0
- package/dist/chunk-DOYWQVTM.js +2296 -0
- package/dist/chunk-DOYWQVTM.js.map +1 -0
- package/dist/chunk-DPSCMWIB.js +49 -0
- package/dist/chunk-DPSCMWIB.js.map +1 -0
- package/dist/chunk-DRM4YQL3.js +108 -0
- package/dist/chunk-DRM4YQL3.js.map +1 -0
- package/dist/chunk-DVZP6PO3.js +257 -0
- package/dist/chunk-DVZP6PO3.js.map +1 -0
- package/dist/chunk-EE5JCC2N.js +3629 -0
- package/dist/chunk-EE5JCC2N.js.map +1 -0
- package/dist/chunk-EED2CWB3.js +141 -0
- package/dist/chunk-EED2CWB3.js.map +1 -0
- package/dist/chunk-EOMPNXYW.js +141 -0
- package/dist/chunk-EOMPNXYW.js.map +1 -0
- package/dist/chunk-ESE4IOXB.js +101 -0
- package/dist/chunk-ESE4IOXB.js.map +1 -0
- package/dist/chunk-EVCNR7M7.js +150 -0
- package/dist/chunk-EVCNR7M7.js.map +1 -0
- package/dist/chunk-EXVWVGQ3.js +108 -0
- package/dist/chunk-EXVWVGQ3.js.map +1 -0
- package/dist/chunk-EY4IMAYQ.js +108 -0
- package/dist/chunk-EY4IMAYQ.js.map +1 -0
- package/dist/chunk-F4H73EBR.js +2296 -0
- package/dist/chunk-F4H73EBR.js.map +1 -0
- package/dist/chunk-F5GW75SB.js +37 -0
- package/dist/chunk-F5GW75SB.js.map +1 -0
- package/dist/chunk-FB2DC3ZK.js +250 -0
- package/dist/chunk-FB2DC3ZK.js.map +1 -0
- package/dist/chunk-FF7ZGRIB.js +108 -0
- package/dist/chunk-FF7ZGRIB.js.map +1 -0
- package/dist/chunk-FGNBG722.js +108 -0
- package/dist/chunk-FGNBG722.js.map +1 -0
- package/dist/chunk-FJ4YMYZH.js +257 -0
- package/dist/chunk-FJ4YMYZH.js.map +1 -0
- package/dist/chunk-FJNLD4NH.js +150 -0
- package/dist/chunk-FJNLD4NH.js.map +1 -0
- package/dist/chunk-FLS3MUW7.js +252 -0
- package/dist/chunk-FLS3MUW7.js.map +1 -0
- package/dist/chunk-FPG5UDK3.js +212 -0
- package/dist/chunk-FPG5UDK3.js.map +1 -0
- package/dist/chunk-FPPTWXIF.js +108 -0
- package/dist/chunk-FPPTWXIF.js.map +1 -0
- package/dist/chunk-G5EM47DR.js +127 -0
- package/dist/chunk-G5EM47DR.js.map +1 -0
- package/dist/chunk-G6DGYERB.js +108 -0
- package/dist/chunk-G6DGYERB.js.map +1 -0
- package/dist/chunk-GFXXZQRQ.js +150 -0
- package/dist/chunk-GFXXZQRQ.js.map +1 -0
- package/dist/chunk-GIG7IMSP.js +141 -0
- package/dist/chunk-GIG7IMSP.js.map +1 -0
- package/dist/chunk-GSJZA53J.js +213 -0
- package/dist/chunk-GSJZA53J.js.map +1 -0
- package/dist/chunk-GUCQ4F2G.js +49 -0
- package/dist/chunk-GUCQ4F2G.js.map +1 -0
- package/dist/chunk-GX6VTQVX.js +211 -0
- package/dist/chunk-GX6VTQVX.js.map +1 -0
- package/dist/chunk-GZNIZX63.js +108 -0
- package/dist/chunk-GZNIZX63.js.map +1 -0
- package/dist/chunk-H4SQSFJ7.js +63 -0
- package/dist/chunk-H4SQSFJ7.js.map +1 -0
- package/dist/chunk-HFFYGGBO.js +252 -0
- package/dist/chunk-HFFYGGBO.js.map +1 -0
- package/dist/chunk-HGM2CICP.js +212 -0
- package/dist/chunk-HGM2CICP.js.map +1 -0
- package/dist/chunk-HLR7FF2K.js +211 -0
- package/dist/chunk-HLR7FF2K.js.map +1 -0
- package/dist/chunk-HP3DEVBA.js +141 -0
- package/dist/chunk-HP3DEVBA.js.map +1 -0
- package/dist/chunk-HTAWLIFJ.js +3629 -0
- package/dist/chunk-HTAWLIFJ.js.map +1 -0
- package/dist/chunk-HTZUI3AR.js +212 -0
- package/dist/chunk-HTZUI3AR.js.map +1 -0
- package/dist/chunk-HZGDXEM3.js +63 -0
- package/dist/chunk-HZGDXEM3.js.map +1 -0
- package/dist/chunk-ICBCEIZZ.js +212 -0
- package/dist/chunk-ICBCEIZZ.js.map +1 -0
- package/dist/chunk-IEJJYHZZ.js +108 -0
- package/dist/chunk-IEJJYHZZ.js.map +1 -0
- package/dist/chunk-IEXGTZFG.js +37 -0
- package/dist/chunk-IEXGTZFG.js.map +1 -0
- package/dist/chunk-ILJFYWLB.js +353 -0
- package/dist/chunk-ILJFYWLB.js.map +1 -0
- package/dist/chunk-IM3YUUBE.js +257 -0
- package/dist/chunk-IM3YUUBE.js.map +1 -0
- package/dist/chunk-IODNITVN.js +127 -0
- package/dist/chunk-IODNITVN.js.map +1 -0
- package/dist/chunk-IRJC5VRG.js +212 -0
- package/dist/chunk-IRJC5VRG.js.map +1 -0
- package/dist/chunk-ISLACP6M.js +63 -0
- package/dist/chunk-ISLACP6M.js.map +1 -0
- package/dist/chunk-ITM2OXYW.js +143 -0
- package/dist/chunk-ITM2OXYW.js.map +1 -0
- package/dist/chunk-IWOZXJJF.js +108 -0
- package/dist/chunk-IWOZXJJF.js.map +1 -0
- package/dist/chunk-IZG7VX7U.js +3629 -0
- package/dist/chunk-IZG7VX7U.js.map +1 -0
- package/dist/chunk-IZPKXC5T.js +108 -0
- package/dist/chunk-IZPKXC5T.js.map +1 -0
- package/dist/chunk-J77O43SY.js +263 -0
- package/dist/chunk-J77O43SY.js.map +1 -0
- package/dist/chunk-JDIUA4L5.js +141 -0
- package/dist/chunk-JDIUA4L5.js.map +1 -0
- package/dist/chunk-JFXEBKE5.js +141 -0
- package/dist/chunk-JFXEBKE5.js.map +1 -0
- package/dist/chunk-JKFK7BHM.js +108 -0
- package/dist/chunk-JKFK7BHM.js.map +1 -0
- package/dist/chunk-JLDIEGDJ.js +38 -0
- package/dist/chunk-JLDIEGDJ.js.map +1 -0
- package/dist/chunk-JO5SBPNS.js +109 -0
- package/dist/chunk-JO5SBPNS.js.map +1 -0
- package/dist/chunk-JOQA6SDG.js +38 -0
- package/dist/chunk-JOQA6SDG.js.map +1 -0
- package/dist/chunk-JUKLHM7G.js +108 -0
- package/dist/chunk-JUKLHM7G.js.map +1 -0
- package/dist/chunk-K7DXQUWY.js +141 -0
- package/dist/chunk-K7DXQUWY.js.map +1 -0
- package/dist/chunk-KBVUDACJ.js +212 -0
- package/dist/chunk-KBVUDACJ.js.map +1 -0
- package/dist/chunk-KC2DY22D.js +141 -0
- package/dist/chunk-KC2DY22D.js.map +1 -0
- package/dist/chunk-KDYHX27X.js +108 -0
- package/dist/chunk-KDYHX27X.js.map +1 -0
- package/dist/chunk-KGJUIHQK.js +127 -0
- package/dist/chunk-KGJUIHQK.js.map +1 -0
- package/dist/chunk-KIKGZIYW.js +63 -0
- package/dist/chunk-KIKGZIYW.js.map +1 -0
- package/dist/chunk-KJU5OLS3.js +150 -0
- package/dist/chunk-KJU5OLS3.js.map +1 -0
- package/dist/chunk-KM2ZAN4M.js +257 -0
- package/dist/chunk-KM2ZAN4M.js.map +1 -0
- package/dist/chunk-KY2ZDGIF.js +141 -0
- package/dist/chunk-KY2ZDGIF.js.map +1 -0
- package/dist/chunk-KYCICVKS.js +141 -0
- package/dist/chunk-KYCICVKS.js.map +1 -0
- package/dist/chunk-KZZPBI6J.js +108 -0
- package/dist/chunk-KZZPBI6J.js.map +1 -0
- package/dist/chunk-L5CUEXS7.js +108 -0
- package/dist/chunk-L5CUEXS7.js.map +1 -0
- package/dist/chunk-L6SPTHRK.js +63 -0
- package/dist/chunk-L6SPTHRK.js.map +1 -0
- package/dist/chunk-L7CPEX5Q.js +212 -0
- package/dist/chunk-L7CPEX5Q.js.map +1 -0
- package/dist/chunk-L7LRX5XU.js +2296 -0
- package/dist/chunk-L7LRX5XU.js.map +1 -0
- package/dist/chunk-LKVGVLCW.js +844 -0
- package/dist/chunk-LKVGVLCW.js.map +1 -0
- package/dist/chunk-LQYA5NK2.js +108 -0
- package/dist/chunk-LQYA5NK2.js.map +1 -0
- package/dist/chunk-M2YX7FI7.js +141 -0
- package/dist/chunk-M2YX7FI7.js.map +1 -0
- package/dist/chunk-M2ZETO4K.js +127 -0
- package/dist/chunk-M2ZETO4K.js.map +1 -0
- package/dist/chunk-M6MAOPX3.js +108 -0
- package/dist/chunk-M6MAOPX3.js.map +1 -0
- package/dist/chunk-M7IWXN2K.js +211 -0
- package/dist/chunk-M7IWXN2K.js.map +1 -0
- package/dist/chunk-MEOSGIZR.js +127 -0
- package/dist/chunk-MEOSGIZR.js.map +1 -0
- package/dist/chunk-MFUFGYIO.js +127 -0
- package/dist/chunk-MFUFGYIO.js.map +1 -0
- package/dist/chunk-MRTDMFMC.js +257 -0
- package/dist/chunk-MRTDMFMC.js.map +1 -0
- package/dist/chunk-MRUU7EZF.js +212 -0
- package/dist/chunk-MRUU7EZF.js.map +1 -0
- package/dist/chunk-MV35VQI2.js +37 -0
- package/dist/chunk-MV35VQI2.js.map +1 -0
- package/dist/chunk-MWUMNQPB.js +63 -0
- package/dist/chunk-MWUMNQPB.js.map +1 -0
- package/dist/chunk-MZXB5IJP.js +141 -0
- package/dist/chunk-MZXB5IJP.js.map +1 -0
- package/dist/chunk-N4GMCDSM.js +224 -0
- package/dist/chunk-N4GMCDSM.js.map +1 -0
- package/dist/chunk-NB7U63VS.js +141 -0
- package/dist/chunk-NB7U63VS.js.map +1 -0
- package/dist/chunk-NF5DG7TF.js +3629 -0
- package/dist/chunk-NF5DG7TF.js.map +1 -0
- package/dist/chunk-NGAB4S4A.js +63 -0
- package/dist/chunk-NGAB4S4A.js.map +1 -0
- package/dist/chunk-NJ3KYZJZ.js +141 -0
- package/dist/chunk-NJ3KYZJZ.js.map +1 -0
- package/dist/chunk-NPOOQ65V.js +127 -0
- package/dist/chunk-NPOOQ65V.js.map +1 -0
- package/dist/chunk-NQNVZ2Y2.js +127 -0
- package/dist/chunk-NQNVZ2Y2.js.map +1 -0
- package/dist/chunk-NRTH44GV.js +63 -0
- package/dist/chunk-NRTH44GV.js.map +1 -0
- package/dist/chunk-NSN2ONFI.js +212 -0
- package/dist/chunk-NSN2ONFI.js.map +1 -0
- package/dist/chunk-NW5PDW5B.js +143 -0
- package/dist/chunk-NW5PDW5B.js.map +1 -0
- package/dist/chunk-NZFOINXV.js +212 -0
- package/dist/chunk-NZFOINXV.js.map +1 -0
- package/dist/chunk-O4IEY4EN.js +876 -0
- package/dist/chunk-O4IEY4EN.js.map +1 -0
- package/dist/chunk-O6RHDLE7.js +141 -0
- package/dist/chunk-O6RHDLE7.js.map +1 -0
- package/dist/chunk-OGSXDW7D.js +108 -0
- package/dist/chunk-OGSXDW7D.js.map +1 -0
- package/dist/chunk-OHYGCU53.js +141 -0
- package/dist/chunk-OHYGCU53.js.map +1 -0
- package/dist/chunk-OLV63UML.js +127 -0
- package/dist/chunk-OLV63UML.js.map +1 -0
- package/dist/chunk-ORR54EIG.js +212 -0
- package/dist/chunk-ORR54EIG.js.map +1 -0
- package/dist/chunk-OUK5KBFP.js +129 -0
- package/dist/chunk-OUK5KBFP.js.map +1 -0
- package/dist/chunk-OWG2UJNF.js +150 -0
- package/dist/chunk-OWG2UJNF.js.map +1 -0
- package/dist/chunk-OXSSHXEW.js +875 -0
- package/dist/chunk-OXSSHXEW.js.map +1 -0
- package/dist/chunk-P53JJSIX.js +212 -0
- package/dist/chunk-P53JJSIX.js.map +1 -0
- package/dist/chunk-PJOGAA4H.js +141 -0
- package/dist/chunk-PJOGAA4H.js.map +1 -0
- package/dist/chunk-PTADNY4J.js +212 -0
- package/dist/chunk-PTADNY4J.js.map +1 -0
- package/dist/chunk-Q3VVCDVP.js +127 -0
- package/dist/chunk-Q3VVCDVP.js.map +1 -0
- package/dist/chunk-QF5ASUBG.js +3629 -0
- package/dist/chunk-QF5ASUBG.js.map +1 -0
- package/dist/chunk-QFZXB4CD.js +108 -0
- package/dist/chunk-QFZXB4CD.js.map +1 -0
- package/dist/chunk-QJN22YYL.js +128 -0
- package/dist/chunk-QJN22YYL.js.map +1 -0
- package/dist/chunk-QKA7H4EX.js +37 -0
- package/dist/chunk-QKA7H4EX.js.map +1 -0
- package/dist/chunk-QKQG47IV.js +82 -0
- package/dist/chunk-QKQG47IV.js.map +1 -0
- package/dist/chunk-QMBWCVMY.js +108 -0
- package/dist/chunk-QMBWCVMY.js.map +1 -0
- package/dist/chunk-QS2I4PG7.js +212 -0
- package/dist/chunk-QS2I4PG7.js.map +1 -0
- package/dist/chunk-QTN7QLML.js +63 -0
- package/dist/chunk-QTN7QLML.js.map +1 -0
- package/dist/chunk-QYKEGDLO.js +224 -0
- package/dist/chunk-QYKEGDLO.js.map +1 -0
- package/dist/chunk-RDJOMUZH.js +211 -0
- package/dist/chunk-RDJOMUZH.js.map +1 -0
- package/dist/chunk-RGPLJJ2Y.js +141 -0
- package/dist/chunk-RGPLJJ2Y.js.map +1 -0
- package/dist/chunk-RJTRSA4P.js +49 -0
- package/dist/chunk-RJTRSA4P.js.map +1 -0
- package/dist/chunk-RQXQFLB4.js +63 -0
- package/dist/chunk-RQXQFLB4.js.map +1 -0
- package/dist/chunk-RS3YOF5F.js +108 -0
- package/dist/chunk-RS3YOF5F.js.map +1 -0
- package/dist/chunk-RTUI55OW.js +212 -0
- package/dist/chunk-RTUI55OW.js.map +1 -0
- package/dist/chunk-RVARUZVC.js +27 -0
- package/dist/chunk-RVARUZVC.js.map +1 -0
- package/dist/chunk-RVFAWL3I.js +141 -0
- package/dist/chunk-RVFAWL3I.js.map +1 -0
- package/dist/chunk-RYKWAX5X.js +63 -0
- package/dist/chunk-RYKWAX5X.js.map +1 -0
- package/dist/chunk-S5CR7IEA.js +2296 -0
- package/dist/chunk-S5CR7IEA.js.map +1 -0
- package/dist/chunk-S6N5P5OD.js +212 -0
- package/dist/chunk-S6N5P5OD.js.map +1 -0
- package/dist/chunk-SA2LSZDP.js +252 -0
- package/dist/chunk-SA2LSZDP.js.map +1 -0
- package/dist/chunk-SGICH6RI.js +213 -0
- package/dist/chunk-SGICH6RI.js.map +1 -0
- package/dist/chunk-SIX7XLAC.js +49 -0
- package/dist/chunk-SIX7XLAC.js.map +1 -0
- package/dist/chunk-SIZI2YWP.js +212 -0
- package/dist/chunk-SIZI2YWP.js.map +1 -0
- package/dist/chunk-SKRS6PSA.js +141 -0
- package/dist/chunk-SKRS6PSA.js.map +1 -0
- package/dist/chunk-SLWMHHRZ.js +141 -0
- package/dist/chunk-SLWMHHRZ.js.map +1 -0
- package/dist/chunk-SSOJ2LOM.js +141 -0
- package/dist/chunk-SSOJ2LOM.js.map +1 -0
- package/dist/chunk-SVU7AMXV.js +141 -0
- package/dist/chunk-SVU7AMXV.js.map +1 -0
- package/dist/chunk-THZXOHDJ.js +141 -0
- package/dist/chunk-THZXOHDJ.js.map +1 -0
- package/dist/chunk-TLC6WXQ6.js +37 -0
- package/dist/chunk-TLC6WXQ6.js.map +1 -0
- package/dist/chunk-TOTKLZTZ.js +49 -0
- package/dist/chunk-TOTKLZTZ.js.map +1 -0
- package/dist/chunk-TSAG437R.js +49 -0
- package/dist/chunk-TSAG437R.js.map +1 -0
- package/dist/chunk-TTEMP3QU.js +108 -0
- package/dist/chunk-TTEMP3QU.js.map +1 -0
- package/dist/chunk-TXNXFHTS.js +63 -0
- package/dist/chunk-TXNXFHTS.js.map +1 -0
- package/dist/chunk-U7OZK37L.js +63 -0
- package/dist/chunk-U7OZK37L.js.map +1 -0
- package/dist/chunk-UB7MM3A3.js +108 -0
- package/dist/chunk-UB7MM3A3.js.map +1 -0
- package/dist/chunk-UBBJF27D.js +127 -0
- package/dist/chunk-UBBJF27D.js.map +1 -0
- package/dist/chunk-UF4HNAIE.js +108 -0
- package/dist/chunk-UF4HNAIE.js.map +1 -0
- package/dist/chunk-UF7UWXSC.js +127 -0
- package/dist/chunk-UF7UWXSC.js.map +1 -0
- package/dist/chunk-UHLTNS5S.js +2296 -0
- package/dist/chunk-UHLTNS5S.js.map +1 -0
- package/dist/chunk-ULTQZ5FS.js +63 -0
- package/dist/chunk-ULTQZ5FS.js.map +1 -0
- package/dist/chunk-URVGL7OD.js +2296 -0
- package/dist/chunk-URVGL7OD.js.map +1 -0
- package/dist/chunk-USQFD6IR.js +63 -0
- package/dist/chunk-USQFD6IR.js.map +1 -0
- package/dist/chunk-UVPSXDVG.js +100 -0
- package/dist/chunk-UVPSXDVG.js.map +1 -0
- package/dist/chunk-UVURDTXJ.js +212 -0
- package/dist/chunk-UVURDTXJ.js.map +1 -0
- package/dist/chunk-V2QIYGY7.js +127 -0
- package/dist/chunk-V2QIYGY7.js.map +1 -0
- package/dist/chunk-VCE2DP4V.js +100 -0
- package/dist/chunk-VCE2DP4V.js.map +1 -0
- package/dist/chunk-VGCTU7HB.js +127 -0
- package/dist/chunk-VGCTU7HB.js.map +1 -0
- package/dist/chunk-VR7OODCZ.js +150 -0
- package/dist/chunk-VR7OODCZ.js.map +1 -0
- package/dist/chunk-VVJ7Z3KU.js +143 -0
- package/dist/chunk-VVJ7Z3KU.js.map +1 -0
- package/dist/chunk-VVVHFBW7.js +127 -0
- package/dist/chunk-VVVHFBW7.js.map +1 -0
- package/dist/chunk-VXOIIFIY.js +37 -0
- package/dist/chunk-VXOIIFIY.js.map +1 -0
- package/dist/chunk-W3A6JEOD.js +224 -0
- package/dist/chunk-W3A6JEOD.js.map +1 -0
- package/dist/chunk-W4BQSWJN.js +212 -0
- package/dist/chunk-W4BQSWJN.js.map +1 -0
- package/dist/chunk-WJK2VUHR.js +65 -0
- package/dist/chunk-WJK2VUHR.js.map +1 -0
- package/dist/chunk-WPBZEYKB.js +212 -0
- package/dist/chunk-WPBZEYKB.js.map +1 -0
- package/dist/chunk-WV2RUP2Y.js +141 -0
- package/dist/chunk-WV2RUP2Y.js.map +1 -0
- package/dist/chunk-WXVV7KLP.js +127 -0
- package/dist/chunk-WXVV7KLP.js.map +1 -0
- package/dist/chunk-X3BV2HV3.js +212 -0
- package/dist/chunk-X3BV2HV3.js.map +1 -0
- package/dist/chunk-X6E5Y3LR.js +141 -0
- package/dist/chunk-X6E5Y3LR.js.map +1 -0
- package/dist/chunk-X6FBYNQG.js +108 -0
- package/dist/chunk-X6FBYNQG.js.map +1 -0
- package/dist/chunk-X73K44QV.js +49 -0
- package/dist/chunk-X73K44QV.js.map +1 -0
- package/dist/chunk-XC4OHJZG.js +250 -0
- package/dist/chunk-XC4OHJZG.js.map +1 -0
- package/dist/chunk-XDDZHBM4.js +101 -0
- package/dist/chunk-XDDZHBM4.js.map +1 -0
- package/dist/chunk-XEPPP6D4.js +252 -0
- package/dist/chunk-XEPPP6D4.js.map +1 -0
- package/dist/chunk-XG6O7CXO.js +141 -0
- package/dist/chunk-XG6O7CXO.js.map +1 -0
- package/dist/chunk-XN5HKZNZ.js +63 -0
- package/dist/chunk-XN5HKZNZ.js.map +1 -0
- package/dist/chunk-XPL5VFRD.js +224 -0
- package/dist/chunk-XPL5VFRD.js.map +1 -0
- package/dist/chunk-XSIVI53W.js +212 -0
- package/dist/chunk-XSIVI53W.js.map +1 -0
- package/dist/chunk-XU42NMC2.js +37 -0
- package/dist/chunk-XU42NMC2.js.map +1 -0
- package/dist/chunk-XWKRVTOF.js +141 -0
- package/dist/chunk-XWKRVTOF.js.map +1 -0
- package/dist/chunk-XWZ4TDO5.js +108 -0
- package/dist/chunk-XWZ4TDO5.js.map +1 -0
- package/dist/chunk-XX4L6GVN.js +63 -0
- package/dist/chunk-XX4L6GVN.js.map +1 -0
- package/dist/chunk-XXGZMUVM.js +63 -0
- package/dist/chunk-XXGZMUVM.js.map +1 -0
- package/dist/chunk-Y4HM4Z3B.js +108 -0
- package/dist/chunk-Y4HM4Z3B.js.map +1 -0
- package/dist/chunk-Y5QJD3KW.js +108 -0
- package/dist/chunk-Y5QJD3KW.js.map +1 -0
- package/dist/chunk-YNFLM23N.js +108 -0
- package/dist/chunk-YNFLM23N.js.map +1 -0
- package/dist/chunk-YPRAHGPU.js +150 -0
- package/dist/chunk-YPRAHGPU.js.map +1 -0
- package/dist/chunk-YURQ7MSJ.js +108 -0
- package/dist/chunk-YURQ7MSJ.js.map +1 -0
- package/dist/chunk-YVSUXU5I.js +141 -0
- package/dist/chunk-YVSUXU5I.js.map +1 -0
- package/dist/chunk-YXEH4FU4.js +141 -0
- package/dist/chunk-YXEH4FU4.js.map +1 -0
- package/dist/chunk-Z4Q3W7CZ.js +868 -0
- package/dist/chunk-Z4Q3W7CZ.js.map +1 -0
- package/dist/chunk-ZAKHKJLN.js +65 -0
- package/dist/chunk-ZAKHKJLN.js.map +1 -0
- package/dist/chunk-ZE2A3A2S.js +224 -0
- package/dist/chunk-ZE2A3A2S.js.map +1 -0
- package/dist/chunk-ZFHH2EIQ.js +126 -0
- package/dist/chunk-ZFHH2EIQ.js.map +1 -0
- package/dist/chunk-ZL4VSCCE.js +224 -0
- package/dist/chunk-ZL4VSCCE.js.map +1 -0
- package/dist/chunk-ZN3N7CZK.js +141 -0
- package/dist/chunk-ZN3N7CZK.js.map +1 -0
- package/dist/chunk-ZOZ75ANX.js +2296 -0
- package/dist/chunk-ZOZ75ANX.js.map +1 -0
- package/dist/chunk-ZPSNQP7M.js +141 -0
- package/dist/chunk-ZPSNQP7M.js.map +1 -0
- package/dist/chunk-ZW4AXQU4.js +141 -0
- package/dist/chunk-ZW4AXQU4.js.map +1 -0
- package/dist/chunk-ZX3CUM6K.js +212 -0
- package/dist/chunk-ZX3CUM6K.js.map +1 -0
- package/dist/components/AddressContainer/CoreAddressContainer.js +11 -11
- package/dist/components/AddressContainer/EVMAddressContainer.js +9 -9
- package/dist/components/AddressContainer/addressSwitcher.js +7 -7
- package/dist/components/AddressContainer/addressView.js +6 -6
- package/dist/components/AddressContainer/label.js +3 -3
- package/dist/components/Charts/PreviewChartTemplate.js +2 -2
- package/dist/components/Charts/StockChartTemplate.js +2 -2
- package/dist/components/CopyButton/index.js +2 -2
- package/dist/components/CountDown/index.js +3 -3
- package/dist/components/DownloadCSV/index.js +3 -3
- package/dist/components/GasPriceDropdown/index.d.ts +5 -2
- package/dist/components/GasPriceDropdown/index.js +9 -7
- package/dist/components/GasPriceDropdown/index.js.map +1 -1
- package/dist/components/IncreasePercent/Icons.d.ts +6 -0
- package/dist/components/IncreasePercent/Icons.js +9 -0
- package/dist/components/IncreasePercent/Icons.js.map +1 -0
- package/dist/components/IncreasePercent/index.d.ts +20 -0
- package/dist/components/IncreasePercent/index.js +42 -0
- package/dist/components/IncreasePercent/index.js.map +1 -0
- package/dist/components/InfoIconWithTooltip/index.js +2 -2
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/Price/index.js +2 -2
- package/dist/components/Select/index.js +2 -2
- package/dist/components/Select/select.js +2 -2
- package/dist/components/Text/index.js +3 -3
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/TransactionAction/coreTransactionAction.js +11 -11
- package/dist/components/TransactionAction/evmTransactionAction.js +10 -10
- package/dist/utils/address.d.ts +23 -20
- package/dist/utils/address.js +7 -3
- package/dist/utils/hooks/useENS.js +5 -5
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/request.js +2 -2
- package/dist/utils/rpcRequest.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useENS
|
|
3
|
+
} from "./chunk-4WXBNSCI.js";
|
|
4
|
+
import {
|
|
5
|
+
ContractAddress,
|
|
6
|
+
ContractCreatedAddress,
|
|
7
|
+
CoreHexAddress,
|
|
8
|
+
InvalidAddress,
|
|
9
|
+
MyAddress,
|
|
10
|
+
PosAddress
|
|
11
|
+
} from "./chunk-M7IWXN2K.js";
|
|
12
|
+
import {
|
|
13
|
+
RenderAddress
|
|
14
|
+
} from "./chunk-OUK5KBFP.js";
|
|
15
|
+
import {
|
|
16
|
+
formatAddress,
|
|
17
|
+
isCoreAddress,
|
|
18
|
+
isCoreContractAddress,
|
|
19
|
+
isZeroAddress
|
|
20
|
+
} from "./chunk-WKT3L6C4.js";
|
|
21
|
+
import {
|
|
22
|
+
getLabelInfo
|
|
23
|
+
} from "./chunk-72WUTI2U.js";
|
|
24
|
+
import {
|
|
25
|
+
getTranslations,
|
|
26
|
+
useGlobalData
|
|
27
|
+
} from "./chunk-HRW4BUP4.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-ASADUYXC.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,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
+
import {
|
|
5
|
+
getTranslations
|
|
6
|
+
} from "./chunk-QKQG47IV.js";
|
|
7
|
+
|
|
8
|
+
// src/components/AddressContainer/label.tsx
|
|
9
|
+
import { Translation } from "react-i18next";
|
|
10
|
+
import { Bookmark, Hash } from "@zeit-ui/react-icons";
|
|
11
|
+
import ICON_ENS from "./logo-cns-7CXISC6I.svg";
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
var getLabelInfo = (label, type) => {
|
|
14
|
+
const translations = getTranslations();
|
|
15
|
+
if (label) {
|
|
16
|
+
let trans = "";
|
|
17
|
+
let icon = null;
|
|
18
|
+
if (type === "tag") {
|
|
19
|
+
trans = translations.profile.tip.label;
|
|
20
|
+
icon = /* @__PURE__ */ jsx(Bookmark, { color: "var(--theme-color-gray2)", size: 16 });
|
|
21
|
+
} else if (type === "ens") {
|
|
22
|
+
trans = translations.ens.label;
|
|
23
|
+
icon = /* @__PURE__ */ jsx(
|
|
24
|
+
"img",
|
|
25
|
+
{
|
|
26
|
+
src: ICON_ENS,
|
|
27
|
+
className: "w-[16px] h-[16px] mb-[3px] mr-[2px]",
|
|
28
|
+
alt: ""
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
} else if (type === "nametag") {
|
|
32
|
+
trans = translations.nametag.label;
|
|
33
|
+
icon = /* @__PURE__ */ jsx(Hash, { color: "var(--theme-color-gray2)", size: 16 });
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
label,
|
|
37
|
+
icon: /* @__PURE__ */ jsx("span", { className: "mr-[2px]", children: /* @__PURE__ */ jsx(Tooltip, { title: /* @__PURE__ */ jsx(Translation, { children: (t) => t(trans) }), children: icon }) })
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
label: "",
|
|
42
|
+
icon: null
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
getLabelInfo
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=chunk-BDSJ5P63.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/label.tsx"],"sourcesContent":["import { Translation } from 'react-i18next';\nimport { Bookmark, Hash } from '@zeit-ui/react-icons';\nimport { Tooltip } from '../Tooltip';\nimport { getTranslations } from '../../store';\nimport ICON_ENS from '../../images/logo-cns.svg';\n\nexport const getLabelInfo = (label: string, type: string) => {\n const translations = getTranslations();\n if (label) {\n let trans: string = '';\n let icon: React.ReactNode = null;\n\n if (type === 'tag') {\n trans = translations.profile.tip.label;\n icon = <Bookmark color=\"var(--theme-color-gray2)\" size={16} />;\n } else if (type === 'ens') {\n trans = (translations as any).ens.label;\n icon = (\n <img\n src={ICON_ENS}\n className=\"w-[16px] h-[16px] mb-[3px] mr-[2px]\"\n alt=\"\"\n />\n );\n // nametag from official operational staff\n } else if (type === 'nametag') {\n trans = translations.nametag.label;\n icon = <Hash color=\"var(--theme-color-gray2)\" size={16} />;\n }\n\n return {\n label,\n icon: (\n <span className=\"mr-[2px]\">\n <Tooltip title={<Translation>{t => t(trans)}</Translation>}>\n {icon}\n </Tooltip>\n </span>\n ),\n };\n }\n\n return {\n label: '',\n icon: null,\n };\n};\n"],"mappings":";;;;;;;;AAAA,SAAS,mBAAmB;AAC5B,SAAS,UAAU,YAAY;AAG/B,OAAO,cAAc;AAUR;AARN,IAAM,eAAe,CAAC,OAAe,SAAiB;AAC3D,QAAM,eAAe,gBAAgB;AACrC,MAAI,OAAO;AACT,QAAI,QAAgB;AACpB,QAAI,OAAwB;AAE5B,QAAI,SAAS,OAAO;AAClB,cAAQ,aAAa,QAAQ,IAAI;AACjC,aAAO,oBAAC,YAAS,OAAM,4BAA2B,MAAM,IAAI;AAAA,IAC9D,WAAW,SAAS,OAAO;AACzB,cAAS,aAAqB,IAAI;AAClC,aACE;AAAA,QAAC;AAAA;AAAA,UACC,KAAK;AAAA,UACL,WAAU;AAAA,UACV,KAAI;AAAA;AAAA,MACN;AAAA,IAGJ,WAAW,SAAS,WAAW;AAC7B,cAAQ,aAAa,QAAQ;AAC7B,aAAO,oBAAC,QAAK,OAAM,4BAA2B,MAAM,IAAI;AAAA,IAC1D;AAEA,WAAO;AAAA,MACL;AAAA,MACA,MACE,oBAAC,UAAK,WAAU,YACd,8BAAC,WAAQ,OAAO,oBAAC,eAAa,iBAAK,EAAE,KAAK,GAAE,GACzC,gBACH,GACF;AAAA,IAEJ;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AACF;","names":[]}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useENS
|
|
3
|
+
} from "./chunk-4WXBNSCI.js";
|
|
4
|
+
import {
|
|
5
|
+
ContractAddress,
|
|
6
|
+
ContractCreatedAddress,
|
|
7
|
+
CoreHexAddress,
|
|
8
|
+
InvalidAddress,
|
|
9
|
+
MyAddress,
|
|
10
|
+
PosAddress
|
|
11
|
+
} from "./chunk-XSIVI53W.js";
|
|
12
|
+
import {
|
|
13
|
+
RenderAddress
|
|
14
|
+
} from "./chunk-6FTTLWSN.js";
|
|
15
|
+
import {
|
|
16
|
+
formatAddress,
|
|
17
|
+
isCoreAddress,
|
|
18
|
+
isCoreContractAddress,
|
|
19
|
+
isZeroAddress
|
|
20
|
+
} from "./chunk-WKT3L6C4.js";
|
|
21
|
+
import {
|
|
22
|
+
getLabelInfo
|
|
23
|
+
} from "./chunk-72WUTI2U.js";
|
|
24
|
+
import {
|
|
25
|
+
getTranslations,
|
|
26
|
+
useGlobalData
|
|
27
|
+
} from "./chunk-HRW4BUP4.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-BGTUC3AF.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,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AAAA,IACvC;AAEA,QAAI,CAAC,cAAc,gBAAgB,KAAK,GAAG;AACzC,aAAO,eAAe,eAAe;AAAA,IACvC;AAEA,QAAI,sBAAsB,gBAAgB,UAAU,GAAG;AACrD,aAAO,gBAAgB,eAAe;AAAA,IACxC;AAEA,QAAI,gBAAgB,MAAM;AACxB,aAAO,UAAU,eAAe;AAAA,IAClC;AAEA,WAAO,cAAc,eAAe;AAAA,EACtC,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useENS
|
|
3
|
+
} from "./chunk-NGAB4S4A.js";
|
|
4
|
+
import {
|
|
5
|
+
ContractAddress,
|
|
6
|
+
ContractCreatedAddress,
|
|
7
|
+
CoreHexAddress,
|
|
8
|
+
InvalidAddress,
|
|
9
|
+
MyAddress,
|
|
10
|
+
PosAddress
|
|
11
|
+
} from "./chunk-AHY4G53B.js";
|
|
12
|
+
import {
|
|
13
|
+
RenderAddress
|
|
14
|
+
} from "./chunk-4DOOVZYQ.js";
|
|
15
|
+
import {
|
|
16
|
+
formatAddress,
|
|
17
|
+
isCoreAddress,
|
|
18
|
+
isCoreContractAddress,
|
|
19
|
+
isZeroAddress
|
|
20
|
+
} from "./chunk-QYKEGDLO.js";
|
|
21
|
+
import {
|
|
22
|
+
getLabelInfo
|
|
23
|
+
} from "./chunk-72WUTI2U.js";
|
|
24
|
+
import {
|
|
25
|
+
getTranslations,
|
|
26
|
+
useGlobalData
|
|
27
|
+
} from "./chunk-HRW4BUP4.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-BJ5IIEVM.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,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eAAe;AAAA,IACvC;AAEA,QAAI,sBAAsB,gBAAgB,UAAU,GAAG;AACrD,aAAO,gBAAgB,eAAe;AAAA,IACxC;AAEA,QAAI,gBAAgB,MAAM;AACxB,aAAO,UAAU,eAAe;AAAA,IAClC;AAEA,WAAO,cAAc,eAAe;AAAA,EACtC,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import {
|
|
2
|
+
convertCheckSum
|
|
3
|
+
} from "./chunk-SA2LSZDP.js";
|
|
4
|
+
import {
|
|
5
|
+
Text
|
|
6
|
+
} from "./chunk-557Y4PWU.js";
|
|
7
|
+
import {
|
|
8
|
+
getTranslations
|
|
9
|
+
} from "./chunk-QKQG47IV.js";
|
|
10
|
+
|
|
11
|
+
// src/components/AddressContainer/addressView.tsx
|
|
12
|
+
import { Translation } from "react-i18next";
|
|
13
|
+
import { shortenAddress } from "@cfx-kit/dapp-utils/dist/address";
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var defaultPCMaxWidth = 138;
|
|
16
|
+
var renderTooltipContent = (tooltipContent) => {
|
|
17
|
+
return Object.entries(tooltipContent).map(([key, { label, value, hideLabel }]) => {
|
|
18
|
+
if (value) {
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
20
|
+
!hideLabel && /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Translation, { children: (t) => t(label) }) }),
|
|
21
|
+
value
|
|
22
|
+
] }, key);
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}).filter(Boolean);
|
|
26
|
+
};
|
|
27
|
+
var convertLink = ({
|
|
28
|
+
link,
|
|
29
|
+
type,
|
|
30
|
+
hrefAddress,
|
|
31
|
+
cfxAddress
|
|
32
|
+
}) => {
|
|
33
|
+
if (typeof link === "string") {
|
|
34
|
+
return link;
|
|
35
|
+
}
|
|
36
|
+
const address = hrefAddress || cfxAddress;
|
|
37
|
+
if (address && typeof address === "string") {
|
|
38
|
+
const pathname = window.location.pathname.toLowerCase();
|
|
39
|
+
const addressLower = address.toLowerCase();
|
|
40
|
+
if (pathname.includes("/address/" + addressLower)) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
if (type === "pow") {
|
|
44
|
+
return `/address/${address}`;
|
|
45
|
+
}
|
|
46
|
+
if (type === "pos") {
|
|
47
|
+
return `/pos/accounts/${address}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
51
|
+
};
|
|
52
|
+
var RenderAddress = ({
|
|
53
|
+
cfxAddress,
|
|
54
|
+
alias,
|
|
55
|
+
hoverValue,
|
|
56
|
+
hrefAddress,
|
|
57
|
+
content,
|
|
58
|
+
link = "",
|
|
59
|
+
isFull = false,
|
|
60
|
+
isFullNameTag = false,
|
|
61
|
+
style = {},
|
|
62
|
+
maxWidth,
|
|
63
|
+
prefix = null,
|
|
64
|
+
suffix = null,
|
|
65
|
+
type = "pow",
|
|
66
|
+
addressLabel = "",
|
|
67
|
+
ENSLabel = "",
|
|
68
|
+
nametag = "",
|
|
69
|
+
hideAliasPrefixInHover = false
|
|
70
|
+
}) => {
|
|
71
|
+
const translations = getTranslations();
|
|
72
|
+
const name = content || ENSLabel || nametag || addressLabel || alias;
|
|
73
|
+
const defaultStyle = {
|
|
74
|
+
maxWidth: `${name && isFullNameTag || isFull ? "auto" : (maxWidth || defaultPCMaxWidth) + "px"}`
|
|
75
|
+
};
|
|
76
|
+
const href = convertLink({ link, type, hrefAddress, cfxAddress });
|
|
77
|
+
const Wrapper = href ? "a" : "div";
|
|
78
|
+
const tooltipContent = {
|
|
79
|
+
ENSLabel: {
|
|
80
|
+
label: translations?.ens?.tip,
|
|
81
|
+
value: ENSLabel
|
|
82
|
+
},
|
|
83
|
+
nametag: {
|
|
84
|
+
label: translations?.nametag?.tip,
|
|
85
|
+
value: nametag
|
|
86
|
+
},
|
|
87
|
+
addressLabel: {
|
|
88
|
+
label: translations?.profile.address.myNameTag,
|
|
89
|
+
value: addressLabel
|
|
90
|
+
},
|
|
91
|
+
alias: {
|
|
92
|
+
label: translations?.profile.address.publicNameTag,
|
|
93
|
+
value: alias,
|
|
94
|
+
hideLabel: hideAliasPrefixInHover
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const checksumAddress = convertCheckSum(cfxAddress);
|
|
98
|
+
const cfxAddressLabel = typeof cfxAddress === "string" && !isFull ? shortenAddress(checksumAddress) : checksumAddress;
|
|
99
|
+
return /* @__PURE__ */ jsxs("div", { className: "inline-flex", children: [
|
|
100
|
+
prefix,
|
|
101
|
+
/* @__PURE__ */ jsx(
|
|
102
|
+
Text,
|
|
103
|
+
{
|
|
104
|
+
tag: "span",
|
|
105
|
+
hoverValue: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
106
|
+
renderTooltipContent(tooltipContent),
|
|
107
|
+
/* @__PURE__ */ jsx("div", { children: hoverValue || checksumAddress })
|
|
108
|
+
] }),
|
|
109
|
+
children: /* @__PURE__ */ jsx(
|
|
110
|
+
Wrapper,
|
|
111
|
+
{
|
|
112
|
+
className: "block relative align-bottom cursor-default truncate",
|
|
113
|
+
style: { ...defaultStyle, ...style },
|
|
114
|
+
...href ? { href: String(href) } : {},
|
|
115
|
+
children: name || cfxAddressLabel
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
suffix
|
|
121
|
+
] });
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export {
|
|
125
|
+
RenderAddress
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=chunk-BPRHSATO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/addressView.tsx"],"sourcesContent":["import { Translation } from 'react-i18next';\nimport { Text } from '../Text';\nimport { convertCheckSum } from '../../utils/address';\nimport { getTranslations } from '../../store';\nimport { TooltipContent, RenderAddressProps } from './types';\nimport { shortenAddress } from '@cfx-kit/dapp-utils/dist/address';\n\nconst defaultPCMaxWidth = 138;\n\n// common\nconst renderTooltipContent = (tooltipContent: TooltipContent) => {\n return Object.entries(tooltipContent)\n .map(([key, { label, value, hideLabel }]) => {\n if (value) {\n return (\n <div key={key}>\n {!hideLabel && (\n <span>\n <Translation>{t => t(label)}</Translation>\n </span>\n )}\n {value}\n </div>\n );\n }\n return null;\n })\n .filter(Boolean);\n};\n\n// common\nconst convertLink = ({\n link,\n type,\n hrefAddress,\n cfxAddress,\n}: RenderAddressProps) => {\n if (typeof link === 'string') {\n return link;\n }\n\n const address = hrefAddress || cfxAddress;\n\n if (address && typeof address === 'string') {\n const pathname = window.location.pathname.toLowerCase();\n const addressLower = address.toLowerCase();\n if (pathname.includes('/address/' + addressLower)) {\n return false;\n }\n\n if (type === 'pow') {\n return `/address/${address}`;\n }\n\n if (type === 'pos') {\n return `/pos/accounts/${address}`;\n }\n }\n\n return false;\n};\n\n// common\nexport const RenderAddress = ({\n cfxAddress,\n alias,\n hoverValue,\n hrefAddress,\n content,\n link = '',\n isFull = false,\n isFullNameTag = false,\n style = {},\n maxWidth,\n prefix = null,\n suffix = null,\n type = 'pow',\n addressLabel = '',\n ENSLabel = '',\n nametag = '',\n hideAliasPrefixInHover = false,\n}: RenderAddressProps) => {\n const translations = getTranslations();\n\n const name = content || ENSLabel || nametag || addressLabel || alias;\n\n const defaultStyle = {\n maxWidth: `${(name && isFullNameTag) || isFull ? 'auto' : (maxWidth || defaultPCMaxWidth) + 'px'}`,\n };\n\n const href = convertLink({ link, type, hrefAddress, cfxAddress });\n\n const Wrapper = href ? 'a' : 'div';\n\n const tooltipContent: TooltipContent = {\n ENSLabel: {\n label: (translations as any)?.ens?.tip,\n value: ENSLabel,\n },\n nametag: {\n label: translations?.nametag?.tip,\n value: nametag,\n },\n addressLabel: {\n label: translations?.profile.address.myNameTag,\n value: addressLabel,\n },\n alias: {\n label: translations?.profile.address.publicNameTag,\n value: alias,\n hideLabel: hideAliasPrefixInHover,\n },\n };\n\n const checksumAddress = convertCheckSum(cfxAddress);\n\n const cfxAddressLabel =\n typeof cfxAddress === 'string' && !isFull\n ? shortenAddress(checksumAddress!)\n : checksumAddress;\n\n return (\n <div className=\"inline-flex\">\n {prefix}\n <Text\n tag=\"span\"\n hoverValue={\n <>\n {renderTooltipContent(tooltipContent)}\n <div>{hoverValue || checksumAddress}</div>\n </>\n }\n >\n <Wrapper\n className=\"block relative align-bottom cursor-default truncate\"\n style={{ ...defaultStyle, ...style }}\n {...(href ? { href: String(href) } : {})}\n >\n {name || cfxAddressLabel}\n </Wrapper>\n </Text>\n {suffix}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,mBAAmB;AAK5B,SAAS,sBAAsB;AAUrB,SAgHA,UA7GM,KAHN;AARV,IAAM,oBAAoB;AAG1B,IAAM,uBAAuB,CAAC,mBAAmC;AAC/D,SAAO,OAAO,QAAQ,cAAc,EACjC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,OAAO,UAAU,CAAC,MAAM;AAC3C,QAAI,OAAO;AACT,aACE,qBAAC,SACE;AAAA,SAAC,aACA,oBAAC,UACC,8BAAC,eAAa,iBAAK,EAAE,KAAK,GAAE,GAC9B;AAAA,QAED;AAAA,WANO,GAOV;AAAA,IAEJ;AACA,WAAO;AAAA,EACT,CAAC,EACA,OAAO,OAAO;AACnB;AAGA,IAAM,cAAc,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA0B;AACxB,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO;AAAA,EACT;AAEA,QAAM,UAAU,eAAe;AAE/B,MAAI,WAAW,OAAO,YAAY,UAAU;AAC1C,UAAM,WAAW,OAAO,SAAS,SAAS,YAAY;AACtD,UAAM,eAAe,QAAQ,YAAY;AACzC,QAAI,SAAS,SAAS,cAAc,YAAY,GAAG;AACjD,aAAO;AAAA,IACT;AAEA,QAAI,SAAS,OAAO;AAClB,aAAO,YAAY;AAAA,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