| STOCK-BASED COMPENSATION (Tables)
 | 12 Months Ended | 
| Dec. 31, 2023 | 
|---|
| Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  | 
| Schedule of stock-based compensation | Total stock-based compensation expense related to all of our stock-based awards was as follows (in thousands):  
|  |  |  |  |  |  |  |  |  |  
|  | Year Ended December 31,  |  
|  | 2023 |      | 2022 |      | 2021 |  
| Selling, general and administrative | $ |  6,712 |  | $ |  10,217 |  | $ |  7,337 |  
| Research and development |  |  2,094 |  |  |  2,168 |  |  |  1,700 |  
| Restructuring charges |  |  — |  |  |  — |  |  |  449 |  
| Total stock-based compensation expense | $ |  8,806 |  | $ |  12,385 |  | $ |  9,486 |  | 
| Schedule of option activity under equity incentive plans |  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|  |  |  |  | Stock Options |  | RSUs |   |  
|  |  |  |  |  |  | Weighted |  | Weighted  |  |  |  | Weighted Average |   |  
|  |  | Shares Available |  | Number of  |  | Average |  | Intrinsic Value |  | Number of  |  | Grant Date |  |  
|  |  | For Grant |  | Shares |  | Exercise Price |  | (in thousands) |  | Shares |  | Fair Value |   |  
| Outstanding as of December 31, 2022 |   |  10,612,618 |   |  34,696,273 |  | $ |  2.74 |  | $ |  1,605 |   |  1,103,653 |  | $ |  2.39 |  |  
| Authorized for grant |   |  5,019,700 |   |  |  |  |  |  |  |  |  |  |  |  |  |  |  
| Granted |   |  (5,669,944) |   |  3,671,800 |  | $ |  1.69 |  |  |  |   |  1,387,600 |  | $ |  1.80 |  |  
| Exercised/Released |   |  — |   |  (50,161) |  | $ |  0.97 |  |  |  |   |  (435,006) |  | $ |  2.32 |  |  
| Cancelled and forfeited |   |  3,908,921 |   |  (4,199,147) |  | $ |  3.29 |  |  |  |   |  (190,356) |  | $ |  2.20 |  |  
| Outstanding as of December 31, 2023 |   |  13,871,295 |   |  34,118,765 |  | $ |  2.56 |  | $ |  1,453 |   |  1,865,891 |  | $ |  1.98 |  |  
| Vested and expected to vest as of December 31, 2023 |  |  |  |  31,373,765 |  | $ |  2.55 |  | $ |  1,349 |  |  |  |  |  |  |  
| Exercisable as of December 31, 2023 |  |  |  |  24,378,890 |  | $ |  2.70 |  | $ |  403 |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 
| Schedule of stock options by exercise price |  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  
|  |  | Options Outstanding |  | Options Exercisable |  
|  |      |  |      | Weighted-Average |      |  |  |      |  |  |  |  |  
|  |  | Number of  |  | Remaining Contractual |  | Weighted-Average |  | Number of  |  | Weighted-Average |  
| Exercise Price |  | Shares |  | Life (in years) |  | Exercise Price |  | Shares |  | Exercise Price |  
| $0.90 - $1.87 |   |  6,712,896 |   |  8.61 |  | $ |  1.43 |   |  1,991,518 |  | $ |  1.44 |  
| $1.96 - $2.11 |   |  5,063,237 |   |  4.44 |  | $ |  2.03 |   |  5,063,237 |  | $ |  2.03 |  
| $2.14 - $2.40 |  |  3,940,279 |  |  2.89 |  | $ |  2.26 |  |  3,717,256 |  | $ |  2.26 |  
| $2.42 - $2.42 |   |  5,816,323 |   |  6.81 |  | $ |  2.42 |   |  3,794,160 |  | $ |  2.42 |  
| $2.44 - $3.54 |  |  6,852,637 |  |  5.14 |  | $ |  3.16 |  |  4,473,712 |  | $ |  3.06 |  
| $3.59 - $4.49 |  |  5,542,956 |  |  3.95 |  | $ |  3.97 |  |  5,215,904 |  | $ |  3.99 |  
| $4.50 - $4.50 |  |  190,437 |  |  7.29 |  | $ |  4.50 |  |  123,103 |  | $ |  4.50 |  
| $0.90 - $4.50 |   |  34,118,765 |   |  5.56 |  | $ |  2.56 |   |  24,378,890 |  | $ |  2.70 |  | 
| Employee Stock Option [Member] |  | 
| Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  | 
| Summary of weighted-average assumptions relating to options granted |  
|  |  |  |  |  |  |  |  |  
|  |  | Year Ended December 31, |   |  
|  |      | 2023 |      | 2022 |      | 2021 |   |  
| Risk-free interest rate |  | 3.9 | %   | 2.6 | %   | 1.0 | % |  
| Expected term (in years) |  | 6.8 |  | 6.3 |  | 6.4 |  |  
| Dividend yield |  | 0.0 | %   | 0.0 | %   | 0.0 | % |  
| Expected volatility |  | 84.0 | %   | 74.8 | %   | 70.5 | % |  | 
| Purchase Plan |  | 
| Share-based Compensation Arrangement by Share-based Payment Award [Line Items] |  | 
| Summary of weighted-average assumptions used to calculate fair value of purchase rights granted under Employee Stock Purchase Plan |  
|  |  |  |  |  |  |  |  |  
|  |  | Year Ended December 31, |   |  
|  |      | 2023 |      | 2022 |      | 2021 |   |  
| Risk-free interest rate |  | * |  |  3.1 | %   | * |  |  
| Expected term (in years) |  | * |  |  1.3 |  | * |  |  
| Dividend yield |  | * |  | 0.0 | %   | * |  |  
| Expected volatility |  | * |  |  121.0 | %   | * |  |  
| Weighted average grant date fair value (dollar per share) |  | * |  | $0.78  |  | * |  |  |