Your IP : 13.58.214.43


Current Path : /opt/imunify360/venv/lib64/python3.11/site-packages/click/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/click/__pycache__/_compat.cpython-311.pyc

�

Q�Dg8I��&�UddlZddlZddlZddlZddlZddlZddlmZej	�
d��Zej	�
d��ZdZ
ejejejgejfed<ejd��Z		dQdejd	ejed
ejededed
ejfd�Zd	ed
efd�Zdejejd
efd�ZGd�dej��ZGd�d��ZdRdejejded
efd�ZdRdejejded
efd�Z dejejd
ejejfd�Z!dejejd
ejejfd�Z"dejd
efd�Z#dejdedejed
efd�Z$dejd	ejed
ejed
efd�Z%		dQdejejd	ejed
ejed ejejejegefd!ejejejgejejfdeded
ejfd"�Z&	dRd#ejejd	ejed
ejeded
ejf
d$�Z'	dRd%ejejd	ejed
ejeded
ejf
d&�Z(d
ejfd'�Z)d
ejfd(�Z*d
ejfd)�Z+	dSd	ejed
ejed
ejfd*�Z,	dSd	ejed
ejed
ejfd+�Z-	dSd	ejed
ejed
ejfd,�Z.d-ej/ed.e0fd/ed	ejed
ejed
ejejf
d0�Z1				dTd3d4d/ed	ejed
ejed5ed
ej2ejejeffd6�Z3Gd7�d8��Z4ded
efd9�Z5dejejd
efd:�Z6	dSdejejejd;ejed
efd<�Z7ej	�
d��rVerTd=d>l8m9Z9d
efd?�Z:e��Z;ej<ejejfed@<	dUdejd;ejed
ejfdA�Z
n=d
efdB�Z:dCejd	ejed
ejed
ejejfdD�Z9dEed
e0fdF�Z=dejejd
efdG�Z>dHejgejejfdIejgejfd
ejgejejffdJ�Z?e?dK�e,��Z@e?dL�e-��ZAe?dM�e.��ZBe)e*e+dN�ZCejDeejgejffedO<e,e-e.dN�ZEejDeejejeejegejffedP<dS)V�N)�WeakKeyDictionary�cygwin�win�auto_wrap_for_ansiz\033\[[;?0-9]*[a-zA-Z]F�stream�encoding�errors�force_readable�force_writable�returnc�V�|�t|��}|�d}t|||d||���S)N�replaceT)�line_bufferingr
r)�get_best_encoding�_NonClosingTextIOWrapper)rrr	r
rs     �m/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/click/_compat.py�_make_text_streamrsJ����$�V�,�,��
�~���#�����%�%�
����c�`�	tj|��jdkS#t$rYdSwxYw)z$Checks if a given encoding is ascii.�asciiF)�codecs�lookup�name�LookupError)rs r�is_ascii_encodingr$sA����}�X�&�&�+�w�6�6�������u�u����s��
-�-c�p�t|dd��ptj��}t|��rdS|S)z1Returns the default stream encoding if not found.rNzutf-8)�getattr�sys�getdefaultencodingr)r�rvs  rrr,s;��	���T�	*�	*�	F�c�.D�.F�.F�B�������w�
�Irc���eZdZ		d
dejdejedejedededejdd	f�fd
�
Z	dd�Z
defd�Z�xZS)rFrrr	r
r�extrarNc���tjtjt|||����x|_}t��j|||fi|��dS�N)�t�cast�BinaryIO�_FixupStream�_stream�super�__init__)�selfrrr	r
rr"�	__class__s       �rr+z!_NonClosingTextIOWrapper.__init__5s]���!"��
�J��V�^�^�L�L�!
�!
�	
���v�	�������6�;�;�U�;�;�;�;�;rc�R�	|���dS#t$rYdSwxYwr$)�detach�	Exception�r,s r�__del__z _NonClosingTextIOWrapper.__del__Cs:��	��K�K�M�M�M�M�M���	�	�	��D�D�	���s��
&�&c�4�|j���Sr$)r)�isattyr1s rr4z_NonClosingTextIOWrapper.isattyIs���|�"�"�$�$�$r�FF)rN)
�__name__�
__module__�__qualname__r%r'�Optional�str�bool�Anyr+r2r4�
__classcell__)r-s@rrr4s�������� %�$�
<�<��
�<��*�S�/�<��
�3��	<�
�<��
<���<�
�<�<�<�<�<�<�����%��%�%�%�%�%�%�%�%rrc��eZdZdZ		ddejdedefd�Zdedej	fd	�Z
d
edefd�Z
defd�Zdefd
�Zdefd�ZdS)r(aQThe new io interface needs more from streams than streams
    traditionally implement.  As such, this fix-up code is necessary in
    some circumstances.

    The forcing of readable and writable flags are there because some tools
    put badly patched objects on sys (one such offender are certain version
    of jupyter notebook).
    Frr
rc�0�||_||_||_dSr$)r)�_force_readable�_force_writable)r,rr
rs    rr+z_FixupStream.__init__Xs!�����-���-����rrrc�,�t|j|��Sr$)rr)�r,rs  r�__getattr__z_FixupStream.__getattr__bs���t�|�T�*�*�*r�sizec��t|jdd��}|�#tjt||����S|j�|��S)N�read1)rr)r%r&�bytes�read)r,rE�fs   rrGz_FixupStream.read1esJ���D�L�'�4�0�0���=��6�%���4���)�)�)��|� � ��&�&�&rc���|jrdSt|jdd��}|�"tjt
|����S	|j�d��n#t$rYdSwxYwdS)NT�readablerF)r@rr)r%r&r;rIr0�r,�xs  rrLz_FixupStream.readablems�����	��4��D�L�*�d�3�3���=��6�$�����$�$�$�	��L���a� � � � ���	�	�	��5�5�	�����ts�A � 
A.�-A.c�@�|jrdSt|jdd��}|�"tjt
|����S	|j�d��n>#t$r1	|j�d��n#t$rYYdSwxYwYnwxYwdS)NT�writable�rF)rArr)r%r&r;�writer0rMs  rrPz_FixupStream.writableys�����	��4��D�L�*�d�3�3���=��6�$�����$�$�$�	��L���r�"�"�"�"���	�	�	�
���"�"�3�'�'�'�'���
�
�
��u�u�u�
����(�'�	����
�ts6�A � 
B�+B�B�
B�B�B�B�Bc��t|jdd��}|�"tjt|����S	|j�|j�����n#t$rYdSwxYwdS)N�seekableFT)rr)r%r&r;�seek�tellr0rMs  rrTz_FixupStream.seekable�s����D�L�*�d�3�3���=��6�$�����$�$�$�	��L���d�l�/�/�1�1�2�2�2�2���	�	�	��5�5�	�����ts�1A.�.
A<�;A<Nr5)r6r7r8�__doc__r%r'r;r+r:r<rD�intrHrGrLrPrT�rrr(r(Ns��������� %�$�	.�.��
�.��.��	.�.�.�.�+��+���+�+�+�+�'�#�'�%�'�'�'�'�
�$�
�
�
�
�
�$�
�
�
�
��$������rr(�defaultc�x�	t|�d��t��S#t$r|cYSwxYw�Nr)�
isinstancerIrHr0�rrZs  r�_is_binary_readerr_�sE����&�+�+�a�.�.�%�0�0�0�������������s�'*�9�9c��	|�d��n;#t$r.	|�d��YdS#t$rYnwxYw|cYSwxYwdS)NrrQFT)rRr0r^s  r�_is_binary_writerra�s�������S����������	��L�L������5�5���	�	�	��D�	��������
�����4s*��
A�;�
A�A�A�A�Ac���t|d��rtjtj|��St	|dd��}|�/t|d��rtjtj|��SdS�NF�bufferT)r_r%r&r'r�r�bufs  r�_find_binary_readerrg��j��
���'�'�*��v�a�j�&�)�)�)�
�&�(�D�
)�
)�C���,�S�$�7�7���v�a�j�#�&�&�&��4rc���t|d��rtjtj|��St	|dd��}|�/t|d��rtjtj|��SdSrc)rar%r&r'rres  r�_find_binary_writerrj�rhrc�B�tt|dd��pd��S)z3A stream is misconfigured if its encoding is ASCII.rNr)rr�rs r�_stream_is_misconfiguredrm�s#���W�V�Z��>�>�I�'�J�J�Jr�attr�valuec�@�t||d��}||kp|duo|duS)z�A stream attribute is compatible if it is equal to the
    desired value or the desired value is unset and the attribute
    has a value.
    N)r)rrnro�stream_values    r�_is_compat_stream_attrrr�s3��
�6�4��.�.�L��5� �P�U�d�]�%O�|�4�7O�Prc�F�t|d|��ot|d|��S)zcCheck if a stream's encoding and errors attributes are
    compatible with the desired values.
    rr	)rr)rrr	s   r�_is_compatible_text_streamrt�s1��"��
�H���;�
 ���6�
:�
:�;r�text_stream�	is_binary�find_binaryc�2�||d��r tjtj|��}nTtjtj|��}t	|||��r|�t|��s|S||��}|�|S|}|�d}t
|||||���S)NFr)r
r)r%r&r'�TextIOrtrmr)	rurr	rvrwr
r�
binary_reader�possible_binary_readers	         r�_force_correct_text_streamr|�s����y��e�$�$�/���q�z�;�7�7�
�
��f�Q�X�{�3�3��&�k�8�V�D�D�	���!9�+�!F�!F����"-��[�!9�!9��"�)���.�
��~�������%�%����r�text_readerc�@�t|||tt|���S)N�r
)r|r_rg)r}rr	r
s    r�_force_correct_text_readerr��-��&������%�
���r�text_writerc�@�t|||tt|���S)N�r)r|rarj)r�rr	rs    r�_force_correct_text_writerr�(r�rc�Z�ttj��}|�td���|S)Nz6Was not able to determine binary stream for sys.stdin.)rgr�stdin�RuntimeError)�readers r�get_binary_stdinr�8s*��
 ���
+�
+�F�
�~��S�T�T�T��Mrc�Z�ttj��}|�td���|S)Nz7Was not able to determine binary stream for sys.stdout.)rjr�stdoutr���writers r�get_binary_stdoutr�?�*��
 ���
,�
,�F�
�~��T�U�U�U��Mrc�Z�ttj��}|�td���|S)Nz7Was not able to determine binary stream for sys.stderr.)rjr�stderrr�r�s r�get_binary_stderrr�Fr�rc�z�ttj||��}|�|Sttj||d���S)NTr)�_get_windows_console_streamrr�r��rr	r s   r�get_text_stdinr�Ms;��
%�S�Y��&�	A�	A�B�	�~��	�%�c�i��6�RV�W�W�W�Wrc�z�ttj||��}|�|Sttj||d���S�NTr�)r�rr�r�r�s   r�get_text_stdoutr�V�;��
%�S�Z��6�	B�	B�B�	�~��	�%�c�j�(�F�SW�X�X�X�Xrc�z�ttj||��}|�|Sttj||d���Sr�)r�rr�r�r�s   r�get_text_stderrr�_r�r�filezos.PathLike[str]�modec�P�d|vrt||��St||||���S)z?Handles not passing ``encoding`` and ``errors`` in binary mode.�b�rr	)�open)r�r�rr	s    r�
_wrap_io_openr�hs4���d�{�{��D�$������d�X�f�=�=�=�=r�r�strict�filenamezt.Union[str, os.PathLike[str]]�atomicc����d�v}tj|��}tj|��dkret�fd�dD����r%|rt	��dfSt||���dfS|rt
��dfSt||���dfS|st|�||��dfSd�vrtd	���d
�vrtd���d�vrtd
���ddl
}ddl}	tj|��j
}n#t$rd}YnwxYwtjtjztjz}	|r|	t%tdd��z}		tj�tj�|��d|�d��d����}
	tj|
|	|�dn|��}n�#t$r�}|j
|jkshtjdkr]|j
|jkrMtj�|j��r)tj|jtj��rYd}~���d}~wwxYw|�tj|
|��t|�||��}
tA|
|
tj�!|����}tEj#tDj$tDj%|��dfS)Nr��-c3� �K�|]}|�vV��	dSr$rY)�.0�mr�s  �r�	<genexpr>zopen_stream.<locals>.<genexpr>�s'�����2�2�Q�q�D�y�2�2�2�2�2�2r)�w�arNFr�Tr�z�Appending to an existing file is not supported, because that would involve an expensive `copy`-operation to a temporary file. Open the file in normal `w`-mode and copy explicitly if that's what you're after.rNz&Use the `overwrite`-parameter instead.r�z,Atomic writes only make sense with `w`-mode.r�O_BINARYz.__atomic-writel�08xi��nt)&�os�fspath�fsdecode�anyr�r�r�r�r��
ValueError�errno�random�stat�st_mode�OSError�O_RDWR�O_CREAT�O_EXCLr�path�join�dirname�	randranger��EEXISTr�EACCES�isdirr��access�W_OK�chmod�_AtomicFile�realpathr%r&�IOr<)r�r�rr	r��binaryr�r��perm�flags�tmp_filename�fd�erJ�afs `             r�open_streamr�us����D�[�F��y��"�"�H�
�{�8����#�#��2�2�2�2�/�2�2�2�2�2�	L��
2�(�*�*�E�1�1�"�H�V�D�D�D�e�K�K��	-�#�%�%�u�,�,��x��?�?�?��F�F��E��X�t�X�v�>�>��D�D��d�{�{��
,�
�
�	
��d�{�{��A�B�B�B�
�$����G�H�H�H��L�L�L��M�M�M�� "��� 1� 1� 9����������������
�I��
�"�R�Y�.�E�
�,�
���Z��+�+�+����w�|�|��G�O�O�H�%�%�=�f�.�.�w�7�7�=�=�=�
�
��	����u�t�|�e�e��N�N�B����	�	�	��w�%�,�&�&���4����G�u�|�+�+��G�M�M�!�*�-�-�,��I�a�j�"�'�2�2�,�����������	������
���t�$�$�$��b�$��&�1�1�A�	�Q��b�g�&6�&6�x�&@�&@�	A�	A�B��6�!�$�q�u�+�r�"�"�D�(�(s1�/D	�	D�D�2G
�
I�A8I�I�Ic���eZdZdejejdededdfd�Zedefd���Z	dd	e
ddfd
�Zdedejfd�Zdd
�Z
dejejedejddfd�Zdefd�ZdS)r�rJr��
real_filenamerNc�>�||_||_||_d|_dS�NF)�_f�
_tmp_filename�_real_filename�closed)r,rJr�r�s    rr+z_AtomicFile.__init__�s$�����)���+�������rc��|jSr$)r�r1s rrz_AtomicFile.name�s���"�"rF�deletec��|jrdS|j���tj|j|j��d|_dS)NT)r�r��closer�rr�r�)r,r�s  rr�z_AtomicFile.close�sC���;�	��F���
�
����
�
�4�%�t�':�;�;�;�����rrc�,�t|j|��Sr$)rr�rCs  rrDz_AtomicFile.__getattr__�s���t�w��%�%�%rc��|Sr$rYr1s r�	__enter__z_AtomicFile.__enter__�s���r�exc_type�_c�6�|�|du���dS)N)r�)r�)r,r�r�s   r�__exit__z_AtomicFile.__exit__�s!���
�
�(�$�.�
�/�/�/�/�/rc�*�t|j��Sr$)�reprr�r1s r�__repr__z_AtomicFile.__repr__�s���D�G�}�}�r�F)rr�)r6r7r8r%r�r<r:r+�propertyrr;r�rDr�r9�Type�
BaseExceptionr�r�rYrrr�r��s(�������!�$�q�u�+��S����QU������#�c�#�#�#��X�#���D��T�����&��&���&�&�&�&�����0���A�F�=�,A�!B�0���0�RV�0�0�0�0��#������rr�c�8�t�d|��S)NrQ)�_ansi_re�sub)ros r�
strip_ansir��s���<�<��E�"�"�"rc��t|ttf��r#|j}t|ttf���#|jj�d��S)Nz
ipykernel.)r]r(rr)r-r7�
startswithrls r�_is_jupyter_kernel_outputr��sW��
�V�l�,D�E�
F�
F� �����V�l�,D�E�
F�
F� ���&�1�1�,�?�?�?r�colorc�h�|�.|�tj}t|��ot|��S|Sr$)rr�r4r�)rr�s  r�should_strip_ansir��s=��
�}��>��Y�F��&�>�>�!�K�*C�F�*K�*K�&K�K��9�r�)r�c�2�ddl}|���Sr\)�locale�getpreferredencoding)r�s r�_get_argv_encodingr�s���
�
�
��*�*�,�,�,r�_ansi_stream_wrappersc�l���	t�|��}n#t$rd}YnwxYw|�|Sddl}t	||��}|�||����t
jtj�j	��}|j
���fd�}||_
	|t|<n#t$rYnwxYw|S)zbSupport ANSI color and style codes on Windows by wrapping a
        stream with colorama.
        Nr)�stripc�b��	�|��S#t$r�����wxYwr$)r��	reset_all)�s�_write�ansi_wrappers ��r�_safe_writez'auto_wrap_for_ansi.<locals>._safe_writesF���
��v�a�y�y� �� �
�
�
��&�&�(�(�(��
���s�
� .)r��getr0�coloramar��AnsiToWin32r%r&ryrrR)	rr��cachedr	rr rrrs	       @@rrrs�����	�*�.�.�v�6�6�F�F���	�	�	��F�F�F�	�������M�����!�&�%�0�0���+�+�F�%�+�@�@��
�V�A�H�l�1�
2�
2�����	�	�	�	�	�	����	�,.�!�&�)�)���	�	�	��D�	�����	s��.�.�
B$�$
B1�0B1c�^�ttjdd��ptj��S)Nr)rrr��getfilesystemencodingrYrrr�r�.s$���s�y�*�d�3�3�R�s�7P�7R�7R�RrrJc��dSr$rY)rJrr	s   rr�r�1s	���trrNc�:�tt|����Sr$)�lenr�)rNs r�term_lenr7s���z�!�}�}���rc�N�	|���S#t$rYdSwxYwr�)r4r0rls rr4r4;s7����}�}����������u�u����s��
$�$�src_func�wrapper_funcc�p����t���dtjtjf���fd�}|S)Nrc������}|�dS	��|��}n#t$rd}YnwxYw|�|S���}	|�|<n#t$rYnwxYw|Sr$)rr0)rr �cacherrs  ���r�funcz&_make_cached_stream_func.<locals>.funcHs����������>��4�	����6�"�"�B�B���	�	�	��B�B�B�	����
�>��I�
�\�^�^��	��E�&�M�M���	�	�	��D�	�����	s�'�6�6�A�
A�A)rr%r9ry)rrrrs`` @r�_make_cached_stream_funcrBsR�����3D�2E�2E�E��!�*�Q�X�&���������&�Krc��tjSr$)rr�rYrr�<lambda>r^s��s�y�rc��tjSr$)rr�rYrrrr_����
�rc��tjSr$)rr�rYrrrr`rr)r�r�r��binary_streams�text_streamsr5r�)NN)r�Nr�Fr$)Fr�ior��rer�typingr%�weakrefr�platformr��CYGWIN�WINrr9�Callablery�__annotations__�compiler�r'r:r;rrr�r<r�
TextIOWrapperrr(r_rargrjrmrrrtr|r�r�r�r�r�r�r�r��UnionrXr��Tupler�r�r�r�r��_winconsoler�r�r��MutableMappingrr4r�_default_text_stdin�_default_text_stdout�_default_text_stderrr�Mappingr rYrr�<module>r4s�
��
�
�
�
�
�	�	�	�	�	�	�	�	�	�	�	�	�
�
�
�
�����%�%�%�%�%�%�	��	 �	 ��	*�	*��	�l���e�$�$��CG��A�J�q�z�1�8�*�a�h�*>�?�@�G�G�G��2�:�/�0�0��!� ���
�J���j��o��
�J�s�O���	�
���X�
����*���������a�d�1�5�k��c�����%�%�%�%�%�r�/�%�%�%�4B�B�B�B�B�B�B�B�J��a�d�1�5�k��D��T�����
�
�a�d�1�5�k�
�D�
�T�
�
�
�
����Q�U����
�1�:�0F�����$���Q�U����
�1�:�0F�����$K�Q�X�K�$�K�K�K�K�Q�1�8�Q�3�Q�q�z�#��Q�SW�Q�Q�Q�Q�;�
�H�;� !�
�3��;�9:��C��;�	�;�;�;�;�"!� �+�+���a�e��+��j��o�+�
�J�s�O�+��z�1�4���;��-�t�3�4�	+�
��Q�T�!�%�[�M�1�:�a�j�+A�A�B�+��
+��+��X�+�+�+�+�d!�	
�
���a�e��
��j��o�
�
�J�s�O�
��	
�
�X�
�
�
�
�(!�	
�
���a�e��
��j��o�
�
�J�s�O�
��	
�
�X�
�
�
�
� �!�*������1�:������1�:�����AE�X�X��j��o�X�./�j��o�X��X�X�X�X�X�AE�Y�Y��j��o�Y�./�j��o�Y��X�Y�Y�Y�Y�AE�Y�Y��j��o�Y�./�j��o�Y��X�Y�Y�Y�Y�
>�
�'�#�)�3�.�
/�
>�

�
>��j��o�
>�
�J�s�O�	
>�
�T�!�%�[�
>�
>�
>�
>�� $�&��N)�N)�.�N)�

�N)��j��o�N)�
�J�s�O�	N)�

�N)��W�Q�T�!�%�[�$�
��
N)�N)�N)�N)�b��������>#�c�#�c�#�#�#�#�@�a�d�1�5�k�@�d�@�@�@�@�GK���
�J�q�t�A�E�{�#��34�:�d�3C��	������<���5�!�!�7�c�7�8�8�8�8�8�8�-��-�-�-�-�
CT�BS�BU�BU��1�+�A�H�a�h�,>�?�U�U�U�59�#�#���#�!"��D�!1�#�	
��#�#�#�#�#�NS��S�S�S�S���8�� �z�#���89�
�3���	
��A�H�	��������������1�4���;��4�������j��Q�Z���1�1�2���*�R���\�*���Z��A�J�q�x�(�(�)�����8/�.�/@�/@�.�Q�Q��/�/�0B�0B�O�T�T��/�/�0B�0B�O�T�T�����>�>���	�#�q�z�"�a�j�.�9�9�:���������
�a�i����Q�Z��_�a�j��o�6���@�	A�A������r

?>