Condensed Consolidated Statements of Cash Flows - USD ($)
$ in Thousands
9 Months Ended
Sep. 30, 2022
Sep. 30, 2021
Cash flows from operating activities:    
Net loss $ (61,647) $ (26,948)
Adjustments to reconcile net loss to net cash used in operating activities:    
Depreciation and amortization 2,881 2,792
Provision for doubtful accounts 393 477
Provision for inventory obsolescence 1,487 93
Share-based compensation 10,098 7,377
Loss from disposal of property and equipment 121 133
Unrealized foreign currency loss, net 5,832 3,317
Amortization of right-to-use asset 311 305
Loss on extinguishment of debt 19,019 0
Gain from write-off of liability (1,866) 0
Change in fair value of derivative instruments (703) (546)
Non-cash interest expense and amortization of debt discount 5,356 1,512
Changes in operating assets and liabilities:    
Accounts receivable (9,883) (6,795)
Inventory (8,315) (5,289)
Prepaid expenses and other current assets (3,191) (3,320)
Other assets (937) 204
Accounts payable 610 660
Accrued liabilities 2,692 6,828
Operating lease liabilities (251) (309)
Other liabilities (157) (314)
Net cash used in operating activities (38,150) (19,823)
Cash flows from investing activities:    
Purchases of property and equipment (1,885) (2,667)
Cash used in asset acquisitions (525) (434)
Cost incurred for intangible assets (1,209) (447)
Capital expenditures on construction in progress (20,744) 0
Net cash used in investing activities (24,363) (3,548)
Cash flows from financing activities:    
Borrowings under Oaktree debt agreement, net of debt discount and issuance costs 143,593 0
Repayment of Madryn debt agreement (71,681) 0
Repayments on finance leases (17) (163)
Proceeds from stock option exercises 3,388 4,096
Tax payments related to shares withheld upon vesting of restricted stock (5) (88)
Net cash provided by financing activities 75,278 3,845
Effect of exchange rate changes on cash (831) (374)
Net increase (decrease) in cash 11,934 (19,900)
Cash at beginning of period 53,415 84,523
Cash at end of period 65,349 64,623
Supplemental disclosures:    
Cash paid for interest 4,184 5,182
Cash paid for income taxes 1,298 429
Supplemental disclosures of non-cash investing and financing activities:    
Unpaid balance for property and equipment 32 34
Consideration payable related to asset acquisition 0 412
Cashless option exercise $ 0 $ 1,640