v3.22.0.1

Income Taxes (Tables) | 12 Months Ended
--- | ---
Dec. 31, 2021
Income Tax Disclosure [Abstract] |
Schedule of Income before Income Tax, Domestic and Foreign | The domestic and foreign components of income (loss) before income taxes were as follows (in thousands):
| Year Ended December 31,
| 2019 | 2020 | 2021
Domestic | $ | (153,154) |  | $ | (4,509,519) |  | $ | (390,652) |
Foreign | (258,549) |  | (172,419) |  | 90,445 |
Loss before income taxes | $ | (411,703) |  | $ | (4,681,938) |  | $ | (300,207) |
Schedule of Components of Income Tax Expense (Benefit) | The components of the provision for (benefit from) income taxes were as follows (in thousands):
| Year Ended December 31,
| 2019 | 2020 | 2021
Current |  |  |
Federal | $ | 223,673 |  | $ | (91,094) |  | $ | 4,704 |
State | 5,930 |  | (976) |  | 2,238 |
Foreign | 38,660 |  | 14,449 |  | 33,950 |
Total current provision for (benefit from) income taxes | 268,263 |  | (77,621) |  | 40,892 |
Deferred |  |  |
Federal | (1,563) |  | 47 |  | 98 |
State | (248) |  | 55 |  | — |
Foreign | (3,816) |  | (19,703) |  | 10,837 |
Total deferred benefit for income taxes | (5,627) |  | (19,601) |  | 10,935 |
Total provision for (benefit from) income taxes | $ | 262,636 |  | $ | (97,222) |  | $ | 51,827 |
Schedule of Effective Income Tax Rate Reconciliation | The following is a reconciliation of the statutory federal income tax rate to the Company’s effective tax rate:
| Year Ended December 31,
| 2019 | 2020 | 2021
Expected income tax expense at federal statutory rate | 21.0 | % | 21.0 | % | 21.0 | %
State taxes, net of federal benefits | (0.2) |  | — |  | (0.7) |
Foreign tax rate differential | (19.5) |  | (0.5) |  | (5.1) |
Stock-based compensation | (0.9) |  | 7.1 |  | 282.4 |
Acquisition related expenses | (0.3) |  | — |  | — |
Deferred tax impacts of restructuring | — |  | 6.5 |  | (9.7) |
Other statutorily non-deductible expenses | (2.6) |  | (0.3) |  | (1.1) |
Non-deductible warrant revaluations | — |  | (3.9) |  | (20.4) |
Research and development credits | (0.9) |  | 4.3 |  | 51.0 |
Uncertain tax positions—prior year positions | (53.0) |  | (0.1) |  | (3.1) |
Uncertain tax positions—current year positions | (4.2) |  | (0.2) |  | (1.0) |
Other | 0.2 |  | 0.3 |  | 1.3 |
Change in valuation allowance | (3.4) |  | (32.1) |  | (331.9) |
Effective tax rate | (63.8) | % | 2.1 | % | (17.3) | %
Schedule of Deferred Tax Assets and Liabilities | The components of deferred tax assets and liabilities consisted of the following (in thousands):
| As of December 31,
| 2020 | 2021
Deferred tax assets: |  |
Net operating loss carryforwards | $ | 1,078,070 |  | $ | 1,987,606 |
Tax credit carryforwards | 333,991 |  | 568,468 |
Accruals and reserves | 70,130 |  | 105,530 |
Non-income tax accruals | 71,706 |  | 64,757 |
Stock-based compensation | 211,216 |  | 156,726 |
Operating lease liabilities | 94,840 |  | 86,690 |
Intangible assets | 274,396 |  | 210,057 |
Other | 53,477 |  | 155,020 |
Gross deferred tax assets | 2,187,826 |  | 3,334,854 |
Valuation allowance | (2,053,069) |  | (3,263,823) |
Total deferred tax assets | 134,757 |  | 71,031 |
Deferred tax liabilities: |  |
Property and equipment basis differences | (33,503) |  | (7,834) |
Operating lease assets | (72,659) |  | (48,628) |
Other | (3,091) |  | — |
Total deferred tax liabilities | (109,253) |  | (56,462) |
Total net deferred tax assets | $ | 25,504 |  | $ | 14,569 |
Schedule of Unrecognized Tax Benefits Roll Forward | A reconciliation of the beginning and ending amount of the Company’s total gross unrecognized tax benefits was as follows (in thousands):
| Year Ended December 31,
| 2019 | 2020 | 2021
Balance at beginning of period | $ | 69,837 |  | $ | 336,726 |  | $ | 507,865 |
Gross increases related to prior year tax positions | 237,972 |  | 2,223 |  | 13,568 |
Gross decreases related to prior year tax positions | (5,029) |  | (5,970) |  | (1,772) |
Gross increases related to current year tax positions | 36,502 |  | 196,492 |  | 84,990 |
Reductions due to settlements with taxing authorities | (2,296) |  | (21,240) |  | (1,313) |
Reduction due to lapse in statute of limitations | (260) |  | (366) |  | (6,776) |
Balance at end of period | $ | 336,726 |  | $ | 507,865 |  | $ | 596,562 |

X
- References No definition available. + Details
Name: | us-gaap_IncomeTaxDisclosureAbstract
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure of the components of income tax expense attributable to continuing operations for each year presented including, but not limited to: current tax expense (benefit), deferred tax expense (benefit), investment tax credits, government grants, the benefits of operating loss carryforwards, tax expense that results from allocating certain tax benefits either directly to contributed capital or to reduce goodwill or other noncurrent intangible assets of an acquired entity, adjustments of a deferred tax liability or asset for enacted changes in tax laws or rates or a change in the tax status of the entity, and adjustments of the beginning-of-the-year balances of a valuation allowance because of a change in circumstances that causes a change in judgment about the realizability of the related deferred tax asset in future years. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 740 -SubTopic 10 -Section 50 -Paragraph 9 -URI http://asc.fasb.org/extlink&oid=121826272&loc=d3e32639-109319 + Details
Name: | us-gaap_ScheduleOfComponentsOfIncomeTaxExpenseBenefitTableTextBlock
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure of the components of net deferred tax asset or liability recognized in an entity's statement of financial position, including the following: the total of all deferred tax liabilities, the total of all deferred tax assets, the total valuation allowance recognized for deferred tax assets. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 740 -SubTopic 10 -Section 50 -Paragraph 2 -URI http://asc.fasb.org/extlink&oid=121826272&loc=d3e32537-109319 + Details
Name: | us-gaap_ScheduleOfDeferredTaxAssetsAndLiabilitiesTableTextBlock
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure of the reconciliation using percentage or dollar amounts of the reported amount of income tax expense attributable to continuing operations for the year to the amount of income tax expense that would result from applying domestic federal statutory tax rates to pretax income from continuing operations. + References Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 740 -SubTopic 10 -Section 50 -Paragraph 12 -URI http://asc.fasb.org/extlink&oid=121826272&loc=d3e32687-109319 + Details
Name: | us-gaap_ScheduleOfEffectiveIncomeTaxRateReconciliationTableTextBlock
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure of income before income tax between domestic and foreign jurisdictions. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 235 -SubTopic 10 -Section S99 -Paragraph 1 -Subparagraph (SX 210.4-08(h)(1)(Note 1)) -URI http://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690 + Details
Name: | us-gaap_ScheduleOfIncomeBeforeIncomeTaxDomesticAndForeignTableTextBlock
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- Definition Tabular disclosure of the change in unrecognized tax benefits. + References Reference 1: http://www.xbrl.org/2003/role/exampleRef -Publisher FASB -Name Accounting Standards Codification -Topic 740 -SubTopic 10 -Section 55 -Paragraph 217 -URI http://asc.fasb.org/extlink&oid=124434304&loc=d3e36027-109320 Reference 2: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 740 -SubTopic 10 -Section 50 -Paragraph 15A -URI http://asc.fasb.org/extlink&oid=121826272&loc=SL6600010-109319 + Details
Name: | us-gaap_ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:textBlockItemType
Balance Type: | na
Period Type: | duration