§
    hiF  ã                  óP   — d dl mZ d dlmZ  G d„ d¦  «        Zdd„Zdd„Zdd„ZdS )é    )Úannotations)ÚIterablec                  ó*   — e Zd ZdZddœdd
„Zddd„ZdS )ÚNameGeneratora÷  Utility for generating distinct C names from Python names.

    Since C names can't use '.' (or unicode), some care is required to
    make C names generated from Python names unique. Also, we want to
    avoid generating overly long C names since they make the generated
    code harder to read.

    Note that we don't restrict ourselves to a 32-character distinguishing
    prefix guaranteed by the C standard since all the compilers we care
    about at the moment support longer names without issues.

    For names that are exported in a shared library (not static) use
    exported_name() instead.

    Summary of the approach:

    * Generate a unique name prefix from suffix of fully-qualified
      module name used for static names. If only compiling a single
      module, this can be empty. For example, if the modules are
      'foo.bar' and 'foo.baz', the prefixes can be 'bar_' and 'baz_',
      respectively. If the modules are 'bar.foo' and 'baz.foo', the
      prefixes will be 'bar_foo_' and 'baz_foo_'.

    * Replace '.' in the Python name with '___' in the C name. (And
      replace the unlikely but possible '___' with '___3_'. This
      collides '___' with '.3_', but this is OK because names
      may not start with a digit.)

    The generated should be internal to a build and thus the mapping is
    arbitrary. Just generating names '1', '2', ... would be correct,
    though not very usable. The generated names may be visible in CPU
    profiles and when debugging using native debuggers.
    F)ÚseparateÚgroupsúIterable[list[str]]r   ÚboolÚreturnÚNonec               óÊ   — i | _         |D ]>}|s(| j                              t          |¦  «        ¦  «         Œ,|D ]}|dz   | j         |<   ŒŒ?i | _        t	          ¦   «         | _        dS )aD  Initialize with a list of modules in each compilation group.

        The names of modules are used to shorten names referring to
        modules, for convenience. Arbitrary module
        names are supported for generated names, but uncompiled modules
        will use long names.

        If separate is True, assume separate compilation. This implies
        that we don't have knowledge of all sources that will be linked
        together. In this case we won't trim module prefixes, since we
        don't have enough information to determine common module prefixes.
        ú.N)Ú
module_mapÚupdateÚmake_module_translation_mapÚtranslationsÚsetÚ
used_names)Úselfr   r   ÚnamesÚnames        ú]/var/www/html/Pagina-Ingenieria-Requisitos/venv/lib/python3.11/site-packages/mypyc/namegen.pyÚ__init__zNameGenerator.__init__)   s‚   € ð +-ˆŒØð 	7ð 	7ˆEØð 7Ø”×&Ò&Õ'BÀ5Ñ'IÔ'IÑJÔJÐJÐJà!ð 7ð 7DØ,0°3©JD”O DÑ)Ð)ð7à8:ˆÔÝ$'¡E¤EˆŒˆˆó    NÚmoduleÚstrÚpartial_nameú
str | Nonec                ó  — |€-t          | j        |                              d¦  «        ¦  «        S ||f| j        v r| j        ||f         S || j        v r| j        |         }n
|r|dz   }nd}t          |› |› ¦  «        }|| j        ||f<   |S )aÓ  Return a C name usable for a static definition.

        Return a distinct result for each (module, partial_name) pair.

        The caller should add a suitable prefix to the name to avoid
        conflicts with other C names. Only ensure that the results of
        this function are unique, not that they aren't overlapping with
        arbitrary names.

        If a name is not specific to any module, the module argument can
        be an empty string.
        Nr   Ú )Úexported_namer   Úrstripr   )r   r   r   Úmodule_prefixÚactuals        r   Úprivate_namezNameGenerator.private_name@   sµ   € ð ÐÝ  ¤°Ô!8×!?Ò!?ÀÑ!DÔ!DÑEÔEÐEØLÐ! TÔ%6Ð6Ð6ØÔ$ V¨\Ð%9Ô:Ð:ØT”_Ð$Ð$Ø œO¨FÔ3ˆMˆMØð 	Ø" S™LˆMˆMàˆMÝ -Ð?°Ð?Ð?Ñ@Ô@ˆØ28ˆÔ˜& ,Ð.Ñ/Øˆr   )r   r	   r   r
   r   r   )N)r   r   r   r   r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r%   © r   r   r   r      s]   € € € € € ð ð  ðD INð *ð *ð *ð *ð *ð *ð.ð ð ð ð ð ð r   r   Úfullnamer   r   c                óV   — |                       dd¦  «                              dd¦  «        S )zËReturn a C name usable for an exported definition.

    This is like private_name(), but the output only depends on the
    'fullname' argument, so the names are distinct across multiple
    builds.
    Ú___Ú___3_r   )Úreplace)r+   s    r   r!   r!   ]   s*   € ð ×Ò˜E 7Ñ+Ô+×3Ò3°C¸Ñ?Ô?Ð?r   r   ú	list[str]údict[str, str]c                óÈ   — i }| D ]0}t          |¦  «        D ]}|                     |d¦  «        dz   ||<   ŒŒ1i }| D ]'}t          |¦  «        D ]}||         dk    r nŒ|||<   Œ(|S )Nr   é   )Úcandidate_suffixesÚget)r   Únum_instancesr   ÚsuffixÚresults        r   r   r   h   s°   € Ø$&€MØð Eð EˆÝ(¨Ñ.Ô.ð 	Eð 	EˆFØ$1×$5Ò$5°f¸aÑ$@Ô$@À1Ñ$DˆM˜&Ñ!Ð!ð	Eà€FØð ð ˆÝ(¨Ñ.Ô.ð 	ð 	ˆFØ˜VÔ$¨Ò)Ð)Øð *ð ˆˆt‰ˆØ€Mr   c                óâ   — |                       d¦  «        }dg}t          t          |¦  «        ¦  «        D ]9}|                     d                     || dz
  d …         ¦  «        dz   ¦  «         Œ:|S )Nr   r    r3   )ÚsplitÚrangeÚlenÚappendÚjoin)r+   Ú
componentsr8   Úis       r   r4   r4   w   sq   € Ø—’ Ñ$Ô$€JØˆT€FÝ•3z‘?”?Ñ#Ô#ð <ð <ˆØŠc—h’h˜z¨1¨"¨q©&¨(¨(Ô3Ñ4Ô4°sÑ:Ñ;Ô;Ð;Ð;Ø€Mr   N)r+   r   r   r   )r   r0   r   r1   )r+   r   r   r0   )Ú
__future__r   Úcollections.abcr   r   r!   r   r4   r*   r   r   ú<module>rC      s¤   ðØ "Ð "Ð "Ð "Ð "Ð "à $Ð $Ð $Ð $Ð $Ð $ðTð Tð Tð Tð Tñ Tô Tð Tðn@ð @ð @ð @ðð ð ð ðð ð ð ð ð r   