Determine the function of the gerund that is underlined in each sentence

1) Emily is interested in learning foreign languages.

A) Indirect object
B) object of a preposition
C) direct object
D) subject