Current File : //usr/lib/python3/dist-packages/pip/_vendor/rich/__pycache__/text.cpython-312.pyc
�

/�gձ����UddlZddlmZmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZddlmZddlmZdd	lmZdd
lmZddlmZmZddlmZdd
l m!Z!ddl"m#Z#ddl$m%Z%ddl&m'Z'ddl(m)Z)ddl*m+Z+m,Z,e	rddl-m.Z.m/Z/m0Z0m1Z1dZ2de3d<dZ4de3d<ejjd�Z6ee7dfZ8ee7gee,fZ9Gd�de�Z:Gd�de%�Z;e<dk(�rdd l=m.Z.e;d!�Z>e>jd"gd#�e>jd$gd%�e.�Z-e-j�d&�e-j�e>d'�(�e-j��e-j�d)�e-j�e>d*d+�,�e-j��e-j�d-�e-j�e>d.d/�,�e-j��e-j�d0�e-j�e>d1d2�,�e-j��yy)3�N)�partial�reduce)�gcd)�
itemgetter)
�
TYPE_CHECKING�Any�Callable�Dict�Iterable�List�
NamedTuple�Optional�Tuple�Union�)�	loop_last)�	pick_bool)�divide_line)�AlignMethod)�cell_len�
set_cell_size)�Lines)�strip_control_codes)�EmojiVariant)�JupyterMixin)�Measurement)�Segment)�Style�	StyleType)�Console�ConsoleOptions�
JustifyMethod�OverflowMethod�defaultr"�DEFAULT_JUSTIFY�foldr#�DEFAULT_OVERFLOWz\s+$�Textc��eZdZUdZeed<	eed<	eeefed<	defd�Z	de
fd�Zdedede
dffd	�Zdeddfd
�Zdeddfd�Zy)
�Spanz A marked up region in some text.�start�end�style�returnc�V�d|j�d|j�d|j�d�S)NzSpan(z, �))r+r,r-��selfs �7/usr/lib/python3/dist-packages/pip/_vendor/rich/text.py�__repr__z
Span.__repr__7s)���t�z�z�l�"�T�X�X�J�b�����a�@�@�c�4�|j|jkDS�N)r,r+r1s r3�__bool__z
Span.__bool__:s���x�x�$�*�*�$�$r5�offsetc��||jkr|dfS||jk\r|dfS|\}}}t|t||�|�}t|j||�}||fS)z)Split a span in to 2 from a given offset.N)r+r,r*�min)r2r9r+r,r-�span1�span2s       r3�splitz
Span.split=sm���D�J�J����:���T�X�X����:�� ���s�E��U�C��V�,�e�4���U�Y�Y��U�+���e�|�r5c�4�|\}}}t||z||z|�S)z�Move start and end by a given offset.

        Args:
            offset (int): Number of characters to add to start and end.

        Returns:
            TextSpan: A new TextSpan with adjusted position.
        )r*�r2r9r+r,r-s     r3�movez	Span.moveJs'��!���s�E��E�F�N�C�&�L�%�8�8r5c�J�|\}}}||k\r|St|t||�|�S)z�Crop the span at the given offset.

        Args:
            offset (int): A value between start and end.

        Returns:
            Span: A new (possibly smaller) span.
        )r*r;r@s     r3�
right_cropzSpan.right_cropVs2��!���s�E��S�=��K��E�3�v�s�+�U�3�3r5N)�__name__�
__module__�__qualname__�__doc__�int�__annotations__r�strrr4�boolr8rrr>rArC�r5r3r*r*-s���*��J��	�H����e����)�A�#�A�%�$�%��C��E�&�(�6�2B�*B�$C��
9�3�
9�6�
9�4��4��4r5r*c��eZdZdZgd�Z		d}ddddddd�ded	eeefd
edded
dee	dedee
deeeddfd�Z
de
fd�Zde	fd�Zdefd�Zdefd�Zdeddfd�Zdede	fd�Zdede	fd�Zdee
efddfd�Zede
fd��Zedefd��Zedd ddddd!�ded	eeefd"e	d#eed
edded
deddfd$��Zeddddddd%�ded	eeefd
edded
dee	dedee
ddfd&��Ze	d~ddd'�ded	e d
edded
ddf
d(��Z!edddddddd)�d*eede"ee ffd	eeefd
edded
dee	dede
d+ee#eefddfd,��Z$edefd-��Z%e%jLd.eddfd/��Z%edeefd0��Z'e'jLdeeddfd1��Z'd~d2eddfd3�Z(dd4�Z)		d�d	eeefd5e
dee
ddfd6�Z*		d�d	eeefd5e
dee
ddfd7�Z+	d�d+e#eefd5e
dee
ddfd8�Z,d�d+ee#eefd9eddfd:�Z-d;eddfd<�Z.d=d>d?e
defd@�Z/	d�ddA�dBed	eee0e fdCede
fdD�Z1d dE�dFe2ed	eeefdGe	de
fdH�Z3d�dI�Z4dJe
ddfdK�Z5dLe
ddfdM�Z6d=d>dNdOde2e7fdP�Z8d=d>dNdOde9fdQ�Z:d~d=d>dede2dRfdS�Z;dTe2dddfdU�Z<d�dee
ddfdV�Z=ddWdX�dYe
ded
dZe	ddfd[�Z>d�d\�Z?d�d]e
d^eddfd_�Z@d�d]e
d^eddfd`�ZAd�d]e
d^eddfda�ZBd�dbeCdce
d^eddfdd�ZD	d�dedefd	eeedefddfdf�ZEd�dg�ZFdhe2e"eee fddfdi�ZGd�dj�ZH	d�dWdWdk�dledme	dne	deIfdo�ZJdpe2e
deIfdq�ZKd�dre
ddfds�ZLdddddt�d=d>dce
d
edded
de
dee	deIfdu�ZMdce
deIfdv�ZNde
fdw�ZO	d�dxdydz�d{ee
d^ed	e ddfd|�ZPy)�r(a�Text with color / style.

    Args:
        text (str, optional): Default unstyled text. Defaults to "".
        style (Union[str, Style], optional): Base style for text. Defaults to "".
        justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
        overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
        no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
        end (str, optional): Character to end text with. Defaults to "\\n".
        tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to 8.
        spans (List[Span], optional). A list of predefined style spans. Defaults to None.
    )	�_textr-�justify�overflow�no_wrapr,�tab_size�_spans�_length�N�
�)rOrPrQr,rR�spans�textr-rOr"rPr#rQr,rRrXr.c��t|�}	|	g|_||_||_||_||_||_||_|xsg|_t|	�|_
yr7)rrNr-rOrPrQr,rRrS�lenrT)
r2rYr-rOrPrQr,rRrX�sanitized_texts
          r3�__init__z
Text.__init__sY��-�T�2��$�%��
���
�29���4<��
������� ��
�"'�+�2�����/��r5c��|jSr7)rTr1s r3�__len__zText.__len__�s���|�|�r5c�,�t|j�Sr7)rKrTr1s r3r8z
Text.__bool__�s���D�L�L�!�!r5c��|jSr7��plainr1s r3�__str__zText.__str__�s���z�z�r5c�<�d|j�d|j�d�S)Nz<text � �>)rcrSr1s r3r4z
Text.__repr__�s����
�
�~�Q�t�{�{�o�Q�7�7r5�otherc��t|ttf�r#|j�}|j	|�|St
Sr7)�
isinstancerJr(�copy�append�NotImplemented)r2rh�results   r3�__add__zText.__add__�s2���e�c�4�[�)��Y�Y�[�F��M�M�%� ��M��r5c��t|t�stS|j|jk(xr|j|jk(Sr7)rjr(rmrcrS�r2rhs  r3�__eq__zText.__eq__�s7���%��&�!�!��z�z�U�[�[�(�H�T�[�[�E�L�L�-H�Hr5c��t|t�r||jvSt|t�r|j|jvSy)NF)rjrJrcr(rqs  r3�__contains__zText.__contains__�s;���e�S�!��D�J�J�&�&�
��t�
$��;�;�$�*�*�,�,�r5�slicec����dtddf�fd�}t|t�r||�S|jt�j��\}}}|dk(r�j||g�}|dSt
d��)Nr9r.r(c
����t}t�j|�jD���cgc]\}}}||cxkDr|k\r
nn
|dd|��� c}}}d��}|Scc}}}w)NrrrU)rXr,)r*r(rcrS)r9�_Spanr+r,r-rYr2s      �r3�get_text_atz%Text.__getitem__.<locals>.get_text_at�sl����E���
�
�6�"�.2�[�[���)��s�E��V�,�u�,��!�Q��&��
��D��K��s�#Arz%slices with step!=1 are not supported)rHrj�indicesr[rc�divide�	TypeError)r2ruryr+�stop�step�liness`      r3�__getitem__zText.__getitem__�sz���	��	��	��e�S�!��u�%�%� %�
�
�c�$�*�*�o� >��E�4���q�y����U�D�M�2���Q�x�� � G�H�Hr5c�,�t|j�S)z5Get the number of cells required to render this text.)rrcr1s r3rz
Text.cell_len�s����
�
�#�#r5c��ddlm}g}|j}dd|jfgd�|jD��d�|jD��t|�d|jf�}|j
tdd���d}|j}|D]5\}}}	||kDr|||||��|}|	s�"||rd	|	�d
�nd|	�d
���7dj|�}
|
S)
z~Get console markup to render this Text.

        Returns:
            str: A string potentially creating markup tags.
        r)�escaperFc3�NK�|]}|jd|jf���y�w�FN)r+r-��.0�spans  r3�	<genexpr>zText.markup.<locals>.<genexpr>�s����
F�$�t�z�z�5�$�*�*�-�
F���#%c3�NK�|]}|jd|jf���y�w�TN)r,r-r�s  r3r�zText.markup.<locals>.<genexpr>�s����
C�t�t�x�x��t�z�z�*�
C�r�T��keyz[/�]�[rU)
�markupr�rcr-rSr[�sortrrl�join)r2r��outputrc�markup_spans�positionrlr9�closingr-r�s           r3r�zText.markup�s���	#����
�
��
��t�z�z�"�
�
F�$�+�+�
F�
�D�t�{�{�
C�
���Z��t�z�z�*�	
��	���j��A�.��/�������&2�	C�"�F�G�U��� ��v�e�H�V�4�5�6�!������E�7�!�}�q���q�\�B�	C��������
r5T)r-�emoji�
emoji_variantrOrPr,r�r�c�T�ddlm}|||||��}	||	_||	_||	_|	S)a,Create Text instance from markup.

        Args:
            text (str): A string containing console markup.
            emoji (bool, optional): Also render emoji code. Defaults to True.
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
            end (str, optional): Character to end text with. Defaults to "\\n".

        Returns:
            Text: A Text instance with markup rendered.
        r)�render)r�r�)r�r�rOrPr,)
�clsrYr-r�r�rOrPr,r��
rendered_texts
          r3�from_markupzText.from_markup�s5��0	#��t�U�%�}�U�
� '�
��!)�
���
���r5�r-rOrPrQr,rRc	��ddlm}td||||||��}	|�}
|	jd�|
j	|�D��}|S)a�Create a Text object from a string containing ANSI escape codes.

        Args:
            text (str): A string containing escape codes.
            style (Union[str, Style], optional): Base style for text. Defaults to "".
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
            no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
            end (str, optional): Character to end text with. Defaults to "\\n".
            tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to 8.
        r)�AnsiDecoderrV)rOrPrQr,rRr-c3� K�|]}|���y�wr7rL�r��lines  r3r�z!Text.from_ansi.<locals>.<genexpr>5s����C�d�T�C�s�)�ansir�r(r��decode)r�rYr-rOrPrQr,rRr��joiner�decoderrns            r3�	from_ansizText.from_ansisQ��.	&���������
���-�����C�g�n�n�T�.B�C�C���
r5�rOrPc�>�||||��}|j|�|S)aaConstruct a Text instance with a pre-applied styled. A style applied in this way won't be used
        to pad the text when it is justified.

        Args:
            text (str): A string containing console markup.
            style (Union[str, Style]): Style to apply to the text. Defaults to "".
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.

        Returns:
            Text: A text instance with a style applied to the entire string.
        r�)�stylize)r�rYr-rOrP�styled_texts      r3�styledzText.styled8s&��*�$��(�C�����E�"��r5)r-rOrPrQr,rR�meta�partsr�c��|||||||��}	|	j}
t}|D]"}t||tf�r	|
|��|
|��$|r|	j	|�|	S)aRConstruct a text instance by combining a sequence of strings with optional styles.
        The positional arguments should be either strings, or a tuple of string + style.

        Args:
            style (Union[str, Style], optional): Base style for text. Defaults to "".
            justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
            overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
            end (str, optional): Character to end text with. Defaults to "\\n".
            tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to 8.
            meta (Dict[str, Any], optional). Meta data to apply to text, or None for no meta data. Default to None

        Returns:
            Text: A new text instance.
        r�)rlr(rjrJ�
apply_meta)
r�r-rOrPrQr,rRr�r�rYrl�_Text�parts
             r3�assemblez
Text.assembleQsq��4�������

���������	�D��$����-��t����
�		�
��O�O�D�!��r5c��t|j�dk7r)dj|j�g|jdd|jdS)z Get the text as a single string.rrUNr)r[rNr�r1s r3rcz
Text.plain~s?���t�z�z�?�a���W�W�T�Z�Z�0�1�D�J�J�q�M��z�z�!�}�r5�new_textc���||jk7rXt|�}|g|jdd|j}t	|�|_||jkDr|j�yyy)zSet the text to a new value.N)rcrrNrTr[�_trim_spans)r2r�r\�
old_lengths    r3rcz
Text.plain�sa���t�z�z�!�0��:�N�+�,�D�J�J�q�M����J��~�.�D�L��D�L�L�(�� � �"�)�"r5c��|jS)z.Get a reference to the internal list of spans.�rSr1s r3rXz
Text.spans�s���{�{�r5c��|dd|_y)z
Set spans.Nr�)r2rXs  r3rXz
Text.spans�s���A�h��r5rcc	��t||j|j|j|j|j
|j��}|S)zOReturn a new Text instance with copied meta data (but not the string or spans).r�)r(r-rOrPrQr,rR)r2rc�	copy_selfs   r3�
blank_copyzText.blank_copy�sA�����*�*��L�L��]�]��L�L�����]�]�
�	��r5c	���t|j|j|j|j|j
|j|j��}|j|jdd|S)zReturn a copy of this instance.r�N)	r(rcr-rOrPrQr,rRrS)r2r�s  r3rkz	Text.copy�sY����J�J��*�*��L�L��]�]��L�L�����]�]�
�	�#�k�k�	������r5r+c	���|r_t|�}|dkr||z}|�|}|dkr||z}||k\s||kry|jjt|t	||�|��yy)azApply a style to the text, or a portion of the text.

        Args:
            style (Union[str, Style]): Style instance or style definition to apply.
            start (int): Start offset (negative indexing is supported). Defaults to 0.
            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
        rN)r[rSrlr*r;�r2r-r+r,�lengths     r3r�zText.stylize�sq�����Y�F��q�y������{����Q�w��s�l�����#��,���K�K���t�E�3�v�s�+;�U�C�D�r5c
���|r`t|�}|dkr||z}|�|}|dkr||z}||k\s||kry|jjdt|t	||�|��yy)a�Apply a style to the text, or a portion of the text. Styles will be applied before other styles already present.

        Args:
            style (Union[str, Style]): Style instance or style definition to apply.
            start (int): Start offset (negative indexing is supported). Defaults to 0.
            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
        rN)r[rS�insertr*r;r�s     r3�stylize_beforezText.stylize_before�ss�����Y�F��q�y������{����Q�w��s�l�����#��,���K�K���q�$�u�c�&�#�.>��"F�G�r5c�V�tj|�}|j|||��y)ahApply meta data to the text, or a portion of the text.

        Args:
            meta (Dict[str, Any]): A dict of meta information.
            start (int): Start offset (negative indexing is supported). Defaults to 0.
            end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.

        )r+r,N)r�	from_metar�)r2r�r+r,r-s     r3r�zText.apply_meta�s$������%�����U�%�S��1r5�handlersc���|�in|}|j|j�D��cic]\}}d|��|��
c}}�|jtj|��|Scc}}w)a�Apply event handlers (used by Textual project).

        Example:
            >>> from rich.text import Text
            >>> text = Text("hello world")
            >>> text.on(click="view.toggle('world')")

        Args:
            meta (Dict[str, Any]): Mapping of meta information.
            **handlers: Keyword args are prefixed with "@" to defined handlers.

        Returns:
            Text: Self is returned to method may be chained.
        �@)�update�itemsr�rr�)r2r�r�r��values     r3�onzText.on�s\���\�r�t��������8H�I�*�#�u�q���Y��%�I�J����U�_�_�T�*�+����Js�A#
�suffixc�p�|jj|�r|jt|��yy)zaRemove a suffix if it exists.

        Args:
            suffix (str): Suffix to remove.
        N)rc�endswithrCr[)r2r�s  r3�
remove_suffixzText.remove_suffixs+���:�:���v�&��O�O�C��K�(�'r5�consoler r9c���|dkrt|�|z}|j}||j�j�}|jD]"\}}}||cxkDr|k\s�n�|||d��z
}�$|S)a
Get the style of a character at give offset.

        Args:
            console (~Console): Console where text will be rendered.
            offset (int): Offset in to text (negative indexing supported)

        Returns:
            Style: A Style instance.
        rrU�r$)r[�	get_styler-rkrS)r2r�r9r�r-r+r,�
span_styles        r3�get_style_at_offsetzText.get_style_at_offsetsz���A�:���Y��'�F��%�%�	��$�*�*�%�*�*�,��&*�k�k�	;�"�E�3�
��V�$�u�$���:�r�:�:��	;��r5)�style_prefix�re_highlightr�c
���d}|jj}t}|j}t	j
||�D]�}|j}	|r9|	�\}
}t|�r|||
|�n|}|�||
kDr|||
||��|dz
}|j�j�D]-}
|	|
�\}
}|
dk7s�||
kDs�|||
||�|
�����/��|S)aHighlight text with a regular expression, where group names are
        translated to styles.

        Args:
            re_highlight (str): A regular expression.
            style (Union[GetStyleCallable, StyleType]): Optional style to apply to whole match, or a callable
                which accepts the matched text and returns a style. Defaults to None.
            style_prefix (str, optional): Optional prefix to add to style group names.

        Returns:
            int: Number of regex matches
        rr���)
rSrlr*rc�re�finditerr��callable�	groupdict�keys)r2r�r-r��count�append_spanrxrc�match�get_spanr+r,�match_style�names              r3�highlight_regexzText.highlight_regex(s���&���k�k�(�(�����
�
���[�[��u�5�	L�E��z�z�H��%�Z�
��s�9A�%��e�E�%��$4�5�e���*�s�U�{���e�S�+� >�?��Q�J�E����)�.�.�0�
L��%�d�^�
��s��B�;�3��;���e�S�\�N�4�&�2I� J�K�
L�	L��r5)�case_sensitive�wordsr�c�6�djd�|D��}|jj}d}t}t	j
||j|rdntj��D]+}|jd�\}	}
|||	|
|��|dz
}�-|S)aDHighlight words with a style.

        Args:
            words (Iterable[str]): Worlds to highlight.
            style (Union[str, Style]): Style to apply.
            case_sensitive (bool, optional): Enable case sensitive matchings. Defaults to True.

        Returns:
            int: Number of words highlighted.
        �|c3�FK�|]}tj|����y�wr7)r�r��r��words  r3r�z'Text.highlight_words.<locals>.<genexpr>_s����>��B�I�I�d�O�>�s�!r��flagsr)	r�rSrlr*r�r�rc�
IGNORECASEr�)r2r�r-r��re_words�add_spanr�rxr�r+r,s           r3�highlight_wordszText.highlight_wordsNs���"�8�8�>��>�>���;�;�%�%�������[�[��d�j�j�^�����
�	�E����A��J�E�3��U�5�#�u�-�.��Q�J�E�	��r5c�B�|jj�|_y)z"Strip whitespace from end of text.N)rc�rstripr1s r3r�zText.rstripks���Z�Z�&�&�(��
r5�sizec���t|�}||kDr]||z
}tj|j�}|�6t|j	d��}|jt
||��yyy)z�Remove whitespace beyond a certain width at the end of the text.

        Args:
            size (int): The desired size of the text.
        Nr)r[�_re_whitespace�searchrc�grouprCr;)r2r��text_length�excess�whitespace_match�whitespace_counts      r3�
rstrip_endzText.rstrip_endoso���$�i����� �4�'�F�-�4�4�T�Z�Z�@���+�#&�'7�'=�'=�a�'@�#A� �����$4�f� =�>�,�r5�
new_lengthc��t|�}||k7r/||kr|j||z
�y|j||z
�yy)z<Set new length of the text, clipping or padding is required.N)r[�	pad_rightrC)r2rr�s   r3�
set_lengthzText.set_length}sB���T����Z���
�"����z�F�2�3������ 3�4�	 r5�optionsr!c#��K�|jxs|jxsd}|jxs|jxst}|jxs|jxst}|j||j|||xsdt|j|jd���}td�j|�}|j||j��Ed{���y7��w)NrWF�rOrPrRrQrV�r,)
rRrOr%rPr'�wrap�	max_widthrrQr(r�r�r,)r2r�rrRrOrPr�	all_liness        r3�__rich_console__zText.__rich_console__�s����� �(�(�>�D�M�M�>�Q���,�,�D�'�/�/�D�_���=�=�H�G�$4�$4�H�8H���	�	��������]���d�l�l�G�O�O�U�C�
�
����J�O�O�E�*�	��#�#�G����#�:�:�:�s�C!C+�#C)�$C+c���|j}|j�}|rtd�|D��nd}|j�}|rtd�|D��n|}t	||�S)Nc3�2K�|]}t|����y�wr7�rr�s  r3r�z(Text.__rich_measure__.<locals>.<genexpr>�s����>��X�d�^�>���rc3�2K�|]}t|����y�wr7rr�s  r3r�z(Text.__rich_measure__.<locals>.<genexpr>�s����1�4����1�r)rc�
splitlines�maxr>r)r2r�rrYr�max_text_widthr��min_text_widths        r3�__rich_measure__zText.__rich_measure__�s^���z�z�����!��BG��>��>�>�Q���
�
���5:�C�1�5�1�1��	��>�>�:�:r5rc#�V�����K�t}|j}|jst|���|r
||���yt|jtj���}tt|jd��}|D��cic]\}}|||j���c}}�||j��d<dgd�|D��d�|D��t|�ddf�}	|	jtdd��	�g��j}
�j}i��j�t
j �d
t
f�����fd�}t#|	|	dd�D]9\\}
}}\}}}|r	||�n|
|�||
kDs�'|||
||�����;|r||���yycc}}w�w)aRender the text as Segments.

        Args:
            console (Console): Console instance.
            end (Optional[str], optional): Optional end character.

        Returns:
            Iterable[Segment]: Result of render that may be written to the console.
        Nr�rr)rFrc3�@K�|]\}}|jd|f���y�wr�)r+�r��indexr�s   r3r�zText.render.<locals>.<genexpr>�s����
M�[�U�D�t�z�z�5�%�(�
M���c3�@K�|]\}}|jd|f���y�wr�rrs   r3r�zText.render.<locals>.<genexpr>�s����
J�+�%��t�x�x��u�%�
J�rTr�r.c�t��t�fd�t��D��}�|�}|�|S�|�}|�|<|S)z#Construct current style from stack.c3�(�K�|]	}�|���y�wr7rL)r��	_style_id�	style_maps  �r3r�z9Text.render.<locals>.get_current_style.<locals>.<genexpr>�s�����O�I�9�Y�/�O�s�)�tuple�sorted)�styles�cached_style�
current_style�combine�stack�style_cache�style_cache_getr#s   �����r3�get_current_stylez&Text.render.<locals>.get_current_style�sF����O����O�O�F�*�6�2�L��'�#�#�#�F�O�M�"/�K��� � r5)rrcrSrr�r�null�list�	enumerater-r[r�rrl�remove�getr)�zip)r2r�r,�_SegmentrYr��enumerated_spansrr�rX�stack_append�	stack_popr-r9�leaving�style_id�next_offset�_r)r*r+r,r#s                  @@@@@r3r�zText.render�s���������z�z���{�{��$�-����s�m�#���G�-�-�u�z�z�|�D�	��	�$�+�+�q� 9�:��EU�V�k�e�T�U�I�d�j�j�1�1�V�	� ����,�	�!��
�
�
M�<L�
M�
�K�9I�
J�
���Y��a� �	
��	�
�
�z�!�Q�'�
�(����|�|���L�L�	�68��%�/�/���-�-��	!�5�	!�	!�AD�E�5�QR�QS�9�@U�	N�<�'�V�W�h�)<�+�q�!���(�#��X�&��V�#��t�F�;�7�9J�9L�M�M�
	N���3�-����IW�s�BF)�
F#�*CF)�)F)rc
������	��j�}dtdf��fd�}|jj}|jj
}|jj}d�	t�|�D]p}||j�|jr&|��	�	t|�z|j��|��	fd�|jD���	t|�z
�	�r�	|_	|S)z�Join text together with this instance as the separator.

        Args:
            lines (Iterable[Text]): An iterable of Text instances to join.

        Returns:
            Text: A new text instance containing join text.
        r.r(c3�|�K��jrt��D]\}}|��|r�
����y�Ed{���y7��wr7)rcr)�lastr�rr2s  ��r3�	iter_textzText.join.<locals>.iter_text�s>������z�z�"+�E�"2�#�J�D�$��J��"�
�#�
!� � �s�$<�<�:�<rc3�F�K�|]\}}}��|z�|z|����y�wr7rL)r�r+r,r-rxr9s    ��r3r�zText.join.<locals>.<genexpr>�s0������%�E�3���f�u�n�f�s�l�E�:����!)
r�rrN�extendrSrlr*r-r[rT)
r2rr�r?�extend_textr��extend_spansrYrxr9s
``      @@r3r�z	Text.join�s�����?�?�$��	!�8�F�+�	!��n�n�+�+���o�o�,�,�����-�-�������K�	 �D���
�
�#��z�z��E�&�&�3�t�9�*<�d�j�j�I�J���)-����
�
�c�$�i��F�	 �"����r5c�p�d|jvryd}|�|j}|�J�|j�}|j}|j}|jdd��D]�}|jdd��}|D]v}|jj
d�rQ|jdddzg|_||�|t|�z
}||d	z
|zz
d	z
}	|	s�]|d|	z|�||	z
}�o||��x��|jg|_t|j�|_	|j|jddy)
ztConverts tabs to spaces.

        Args:
            tab_size (int, optional): Size of tabs. Defaults to 8.

        �	NrrVT)�include_separatorr�rfr)rcrRr�rlr-r>r�rNr[rTrS)
r2rR�posrnrl�_styler�r�r��spacess
          r3�expand_tabszText.expand_tabss6���t�z�z�!�������}�}�H��#�#�#����"�����������J�J�t�t�J�<�	!�D��J�J�t�t�J�<�E��

!���:�:�&�&�t�,�"&�*�*�S�b�/�C�"7�!8�D�J��4�L��3�t�9�$�C�%�#��'�X�)=�>��B�F���s�V�|�V�4��v�
���4�L�

!�	!��l�l�^��
��4�:�:����������A�r5F)rP�padr
rLc�z�|xs|jxst}|dk7r�t|j�}||kDrB|dk(r"t	|j|dz
�dz|_nt	|j|�|_|r?||kr9||z
}|j�d|z��g|_t
|j�|_yyyy)auTruncate text if it is longer that a given width.

        Args:
            max_width (int): Maximum number of characters in text.
            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None, to use self.overflow.
            pad (bool, optional): Pad with spaces if the length is less than max_width. Defaults to False.
        �ignore�ellipsisru…rfN)rPr'rrcrrNr[rT)r2r
rPrL�	_overflowr�rJs       r3�truncatez
Text.truncate)s����A��
�
�A�1A�	��� ��d�j�j�)�F��	�!��
�*�!.�t�z�z�9�q�=�!I�E�!Q�D�J�!.�t�z�z�9�!E�D�J��v�	�)�"�V�+��!%����S�6�\�N�;�<��
�"�4�:�:����*�s�!r5c
�2�t|j�}t}|jD�cgc]T}|j|krC|j
|kr|n1||jt
||j
�|j���Vc}|jddycc}w)z=Remove or modify any spans that are over the end of the text.N)r[rcr*rSr+r,r;r-)r2�
max_offsetrxr�s    r3r�zText._trim_spansDs�������_�
������

���z�z�J�&�	�8�8�j�(���4�:�:�s�:�t�x�x�'@�$�*�*�M�N�
����A���
s�ABr��	characterc
��t|�dk(sJd��|r`||z}|�|j�|��|_t}|jD���cgc]\}}}|||z||z|���c}}}|jddyycc}}}w)zxPad left and right with a given number of characters.

        Args:
            count (int): Width of padding.
        r�&Character must be a string of length 1N�r[rcr*rS)r2r�rT�pad_charactersrxr+r,r-s        r3rLzText.padRs����9�~��"�L�$L�L�"��&��.�N�*�+�D�J�J�<��7G�H�D�J��E�*.�����%�E�3���e�e�m�S�5�[�%�8��D�K�K��N�	��s�
A9c
��t|�dk(sJd��|r\||z�|j��|_t}|jD���cgc]\}}}|||z||z|���c}}}|jddyycc}}}w)z�Pad the left with a given character.

        Args:
            count (int): Number of characters to pad.
            character (str, optional): Character to pad with. Defaults to " ".
        rrVNrW)r2r�rTrxr+r,r-s       r3�pad_leftz
Text.pad_leftbs����9�~��"�L�$L�L�"��%��-�.�t�z�z�l�;�D�J��E�*.�����%�E�3���e�e�m�S�5�[�%�8��D�K�K��N���s�A5c�d�t|�dk(sJd��|r|j�||z��|_yy)z�Pad the right with a given character.

        Args:
            count (int): Number of characters to pad.
            character (str, optional): Character to pad with. Defaults to " ".
        rrVN)r[rc)r2r�rTs   r3rzText.pad_rightrs>���9�~��"�L�$L�L�"�� �J�J�<�	�E�(9�':�;�D�J�r5�align�widthc��|j|�|t|j�z
}|r]|dk(r|j||�y|dk(r-|dz}|j	||�|j||z
|�y|j	||�yy)z�Align text to a given width.

        Args:
            align (AlignMethod): One of "left", "center", or "right".
            width (int): Desired width.
            character (str, optional): Character to pad with. Defaults to " ".
        �left�center�N)rQrrcrrZ)r2r\r]rT�excess_spacer_s      r3r\z
Text.align}s���	
�
�
�e���x��
�
�3�3���������|�Y�7��(�"�#�q�(���
�
�d�I�.����|�d�2�I�>��
�
�l�I�6�r5rc	�L���t|ttf�std��t	|��rtt|t�r~t|�}|jj|�t	|�}t	|��|�)|jjt||�z|��|xj�z
c_
|St|t�r�t�|�td��|j�|j�9|jj���t	|�z|j��|jj|j�|jj��fd�|jD��|xjt	|�z
c_
|S)z�Add text with an optional style.

        Args:
            text (Union[Text, str]): A str or Text to append.
            style (str, optional): A style name. Defaults to None.

        Returns:
            Text: Returns self for chaining.
        z(Only str or Text can be appended to Textz2style must not be set when appending Text instancec3�F�K�|]\}}}�|�z|�z|����y�wr7rL�r�r+r,r-rxr�s    ��r3r�zText.append.<locals>.<genexpr>�s2�����#�)��s�E��%�+�-�s�[�/@�%�H�#�rA)rjrJr(r|r[rrNrlrSr*rT�
ValueErrorr-rcrB)r2rYr-r\r9rxr�s     @@r3rlzText.append�sU����$��d��,��F�G�G��t�9��$��$�!4�T�!:���
�
�!�!�.�1��T���!�.�1���$��K�K�&�&�t�F�F�[�4H�%�'P�Q�����+��$��#�D�$�'����$�$�L���#�l�l���:�:�)��K�K�&�&��k�;��T��+B�D�J�J�O���
�
�!�!�$�*�*�-����"�"�#�-1�[�[�#������D�	�)���r5c	����t�|j�|j�9|jj	���t|�z|j��|jj	|j�|jj��fd�|jD��|xjt|�z
c_|S)z�Append another Text instance. This method is more performant that Text.append, but
        only works for Text.

        Returns:
            Text: Returns self for chaining.
        c3�F�K�|]\}}}�|�z|�z|����y�wr7rLres    ��r3r�z#Text.append_text.<locals>.<genexpr>�s2�����
�!��s�E�
�%�+�%�s�[�'8�%�@�
�rA)	r*rTr-rSrlr[rNrcrB)r2rYrxr�s  @@r3�append_textzText.append_text�s�������l�l���:�:�!��K�K���u�[�+��D�	�2I�4�:�:�V�W��
�
���$�*�*�%������
�%)�[�[�
�	
�	
����D�	�!���r5�tokensc
�
�|jj}|jj}t}t	|�}|D]9\}}||�|�||||t	|�z|��|t	|�z
}�;||_|S)a(Append iterable of str and style. Style may be a Style instance or a str style definition.

        Args:
            pairs (Iterable[Tuple[str, Optional[StyleType]]]): An iterable of tuples containing str content and style.

        Returns:
            Text: Returns self for chaining.
        )rNrlrSr*r[rT)r2rjrir�rxr9�contentr-s        r3�
append_tokenszText.append_tokens�s����j�j�'�'���k�k�(�(�����T���$�	#�N�G�U��� �� ��E�&�&�3�w�<�*?��G�H��c�'�l�"�F�		#�
����r5c�N�|jj|j�y)z�Copy styles from another Text instance.

        Args:
            text (Text): A Text instance to copy styles from, must be the same length.
        N)rSrB)r2rYs  r3�copy_styleszText.copy_styles�s��	
�����4�;�;�'r5)rG�allow_blank�	separatorrGrpc�����sJd��|j���vrt|j�g�S|r@|jd�t	j
t	j����D��}n<dttf��fd�}t�fd�|j|��D��}|s!�j��r|j�|S)a�Split rich text in to lines, preserving styles.

        Args:
            separator (str, optional): String to split on. Defaults to "\\n".
            include_separator (bool, optional): Include the separator in the lines. Defaults to False.
            allow_blank (bool, optional): Return a blank line if the text ends with a separator. Defaults to False.

        Returns:
            List[RichText]: A list of rich text, one per line of the original.
        zseparator must not be emptyc3�<K�|]}|j����y�wr7r)r�r�s  r3r�zText.split.<locals>.<genexpr>s���� � %��	�	�� �s�r.c3��K�tjtj����D]}|j�\}}|��|���y�wr7)r�r�r�r�)r�r+r,rqrYs   ��r3�
flatten_spansz!Text.split.<locals>.flatten_spanssC������[�[����9�)=�t�D��E�!&����J�E�3��K��I��s�AAc3�B�K�|]}|j�k7s�|���y�wr7rb)r�r�rqs  �r3r�zText.split.<locals>.<genexpr>s!����������y�AX���s��)rcrrkr{r�r�r�rrHr��pop)r2rqrGrprrurYs `    @r3r>z
Text.split�s����"�7�7�7�y��z�z���D� ��$�)�)�+��'�'���K�K� �)+���R�Y�Y�y�5I�4�)P� ��E�

�8�C�=�
���!%���]�_�!=���E��t�}�}�Y�7��I�I�K��r5�offsetsc	�������t|�}|st|j�g�S|j�t	��}dg|�|�}tt||dd��}|j�|j�|j�t�t�����fd�|D��}|js|S|jD�cgc]}|jj��}}t	|�}	t}
|jD]�\}}�d}
|	}|
|zdz}	||\}}||kr|dz
}n||kDr|dz}
nn	|
|zdz}�(||kr|}n/|x}}
|	}	||\}}||kr|dz
}n||kDr|dz}
nn	|
|zdz}�(t||dz�D]D}||\}}td||z
�}t!||z
||z
�}||kDs�2|||
||����F��|Scc}w)z�Divide text in to a number of lines at given offsets.

        Args:
            offsets (Iterable[int]): Offsets used to divide text.

        Returns:
            Lines: New RichText instances between offsets.
        rrNc3�B�K�|]\}}��||��������y�w))r-rOrPNrL)r�r+r,r�rOrPr-rYs   �����r3r�zText.divide.<locals>.<genexpr>2s;�����
���s�

��U�3����!�	
�
�
�s�ra)r/rrkrcr[r3r-rOrPr(rS�_linesrlr*�rangerr;)r2rx�_offsetsr��divide_offsets�line_ranges�	new_linesr��
_line_appends�
line_countrx�
span_start�span_end�lower_bound�upper_bound�
start_line_no�
line_start�line_end�end_line_no�line_no�	new_start�new_endr�rOrPr-rYs                      @@@@@r3r{zText.dividesJ�����=����$�)�)�+��'�'��z�z���$�i���4�h�4��4���3�~�~�a�b�/A�B�C���
�
���,�,���=�=�����
�*�
�
�	��{�{���8A�8H�8H�I�����+�+�I�
�I���%�
���+/�;�;�%	M�'�J��%��K�$�K�(�;�6�1�<�M��'2�=�'A�$�
�H��
�*�"/�!�"3�K��(�*�"/�!�"3�K��!,�{�!:�q� @�
���(�"�+��,9�9��k�(���+6�{�+C�(�J���*�,�&1�A�o��!�H�,�&1�A�o���#.��#<��"B�K��!���a��@�
M��'2�7�';�$�
�H���:�
�#:�;�	��h��3�X�
�5J�K���Y�&�*�M�'�*�5��G�U�+K�L�
M�A%	M�N���WJs�G
�amountc
��t|j�|z
}t}|jD�cgc]T}|j|krC|j
|kr|n1||jt
||j
�|j���Vc}|jdd|jd|g|_|xj|zc_	ycc}w)z7Remove a number of characters from the end of the text.N)
r[rcr*rSr+r,r;r-rNrT)r2r�rSrxr�s     r3rCzText.right_cropks�������_�v�-�
������

���z�z�J�&�	�8�8�j�(���4�:�:�s�:�t�x�x�'@�$�*�*�M�N�
����A���j�j��6�'�*�+��
��������
s�ACr
c�6�|xs|jxst}|xs|jxst}t	||j
d�xs|dk(}t
�}	|jd��D]�}
d|
vr|
j|�|r
t
|
g�}n+tt|
�||dk(��}|
j|�}|D]}
|
j|��|r|j||||��|D]}
|
j||�	��|	j|���|	S)
a�Word wrap the text.

        Args:
            console (Console): Console instance.
            width (int): Number of characters per line.
            emoji (bool, optional): Also render emoji code. Defaults to True.
            justify (str, optional): Justify method: "default", "left", "center", "full", "right". Defaults to "default".
            overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None.
            tab_size (int, optional): Default tab size. Defaults to 8.
            no_wrap (bool, optional): Disable wrapping, Defaults to False.

        Returns:
            Lines: Number of lines.
        FrNT�rprFr&)r&r�)rP)rOr%rPr'rrQrr>rKrrJr{rrQrB)
r2r�r]rOrPrRrQ�wrap_justify�
wrap_overflowrr�r�rxs
             r3rz	Text.wrap{s��0�A�$�,�,�A�/�� �E�D�M�M�E�5E�
��G�T�\�\�5�9�Q�X��=Q������J�J�4�J�0�	$�D��t�|�� � ��*��!�4�&�M�	�%�c�$�i��]�f�=T�U�� �K�K��0�	�!�
'������&�
'���!�!��U�L�=�"��"�
=���
�
�e�m�
�<�
=��L�L��#�!	$�"�r5c��t�}|j}|j�D]}|j|�||��|S)z�Fit the text in to given width by chopping in to lines.

        Args:
            width (int): Maximum characters in a line.

        Returns:
            Lines: Lines container.
        )rrlr>r)r2r]rrlr�s     r3�fitzText.fit�sC���w�������J�J�L�	�D��O�O�E�"��4�L�	��r5c�:�tjd|jtj��D�chc]}t	|jd����}}	t
t|D�cgc]
}|dzr�	|��c}�xsd}|Scc}wcc}w#t$rd}Y|SwxYw)zrAuto-detect indentation of code.

        Returns:
            int: Number of spaces used to indent code.
        �
^( *)(.*)$r�rra)	r�r�rc�	MULTILINEr[r�rrr|)r2r��
_indentations�indent�indentations     r3�detect_indentationzText.detect_indentation�s������]�D�J�J�b�l�l�S�
��
����A���
�
�
�
	��s�-�R��v�PQ�z�V�R�S�X�WX�
����
��S���	��K���	�s/�!B�B�%
B
�0B
�4B�B�B�Bu│z	dim green)rTr-�indent_sizec�$�|�|j�n|}|j�}|j�|�d|dz
z��}tjd�}g}|j
}	d}
|j
d��D]�}|j|j�}|r|jd�s|
dz
}
�7|jd�}
tt|
�|�\}}||z�d|z��}||jt|�dz|_|j|dt|��|
r"|jt||�	�g|
z�d}
|	|���|
r |jtd
|�	�g|
z�|jd�j!|�}|S)u�Adds indent guide lines to text.

        Args:
            indent_size (Optional[int]): Size of indentation, or None to auto detect. Defaults to None.
            character (str, optional): Character to use for indentation. Defaults to "│".
            style (Union[Style, str], optional): Style of indent guides.

        Returns:
            Text: New text with indentation guides.
        Nrfrr�rTr�ra�r-rUrV)r�rkrKr��compilerlr>r�rcr��divmodr[r�rBr(r�r�)r2r�rTr-�_indent_sizerY�indent_line�	re_indentr��add_line�blank_linesr�r�r��full_indents�remaining_space�
new_indentr�s                  r3�with_indent_guideszText.with_indent_guides�s���$5@�4G�t�.�.�0�[���y�y�{������"��C�<�!�+;�$<�#=�>���J�J�}�-�	� "�	��#�#�����J�J�4�J�0�
	�D��O�O�D�J�J�/�E�����A���q� ����[�[��^�F�,2�3�v�;��,M�)�L�/�'�,�6�7��o�8M�7N�O�J�#�d�j�j��Z��1B�&C�C�D�J��L�L���3�z�?�3��� � �$�z��"?�!@�;�!N�O����T�N�
	�����d�2�U�3�4�{�B�C��?�?�4�(�-�-�i�8���r5)rUrU)rU)r.r()rNr7)r.N)rf)rYr(r.r()rYr(r.N)rV)r)QrDrErFrG�	__slots__rJrrrrKrHrr*r]r_r8rdr4rro�objectrrrtrur��propertyrr��classmethodrr�r�rr�rr
r�rc�setterrXr�rkr�r�r�r�r�r��GetStyleCallabler�rr�r�rrrrrrr�r�rKrQr�rLrZrrr\rlrirmrorr>r{rCrr�r�r�rLr5r3r(r(es����
�I��#%�0�
.2�/3�"&��"#�&*�0��0��S�%�Z� �0�
�/�*�0��+�,�
0��$��0��0��3�-�0���T�
�#�0�
�0�.���"�$�"����8�#�8��S��V��I�F�I�t�I�
�&��T��I��s�E�z�!2�I�v�I�4�$�#�$��$�������:�
$&��04�-1�/3������S�%�Z� �	�
�� ��-�
��/�*���+�,����
����>�
$&�-1�/3�"&��"#�#��#��S�%�Z� �	#�
�/�*�#��+�,�
#��$��#��#��3�-�#�
�#��#�J���
.2�/3�
�����
�/�*���+�,�
�
����0�$&�-1�/3�"&���)-�*��c�6�5��i��#8�8�9�*��S�%�Z� �*��/�*�	*�
�+�,�*��$��
*��*��*��t�C��H�~�&�*�
�*��*�X��s�����\�\�#�c�#�d�#��#���t�D�z�����\�\��4��:��$�������V���"�!�	E��S�%�Z� �E��E��c�]�	E�

�E�:�!�	H��S�%�Z� �H��H��c�]�	H�

�H�6JN�2���c��N�2�+.�2�9A�#��2�	
�2��x��S�#�X��/��C��F��()�C�)�D�)��9��c��e��.?C�$�
�$��$���.�	�9�:�;�$�
�$�

�
$�V $����}���S�%�Z� ��
��

�
�:)�?�s�?�t�?�5�S�5�T�5�;� �;�+;�;�	�'�	�;�&
;� �
;�+;�
;�	�
;�9 �i�9 �c�9 �8�I�;N�9 �v%�(�6�*�%�v�%�N '�H�S�M� '�T� '�L04��/��/��+�,�	/�
�/�
�
/�6
������t�� �c��c��D�� 	<�s�	<�s�	<�T�	<�7�;�7�s�7�s�7�T�7�*PT�*��&�#�+�&�*�/7��c�7�l�8K�/L�*�	�*�X�&��u�S�(�9�*=�%=�>�?��	��.(��*�#(�!�*��*� �	*�
�*�
�
*�XN�h�s�m�N��N�`���T��*.2�/3��"&�/��/��/�
�/�*�/��+�,�
/��/��$��/�
�/�b����� �C��.&*�.��&�.��c�]�.��	.�
�.�
�
.r5�__main__)r a�
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
�Lorem�bold�ipsum�italiczjustify='left'�redr�zjustify='center'�greenr`)r-rOzjustify='right'�blue�rightzjustify='full'�magenta�full)Br��	functoolsrr�mathr�operatorr�typingrrr	r
rrr
rrr�_loopr�_pickr�_wraprr\r�cellsrr�
containersr�controlrr�r�jupyterr�measurer�segmentrr-rrr�r r!r"r#r%rIr'r�r�rJ�TextTyper�r*r(rD�pip._vendor.rich.consolerYr��rule�printrLr5r3�<module>r�s���	�%����������*��(��!� ��#��O�O�#,���,�%+��"�+�����G�$����f�����S�E�8�I�#6�6�7��54�:�54�pZ�<�Z�z$�z��0��	P��D�	���'��F�+����'��H�-��i�G��L�L�!�"��M�M�$�e�M�$��M�M�O��L�L�#�$��M�M�$�g�x�M�8��M�M�O��L�L�"�#��M�M�$�f�g�M�6��M�M�O��L�L�!�"��M�M�$�i��M�8��M�M�O�3r5
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!