# 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
            try:
                data = data.replace("\t", " " * self.tab_length)
            except (TypeError, AttributeError, ValueError):
                pass

        if self.is_escape_html_tag:
            try:
                data = html.escape(data)
            except AttributeError:
                return (data, None)

        data = self.__process_line_break(data)
        data = self.__escape_formula_injection(data)
        data = self.__dequote(data)

        try:
            return (data, strip_ansi_escape(data))
        except TypeError:
            return (data, None)

    @staticmethod
    def __preprocess_data(data, strip_str):
        if strip_str is None:
            return data

        try:
            return data.strip(strip_str)
        except AttributeError:
            return data
        except UnicodeDecodeError:

# 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

            try:
                data = data.replace("\t", " " * self.tab_length)
            except (TypeError, AttributeError, ValueError):
                pass

        if self.is_escape_html_tag:
            try:
                data = html.escape(data)
            except AttributeError:
                return (data, None)

        data = self.__process_line_break(data)
        data = self.__escape_formula_injection(data)
        data = self.__dequote(data)

        try:
            return (data, strip_ansi_escape(data))
        except TypeError:
            return (data, None)

    @staticmethod
    def __preprocess_data(data, strip_str):
        if strip_str is None:
            return data

        try:
            return data.strip(strip_str)
        except AttributeError:
            return data
        except UnicodeDecodeError:

            return MultiByteStrDecoder(data).unicode_str.strip(strip_str)