XML 27 R6.htm IDEA: XBRL DOCUMENT v3.10.0.1
Consolidated Statements of Cash Flows - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2018
Dec. 31, 2017
Dec. 31, 2016
Cash flows from operating activities      
Net loss $ (49,205) $ (36,658) $ (31,778)
Adjustments to reconcile net loss to net cash used in operating activities      
Depreciation and amortization 3,887 2,507 1,717
Stock-based compensation expense 36,637 26,143 15,760
Accretion of discount on short-term investments (1,257) (116) (231)
Non-cash loss on extinguishment of debt     1,156
Payment of original issue discount     (1,500)
Provision for (recovery of) doubtful accounts (501) 293 909
Write-down of inventory 2,005 3,984 4,056
Loss on disposal of equipment     287
Non-cash interest expense 7,382 6,884 3,681
Unrealized gains (losses) on foreign currency transactions 1,188 (799) 1,854
Changes in operating assets and liabilities      
Accounts receivable (12,214) (13,899) (32,181)
Inventories 3,846 (16,297) (27,031)
Prepaid expenses and other current assets (767) (501) (1,997)
Other assets (2,601) (892) (505)
Accounts payable 5,170 2,162 (5,586)
Accrued liabilities (242) 12,269 12,136
Other long-term liabilities 964 647 750
Net cash used in operating activities (5,708) (14,273) (58,503)
Cash flows from investing activities      
Purchases of short-term investments (213,723) (287,938) (372,309)
Proceeds from sales of short-term investments   5,993  
Proceeds from maturity of short-term investments 228,373 290,341 243,890
Purchases of property and equipment (8,217) (4,327) (3,368)
Net cash provided by (used in) investing activities 6,433 4,069 (131,787)
Cash flows from financing activities      
Proceeds from issuance of convertible notes     172,500
Convertible notes initial issuance discount and debt issuance costs     (6,171)
Proceeds from issuance of warrants     33,120
Purchase of convertible note hedges     (45,092)
Repayment of debt     (19,500)
Minimum tax withholding paid on behalf of employees for net share settlement (1,742) (991)  
Proceeds from issuance of common stock to employees 9,496 12,190 10,307
Net cash provided by financing activities 7,754 11,199 145,164
Effect of exchange rate changes on cash, cash equivalents and restricted cash (258) 444 (604)
Net increase (decrease) in cash, cash equivalents and restricted cash 8,221 1,439 (45,730)
Cash, cash equivalents and restricted cash      
Cash, cash equivalents and restricted cash at beginning of year 43,651 42,212 87,942
Cash, cash equivalents and restricted cash at end of year 51,872 43,651 42,212
Supplemental disclosures of cash flow information      
Cash paid for income taxes 1,847 687 492
Cash paid for interest 3,019 3,019 2,469
Significant non-cash transactions      
Purchases of property and equipment in accounts payable $ 245 592 725
Vesting of early-exercised stock options   $ 7 $ 47