Condensed Consolidated Statements of Redeemable Convertible and Convertible Preferred Stock and Stockholders' Equity (Deficit) - USD ($) $ in Thousands | Total | Series H-1 Convertible Preferred Stock [Member] | Common Stock [Member] | Common Stock [Member]Series H-1 Convertible Preferred Stock [Member] | Additional Paid-in Capital [Member] | Additional Paid-in Capital [Member]Series H-1 Convertible Preferred Stock [Member] | Treasury Stock [Member] | Accumulated Other Comprehensive Income (Loss) [Member] | Accumulated Deficit | Redeemable Convertible Preferred Stock [Member] | Nonredeemable Convertible Preferred Stock [Member] | Nonredeemable Convertible Preferred Stock [Member]Series H-1 Convertible Preferred Stock [Member] | Nonredeemable Convertible Preferred Stock [Member]Series K Convertible Preferred Stock [Member] | Nonredeemable Convertible Preferred Stock [Member]Series D Convertible Preferred Stock [Member] |
Temporary equity, beginning period, Shares at Dec. 31, 2019 | | | | | | | | | | 4,017,000 | 742,840,000 | | | |
Temporary equity, beginning period at Dec. 31, 2019 | | | | | | | | | | $ 33,569 | $ 2,093,662 | | | |
Balance at beginning period, Shares at Dec. 31, 2019 | | | 581,497,000 | | | | 6,393,000 | | | | | | | |
Balance at beginning period at Dec. 31, 2019 | $ (1,980,642) | | $ 588 | | $ 1,857,331 | | $ (38,895) | $ (703) | $ (3,798,963) | | | | | |
Conversion of convertible preferred stock to common stock, Shares | | | 793,726,000 | 28,000 | | | | | | | (745,313,000) | (28,000) | | |
Conversion of convertible preferred stock to common stock | 2,105,319 | $ 100 | $ 794 | | 2,104,525 | $ 100 | | | | | $ (2,105,319) | $ (100) | | |
Issuance of preferred stock upon net exercise of preferred stock warrants, Shares | | | | | | | | | | | | | 121,000 | 2,380,000 |
Issuance of preferred stock upon net exercise of preferred stock warrants | | | | | | | | | | | | | $ 947 | $ 10,810 |
Repurchase of common stock, held in treasury, Shares | | | (808,000) | | | | 808,000 | | | | | | | |
Repurchase of common stock, held in treasury | (3,777) | | | | | | $ (3,777) | | | | | | | |
Retirement of treasury stock, Shares | | | | | | | (7,201,000) | | | | | | | |
Retirement of treasury stock | | | $ (7) | | (42,665) | | $ 42,672 | | | | | | | |
Issuance of common stock upon net exercise of common stock warrants and other, Shares | | | 7,631,000 | | | | | | | | | | | |
Issuance of common stock upon net exercise of common stock warrants and other | | | $ 8 | | (8) | | | | | | | | | |
Issuance of common stock upon net exercise of common stock warrants, Shares | | | 206,501,000 | | | | | | | | | | | |
Issuance of common stock upon net exercise of common stock warrants | $ 942,529 | | $ 207 | | 942,322 | | | | | | | | | |
Conversion of redeemable convertible preferred stock to common stock, Shares | (4,017,000) | | 4,017,000 | | | | | | | | | | | |
Conversion of redeemable convertible preferred stock to common stock | $ 33,569 | | $ 4 | | 33,565 | | | | | $ (33,569) | | | | |
Conversion of preferred stock warrants to common stock warrants | 31,007 | | | | 31,007 | | | | | | | | | |
Issuance of common stock from the exercise of stock options | 116,030 | | $ 69 | | 115,961 | | | | | | | | | |
Issuance of common stock from the exercise of stock options, Shares | | | 69,444,000 | | | | | | | | | | | |
Issuance of common stock upon vesting of RSUs, Shares | | | 68,150,000 | | | | | | | | | | | |
Issuance of common stock upon vesting of RSUs | | | $ 68 | | (68) | | | | | | | | | |
Stock-based compensation | 1,024,000 | | | | 1,024,000 | | | | | | | | | |
Settlement of employee loan accounted for as a modification to stock option (Shares) | | | (3,500,000) | | | | | | | | | | | |
Settlement of employee loan accounted for as a modification to stock option (Value) | (205) | | $ (4) | | (201) | | | | | | | | | |
Other comprehensive income (loss) | 1,871 | | | | | | | 1,871 | | | | | | |
Net loss | (1,018,048) | | | | | | | | (1,018,048) | | | | | |
Balance at end of period, Shares at Sep. 30, 2020 | | | 1,726,686,000 | | | | | | | | | | | |
Balance at end of period at Sep. 30, 2020 | 1,251,753 | | $ 1,727 | | 6,065,869 | | | 1,168 | (4,817,011) | | | | | |
Temporary equity, beginning period, Shares at Jun. 30, 2020 | | | | | | | | | | 4,017,000 | 742,933,000 | | | |
Temporary equity, beginning period at Jun. 30, 2020 | | | | | | | | | | $ 33,569 | $ 2,094,509 | | | |
Balance at beginning period, Shares at Jun. 30, 2020 | | | 736,635,000 | | | | | | | | | | | |
Balance at beginning period at Jun. 30, 2020 | (1,398,701) | | $ 737 | | 2,563,354 | | | 900 | (3,963,692) | | | | | |
Conversion of convertible preferred stock to common stock, Shares | | | 793,726,000 | | | | | | | | (745,313,000) | | | |
Conversion of convertible preferred stock to common stock | 2,105,319 | | $ 794 | | 2,104,525 | | | | | | $ (2,105,319) | | | |
Issuance of preferred stock upon net exercise of preferred stock warrants, Shares | | | | | | | | | | | | | | 2,380,000 |
Issuance of preferred stock upon net exercise of preferred stock warrants | | | | | | | | | | | | | | $ 10,810 |
Issuance of common stock upon net exercise of common stock warrants and other, Shares | | | 7,631,000 | | | | | | | | | | | |
Issuance of common stock upon net exercise of common stock warrants and other | | | $ 8 | | (8) | | | | | | | | | |
Issuance of common stock upon net exercise of common stock warrants, Shares | | | 88,280,000 | | | | | | | | | | | |
Issuance of common stock upon net exercise of common stock warrants | 404,679 | | $ 88 | | 404,591 | | | | | | | | | |
Conversion of redeemable convertible preferred stock to common stock, Shares | | | 4,017,000 | | | | | | | (4,017,000) | | | | |
Conversion of redeemable convertible preferred stock to common stock | 33,569 | | $ 4 | | 33,565 | | | | | $ (33,569) | | | | |
Conversion of preferred stock warrants to common stock warrants | 31,007 | | | | 31,007 | | | | | | | | | |
Issuance of common stock from the exercise of stock options | 87,207 | | $ 32 | | 87,175 | | | | | | | | | |
Issuance of common stock from the exercise of stock options, Shares | | | 31,748,000 | | | | | | | | | | | |
Issuance of common stock upon vesting of RSUs, Shares | | | 68,149,000 | | | | | | | | | | | |
Issuance of common stock upon vesting of RSUs | | | $ 68 | | (68) | | | | | | | | | |
Stock-based compensation | 841,929 | | | | 841,929 | | | | | | | | | |
Settlement of employee loan accounted for as a modification to stock option (Shares) | | | (3,500,000) | | | | | | | | | | | |
Settlement of employee loan accounted for as a modification to stock option (Value) | (205) | | $ (4) | | (201) | | | | | | | | | |
Other comprehensive income (loss) | 268 | | | | | | | 268 | | | | | | |
Net loss | (853,319) | | | | | | | | (853,319) | | | | | |
Balance at end of period, Shares at Sep. 30, 2020 | | | 1,726,686,000 | | | | | | | | | | | |
Balance at end of period at Sep. 30, 2020 | 1,251,753 | | $ 1,727 | | 6,065,869 | | | 1,168 | (4,817,011) | | | | | |
Balance at beginning period, Shares at Dec. 31, 2020 | | | 1,792,140,000 | | | | | | | | | | | |
Balance at beginning period at Dec. 31, 2020 | 1,522,550 | | $ 1,792 | | 6,488,857 | | | (2,745) | (4,965,354) | | | | | |
Issuance of common stock upon net exercise of common stock warrants and other, Shares | | | 4,664,000 | | | | | | | | | | | |
Issuance of common stock upon net exercise of common stock warrants and other | 1,712 | | $ 6 | | 1,706 | | | | | | | | | |
Issuance of common stock from the exercise of stock options | $ 474,683 | | $ 155 | | 474,528 | | | | | | | | | |
Issuance of common stock from the exercise of stock options, Shares | 155,720,000 | | 155,720,000 | | | | | | | | | | | |
Issuance of common stock upon vesting of RSUs, Shares | | | 37,123,000 | | | | | | | | | | | |
Issuance of common stock upon vesting of RSUs | | | $ 37 | | (37) | | | | | | | | | |
Issuance of common stock upon vesting of growth units, Shares | | | 1,471,000 | | | | | | | | | | | |
Issuance of common stock upon vesting of growth units | | | $ 1 | | (1) | | | | | | | | | |
Stock-based compensation | $ 612,252 | | | | 612,252 | | | | | | | | | |
Other comprehensive income (loss) | 1,050 | | | | | | | 1,050 | | | | | | |
Net loss | (364,191) | | | | | | | | (364,191) | | | | | |
Balance at end of period, Shares at Sep. 30, 2021 | | | 1,991,118,000 | | | | | | | | | | | |
Balance at end of period at Sep. 30, 2021 | 2,248,056 | | $ 1,991 | | 7,577,305 | | | (1,695) | (5,329,545) | | | | | |
Balance at beginning period, Shares at Jun. 30, 2021 | | | 1,936,578,000 | | | | | | | | | | | |
Balance at beginning period at Jun. 30, 2021 | 2,068,963 | | $ 1,937 | | 7,294,369 | | | 65 | (5,227,408) | | | | | |
Issuance of common stock from the exercise of stock options | 97,995 | | $ 41 | | 97,954 | | | | | | | | | |
Issuance of common stock from the exercise of stock options, Shares | | | 41,249,000 | | | | | | | | | | | |
Issuance of common stock upon vesting of RSUs, Shares | | | 13,291,000 | | | | | | | | | | | |
Issuance of common stock upon vesting of RSUs | | | $ 13 | | (13) | | | | | | | | | |
Stock-based compensation | 184,995 | | | | 184,995 | | | | | | | | | |
Other comprehensive income (loss) | (1,760) | | | | | | | (1,760) | | | | | | |
Net loss | (102,137) | | | | | | | | (102,137) | | | | | |
Balance at end of period, Shares at Sep. 30, 2021 | | | 1,991,118,000 | | | | | | | | | | | |
Balance at end of period at Sep. 30, 2021 | $ 2,248,056 | | $ 1,991 | | $ 7,577,305 | | | $ (1,695) | $ (5,329,545) | | | | | |