� M�g� ���ddlZddlZejeej��eej��zzZGd�d��Zd�ZdS)�Nc�X�eZdZUdZeed<efdefd�Zd�Zd�Z d�Z d�Z d�Z d �Z d �Zd S) � Translatorz� >>> Translator('xyz') Traceback (most recent call last): ... AssertionError: Invalid separators >>> Translator('') Traceback (most recent call last): ... AssertionError: Invalid separators �sepsc�v�|r%t|��tt��ks Jd���||_dS)NzInvalid separators)�set� _default_sepsr)�selfrs �Y/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/zipp/glob.py�__init__zTranslator.__init__s:���M��D� � �S��%7�%7�7�7�7�9M�7�7�7��� � � �c�x�|�|�|�|������S)zH Given a glob pattern, produce a regex that matches it. )�extend� match_dirs�translate_core�r �patterns r � translatezTranslator.translates0���{�{�4�?�?�4�+>�+>�w�+G�+G�H�H�I�I�Ir c��d|�d�S)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�rs r rzTranslator.extend s��$�w�#�#�#�#r c� �|�d�S)z� Ensure that zipfile.Path directory names are matched. zipfile.Path directory names always end in a slash. z[/]?rrs r rzTranslator.match_dirs+s�� � � � � r c ��|�|��d�t|jt |�|��������S)a? 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_emptyrs r rzTranslator.translate_core3sL�� ���G�$�$�$��w�w�s�4�<��$�2E�2E�g�2N�2N�)O�)O�P�P�Q�Q�Qr c�(�|�d��p}tj|�d�����dd���ddtj|j���d����dd ��S) zM Perform the replacements for a match from :func:`separate`. rrz\*\*z.*z\*�[^z]*z\?z[^/])�group�re�escaperr)r �matchs r rzTranslator.replaceBsy���{�{�5�!�!� � �I�e�k�k�!�n�n� %� %� �W�X�u� %� %� �W�U�:�"�)�D�I�"6�"6�:�:�:� ;� ;� �W�U�G� $� $�  r c��dtj|j���d�}tj||��}t d�|D����rt d���dS)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 �[�]+c3�*K�|]}d|vo|dkV��dS)z**Nr)�.0�segments r � <genexpr>z,Translator.restrict_rglob.<locals>.<genexpr>Xs/����K�K�w�t�w��2�7�d�?�K�K�K�K�K�Kr z&** must appear alone in a path segmentN)r"r#r�split�any� ValueError)r r� seps_pattern�segmentss r rzTranslator.restrict_rglobMsl��5�B�I�d�i�0�0�4�4�4� ��8�L�'�2�2�� �K�K�(�K�K�K� K� K� G��E�F�F� F� G� Gr c�n�d�}dtj|j���d�}tj|||��S)z@ Ensure that * will not match an empty segment. c�@�|�d��}|dkrdn|S)Nr�*z?*)r!)r$r*s r �handle_segmentz1Translator.star_not_empty.<locals>.handle_segment`s#���k�k�!�n�n�G�"�c�>�>�4�4�w� 6r r r')r"r#r�sub)r rr4�not_seps_patterns r rzTranslator.star_not_empty[sE��  7� 7� 7�:���4�9�!5�!5�9�9�9���v�&���@�@�@r N)�__name__� __module__� __qualname__�__doc__�str�__annotations__rr rrrrrrrrr r rrs�������� � � �I�I�I�#0���S�����J�J�J� $� $� $�!�!�!� R� R� R�  �  �  � G� G� G� A� A� A� A� Ar rc�,�tjd|��S)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)rs r rrhs�� �;�E�w� O� O�Or ) �osr"�sepr;�altsep�boolrrrrr r �<module>rCs��� � � � � � � � �����R�Y���$�$�r�y�/�/�9�9� �^A�^A�^A�^A�^A�^A�^A�^A�B P� P� P� P� Pr
Memory