§
    ¥”jî(  ã                  óp  — U d dl mZ d dlmZmZmZmZmZmZm	Z	m
Z
 d dlmZ d dlmZ e	rd dlmZ  G d„ de¦  «        Z G d„ d	e¦  «        Z G d
„ de¦  «        Z eej        ¬¦  «        ej        d<    eej        dd¬¦  «        ej        d<    eej        dd¬¦  «        ej        d<    eej        ¬¦  «        ej        d<    ed¬¦  «        ej        d<    eej        ¬¦  «        ej        d<    eej        ¬¦  «        ej        d<    ed¬¦  «        ej        d<   eegef         Zded<   e
eef         ZdS )é    )Úannotations)ÚCallableÚDictÚIterableÚOptionalÚSetÚTupleÚTYPE_CHECKINGÚUnion)Ú	TypeAlias)ÚEntitySubstitution)Ú_AttributeValuec                  óÚ   — e Zd ZU dZdZded<   dZded<    e eddg¦  «        ¬	¦  «        Z	d
ed<   ded<   ded<   ded<   ded<   ded<   ded<   d(d„Z
	 	 	 	 	 	 d)d*d „Zd+d"„Zd,d#„Zd-d'„ZdS ).Ú	Formattera  Describes a strategy to use when outputting a parse tree to a string.

    Some parts of this strategy come from the distinction between
    HTML4, HTML5, and XML. Others are configurable by the user.

    Formatters are passed in as the `formatter` argument to methods
    like `bs4.element.Tag.encode`. Most people won't need to
    think about formatters, and most people who need to think about
    them can pass in one of these predefined strings as `formatter`
    rather than making a new Formatter object:

    For HTML documents:
     * 'html' - HTML entity substitution for generic HTML documents. (default)
     * 'html5' - HTML entity substitution for HTML5 documents, as
                 well as some optimizations in the way tags are rendered.
     * 'html5-4.12.0' - The version of the 'html5' formatter used prior to
                        Beautiful Soup 4.13.0.
     * 'minimal' - Only make the substitutions necessary to guarantee
                   valid HTML.
     * None - Do not perform any substitution. This will be faster
              but may result in invalid markup.

    For XML documents:
     * 'html' - Entity substitution for XHTML documents.
     * 'minimal' - Only make the substitutions necessary to guarantee
                   valid XML. (default)
     * None - Do not perform any substitution. This will be faster
              but may result in invalid markup.

    ÚhtmlÚstrÚHTMLÚxmlÚXMLÚscriptÚstyle)Úcdata_containing_tagszDict[str, Set[str]]ÚHTML_DEFAULTSúOptional[str]Úlanguageú%Optional[_EntitySubstitutionFunction]Úentity_substitutionÚvoid_element_close_prefixúSet[str]r   ÚindentÚboolÚempty_attributes_are_booleansÚvalueúOptional[Set[str]]ÚkwargÚreturnc                óV   — |�|S || j         k    rt          ¦   «         S | j        |         S )N)r   Úsetr   )Úselfr   r#   r%   s       ú\/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/bs4/formatter.pyÚ_defaultzFormatter._defaultB   s7   € ð ÐØˆLØ�t”xÒÐõ ‘5”5ˆLð Ô! %Ô(Ð(ó    Nú/Fé   úUnion[int, str]c                ó  — |p| j         | _        || _        || _        |                      | j        |d¦  «        | _        || _        |€d}t          |t          ¦  «        r|dk     rd}d|z  }nt          |t          ¦  «        r|}nd}|| _
        dS )a»  Constructor.

        :param language: This should be `Formatter.XML` if you are formatting
           XML markup and `Formatter.HTML` if you are formatting HTML markup.

        :param entity_substitution: A function to call to replace special
           characters with XML/HTML entities. For examples, see
           bs4.dammit.EntitySubstitution.substitute_html and substitute_xml.
        :param void_element_close_prefix: By default, void elements
           are represented as <tag/> (XML rules) rather than <tag>
           (HTML rules). To get <tag>, pass in the empty string.
        :param cdata_containing_tags: The set of tags that are defined
           as containing CDATA in this dialect. For example, in HTML,
           <script> and <style> tags are defined as containing CDATA,
           and their contents should not be formatted.
        :param empty_attributes_are_booleans: If this is set to true,
          then attributes whose values are sent to the empty string
          will be treated as `HTML boolean
          attributes<https://dev.w3.org/html5/spec-LC/common-microsyntaxes.html#boolean-attributes>`_. (Attributes
          whose value is None are always rendered this way.)
        :param indent: If indent is a non-negative integer or string,
            then the contents of elements will be indented
            appropriately when pretty-printing. An indent level of 0,
            negative, or "" will only insert newlines. Using a
            positive integer indent indents that many spaces per
            level. If indent is a string (such as "\t"), that string
            is used to indent each level. The default behavior is to
            indent one space per level.

        r   Nr   ú )r   r   r   r   r+   r   r"   Ú
isinstanceÚintr   r    )r)   r   r   r   r   r"   r    Ú
indent_strs           r*   Ú__init__zFormatter.__init__O   s­   € ðN !Ð- D¤IˆŒØ#6ˆÔ Ø)BˆÔ&Ø%)§]¢]ØŒMÐ0Ð2Iñ&
ô &
ˆÔ"ð .KˆÔ*Øˆ>ØˆFå�f�cÑ"Ô"ð 	Ø˜ŠzˆzØ�Ø˜v™ˆJˆJÝ˜¥Ñ$Ô$ð 	ØˆJˆJàˆJØ ˆŒˆˆr,   Únsc                ó¢   — | j         s|S ddlm} t          ||¦  «        r|j        �|j        j        | j        v r|S |                       |¦  «        S )a$  Process a string that needs to undergo entity substitution.
        This may be a string encountered in an attribute value or as
        text.

        :param ns: A string.
        :return: The same string but with certain characters replaced by named
           or numeric entities.
        r.   )ÚNavigableString)r   Úelementr8   r2   ÚparentÚnamer   )r)   r6   r8   s      r*   Ú
substitutezFormatter.substituteŠ   so   € ð Ô'ð 	ØˆIØ,Ð,Ð,Ð,Ð,Ð,õ �r˜?Ñ+Ô+ð	à”	Ð%Ø”	” $Ô"<Ð<Ð<ð ˆIà×'Ò'¨Ñ+Ô+Ð+r,   c                ó,   — |                       |¦  «        S )z­Process the value of an attribute.

        :param ns: A string.
        :return: A string with certain characters replaced by named
           or numeric entities.
        )r<   )r)   r#   s     r*   Úattribute_valuezFormatter.attribute_value¡   s   € ð �Š˜uÑ%Ô%Ð%r,   Útagúbs4.element.Tagú/Iterable[Tuple[str, Optional[_AttributeValue]]]c                ó˜   ‡ — |j         €g S t          |j                              ¦   «         ¦  «        }t          ˆ fd„|D ¦   «         ¦  «        S )a°  Reorder a tag's attributes however you want.

        By default, attributes are sorted alphabetically. This makes
        behavior consistent between Python 2 and Python 3, and preserves
        backwards compatibility with older versions of Beautiful Soup.

        If `empty_attributes_are_booleans` is True, then
        attributes whose values are set to the empty string will be
        treated as boolean attributes.
        Nc              3  óD   •K  — | ]\  }}|‰j         r|d k    rdn|fV — ŒdS )Ú N)r"   )Ú.0ÚkÚvr)   s      €r*   ú	<genexpr>z'Formatter.attributes.<locals>.<genexpr>»   sT   øè è € ð 
ð 
á��1ð ˜Ô;ÐNÀÀRÂÀ��ÈQÐPð
ð 
ð 
ð 
ð 
ð 
r,   )ÚattrsÚlistÚitemsÚsorted)r)   r?   rK   s   `  r*   Ú
attributeszFormatter.attributesª   sc   ø€ ð Œ9ÐØˆIå7;¸C¼I¿OºOÑ<MÔ<MÑ7NÔ7NˆÝð 
ð 
ð 
ð 
àð
ñ 
ô 
ñ 
ô 
ð 	
r,   )r   r   r#   r$   r%   r   r&   r   )NNr-   NFr.   )r   r   r   r   r   r   r   r$   r"   r!   r    r/   )r6   r   r&   r   )r#   r   r&   r   )r?   r@   r&   rA   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__annotations__r   Údictr(   r   r+   r5   r<   r>   rM   © r,   r*   r   r   
   sL  € € € € € € ðð ð@ €DÐÐÐÑð €CÐÐÐÑð *.¨Ø!˜c 8¨WÐ"5Ñ6Ô6ð*ñ *ô *€Mð ð ð ñ ð ÐÐÑØ>Ð>Ð>Ñ>Ø"Ð"Ð"Ñ"Ø#Ð#Ð#Ñ#Ø€K€K�Kð (Ð'Ð'Ñ'ð)ð )ð )ð )ð #'ØEIØ),Ø48Ø.3Ø!"ð9!ð 9!ð 9!ð 9!ð 9!ðv,ð ,ð ,ð ,ð.&ð &ð &ð &ð
ð 
ð 
ð 
ð 
ð 
r,   r   c                  ó@   ‡ — e Zd ZU dZi Zded<   	 	 	 	 	 ddˆ fd„Zˆ xZS )ÚHTMLFormatterzA generic Formatter for HTML.z"Dict[Optional[str], HTMLFormatter]ÚREGISTRYNr-   Fr.   r   r   r   r   r   r$   r"   r!   r    r/   c                ón   •— t          t          | ¦  «                             | j        |||||¬¦  «         d S ©N)r    )ÚsuperrV   r5   r   ©r)   r   r   r   r"   r    Ú	__class__s         €r*   r5   zHTMLFormatter.__init__Æ   sJ   ø€ õ 	�m˜TÑ"Ô"×+Ò+ØŒIØØ%Ø!Ø)Øð 	,ñ 	
ô 	
ð 	
ð 	
ð 	
r,   ©Nr-   NFr.   ©
r   r   r   r   r   r$   r"   r!   r    r/   ©rN   rO   rP   rQ   rW   rR   r5   Ú__classcell__©r\   s   @r*   rV   rV   Á   sn   ø€ € € € € € Ø'Ð'à35€HÐ5Ð5Ð5Ñ5ð FJØ),Ø48Ø.3Ø!"ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
r,   rV   c                  ó@   ‡ — e Zd ZU dZi Zded<   	 	 	 	 	 ddˆ fd„Zˆ xZS )ÚXMLFormatterzA generic Formatter for XML.z!Dict[Optional[str], XMLFormatter]rW   Nr-   Fr.   r   r   r   r   r   r$   r"   r!   r    r/   c                ón   •— t          t          | ¦  «                             | j        |||||¬¦  «         d S rY   )rZ   rc   r5   r   r[   s         €r*   r5   zXMLFormatter.__init__Ý   sJ   ø€ õ 	�l˜DÑ!Ô!×*Ò*ØŒHØØ%Ø!Ø)Øð 	+ñ 	
ô 	
ð 	
ð 	
ð 	
r,   r]   r^   r_   ra   s   @r*   rc   rc   Ø   sn   ø€ € € € € € Ø&Ð&à24€HÐ4Ð4Ð4Ñ4ð FJØ),Ø48Ø.3Ø!"ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
r,   rc   )r   r   rD   T)r   r   r"   Úhtml5z
html5-4.12ÚminimalNr   Ú_EntitySubstitutionFunction)Ú
__future__r   Útypingr   r   r   r   r   r	   r
   r   Útyping_extensionsr   Ú
bs4.dammitr   Úbs4._typingr   r   rV   rc   Úsubstitute_htmlrW   Úsubstitute_html5Úsubstitute_xmlr   rg   rR   Ú_FormatterOrNamerT   r,   r*   ú<module>rq      sx  ðØ "Ð "Ð "Ð "Ð "Ð "Ð "Ø WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WÐ WØ 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø )Ð )Ð )Ð )Ð )Ð )àð ,Ø+Ð+Ð+Ð+Ð+Ð+ðt
ð t
ð t
ð t
ð t
Ð"ñ t
ô t
ð t
ðn
ð 
ð 
ð 
ð 
�Iñ 
ô 
ð 
ð.
ð 
ð 
ð 
ð 
�9ñ 
ô 
ð 
ð0 "/ Ø*Ô:ð"ñ "ô "€Ô �vÑ ð #0 -Ø*Ô;Ø Ø"&ð#ñ #ô #€Ô �wÑ ð
 (5 }Ø*Ô:Ø Ø"&ð(ñ (ô (€Ô �|Ñ $ð
 %2 MØ*Ô9ð%ñ %ô %€Ô �yÑ !ð  -˜}ÀÐFÑFÔF€Ô �tÑ Ø , Ø*Ô:ð!ñ !ô !€Ô �fÑ ð $0 <Ø*Ô9ð$ñ $ô $€Ô �iÑ  ð +˜l¸tÐDÑDÔD€Ô �dÑ ð *2°3°%¸°*Ô)=Ð Ð =Ð =Ð =Ñ =ð ˜ C˜Ô(Ð Ð Ð r,   