ó
    F\hò  ã                   ó’   • S SK r S SKr\ R                  \" \ R                  5      \" \ R                  5      -  -   r " S S5      rS rg)é    Nc                   ób   • \ rS rSr% Sr\\S'   \4S\4S jjrS r	S r
S rS rS	 rS
 rS rSrg)Ú
Translatoré   z¿
>>> Translator('xyz')
Traceback (most recent call last):
...
AssertionError: Invalid separators

>>> Translator('')
Traceback (most recent call last):
...
AssertionError: Invalid separators
Úsepsc                 ód   • U(       a  [        U5      [        [        5      ::  d   S5       eXl        g )NzInvalid separators)ÚsetÚ_default_sepsr   )Úselfr   s     Ú)/usr/lib/python3.13/zipfile/_path/glob.pyÚ__init__ÚTranslator.__init__   s&   € Þœ˜D›	¤S¬Ó%7Ó7ÐMÐ9MÓMÐ7Ø�	ó    c                 ó`   • U R                  U R                  U R                  U5      5      5      $ )z8
Given a glob pattern, produce a regex that matches it.
)ÚextendÚ
match_dirsÚtranslate_core©r
   Úpatterns     r   Ú	translateÚTranslator.translate   s'   € ð �{‰{˜4Ÿ?™?¨4×+>Ñ+>¸wÓ+GÓHÓIÐIr   c                 ó   • SU S3$ )z·
Extend regex for pattern-wide concerns.

Apply '(?s:)' to create a non-matching group that
matches newlines (valid on Unix).

Append '\Z' to imply fullmatch even when match is used.
z(?s:z)\Z© r   s     r   r   ÚTranslator.extend    s   € ð �w�i˜sÐ#Ð#r   c                 ó   • U S3$ )zl
Ensure that zipfile.Path directory names are matched.

zipfile.Path directory names always end in a slash.
z[/]?r   r   s     r   r   ÚTranslator.match_dirs+   s   € ð �)˜4Ð Ð r   c           
      óž   • U R                  U5        SR                  [        U R                  [	        U R                  U5      5      5      5      $ )z÷
Given a glob pattern, produce a regex that matches it.

>>> t = Translator()
>>> t.translate_core('*.txt').replace('\\\\', '')
'[^/]*\\.txt'
>>> t.translate_core('a?txt')
'a[^/]txt'
>>> t.translate_core('**/*').replace('\\\\', '')
'.*/[^/][^/]*'
Ú )Úrestrict_rglobÚjoinÚmapÚreplaceÚseparateÚstar_not_emptyr   s     r   r   ÚTranslator.translate_core3   s<   € ð 	×Ñ˜GÔ$Ø�w‰w”s˜4Ÿ<™<¬°$×2EÑ2EÀgÓ2NÓ)OÓPÓQÐQr   c                 ó   • UR                  S5      =(       dw    [        R                  " UR                  S5      5      R                  SS5      R                  SS[        R                  " U R                  5       S35      R                  SS	5      $ )
z=
Perform the replacements for a match from :func:`separate`.
r   r   z\*\*z.*z\*ú[^z]*z\?z[^/])ÚgroupÚreÚescaper!   r   )r
   Úmatchs     r   r!   ÚTranslator.replaceB   si   € ð �{‰{˜5Ó!÷ 
Ü�IŠI�e—k‘k !“nÓ%ß‰W�X˜uÓ%ß‰W�U˜r¤"§)¢)¨D¯I©IÓ"6Ð!7°rÐ:Ó;ß‰W�U˜GÓ$ð		
r   c                 ó¼   • S[         R                  " U R                  5       S3n[         R                  " X!5      n[	        S U 5       5      (       a  [        S5      eg)zÄ
Raise ValueError if ** appears in anything but a full path segment.

>>> Translator().translate('**foo')
Traceback (most recent call last):
...
ValueError: ** must appear alone in a path segment
Ú[ú]+c              3   óD   #   • U  H  nS U;   =(       a    US :g  v •  M     g7f)z**Nr   )Ú.0Úsegments     r   Ú	<genexpr>Ú,Translator.restrict_rglob.<locals>.<genexpr>X   s    é € ÐKÂ(°wˆt�w‰×2 7¨d¡?Ô2Â(ùs   ‚ z&** must appear alone in a path segmentN)r(   r)   r   ÚsplitÚanyÚ
ValueError)r
   r   Úseps_patternÚsegmentss       r   r   ÚTranslator.restrict_rglobM   sQ   € ð œBŸIšI d§i¡iÓ0Ð1°Ð4ˆÜ—8’8˜LÓ2ˆÜÑKÁ(ÓK×KÑKÜÐEÓFÐFð Lr   c                 ó~   • S nS[         R                  " U R                  5       S3n[         R                  " X2U5      $ )z0
Ensure that * will not match an empty segment.
c                 ó8   • U R                  S5      nUS:X  a  S$ U$ )Nr   Ú*z?*)r'   )r*   r1   s     r   Úhandle_segmentÚ1Translator.star_not_empty.<locals>.handle_segment`   s    € Ø—k‘k !“nˆGØ" c›>�4Ð6¨wÐ6r   r&   r.   )r(   r)   r   Úsub)r
   r   r=   Únot_seps_patterns       r   r#   ÚTranslator.star_not_empty[   s8   € ò
	7ð !¤§¢¨4¯9©9Ó!5Ð 6°bÐ9ÐÜ�vŠvÐ&¸Ó@Ð@r   )r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚstrÚ__annotations__r	   r   r   r   r   r   r!   r   r#   Ú__static_attributes__r   r   r   r   r      sD   ‡ ñ
ð ƒIà#0ñ ˜Sõ òJò	$ò!òRò	
òGõ
Ar   r   c                 ó0   • [         R                  " SU 5      $ )z»
Separate out character sets to avoid translating their contents.

>>> [m.group(0) for m in separate('*.txt')]
['*.txt']
>>> [m.group(0) for m in separate('a[?]txt')]
['a', '[?]', 'txt']
z+([^\[]+)|(?P<set>[\[].*?[\]])|([\[][^\]]*$))r(   Úfinditer)r   s    r   r"   r"   h   s   € ô �;Š;ÐEÀwÓOÐOr   )	Úosr(   ÚseprG   ÚaltsepÚboolr	   r   r"   r   r   r   Ú<module>rP      sC   ðÛ 	Û 	à—‘™˜RŸY™Y›©$¨r¯y©y«/Ñ9Ñ9€÷^Añ ^AóB	Pr   