@gardenfi/utils 2.4.4 → 2.4.5-beta.2
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/index10.cjs +1 -1
- package/dist/index10.js +4 -4
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +22 -5
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +108 -34
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +6 -9
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +50 -8
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +16 -26
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +10 -10
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +5 -14
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +13 -116
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +3 -81
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +24 -175
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +4 -6
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +6 -13
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +87 -12
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +123 -93
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +7 -75
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +21 -89
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +16 -137
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +38 -67
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +21 -23
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +10 -108
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +5 -5
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +105 -49
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +3 -17
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +4 -11
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +9 -6
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +2 -15
- package/dist/index126.cjs +2 -1
- package/dist/index126.js +3 -4
- package/dist/index127.cjs +20 -1
- package/dist/index127.js +326 -26
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +13 -4
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +4 -6
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +2 -89
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +6 -124
- package/dist/index132.cjs +3 -1
- package/dist/index132.js +215 -7
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +32 -22
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +20 -16
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +5 -40
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +73 -21
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +5 -11
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +5 -6
- package/dist/index139.cjs +9 -1
- package/dist/index139.js +34 -105
- package/dist/index140.cjs +3 -1
- package/dist/index140.js +111 -3
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +3 -4
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +24 -9
- package/dist/index143.cjs +3 -1
- package/dist/index143.js +452 -2
- package/dist/index144.cjs +2 -2
- package/dist/index144.js +55 -3
- package/dist/index145.cjs +1 -20
- package/dist/index145.js +17 -317
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +31 -11
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +35 -4
- package/dist/index148.cjs +4 -1
- package/dist/index148.js +195 -2
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +7 -6
- package/dist/index150.cjs +1 -3
- package/dist/index150.js +8 -211
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +19 -32
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +26 -20
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +8 -5
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +52 -70
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +45 -5
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +8 -5
- package/dist/index157.cjs +1 -9
- package/dist/index157.js +7 -35
- package/dist/index158.cjs +1 -3
- package/dist/index158.js +16 -110
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +19 -3
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +4 -4
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +21 -23
- package/dist/index161.cjs +1 -3
- package/dist/index161.js +51 -451
- package/dist/index162.cjs +1 -2
- package/dist/index162.js +11 -54
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +153 -18
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +20 -32
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +126 -34
- package/dist/index166.cjs +1 -4
- package/dist/index166.js +38 -194
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +6 -8
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +25 -16
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +183 -19
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +4 -9
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +64 -7
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +3 -17
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +18 -16
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +14 -19
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +23 -51
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +11 -11
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +31 -158
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +3 -128
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +18 -38
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +27 -6
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +35 -26
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +10 -191
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +26 -4
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +27 -63
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +66 -3
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +9 -20
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +32 -15
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +24 -23
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +23 -33
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +8 -8
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +4 -3
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +14 -18
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +101 -25
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +78 -34
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +5 -10
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +6 -25
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +27 -28
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +37 -63
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +13 -9
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +41 -23
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +5 -24
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +11 -3
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +19 -14
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +71 -73
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +2 -6
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +36 -26
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +108 -39
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +49 -5
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +32 -11
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +8 -19
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +2 -2
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +6 -78
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +7 -2
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +11 -37
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +9 -110
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +12 -48
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +31 -31
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +5 -9
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +7 -6
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +8 -6
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +20 -11
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +30 -9
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +3 -13
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +16 -31
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +11 -5
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +21 -7
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +22 -8
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +5 -20
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +5 -31
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +8 -20
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +104 -3
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +9 -9
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +3 -18
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +18 -10
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +169 -19
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +17 -22
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +10 -5
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +16 -8
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +21 -103
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +31 -3
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +2 -19
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +13 -17
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +31 -13
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +12 -10
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +46 -15
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +10 -21
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +7 -30
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +10 -2
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +10 -10
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +13 -11
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +9 -47
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +24 -11
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +12 -7
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +32 -58
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +24 -9
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +10 -10
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +15 -14
- package/dist/index253.cjs +2 -1
- package/dist/index253.js +24 -9
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +52 -24
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +25 -12
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +13 -24
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +14 -12
- package/dist/index258.cjs +1 -1
- package/dist/index258.js +5 -15
- package/dist/index259.cjs +1 -2
- package/dist/index259.js +13 -24
- package/dist/index26.cjs +1 -16
- package/dist/index26.js +11 -113
- package/dist/index260.cjs +1 -1
- package/dist/index260.js +10 -52
- package/dist/index261.cjs +1 -1
- package/dist/index261.js +16 -224
- package/dist/index262.cjs +2 -1
- package/dist/index262.js +40 -138
- package/dist/index263.cjs +1 -1
- package/dist/index263.js +2 -147
- package/dist/index264.cjs +1 -1
- package/dist/index264.js +5 -103
- package/dist/index265.cjs +1 -1
- package/dist/index265.js +10 -6
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +18 -41
- package/dist/index267.cjs +1 -1
- package/dist/index267.js +8 -78
- package/dist/index268.cjs +1 -1
- package/dist/index268.js +67 -2
- package/dist/index269.cjs +1 -2
- package/dist/index269.js +64 -40
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +58 -32
- package/dist/index270.cjs +1 -1
- package/dist/index270.js +187 -2
- package/dist/index271.cjs +1 -1
- package/dist/index271.js +21 -4
- package/dist/index272.cjs +1 -1
- package/dist/index272.js +41 -9
- package/dist/index273.cjs +1 -1
- package/dist/index273.js +74 -17
- package/dist/index274.cjs +1 -1
- package/dist/index274.js +40 -8
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +16 -66
- package/dist/index276.cjs +1 -1
- package/dist/index276.js +12 -64
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +10 -184
- package/dist/index278.cjs +2 -1
- package/dist/index278.js +18 -22
- package/dist/index279.cjs +1 -1
- package/dist/index279.js +13 -41
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +13 -31
- package/dist/index280.cjs +1 -1
- package/dist/index280.js +11 -76
- package/dist/index281.cjs +1 -1
- package/dist/index281.js +136 -21
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +9 -16
- package/dist/index283.cjs +1 -1
- package/dist/index283.js +107 -7
- package/dist/index284.cjs +2 -1
- package/dist/index284.js +135 -13
- package/dist/index285.cjs +1 -2
- package/dist/index285.js +103 -18
- package/dist/index286.cjs +1 -1
- package/dist/index286.js +6 -14
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +224 -11
- package/dist/index288.cjs +1 -1
- package/dist/index288.js +2 -2
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +1 -1
- package/dist/index29.cjs +16 -1
- package/dist/index29.js +113 -11
- package/dist/index290.cjs +1 -1
- package/dist/index290.js +1 -1
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +146 -3
- package/dist/index293.cjs +1 -1
- package/dist/index293.js +3 -140
- package/dist/index294.cjs +1 -1
- package/dist/index294.js +128 -143
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +11 -9
- package/dist/index296.cjs +1 -1
- package/dist/index296.js +18 -112
- package/dist/index297.cjs +1 -2
- package/dist/index297.js +35 -127
- package/dist/index298.cjs +1 -1
- package/dist/index298.js +77 -10
- package/dist/index299.cjs +1 -1
- package/dist/index299.js +2 -20
- package/dist/index300.cjs +1 -1
- package/dist/index300.js +68 -698
- package/dist/index301.cjs +2 -1
- package/dist/index301.js +63 -198
- package/dist/index302.cjs +1 -1
- package/dist/index302.js +4 -68
- package/dist/index303.cjs +1 -2
- package/dist/index303.js +39 -65
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +7 -4
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +60 -38
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +77 -7
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +4 -63
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +181 -64
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +699 -4
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +126 -181
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +201 -4
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +4 -4
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +45 -5
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +4 -44
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +5 -2
- package/dist/index316.cjs +1 -1
- package/dist/index316.js +2 -22
- package/dist/index317.cjs +1 -0
- package/dist/index317.js +24 -0
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +7 -39
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +31 -45
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +28 -24
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +16 -6
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +33 -13
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +44 -15
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +151 -5
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +34 -12
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +56 -9
- package/dist/index41.cjs +2 -1
- package/dist/index41.js +58 -11
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +13 -11
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +37 -13
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +15 -33
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +8 -55
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +20 -16
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +2 -6
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +45 -8
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +31 -170
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +3 -103
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +9 -3
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +67 -20
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +9 -7
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +25 -28
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +71 -29
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +19 -16
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +110 -33
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +57 -41
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +23 -150
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +37 -32
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +35 -36
- package/dist/index62.cjs +1 -2
- package/dist/index62.js +57 -58
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +164 -35
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +39 -14
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +9 -8
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +37 -2
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +9 -45
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +48 -29
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +88 -8
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +38 -65
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +8 -9
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +6 -28
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +17 -71
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +8 -19
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +13 -110
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +7 -60
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +9 -24
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +44 -38
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +13 -37
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +16 -58
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +13 -166
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +6 -40
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +34 -8
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +8 -35
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +7 -8
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +25 -49
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +10 -85
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +14 -41
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +117 -8
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +81 -6
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +177 -17
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +6 -8
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +13 -13
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +13 -7
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +103 -9
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +74 -45
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +89 -13
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +138 -16
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +69 -13
- package/package.json +3 -2
package/dist/index293.js
CHANGED
|
@@ -1,143 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const b = /(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/, l = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/, E = /^data:([a-zA-Z\-/+]*);base64,([^"].*)/, C = /^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;
|
|
4
|
-
async function k(t) {
|
|
5
|
-
try {
|
|
6
|
-
const e = await fetch(t, { method: "HEAD" });
|
|
7
|
-
if (e.status === 200) {
|
|
8
|
-
const n = e.headers.get("content-type");
|
|
9
|
-
return n == null ? void 0 : n.startsWith("image/");
|
|
10
|
-
}
|
|
11
|
-
return !1;
|
|
12
|
-
} catch (e) {
|
|
13
|
-
return typeof e == "object" && typeof e.response < "u" || !globalThis.hasOwnProperty("Image") ? !1 : new Promise((n) => {
|
|
14
|
-
const r = new Image();
|
|
15
|
-
r.onload = () => {
|
|
16
|
-
n(!0);
|
|
17
|
-
}, r.onerror = () => {
|
|
18
|
-
n(!1);
|
|
19
|
-
}, r.src = t;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function w(t, e) {
|
|
24
|
-
return t ? t.endsWith("/") ? t.slice(0, -1) : t : e;
|
|
25
|
-
}
|
|
26
|
-
function N({ uri: t, gatewayUrls: e }) {
|
|
27
|
-
const n = E.test(t);
|
|
28
|
-
if (n)
|
|
29
|
-
return { uri: t, isOnChain: !0, isEncoded: n };
|
|
30
|
-
const r = w(e == null ? void 0 : e.ipfs, "https://ipfs.io"), a = w(e == null ? void 0 : e.arweave, "https://arweave.net"), i = t.match(b), { protocol: o, subpath: p, target: s, subtarget: m = "" } = (i == null ? void 0 : i.groups) || {}, u = o === "ipns:/" || p === "ipns/", h = o === "ipfs:/" || p === "ipfs/" || l.test(t);
|
|
31
|
-
if (t.startsWith("http") && !u && !h) {
|
|
32
|
-
let I = t;
|
|
33
|
-
return e != null && e.arweave && (I = t.replace(/https:\/\/arweave.net/g, e == null ? void 0 : e.arweave)), { uri: I, isOnChain: !1, isEncoded: !1 };
|
|
34
|
-
}
|
|
35
|
-
if ((u || h) && s)
|
|
36
|
-
return {
|
|
37
|
-
uri: `${r}/${u ? "ipns" : "ipfs"}/${s}${m}`,
|
|
38
|
-
isOnChain: !1,
|
|
39
|
-
isEncoded: !1
|
|
40
|
-
};
|
|
41
|
-
if (o === "ar:/" && s)
|
|
42
|
-
return {
|
|
43
|
-
uri: `${a}/${s}${m || ""}`,
|
|
44
|
-
isOnChain: !1,
|
|
45
|
-
isEncoded: !1
|
|
46
|
-
};
|
|
47
|
-
let c = t.replace(C, "");
|
|
48
|
-
if (c.startsWith("<svg") && (c = `data:image/svg+xml;base64,${btoa(c)}`), c.startsWith("data:") || c.startsWith("{"))
|
|
49
|
-
return {
|
|
50
|
-
uri: c,
|
|
51
|
-
isOnChain: !0,
|
|
52
|
-
isEncoded: !1
|
|
53
|
-
};
|
|
54
|
-
throw new d({ uri: t });
|
|
55
|
-
}
|
|
56
|
-
function R(t) {
|
|
57
|
-
if (typeof t != "object" || !("image" in t) && !("image_url" in t) && !("image_data" in t))
|
|
58
|
-
throw new A({ data: t });
|
|
59
|
-
return t.image || t.image_url || t.image_data;
|
|
60
|
-
}
|
|
61
|
-
async function O({ gatewayUrls: t, uri: e }) {
|
|
62
|
-
try {
|
|
63
|
-
const n = await fetch(e).then((a) => a.json());
|
|
64
|
-
return await _({
|
|
65
|
-
gatewayUrls: t,
|
|
66
|
-
uri: R(n)
|
|
67
|
-
});
|
|
68
|
-
} catch {
|
|
69
|
-
throw new d({ uri: e });
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
async function _({ gatewayUrls: t, uri: e }) {
|
|
73
|
-
const { uri: n, isOnChain: r } = N({ uri: e, gatewayUrls: t });
|
|
74
|
-
if (r || await k(n))
|
|
75
|
-
return n;
|
|
76
|
-
throw new d({ uri: e });
|
|
77
|
-
}
|
|
78
|
-
function z(t) {
|
|
79
|
-
let e = t;
|
|
80
|
-
e.startsWith("did:nft:") && (e = e.replace("did:nft:", "").replace(/_/g, "/"));
|
|
81
|
-
const [n, r, a] = e.split("/"), [i, o] = n.split(":"), [p, s] = r.split(":");
|
|
82
|
-
if (!i || i.toLowerCase() !== "eip155")
|
|
83
|
-
throw new f({ reason: "Only EIP-155 supported" });
|
|
84
|
-
if (!o)
|
|
85
|
-
throw new f({ reason: "Chain ID not found" });
|
|
86
|
-
if (!s)
|
|
87
|
-
throw new f({
|
|
88
|
-
reason: "Contract address not found"
|
|
89
|
-
});
|
|
90
|
-
if (!a)
|
|
91
|
-
throw new f({ reason: "Token ID not found" });
|
|
92
|
-
if (!p)
|
|
93
|
-
throw new f({ reason: "ERC namespace not found" });
|
|
94
|
-
return {
|
|
95
|
-
chainID: Number.parseInt(o),
|
|
96
|
-
namespace: p.toLowerCase(),
|
|
97
|
-
contractAddress: s,
|
|
98
|
-
tokenID: a
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
async function P(t, { nft: e }) {
|
|
102
|
-
if (e.namespace === "erc721")
|
|
103
|
-
return g(t, {
|
|
104
|
-
address: e.contractAddress,
|
|
105
|
-
abi: [
|
|
106
|
-
{
|
|
107
|
-
name: "tokenURI",
|
|
108
|
-
type: "function",
|
|
109
|
-
stateMutability: "view",
|
|
110
|
-
inputs: [{ name: "tokenId", type: "uint256" }],
|
|
111
|
-
outputs: [{ name: "", type: "string" }]
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
functionName: "tokenURI",
|
|
115
|
-
args: [BigInt(e.tokenID)]
|
|
116
|
-
});
|
|
117
|
-
if (e.namespace === "erc1155")
|
|
118
|
-
return g(t, {
|
|
119
|
-
address: e.contractAddress,
|
|
120
|
-
abi: [
|
|
121
|
-
{
|
|
122
|
-
name: "uri",
|
|
123
|
-
type: "function",
|
|
124
|
-
stateMutability: "view",
|
|
125
|
-
inputs: [{ name: "_id", type: "uint256" }],
|
|
126
|
-
outputs: [{ name: "", type: "string" }]
|
|
127
|
-
}
|
|
128
|
-
],
|
|
129
|
-
functionName: "uri",
|
|
130
|
-
args: [BigInt(e.tokenID)]
|
|
131
|
-
});
|
|
132
|
-
throw new v({ namespace: e.namespace });
|
|
1
|
+
function n(e) {
|
|
2
|
+
return `[${e.slice(2)}]`;
|
|
133
3
|
}
|
|
134
4
|
export {
|
|
135
|
-
|
|
136
|
-
R as getJsonImage,
|
|
137
|
-
O as getMetadataAvatarUri,
|
|
138
|
-
P as getNftTokenUri,
|
|
139
|
-
k as isImageUri,
|
|
140
|
-
_ as parseAvatarUri,
|
|
141
|
-
z as parseNftUri,
|
|
142
|
-
N as resolveAvatarUri
|
|
5
|
+
n as encodeLabelhash
|
|
143
6
|
};
|
package/dist/index294.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index36.cjs"),a=require("./index146.cjs"),w=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,b=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,N=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,C=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function I(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const r=e.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function d(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function A({uri:t,gatewayUrls:e}){const r=N.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=d(e==null?void 0:e.ipfs,"https://ipfs.io"),s=d(e==null?void 0:e.arweave,"https://arweave.net"),o=t.match(w),{protocol:c,subpath:p,target:i,subtarget:h=""}=(o==null?void 0:o.groups)||{},u=c==="ipns:/"||p==="ipns/",m=c==="ipfs:/"||p==="ipfs/"||b.test(t);if(t.startsWith("http")&&!u&&!m){let v=t;return e!=null&&e.arweave&&(v=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:v,isOnChain:!1,isEncoded:!1}}if((u||m)&&i)return{uri:`${n}/${u?"ipns":"ipfs"}/${i}${h}`,isOnChain:!1,isEncoded:!1};if(c==="ar:/"&&i)return{uri:`${s}/${i}${h||""}`,isOnChain:!1,isEncoded:!1};let f=t.replace(C,"");if(f.startsWith("<svg")&&(f=`data:image/svg+xml;base64,${btoa(f)}`),f.startsWith("data:")||f.startsWith("{"))return{uri:f,isOnChain:!0,isEncoded:!1};throw new a.EnsAvatarUriResolutionError({uri:t})}function l(t){if(typeof t!="object"||!("image"in t)&&!("image_url"in t)&&!("image_data"in t))throw new a.EnsAvatarInvalidMetadataError({data:t});return t.image||t.image_url||t.image_data}async function k({gatewayUrls:t,uri:e}){try{const r=await fetch(e).then(s=>s.json());return await E({gatewayUrls:t,uri:l(r)})}catch{throw new a.EnsAvatarUriResolutionError({uri:e})}}async function E({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=A({uri:e,gatewayUrls:t});if(n||await I(r))return r;throw new a.EnsAvatarUriResolutionError({uri:e})}function R(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,s]=e.split("/"),[o,c]=r.split(":"),[p,i]=n.split(":");if(!o||o.toLowerCase()!=="eip155")throw new a.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!c)throw new a.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!i)throw new a.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!s)throw new a.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!p)throw new a.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:Number.parseInt(c),namespace:p.toLowerCase(),contractAddress:i,tokenID:s}}async function O(t,{nft:e}){if(e.namespace==="erc721")return g.readContract(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return g.readContract(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new a.EnsAvatarUnsupportedNamespaceError({namespace:e.namespace})}exports.getGateway=d;exports.getJsonImage=l;exports.getMetadataAvatarUri=k;exports.getNftTokenUri=O;exports.isImageUri=I;exports.parseAvatarUri=E;exports.parseNftUri=R;exports.resolveAvatarUri=A;
|
package/dist/index294.js
CHANGED
|
@@ -1,158 +1,143 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function y(t, e = {}) {
|
|
6
|
-
const { strict: r = !1 } = e;
|
|
7
|
-
if (!t)
|
|
8
|
-
throw new f(t);
|
|
9
|
-
if (typeof t != "string")
|
|
10
|
-
throw new f(t);
|
|
11
|
-
if (r && !/^0x[0-9a-fA-F]*$/.test(t))
|
|
12
|
-
throw new l(t);
|
|
13
|
-
if (!t.startsWith("0x"))
|
|
14
|
-
throw new l(t);
|
|
15
|
-
}
|
|
16
|
-
function B(...t) {
|
|
17
|
-
return `0x${t.reduce((e, r) => e + r.replace("0x", ""), "")}`;
|
|
18
|
-
}
|
|
19
|
-
function P(t, e = {}) {
|
|
20
|
-
const r = `0x${Number(t)}`;
|
|
21
|
-
return typeof e.size == "number" ? (g(r, e.size), x(r, e.size)) : r;
|
|
22
|
-
}
|
|
23
|
-
function w(t, e = {}) {
|
|
24
|
-
let r = "";
|
|
25
|
-
for (let i = 0; i < t.length; i++)
|
|
26
|
-
r += h[t[i]];
|
|
27
|
-
const n = `0x${r}`;
|
|
28
|
-
return typeof e.size == "number" ? (g(n, e.size), E(n, e.size)) : n;
|
|
29
|
-
}
|
|
30
|
-
function V(t, e = {}) {
|
|
31
|
-
const { signed: r, size: n } = e, i = BigInt(t);
|
|
32
|
-
let s;
|
|
33
|
-
n ? r ? s = (1n << BigInt(n) * 8n - 1n) - 1n : s = 2n ** (BigInt(n) * 8n) - 1n : typeof t == "number" && (s = BigInt(Number.MAX_SAFE_INTEGER));
|
|
34
|
-
const u = typeof s == "bigint" && r ? -s - 1n : 0;
|
|
35
|
-
if (s && i > s || i < u) {
|
|
36
|
-
const a = typeof t == "bigint" ? "n" : "";
|
|
37
|
-
throw new O({
|
|
38
|
-
max: s ? `${s}${a}` : void 0,
|
|
39
|
-
min: `${u}${a}`,
|
|
40
|
-
signed: r,
|
|
41
|
-
size: n,
|
|
42
|
-
value: `${t}${a}`
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
const c = `0x${(r && i < 0 ? (1n << BigInt(n * 8)) + BigInt(i) : i).toString(16)}`;
|
|
46
|
-
return n ? x(c, n) : c;
|
|
47
|
-
}
|
|
48
|
-
function j(t, e = {}) {
|
|
49
|
-
return w($.encode(t), e);
|
|
50
|
-
}
|
|
51
|
-
function x(t, e) {
|
|
52
|
-
return d(t, { dir: "left", size: e });
|
|
53
|
-
}
|
|
54
|
-
function E(t, e) {
|
|
55
|
-
return d(t, { dir: "right", size: e });
|
|
56
|
-
}
|
|
57
|
-
function v(t, e, r, n = {}) {
|
|
58
|
-
const { strict: i } = n;
|
|
59
|
-
p(t, e);
|
|
60
|
-
const s = `0x${t.replace("0x", "").slice((e ?? 0) * 2, (r ?? t.length) * 2)}`;
|
|
61
|
-
return i && m(s, e, r), s;
|
|
62
|
-
}
|
|
63
|
-
function A(t) {
|
|
64
|
-
return Math.ceil((t.length - 2) / 2);
|
|
65
|
-
}
|
|
66
|
-
function N(t, e = {}) {
|
|
67
|
-
const { strict: r = !1 } = e;
|
|
1
|
+
import { readContract as g } from "./index36.js";
|
|
2
|
+
import { EnsAvatarUriResolutionError as d, EnsAvatarInvalidNftUriError as f, EnsAvatarUnsupportedNamespaceError as v, EnsAvatarInvalidMetadataError as A } from "./index146.js";
|
|
3
|
+
const b = /(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/, l = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/, E = /^data:([a-zA-Z\-/+]*);base64,([^"].*)/, C = /^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;
|
|
4
|
+
async function k(t) {
|
|
68
5
|
try {
|
|
69
|
-
|
|
70
|
-
|
|
6
|
+
const e = await fetch(t, { method: "HEAD" });
|
|
7
|
+
if (e.status === 200) {
|
|
8
|
+
const n = e.headers.get("content-type");
|
|
9
|
+
return n == null ? void 0 : n.startsWith("image/");
|
|
10
|
+
}
|
|
71
11
|
return !1;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
value: "Hex.IntegerOutOfRangeError"
|
|
12
|
+
} catch (e) {
|
|
13
|
+
return typeof e == "object" && typeof e.response < "u" || !globalThis.hasOwnProperty("Image") ? !1 : new Promise((n) => {
|
|
14
|
+
const r = new Image();
|
|
15
|
+
r.onload = () => {
|
|
16
|
+
n(!0);
|
|
17
|
+
}, r.onerror = () => {
|
|
18
|
+
n(!1);
|
|
19
|
+
}, r.src = t;
|
|
81
20
|
});
|
|
82
21
|
}
|
|
83
22
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
23
|
+
function w(t, e) {
|
|
24
|
+
return t ? t.endsWith("/") ? t.slice(0, -1) : t : e;
|
|
25
|
+
}
|
|
26
|
+
function N({ uri: t, gatewayUrls: e }) {
|
|
27
|
+
const n = E.test(t);
|
|
28
|
+
if (n)
|
|
29
|
+
return { uri: t, isOnChain: !0, isEncoded: n };
|
|
30
|
+
const r = w(e == null ? void 0 : e.ipfs, "https://ipfs.io"), a = w(e == null ? void 0 : e.arweave, "https://arweave.net"), i = t.match(b), { protocol: o, subpath: p, target: s, subtarget: m = "" } = (i == null ? void 0 : i.groups) || {}, u = o === "ipns:/" || p === "ipns/", h = o === "ipfs:/" || p === "ipfs/" || l.test(t);
|
|
31
|
+
if (t.startsWith("http") && !u && !h) {
|
|
32
|
+
let I = t;
|
|
33
|
+
return e != null && e.arweave && (I = t.replace(/https:\/\/arweave.net/g, e == null ? void 0 : e.arweave)), { uri: I, isOnChain: !1, isEncoded: !1 };
|
|
94
34
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
35
|
+
if ((u || h) && s)
|
|
36
|
+
return {
|
|
37
|
+
uri: `${r}/${u ? "ipns" : "ipfs"}/${s}${m}`,
|
|
38
|
+
isOnChain: !1,
|
|
39
|
+
isEncoded: !1
|
|
40
|
+
};
|
|
41
|
+
if (o === "ar:/" && s)
|
|
42
|
+
return {
|
|
43
|
+
uri: `${a}/${s}${m || ""}`,
|
|
44
|
+
isOnChain: !1,
|
|
45
|
+
isEncoded: !1
|
|
46
|
+
};
|
|
47
|
+
let c = t.replace(C, "");
|
|
48
|
+
if (c.startsWith("<svg") && (c = `data:image/svg+xml;base64,${btoa(c)}`), c.startsWith("data:") || c.startsWith("{"))
|
|
49
|
+
return {
|
|
50
|
+
uri: c,
|
|
51
|
+
isOnChain: !0,
|
|
52
|
+
isEncoded: !1
|
|
53
|
+
};
|
|
54
|
+
throw new d({ uri: t });
|
|
55
|
+
}
|
|
56
|
+
function R(t) {
|
|
57
|
+
if (typeof t != "object" || !("image" in t) && !("image_url" in t) && !("image_data" in t))
|
|
58
|
+
throw new A({ data: t });
|
|
59
|
+
return t.image || t.image_url || t.image_data;
|
|
60
|
+
}
|
|
61
|
+
async function O({ gatewayUrls: t, uri: e }) {
|
|
62
|
+
try {
|
|
63
|
+
const n = await fetch(e).then((a) => a.json());
|
|
64
|
+
return await _({
|
|
65
|
+
gatewayUrls: t,
|
|
66
|
+
uri: R(n)
|
|
107
67
|
});
|
|
68
|
+
} catch {
|
|
69
|
+
throw new d({ uri: e });
|
|
108
70
|
}
|
|
109
71
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
72
|
+
async function _({ gatewayUrls: t, uri: e }) {
|
|
73
|
+
const { uri: n, isOnChain: r } = N({ uri: e, gatewayUrls: t });
|
|
74
|
+
if (r || await k(n))
|
|
75
|
+
return n;
|
|
76
|
+
throw new d({ uri: e });
|
|
77
|
+
}
|
|
78
|
+
function z(t) {
|
|
79
|
+
let e = t;
|
|
80
|
+
e.startsWith("did:nft:") && (e = e.replace("did:nft:", "").replace(/_/g, "/"));
|
|
81
|
+
const [n, r, a] = e.split("/"), [i, o] = n.split(":"), [p, s] = r.split(":");
|
|
82
|
+
if (!i || i.toLowerCase() !== "eip155")
|
|
83
|
+
throw new f({ reason: "Only EIP-155 supported" });
|
|
84
|
+
if (!o)
|
|
85
|
+
throw new f({ reason: "Chain ID not found" });
|
|
86
|
+
if (!s)
|
|
87
|
+
throw new f({
|
|
88
|
+
reason: "Contract address not found"
|
|
117
89
|
});
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
90
|
+
if (!a)
|
|
91
|
+
throw new f({ reason: "Token ID not found" });
|
|
92
|
+
if (!p)
|
|
93
|
+
throw new f({ reason: "ERC namespace not found" });
|
|
94
|
+
return {
|
|
95
|
+
chainID: Number.parseInt(o),
|
|
96
|
+
namespace: p.toLowerCase(),
|
|
97
|
+
contractAddress: s,
|
|
98
|
+
tokenID: a
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
async function P(t, { nft: e }) {
|
|
102
|
+
if (e.namespace === "erc721")
|
|
103
|
+
return g(t, {
|
|
104
|
+
address: e.contractAddress,
|
|
105
|
+
abi: [
|
|
106
|
+
{
|
|
107
|
+
name: "tokenURI",
|
|
108
|
+
type: "function",
|
|
109
|
+
stateMutability: "view",
|
|
110
|
+
inputs: [{ name: "tokenId", type: "uint256" }],
|
|
111
|
+
outputs: [{ name: "", type: "string" }]
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
functionName: "tokenURI",
|
|
115
|
+
args: [BigInt(e.tokenID)]
|
|
127
116
|
});
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
117
|
+
if (e.namespace === "erc1155")
|
|
118
|
+
return g(t, {
|
|
119
|
+
address: e.contractAddress,
|
|
120
|
+
abi: [
|
|
121
|
+
{
|
|
122
|
+
name: "uri",
|
|
123
|
+
type: "function",
|
|
124
|
+
stateMutability: "view",
|
|
125
|
+
inputs: [{ name: "_id", type: "uint256" }],
|
|
126
|
+
outputs: [{ name: "", type: "string" }]
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
functionName: "uri",
|
|
130
|
+
args: [BigInt(e.tokenID)]
|
|
137
131
|
});
|
|
138
|
-
}
|
|
132
|
+
throw new v({ namespace: e.namespace });
|
|
139
133
|
}
|
|
140
134
|
export {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
P as fromBoolean,
|
|
150
|
-
w as fromBytes,
|
|
151
|
-
V as fromNumber,
|
|
152
|
-
j as fromString,
|
|
153
|
-
x as padLeft,
|
|
154
|
-
E as padRight,
|
|
155
|
-
A as size,
|
|
156
|
-
v as slice,
|
|
157
|
-
N as validate
|
|
135
|
+
w as getGateway,
|
|
136
|
+
R as getJsonImage,
|
|
137
|
+
O as getMetadataAvatarUri,
|
|
138
|
+
P as getNftTokenUri,
|
|
139
|
+
k as isImageUri,
|
|
140
|
+
_ as parseAvatarUri,
|
|
141
|
+
z as parseNftUri,
|
|
142
|
+
N as resolveAvatarUri
|
|
158
143
|
};
|
package/dist/index295.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index41.cjs");class t extends a.BaseError{constructor(e){const{docsPath:s,field:r,metaMessages:i}=e;super(`Invalid Sign-In with Ethereum message field "${r}".`,{docsPath:s,metaMessages:i,name:"SiweInvalidMessageFieldError"})}}exports.SiweInvalidMessageFieldError=t;
|
package/dist/index295.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { BaseError as i } from "./index41.js";
|
|
2
|
+
class d extends i {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
const { docsPath: s, field: r, metaMessages: a } = e;
|
|
5
|
+
super(`Invalid Sign-In with Ethereum message field "${r}".`, {
|
|
6
|
+
docsPath: s,
|
|
7
|
+
metaMessages: a,
|
|
8
|
+
name: "SiweInvalidMessageFieldError"
|
|
9
|
+
});
|
|
10
|
+
}
|
|
9
11
|
}
|
|
10
12
|
export {
|
|
11
|
-
|
|
13
|
+
d as SiweInvalidMessageFieldError
|
|
12
14
|
};
|
package/dist/index296.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(e){if(/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)||/%[^0-9a-f]/i.test(e)||/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e))return!1;const s=a(e),f=s[1],t=s[2],i=s[3],r=s[4],l=s[5];if(!(f!=null&&f.length&&i.length>=0))return!1;if(t!=null&&t.length){if(!(i.length===0||/^\//.test(i)))return!1}else if(/^\/\//.test(i))return!1;if(!/^[a-z][a-z0-9\+\-\.]*$/.test(f.toLowerCase()))return!1;let n="";return n+=`${f}:`,t!=null&&t.length&&(n+=`//${t}`),n+=i,r!=null&&r.length&&(n+=`?${r}`),l!=null&&l.length&&(n+=`#${l}`),n}function a(e){return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/)}exports.isUri=o;
|
package/dist/index296.js
CHANGED
|
@@ -1,116 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
function o(e) {
|
|
2
|
+
if (/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e) || /%[^0-9a-f]/i.test(e) || /%[0-9a-f](:?[^0-9a-f]|$)/i.test(e))
|
|
3
|
+
return !1;
|
|
4
|
+
const s = a(e), f = s[1], t = s[2], i = s[3], r = s[4], l = s[5];
|
|
5
|
+
if (!(f != null && f.length && i.length >= 0))
|
|
6
|
+
return !1;
|
|
7
|
+
if (t != null && t.length) {
|
|
8
|
+
if (!(i.length === 0 || /^\//.test(i)))
|
|
9
|
+
return !1;
|
|
10
|
+
} else if (/^\/\//.test(i))
|
|
11
|
+
return !1;
|
|
12
|
+
if (!/^[a-z][a-z0-9\+\-\.]*$/.test(f.toLowerCase()))
|
|
13
|
+
return !1;
|
|
14
|
+
let n = "";
|
|
15
|
+
return n += `${f}:`, t != null && t.length && (n += `//${t}`), n += i, r != null && r.length && (n += `?${r}`), l != null && l.length && (n += `#${l}`), n;
|
|
13
16
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
if (u.length === 0)
|
|
17
|
-
throw new d({ name: r });
|
|
18
|
-
if (u.length === 1)
|
|
19
|
-
return {
|
|
20
|
-
...u[0],
|
|
21
|
-
...f ? { hash: s(u[0]) } : {}
|
|
22
|
-
};
|
|
23
|
-
let o;
|
|
24
|
-
for (const t of u) {
|
|
25
|
-
if (!("inputs" in t))
|
|
26
|
-
continue;
|
|
27
|
-
if (!n || n.length === 0) {
|
|
28
|
-
if (!t.inputs || t.inputs.length === 0)
|
|
29
|
-
return {
|
|
30
|
-
...t,
|
|
31
|
-
...f ? { hash: s(t) } : {}
|
|
32
|
-
};
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
if (!t.inputs || t.inputs.length === 0 || t.inputs.length !== n.length)
|
|
36
|
-
continue;
|
|
37
|
-
if (n.every((a, w) => {
|
|
38
|
-
const g = "inputs" in t && t.inputs[w];
|
|
39
|
-
return g ? E(a, g) : !1;
|
|
40
|
-
})) {
|
|
41
|
-
if (o && "inputs" in o && o.inputs) {
|
|
42
|
-
const a = B(t.inputs, o.inputs, n);
|
|
43
|
-
if (a)
|
|
44
|
-
throw new O({
|
|
45
|
-
abiItem: t,
|
|
46
|
-
type: a[0]
|
|
47
|
-
}, {
|
|
48
|
-
abiItem: o,
|
|
49
|
-
type: a[1]
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
o = t;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const c = (() => {
|
|
56
|
-
if (o)
|
|
57
|
-
return o;
|
|
58
|
-
const [t, ...m] = u;
|
|
59
|
-
return { ...t, overloads: m };
|
|
60
|
-
})();
|
|
61
|
-
if (!c)
|
|
62
|
-
throw new d({ name: r });
|
|
63
|
-
return {
|
|
64
|
-
...c,
|
|
65
|
-
...f ? { hash: s(c) } : {}
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function T(e) {
|
|
69
|
-
return A(s(e), 0, 4);
|
|
70
|
-
}
|
|
71
|
-
function F(e) {
|
|
72
|
-
const r = typeof e == "string" ? e : h(e);
|
|
73
|
-
return p(r);
|
|
74
|
-
}
|
|
75
|
-
function s(e) {
|
|
76
|
-
return typeof e != "string" && "hash" in e && e.hash ? e.hash : v(S(F(e)));
|
|
77
|
-
}
|
|
78
|
-
class O extends y {
|
|
79
|
-
constructor(r, i) {
|
|
80
|
-
super("Found ambiguous types in overloaded ABI Items.", {
|
|
81
|
-
metaMessages: [
|
|
82
|
-
// TODO: abitype to add support for signature-formatted ABI items.
|
|
83
|
-
`\`${r.type}\` in \`${p(h(r.abiItem))}\`, and`,
|
|
84
|
-
`\`${i.type}\` in \`${p(h(i.abiItem))}\``,
|
|
85
|
-
"",
|
|
86
|
-
"These types encode differently and cannot be distinguished at runtime.",
|
|
87
|
-
"Remove one of the ambiguous items in the ABI."
|
|
88
|
-
]
|
|
89
|
-
}), Object.defineProperty(this, "name", {
|
|
90
|
-
enumerable: !0,
|
|
91
|
-
configurable: !0,
|
|
92
|
-
writable: !0,
|
|
93
|
-
value: "AbiItem.AmbiguityError"
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
class d extends y {
|
|
98
|
-
constructor({ name: r, data: i, type: n = "item" }) {
|
|
99
|
-
const f = r ? ` with name "${r}"` : i ? ` with data "${i}"` : "";
|
|
100
|
-
super(`ABI ${n}${f} not found.`), Object.defineProperty(this, "name", {
|
|
101
|
-
enumerable: !0,
|
|
102
|
-
configurable: !0,
|
|
103
|
-
writable: !0,
|
|
104
|
-
value: "AbiItem.NotFoundError"
|
|
105
|
-
});
|
|
106
|
-
}
|
|
17
|
+
function a(e) {
|
|
18
|
+
return e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);
|
|
107
19
|
}
|
|
108
20
|
export {
|
|
109
|
-
|
|
110
|
-
d as NotFoundError,
|
|
111
|
-
H as from,
|
|
112
|
-
M as fromAbi,
|
|
113
|
-
T as getSelector,
|
|
114
|
-
F as getSignature,
|
|
115
|
-
s as getSignatureHash
|
|
21
|
+
o as isUri
|
|
116
22
|
};
|