うえ はこであれば
uewa kodeareba

Noun
Da Copula

The "-eba" conditional form ("if/when…") of 上箱

1. If the upper box; Were the upper box

Ba Conditional