v3.19.2
Balance Sheet Components - Schedule of Accounts Receivable, Net of Allowances (Details) - USD ($)
$ in Thousands
Jun. 30, 2019
Dec. 31, 2018
Dec. 31, 2017
Valuation And Qualifying Accounts Disclosure [Line Items]      
Gross accounts receivable $ 218,296 $ 204,975  
Allowance for accounts receivable (14,259) (21,897)  
Total Accounts Receivable—net of allowances 204,037 183,078  
Allowance for Sales Returns      
Valuation And Qualifying Accounts Disclosure [Line Items]      
Allowance for accounts receivable (5,250) (7,335) $ (6,907)
Allowance for Sales Incentives      
Valuation And Qualifying Accounts Disclosure [Line Items]      
Allowance for accounts receivable (8,583) (13,750) $ (10,442)
Other Allowances      
Valuation And Qualifying Accounts Disclosure [Line Items]      
Allowance for accounts receivable $ (426) $ (812)