Origin of visible and near IR upconversion in Yb3+-Tm3+-Er3+ doped BaMgF4 phosphor through energy transfer and cross-relaxation processes