# Path: dataproperty/_function.py
# def strip_ansi_escape(unicode_str: str) -> str:
#     return _ansi_escape.sub("", unicode_str)
# 
# Path: dataproperty/_line_break.py
# class LineBreakHandling(Enum):
#     NOP = 0
#     REPLACE = 1
#     ESCAPE = 2


import html
import re
from typing import Any, Optional, Tuple, Union
from mbstrdecoder import MultiByteStrDecoder
from ._function import strip_ansi_escape
from ._line_break import LineBreakHandling
            return data
        except UnicodeDecodeError:
            return MultiByteStrDecoder(data).unicode_str.strip(strip_str)
        except TypeError:
            # reach here when data and strip_str type are different
            if isinstance(data, bytes):
                return MultiByteStrDecoder(data).unicode_str.strip(strip_str)
            elif isinstance(strip_str, bytes):
                return data.strip(MultiByteStrDecoder(strip_str).unicode_str)

    def __dequote(self, s: str) -> str:
        if not self.dequote or not s:
            return s

        try:
            if (s[0] == s[-1]) and s.startswith(("'", '"')):
                if s.count(s[0]) == 2:
                    return s[1:-1]
        except TypeError:
            pass

        return s

    def __process_line_break(self, data):
        lbh = self.line_break_handling

        if lbh == LineBreakHandling.NOP:
            return data

        try:

# Path: dataproperty/_function.py
# def strip_ansi_escape(unicode_str: str) -> str:
#     return _ansi_escape.sub("", unicode_str)
# 
# Path: dataproperty/_line_break.py
# class LineBreakHandling(Enum):
#     NOP = 0
#     REPLACE = 1
#     ESCAPE = 2


# Path: dataproperty/_preprocessor.py
import html
import re
from typing import Any, Optional, Tuple, Union
from mbstrdecoder import MultiByteStrDecoder
from ._function import strip_ansi_escape
from ._line_break import LineBreakHandling

            return data
        except UnicodeDecodeError:
            return MultiByteStrDecoder(data).unicode_str.strip(strip_str)
        except TypeError:
            # reach here when data and strip_str type are different
            if isinstance(data, bytes):
                return MultiByteStrDecoder(data).unicode_str.strip(strip_str)
            elif isinstance(strip_str, bytes):
                return data.strip(MultiByteStrDecoder(strip_str).unicode_str)

    def __dequote(self, s: str) -> str:
        if not self.dequote or not s:
            return s

        try:
            if (s[0] == s[-1]) and s.startswith(("'", '"')):
                if s.count(s[0]) == 2:
                    return s[1:-1]
        except TypeError:
            pass

        return s

    def __process_line_break(self, data):
        lbh = self.line_break_handling

        if lbh == LineBreakHandling.NOP:
            return data

        try:

            if lbh == LineBreakHandling.REPLACE: