Planar analytic vector fields with generalized rational first integrals