| Income Taxes - Summary of uncertain tax positions (Details 4) - USD ($) $ in Thousands | 12 Months Ended | |
|---|---|---|
| Dec. 31, 2018 | Dec. 31, 2017 | |
| Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns [Roll Forward] | ||
| Balance, beginning of year | $ 685 | $ 674 | 
| Increase related to prior period positions | 0 | 0 | 
| Increase related to current year positions | 219 | 203 | 
| Decrease related to prior period positions | (97) | (192) | 
| Balance, end of year | $ 807 | $ 685 | 
| X | ||||||||||
| 
- Definition A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period. No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount of unrecognized tax benefits. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
 | 
| X | ||||||||||
| 
- Definition Amount of decrease in unrecognized tax benefits resulting from tax positions taken in prior period tax returns. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount of increase in unrecognized tax benefits resulting from tax positions that have been or will be taken in current period tax return. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount of increase in unrecognized tax benefits resulting from tax positions taken in prior period tax returns. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 |