Quarterly report pursuant to Section 13 or 15(d)

Borrowings - Additional Information (Details)

v3.21.2
Borrowings - Additional Information (Details)
1 Months Ended 3 Months Ended 6 Months Ended
May 13, 2021
USD ($)
Tranche
Apr. 09, 2020
USD ($)
Mar. 07, 2019
USD ($)
d
$ / shares
Jan. 31, 2021
USD ($)
shares
Jun. 30, 2021
USD ($)
Jun. 30, 2020
USD ($)
Jun. 30, 2021
USD ($)
Jun. 30, 2020
USD ($)
Dec. 31, 2020
USD ($)
Debt Instrument [Line Items]                  
Face amount         $ 31,185,000   $ 31,185,000    
Payment of debt issuance costs             0 $ 462,000  
Loss on extinguishment of debt         0 $ 806,000 2,725,000 806,000  
Net carrying amount of convertible debt and derivative liability         11,996,000   11,996,000   $ 16,516,000
Amortization of debt issuance costs and discount         269,000 321,000 525,000 599,000  
SVB                  
Debt Instrument [Line Items]                  
Minimum outstanding term loan principal percentage for financial covenant waived 50.00%                
Loan and Security Agreement                  
Debt Instrument [Line Items]                  
Fair value of loan payable         $ 29,200,000   $ 29,200,000    
Loan and Security Agreement | Level 3 Inputs | Secured Spread                  
Debt Instrument [Line Items]                  
Debt instrument, measurement input         9.45   9.45    
Loan and Security Agreement | Level 3 Inputs | Risk Free Rate                  
Debt Instrument [Line Items]                  
Debt instrument, measurement input         0.54   0.54    
Loan and Security Agreement | Level 3 Inputs | Secured Yield                  
Debt Instrument [Line Items]                  
Debt instrument, measurement input         9.99   9.99    
Term Loan | Loan and Security Agreement                  
Debt Instrument [Line Items]                  
Notes maturity date Mar. 03, 2025                
Basis spread on variable rate (as a percent) 9.05%                
Debt instrument maturity date subject to occurrence of certain conditions May 01, 2025                
Term Loan | Loan and Security Agreement | Prime Rate                  
Debt Instrument [Line Items]                  
Basis spread on variable rate (as a percent) 5.80%                
Term Loan | Loan and Security Agreement | Hercules Capital Inc. and Silicon Valley Bank                  
Debt Instrument [Line Items]                  
Face amount $ 60,000,000.0                
Number of available tranches | Tranche 4                
Initial Tranche of Term Loan | Loan and Security Agreement                  
Debt Instrument [Line Items]                  
Additional borrowing amount available $ 20,000,000.0                
Second Tranche of Term Loan | Loan and Security Agreement                  
Debt Instrument [Line Items]                  
Additional borrowing amount available 10,000,000.0                
Third Tranche of Term Loan | Loan and Security Agreement                  
Debt Instrument [Line Items]                  
Additional borrowing amount available 5,000,000.0                
Fourth Tranche of Term Loan | Loan and Security Agreement                  
Debt Instrument [Line Items]                  
Additional borrowing amount available 25,000,000.0                
Increment debt amount $ 5,000,000.0                
April 2020 Note Purchase Agreement                  
Debt Instrument [Line Items]                  
Face amount   $ 10,000,000.0              
Date of issuance and sale of notes   Apr. 09, 2020              
Proceeds from debt, net of issuance costs   $ 9,500,000              
Payment of debt issuance costs   $ 500,000              
Fair value of notes                 7,400,000
Conversion of convertible note, amount       $ 6,000,000.0          
Conversion of convertible note exchanged for shares | shares       959,080          
Loss on extinguishment of debt       $ 2,700,000          
Net carrying amount of convertible debt and derivative liability       4,800,000          
Fair value of the consideration issued       $ 7,500,000          
Senior Convertible Note Purchase Agreement                  
Debt Instrument [Line Items]                  
Face amount     $ 16,000,000.0            
Notes maturity date     Mar. 15, 2025            
Date of issuance and sale of notes     Mar. 07, 2019            
Proceeds from debt, net of issuance costs     $ 14,700,000            
Payment of debt issuance costs     $ 1,300,000            
Senior convertible notes         $ 9,800,000   $ 9,800,000    
Unamortized debt issuance cost         400,000   400,000    
Bifurcated embedded conversion option derivative liability         2,200,000   2,200,000    
Derivative, fair value         7,000,000.0   7,000,000.0    
Gain (loss) on fair value adjustment of derivative liability         500,000 (200,000) 500,000 500,000  
Amortization of debt issuance costs and discount         200,000 $ 200,000 500,000 $ 500,000  
Fair value of convertible debt and derivative liability         $ 12,800,000   $ 12,800,000   $ 12,900,000
Purchase price as percentage of principal amount     100.00%            
Interest rate     6.00%            
Payment terms             The March 2019 Notes bear interest at a rate of 6.0% per annum payable semiannually in arrears on March 15 and September 15 of each year, beginning September 15, 2019. The March 2019 Notes will mature on March 15, 2025, unless earlier converted, redeemed or repurchased.    
Conversion terms             holder of the March 2019 Notes may convert their March 2019 Notes at their option at any time prior to the close of business on the business day immediately preceding March 15, 2025 into shares of the Company’s common stock.    
Conversion rate, number of shares to be issued per $1000 of principal (in shares)     73.9096            
Principal amount of notes used as the denominator for conversion into notes     $ 1,000            
Initial conversion price of notes | $ / shares     $ 13.53            
Conversion rate, number of shares to be issued per $1000 of principal (in shares) after adjustment to certain events     81            
Principal amount of notes used as the denominator for conversion into notes after adjustment of certain events     $ 1,000            
Convertible notes, redemption start date     Mar. 15, 2022            
Convertible notes, threshold percentage of stock price trigger     130.00%            
Convertible notes, threshold trading days | d     20            
Convertible notes, threshold consecutive trading days | d     30            
Redemption price as percentage of the principal amount     100.00%            
Redemption price as percentage of the principal amount subject to certain exceptions     100.00%