XML 52 R37.htm IDEA: XBRL DOCUMENT v3.19.1
DEBT - Schedule of Debt (Details) - USD ($)
$ in Thousands
Mar. 31, 2019
Jun. 30, 2018
Dec. 01, 2017
Debt Instrument [Line Items]      
Notes payable at fair value $ 0 $ 15,899  
Long-term debt, gross 179,560 142,260  
Long-term debt, net 134,245 95,876  
Less: Current portion 0 (2,500)  
Long-term debt, non-current portion 134,245 93,376  
Convertible Senior Notes | 2024 convertible senior notes      
Debt Instrument [Line Items]      
Long-term debt, gross 126,060    
Long-term debt, net     $ 80,400
Line of Credit | Term loan | SVB credit facility | Silicon Valley Bank      
Debt Instrument [Line Items]      
Exit fee due upon redemption 3,500 1,200  
Carrying Value      
Debt Instrument [Line Items]      
Less: Unamortized debt discount and fees (45,315) (46,384)  
Carrying Value | Convertible Senior Notes | 2024 convertible senior notes      
Debt Instrument [Line Items]      
Long-term debt, gross   126,060  
Carrying Value | Line of Credit | Term loan | SVB credit facility      
Debt Instrument [Line Items]      
Long-term debt, gross $ 53,500 $ 16,200