Complex-generator-coordinate technique in resonating-group calculations employing flexible fragment wave functions