Fair Value Measurements - Schedule of Fair Value of Financial Instruments (Detail) - Recurring - USD ($) $ in Thousands | Jun. 30, 2019 | Dec. 31, 2018 |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | $ 240,571 | $ 171,776 |
Total liabilities measured at fair value | 2,824 | 2,753 |
Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 81,734 | 38,354 |
U.S. treasury securities | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 114,107 | 80,844 |
U.S. government agency obligations | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | | 52,578 |
Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 44,730 | |
Derivative liability associated with the Medicis settlement | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total liabilities measured at fair value | 2,824 | 2,753 |
Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 195,841 | 119,198 |
Total liabilities measured at fair value | 0 | 0 |
Level 1 | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 81,734 | 38,354 |
Level 1 | U.S. treasury securities | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 114,107 | 80,844 |
Level 1 | U.S. government agency obligations | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | | 0 |
Level 1 | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 0 | |
Level 1 | Derivative liability associated with the Medicis settlement | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total liabilities measured at fair value | 0 | 0 |
Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 44,730 | 52,578 |
Total liabilities measured at fair value | 0 | 0 |
Level 2 | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 0 | 0 |
Level 2 | U.S. treasury securities | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 0 | 0 |
Level 2 | U.S. government agency obligations | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | | 52,578 |
Level 2 | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 44,730 | |
Level 2 | Derivative liability associated with the Medicis settlement | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total liabilities measured at fair value | 0 | 0 |
Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 0 | 0 |
Total liabilities measured at fair value | 2,824 | 2,753 |
Level 3 | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 0 | 0 |
Level 3 | U.S. treasury securities | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 0 | 0 |
Level 3 | U.S. government agency obligations | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | | 0 |
Level 3 | Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total assets measured at fair value | 0 | |
Level 3 | Derivative liability associated with the Medicis settlement | | |
Fair Value, Assets and Liabilities Measured on Recurring Basis [Line Items] | | |
Total liabilities measured at fair value | $ 2,824 | $ 2,753 |