Derivatives - Schedule of Gain Loss From Derivatives Not Designated As Hedging Instruments Statements of Financial Performance And Location (Detail) - USD ($) $ in Thousands |
12 Months Ended | ||
---|---|---|---|
May 31, 2022 |
May 31, 2021 |
May 31, 2020 |
|
Not Designated as Hedging Instrument [Member] | Forward Contracts [Member] | Other income (expense) [Member] | |||
Schedule of Gain Loss From Derivatives Not Designated As Hedging Instruments Statements of Financial Performance And Location [Line Items] | |||
Foreign currency forward contracts | $ 1,218 | $ 2,651 | $ 1,111 |