Annual report pursuant to Section 13 and 15(d)

Loan and Security Agreement - Additional Information (Details)

v3.19.1
Loan and Security Agreement - Additional Information (Details)
1 Months Ended 3 Months Ended 12 Months Ended
Jul. 31, 2018
USD ($)
$ / shares
shares
Aug. 31, 2017
USD ($)
Installment
$ / shares
shares
Jul. 31, 2018
USD ($)
$ / shares
shares
Dec. 31, 2018
USD ($)
shares
Dec. 31, 2017
USD ($)
Dec. 31, 2016
USD ($)
Aug. 31, 2018
USD ($)
Debt Instrument [Line Items]              
Debt, non-current       $ 10,000,000      
Funding through sale of stock       $ 84,739,000 $ 0 $ 0  
2017 Warrant              
Debt Instrument [Line Items]              
Estimated fair value portion of preferred stock $ 300,000   $ 300,000        
Series D-2 Redeemable Convertible Preferred Stock | 2017 Warrant              
Debt Instrument [Line Items]              
Exercise price per share of warrants | $ / shares   $ 0.6596          
Series E Redeemable Convertible Preferred Stock              
Debt Instrument [Line Items]              
Funding through sale of stock     $ 85,400,000        
Sale and issuance of shares | shares 319,305,718   319,305,718        
Redeemable convertible preferred stock, par value | $ / shares $ 0.2674   $ 0.2674        
Preferred stock, conversion basis       1-for-0.0275      
Stock split conversion ratio 0.8374     36.3636      
Series E Redeemable Convertible Preferred Stock | 2017 Warrant              
Debt Instrument [Line Items]              
Warrant to purchase stock | shares 1,682,871   1,682,871 46,359      
Exercise price per share of warrants | $ / shares $ 0.2674   $ 0.2674        
Funding through sale of stock     $ 85,400,000        
Sale and issuance of shares | shares 319,305,718   319,305,718        
Redeemable convertible preferred stock, par value | $ / shares $ 0.2674   $ 0.2674        
Preferred stock, conversion basis       1-for-0.0275      
Stock split conversion ratio       36.36      
Warrants exercisable, term 10 years   10 years        
August 2017 Loan              
Debt Instrument [Line Items]              
Debt, current       $ 4,700,000      
Debt, non-current       10,000,000      
Final payment fee percentage   3.83%          
Interest payable   $ 600,000   $ 300,000      
Average interest rate       8.39%      
Interest expense related to loan       $ 1,600,000 600,000    
Accretion of debt discount       $ 200,000 $ 100,000    
August 2017 Loan | Floating Rate              
Debt Instrument [Line Items]              
Interest charges on loan   7.39%          
August 2017 Loan | LIBOR              
Debt Instrument [Line Items]              
Interest charges on loan   6.40%          
Description of interest charges on loan       the sum of the 30-day U.S. Dollar London Interbank Offered Rate (“LIBOR”) plus 6.40%.      
Oxford | Series D-2 Redeemable Convertible Preferred Stock | 2017 Warrant              
Debt Instrument [Line Items]              
Warrant to purchase stock | shares   454,820          
SVB | Series D-2 Redeemable Convertible Preferred Stock | 2017 Warrant              
Debt Instrument [Line Items]              
Warrant to purchase stock | shares   227,410          
Loan and Security Agreement | Oxford Finance LLC and Silicon Valley Bank | August 2017 Loan              
Debt Instrument [Line Items]              
Borrowed amount   $ 15,000,000         $ 15,000,000
Loan and Security Agreement | Oxford Finance LLC and Silicon Valley Bank | August 2017 Loan | March 2019              
Debt Instrument [Line Items]              
Number of monthly installments | Installment   30          
Payment terms, description       The loan is due in 30 monthly installments from March 2019 through its repayment in August 2021, with interest-only monthly payments until March 2019. If certain qualified funding events occur, the loan will be due in 24 monthly installments from September 2019 through its repayment in August 2021, with interest-only payments until September 2019.      
Repayment installment, start date, month and year   2019-03          
Repayment installment, end date, month and year   2021-08          
Frequency of interest-only payments       monthly payments      
Interest-only payments, maturity month and year   2019-03          
Loan and Security Agreement | Oxford Finance LLC and Silicon Valley Bank | August 2017 Loan | September 2019              
Debt Instrument [Line Items]              
Number of monthly installments | Installment   24          
Repayment installment, start date, month and year   2019-09          
Repayment installment, end date, month and year   2021-08          
Interest-only payments, maturity month and year   2019-09