CONVERTIBLE NOTES (Tables)
12 Months Ended
Dec. 31, 2021
2025 Convertible notes [Member]  
Schedule of net carrying amount
The net carrying amount of the 2025 Convertible Notes were as follows:
 
   
December 31,
 
   
2021
   
2020
 
             
Principal outstanding
 
$
575,000    
$
575,000  
Unamortized debt discount (1)
    -       (109,655
)
Unamortized debt issuance costs (1)
    (11,565
)
    (11,766
)
                 
Net carrying amount
 
$
563,435    
$
453,579  
 
The Company recognized interest expense on the 2025 Convertible Notes as follows:
 
   
Year ended December 31,
 
   
2021
   
2020
 
             
Amortization of debt discount and issuance costs (1)
 
$
3,114    
$
7,629  
 
(1) Prior to the early adoption of ASU 2020-06 on January 1, 2021, the Company accounted for its notes as separate liability and equity components. The comparative figures represent the debt discount and issuance costs related to the liability component prior to the early adoption. The annual effective interest rate was 5.21%.
2023 Convertible note [Member]  
Schedule of net carrying amount
The net carrying amount of the 2023 Convertible Notes were as follows:
 
   
December 31,
 
   
2021
   
2020
 
             
Principal outstanding
 
$
442,750    
$
442,750  
Unamortized debt discount (1)
    -       (57,435
)
Unamortized debt issuance costs (1)
    (3,128
)
    (4,275
)
Converted to shares
    (80,083
)
    (179
)
                 
Net carrying amount
 
$
359,539    
$
380,861  
 
The Company recognized interest expense on the 2023 Convertible Notes as follows:
 
   
Year ended December 31,
 
   
2021
   
2020
   
2019
 
                   
Amortization of debt discount and issuance costs (1)
 
$
2,184    
$
22,325    
$
20,938  
 
(1) Prior to the early adoption of ASU 2020-06 on January 1, 2021, the Company accounted for its notes as separate liability and equity components. The comparative figures represent the debt discount and issuance costs related to the liability component prior to the early adoption. The annual effective interest rate was 6.20%.