def split_csp_str(val):
    """ Split comma separated string into unique values, keeping their order.

    :returns: list of splitted values

    """
    seen = set()
    values = val if isinstance(val, (list, tuple)) else val.strip().split(',')
    return [x for x in values if x and not (x in seen or seen.add(x))]