AlkantarClanX12

Your IP : 3.144.89.42


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/__pycache__/docopt.cpython-311.pyc

�

�܋f�M���dZddlZddlZdgZdZGd�de��ZGd�de��ZGd	�d
e	��Z
Gd�de
��ZGd
�de
��ZGd�de��Z
Gd�de
��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�d e��Zd!�Zd"�Zd#�Zd$�Zd%�Zd&�Zd1d(�Zd)�Zd*�Zd+�Z d,�Z!Gd-�d.e"��Z#d2d0�Z$dS)3aPythonic command-line interface parser that will make you smile.

 * http://docopt.org
 * Repository and issue-tracker: https://github.com/docopt/docopt
 * Licensed under terms of MIT license (see LICENSE-MIT)
 * Copyright (c) 2013 Vladimir Keleshev, vladimir@keleshev.com

�N�docoptz0.6.2c��eZdZdZdS)�DocoptLanguageErrorz4Error in construction of usage-message by developer.N��__name__�
__module__�__qualname__�__doc__���=/opt/cloudlinux/venv/lib64/python3.11/site-packages/docopt.pyrrs������>�>�>�>rrc��eZdZdZdZdd�ZdS)�
DocoptExitz;Exit in case user invoked program with incorrect arguments.�c�v�t�||dz|jz�����dS)N�
)�
SystemExit�__init__�usage�strip)�self�messages  r
rzDocoptExit.__init__s5�����D�7�T�>�D�J�#>�"E�"E�"G�"G�H�H�H�H�HrN)r)rrr	r
rrrrr
rrs9������E�E��E�I�I�I�I�I�Irrc�D�eZdZd�Zd�Zd�Zdd�Zd�Zed���Z	dS)	�Patternc�B�t|��t|��kS�N��repr)r�others  r
�__eq__zPattern.__eq__"s���D�z�z�T�%�[�[�(�(rc�:�tt|����Sr)�hashr�rs r
�__hash__zPattern.__hash__%s���D��J�J���rc�V�|���|���|Sr)�fix_identities�fix_repeating_argumentsr#s r
�fixzPattern.fix(s+���������$�$�&�&�&��rNc�`�t|d��s|S|�.tt|�������n|}t	|j��D]T\}}t|d��s*||vsJ�||�|��|j|<�?|�|���UdS)z>Make pattern-tree tips point to same object if they are equal.�childrenN)�hasattr�list�set�flat�	enumerater*�indexr&)r�uniq�i�cs    r
r&zPattern.fix_identities-s����t�Z�(�(�	��K�)-��t�C��	�	���$�$�%�%�%�4���d�m�,�,�	'�	'�D�A�q��1�j�)�)�
'��D�y�y�y�y�#'��
�
�1�
�
�#6��
�a� � �� � ��&�&�&�&�	'�	'rc����d�|jjD��}|D]̊�fd��D��D]�}t|��tust|��turO|jrH|j�g|_n9t|j��tur|j���|_t|��tus!t|��tur|jdkrd|_����|S)z5Fix elements that should accumulate/increment values.c�6�g|]}t|j����Sr�r,r*��.0r3s  r
�
<listcomp>z3Pattern.fix_repeating_arguments.<locals>.<listcomp>;s"��A�A�A�q�$�q�z�"�"�A�A�Arc�F��g|]}��|��dk�|��S)�)�count)r8r3�cases  �r
r9z3Pattern.fix_repeating_arguments.<locals>.<listcomp>=s-���;�;�;�A����A����):�):�a�):�):�):rNr)
�eitherr*�type�Argument�Option�argcount�valuer,�split�Command)rr>�er=s   @r
r'zPattern.fix_repeating_arguments9s����A�A�D�K�,@�A�A�A���	 �	 �D�;�;�;�;��;�;�;�
 �
 ����7�7�h�&�&�$�q�'�'�V�*;�*;��
�*;��w��"$�����a�g���d�2�2�"#�'�-�-�/�/�����7�7�g�%�%��a���F�):�):�q�z�Q����A�G��
 ��rc���g}|gg}|�r]|�d��}d�|D��}t|vr_d�|D��d}|�|�|����|jD]}|�|g|z����n�t
|vrfd�|D��d}|�|�|����|�t
|j��|z���nbt|vred�|D��d}|�|�|����|�t
|j��|z��n�t|vred�|D��d}|�|�|����|�t
|j��|z��n�t|vrhd�|D��d}	|�|�|	����|�t
|	j��dz|z��n|�|��|��]td	�|D���S)
zATransform pattern into an equivalent, with only top-level Either.rc�,�g|]}t|����Sr�r?r7s  r
r9z"Pattern.either.<locals>.<listcomp>Ps��/�/�/��T�!�W�W�/�/�/rc�>�g|]}t|��tu�|��Sr)r?�Eitherr7s  r
r9z"Pattern.either.<locals>.<listcomp>Rs(��C�C�C���a���F�1B�1B�!�1B�1B�1Brc�>�g|]}t|��tu�|��Sr)r?�Requiredr7s  r
r9z"Pattern.either.<locals>.<listcomp>W�(��G�G�G�!�4��7�7�h�3F�3F�A�3F�3F�3Frc�>�g|]}t|��tu�|��Sr)r?�Optionalr7s  r
r9z"Pattern.either.<locals>.<listcomp>[rNrc�>�g|]}t|��tu�|��Sr)r?�
AnyOptionsr7s  r
r9z"Pattern.either.<locals>.<listcomp>_s(��I�I�I�!�4��7�7�j�3H�3H�A�3H�3H�3Hrc�>�g|]}t|��tu�|��Sr)r?�	OneOrMorer7s  r
r9z"Pattern.either.<locals>.<listcomp>cs(��I�I�I�1�D��G�G�y�4H�4H�Q�4H�4H�4Hr�c� �g|]}t|���Sr)rM)r8rFs  r
r9z"Pattern.either.<locals>.<listcomp>hs��2�2�2���!��2�2�2r)
�poprKr0r*�appendrMr,rPrRrT)
r�ret�groupsr*�typesr>r3�required�optional�	oneormores
          r
r>zPattern.eitherGs���
���&����	%��z�z�!�}�}�H�/�/�h�/�/�/�E�����C�C�X�C�C�C�A�F�����X�^�^�F�3�3�4�4�4���2�2�A��M�M�1�#��.�1�1�1�1�2��U�"�"�G�G�x�G�G�G��J�����X�^�^�H�5�5�6�6�6��
�
�d�8�#4�5�5��@�A�A�A�A��U�"�"�G�G�x�G�G�G��J�����X�^�^�H�5�5�6�6�6��
�
�d�8�#4�5�5��@�A�A�A�A��u�$�$�I�I�x�I�I�I�!�L�����X�^�^�H�5�5�6�6�6��
�
�d�8�#4�5�5��@�A�A�A�A��e�#�#�I�I��I�I�I�!�L�	����X�^�^�I�6�6�7�7�7��
�
�d�9�#5�6�6��:�X�E�F�F�F�F��
�
�8�$�$�$�3�	%�4�2�2�c�2�2�2�3�3rr)
rrr	r r$r(r&r'�propertyr>rrr
rr s������)�)�)� � � ����

'�
'�
'�
'����� 4� 4��X� 4� 4� 4rrc�*�eZdZdd�Zd�Zd�Zdd�ZdS)�ChildPatternNc�"�||_||_dSr��namerC�rrdrCs   r
rzChildPattern.__init__m�����	���
�
�
rc�@�|jj�d|j�d|j�d�S)N�(�, �))�	__class__rrdrCr#s r
�__repr__zChildPattern.__repr__qs&��#�~�6�6�6��	�	�	�4�:�:�:�N�Nrc�2�|rt|��|vr|gngSrrI�rr[s  r
r.zChildPattern.flatts#��"�A�d�4�j�j�E�&9�&9��v�v�r�Arc����|�gn|}��|��\}}|�d||fS|d|�||dzd�z}�fd�|D��}t�j��ttfvrut�j��turd}n*t|j��t
ur|jgn|j}|s||_d|||gzfS|dxj|z
c_d||fSd|||gzfS)NFr;c�4��g|]}|j�jk�|��Sr)rd)r8�ars  �r
r9z&ChildPattern.match.<locals>.<listcomp>}s'���A�A�A�1�Q�V�t�y�-@�-@�Q�-@�-@�-@rTr)�single_matchr?rC�intr,�str)r�left�	collected�pos�match�left_�	same_name�	increments`       r
rxzChildPattern.matchws)���#�+�B�B��	��&�&�t�,�,�
��U��=��$�	�)�)��T�c�T�
�T�#��'�(�(�^�+��A�A�A�A�	�A�A�A�	���
����T�{�*�*��D�J���3�&�&��	�	�.2�5�;�.?�.?�3�.F�.F�e�k�]�]�"'�+���
8�'����U�I���$7�7�7��a�L���)�+�����	�)�)��U�I���/�/�/rr)rrr	rrlr.rxrrr
raraks`����������O�O�O�B�B�B�0�0�0�0�0�0rrac� �eZdZd�Zd�Zd�ZdS)�
ParentPatternc�.�t|��|_dSrr6)rr*s  r
rzParentPattern.__init__�s���X����
�
�
rc�j�|jj�dd�d�|jD�����d�S)Nrhric3�4K�|]}t|��V��dSrr�r8rqs  r
�	<genexpr>z)ParentPattern.__repr__.<locals>.<genexpr>�s(����$D�$D��T�!�W�W�$D�$D�$D�$D�$D�$Drrj)rkr�joinr*r#s r
rlzParentPattern.__repr__�sB���>�2�2�2��9�9�$D�$D�d�m�$D�$D�$D�D�D�D�D�F�	Frc�n��t|���vr|gSt�fd�|jD��g��S)Nc�$��g|]}|j����
Sr)r.)r8r3r[s  �r
r9z&ParentPattern.flat.<locals>.<listcomp>�s!���:�:�:�q�F�A�F�E�N�:�:�:r)r?�sumr*rns `r
r.zParentPattern.flat�sB�����:�:�����6�M��:�:�:�:�D�M�:�:�:�B�?�?�?rN)rrr	rrlr.rrr
r}r}�sI������'�'�'�F�F�F�@�@�@�@�@rr}c�*�eZdZd�Zed���ZdS)r@c��t|��D]9\}}t|��tur|t|j|j��fcS�:dS�N�NN)r/r?r@rdrC�rru�n�ps    r
rrzArgument.single_match�sU���d�O�O�	7�	7�D�A�q��A�w�w�(�"�"��(�4�9�a�g�6�6�6�6�6�6�#��zrc��tjd|��d}tjd|tj���}|||r|dnd��S)Nz(<\S*?>)r�\[default: (.*)\]��flags)�re�findall�I)�class_�sourcerdrCs    r
�parsezArgument.parse�sP���z�*�f�-�-�a�0���
�.��b�d�C�C�C���v�d��7�E�!�H�H�4�8�8�8rN)rrr	rr�classmethodr�rrr
r@r@�s>����������9�9��[�9�9�9rr@c��eZdZdd�Zd�ZdS)rEFc�"�||_||_dSrrcres   r
rzCommand.__init__�rfrc��t|��D]F\}}t|��tur+|j|jkr|t|jd��fcSn�GdS)NTr�)r/r?r@rCrdrEr�s    r
rrzCommand.single_match�si���d�O�O�	�	�D�A�q��A�w�w�(�"�"��7�d�i�'�'��g�d�i��6�6�6�6�6�6��E�	#�
�zrN�F)rrr	rrrrrr
rErE�s7��������������rrEc�N�eZdZd	d�Zed���Zd�Zed���Zd�Z	dS)
rANrFc�l�|dvsJ�||c|_|_||c|_|_|dur|rdn||_dS)N)rr;F��short�longrBrC)rr�r�rBrCs     r
rzOption.__init__�sN���6�!�!�!�!� %�t���
�D�I�$,�e�!��
�t�z�"�e�^�^��^�T�T�e��
�
�
rc���d\}}}}|����d��\}}}|�dd���dd��}|���D]4}	|	�d��r|	}�|	�d��r|	}�2d}�5|r-tjd	|t
j�
��}
|
r|
dnd}|||||��S)N�NNrFz  �,� �=�--�-r;r�r�r)r�	partition�replacerD�
startswithr�r�r�)r��option_descriptionr�r�rBrC�options�_�description�s�matcheds           r
r�zOption.parse�s���';�$��t�X�u�"4�":�":�"<�"<�"F�"F�t�"L�"L����K��/�/�#�s�+�+�3�3�C��=�=�������	�	�A��|�|�D�!�!�
�������c�"�"�
��������	4��j�!4�k���N�N�N�G�")�3�G�A�J�J�t�E��v�e�T�8�U�3�3�3rc�\�t|��D]\}}|j|jkr||fcS�dSr�)r/rdr�s    r
rrzOption.single_match�sA���d�O�O�	�	�D�A�q��y�A�F�"�"��!�t����#��zrc��|jp|jSr)r�r�r#s r
rdzOption.name�s���y�&�D�J�&rc	�H�d|j�d|j�d|j�d|j�d�	S)NzOption(rirjr�r#s r
rlzOption.__repr__�s2���+/�:�:�:�t�y�y�y�+/�=�=�=�$�*�*�*�F�	Frr�)
rrr	rr�r�rrr_rdrlrrr
rArA�s�������D�D�D�D��4�4��[�4� ����'�'��X�'�F�F�F�F�FrrAc��eZdZdd�ZdS)rMNc�z�|�gn|}|}|}|jD]%}|�||��\}}}|sd||fcS�&d||fS)NFT�r*rx)rrurv�lr3r�r�s       r
rxzRequired.match�sn��#�+�B�B��	�������	.�	.�A��G�G�A�q�M�M�M�G�Q���
.��d�I�-�-�-�-�
.��Q��z�rr�rrr	rxrrr
rMrM�s(�����������rrMc��eZdZdd�ZdS)rPNc�`�|�gn|}|jD]}|�||��\}}}�d||fS)NTr�)rrurvr��ms     r
rxzOptional.match�sJ��#�+�B�B��	���	:�	:�A�!"����y�!9�!9��A�t�Y�Y��T�9�$�$rrr�rrr
rPrP�s(������%�%�%�%�%�%rrPc��eZdZdZdS)rRz*Marker/placeholder for [options] shortcut.Nrrrr
rRrR�s������4�4�4�4rrRc��eZdZdd�ZdS)rTNc���t|j��dksJ�|�gn|}|}|}d}d}d}|r9|jd�||��\}}}||rdndz
}||krn|}|�9|dkrd||fSd||fS)Nr;TrF)�lenr*rx)rrurvr�r3�l_r��timess        r
rxzOneOrMore.match�s����4�=�!�!�Q�&�&�&�&�#�+�B�B��	�����
�������	� �M�!�,�2�2�1�a�8�8�M�G�Q���'�(�Q�Q�q�(�E��Q�w�w���B�
�	��A�:�:���A�:���d�I�%�%rrr�rrr
rTrT�s(������&�&�&�&�&�&rrTc��eZdZdd�ZdS)rKNc��|�gn|}g}|jD]5}|�||��x\}}}}|r|�|���6|rt|d����Sd||fS)Nc�,�t|d��S)Nr;�r�)�outcomes r
�<lambda>zEither.match.<locals>.<lambda>s��S����_�_�r)�keyF)r*rxrX�min)rrurv�outcomesr�r�r�r�s        r
rxzEither.matchs���#�+�B�B��	�����	)�	)�A�&'�g�g�d�I�&>�&>�>�M�G�Q��G��
)�����(�(�(���	F��x�%D�%D�E�E�E�E��d�I�%�%rrr�rrr
rKrKs(������	&�	&�	&�	&�	&�	&rrKc� �eZdZd�Zd�Zd�ZdS)�TokenStreamc�f�|t|d��r|���n|z
}||_dS)NrD)r+rD�error)rr�r�s   r
rzTokenStream.__init__#s2���'�&�'�":�":�F��������F����
�
�
rc�N�t|��r|�d��ndS�Nr)r�rWr#s r
�movezTokenStream.move's!��!�$�i�i�1�t�x�x��{�{�{�T�1rc�4�t|��r|dndSr�r�r#s r
�currentzTokenStream.current*s���d�)�)�-�t�A�w�w��-rN)rrr	rr�r�rrr
r�r�!sA���������2�2�2�.�.�.�.�.rr�c���|����d��\�}}��d��sJ�||cxkrdkrnndn|}�fd�|D��}|jtur|gkr�fd�|D��}t|��dkr8|���dd	�d
�|D�����d����t|��dkrU|dkrdnd}td�|��}|�|��|jturtd�||r|nd
��}n�t|dj	|dj
|dj|dj��}|jdkr |�|�d|j
z���nG|�E|�
���|�d|j
z���|���}|jtur|�|nd
|_|gS)z-long ::= '--' chars [ ( ' ' | '=' ) chars ] ;r�r�rNc�*��g|]}|j�k�
|��Sr�r��r8�or�s  �r
r9zparse_long.<locals>.<listcomp>3s ���4�4�4�Q�Q�V�t�^�^�q�^�^�^rc�V��g|]%}|j�	|j�����#|��&Sr)r�r�r�s  �r
r9zparse_long.<locals>.<listcomp>5s5���L�L�L����L�A�F�4E�4E�d�4K�4K�L�1�L�L�Lrr;z is not a unique prefix: ric3�$K�|]}|jV��dSrr��r8r�s  r
r�zparse_long.<locals>.<genexpr>8s$����+D�+D�q�A�F�+D�+D�+D�+D�+D�+Dr�?rTz%s must not have an argument�%s requires argument)r�r�r�r�rr�r�rArXr�r�rBrCr�)�tokensr��eqrC�similarrBr�r�s       @r
�
parse_longr�.s;����k�k�m�m�-�-�c�2�2�O�D�"�e��?�?�4� � � � � ��%�%�%�%�%�2�%�%�%�%�%�D�D�5�E�4�4�4�4�'�4�4�4�G�
�|�z�!�!�g��m�m�L�L�L�L�g�L�L�L��
�7�|�|�a����l�l� �D�D�$�)�)�+D�+D�G�+D�+D�+D�"D�"D�"D�"D�F�G�G�	G�	�W����	�	��c�	�	�1�1�q���4��x�(�(�����q�����<�:�%�%��t�T�8�h�-H�U�U�D�I�I�A���7�1�:�#�W�Q�Z�_��1�:�&���
�(8�
:�
:���:��?�?�� ��l�l�#A�A�F�#J�K�K�K�!��}��>�>�#�#�+� �,�,�'=���'F�G�G�G����
�
���<�:�%�%�$�0�e�e�d�A�G�
�3�Jrc���|���}|�d��r|�d��rJ�|�d��}g}|dk�rxd|dz|dd�c�}�fd�|D��}t|��dkr'|�d�t|��fz���t|��dkrGt�dd��}|�|��|jturt�ddd	��}n�t�|dj|dj	|dj
��}d}|j	dkrK|dkrA|����|�d
�z���|���}n|}d}|jtur|�|nd	|_
|�|��|dk��x|S)z-shorts ::= '-' ( chars )* [ [ ' ' ] chars ] ;r�r�rrr;Nc�*��g|]}|j�k�
|��Sr)r�)r8r�r�s  �r
r9z parse_shorts.<locals>.<listcomp>Ws%���:�:�:����E�)9�)9�1�)9�)9�)9rz$%s is specified ambiguously %d timesTr�)r�r��lstripr�r�rArXrr�rBrCr�)	r�r��tokenru�parsedr�r�rCr�s	        @r
�parse_shortsr�Os�����K�K�M�M�E����C� � �?��)9�)9�$�)?�)?�?�?�?��<�<����D�
�F�
�"�*�*��D��G�m�T�!�"�"�X���t�:�:�:�:�g�:�:�:���w�<�<�!����,�,�E� %�s�7�|�|�4� 5�6�6�
6�
��\�\�A�
�
��u�d�A�&�&�A��N�N�1�����|�z�)�)��5�$��4�0�0����u�g�a�j�o��q�z�*�G�A�J�,<�>�>�A��E��z�Q����2�:�:��~�~�'�'�/�$�l�l�+A�E�+I�J�J�J�"�K�K�M�M�E�E� �E��D��|�z�)�)�#(�#4�%�%�$����
�
�a����3�"�*�*�4�Mrc��ttjdd|��t��}t	||��}|����+|�dd�|��z���t|�S)Nz([\[\]\(\)\|]|\.\.\.)z \1 zunexpected ending: %rr�)	r�r��subr�
parse_exprr�r�r�rM)r�r�r��results    r
�
parse_patternr�rss��
��� 8�'�6�J�J�,�.�.�F�
���
(�
(�F�
�~�~���#��l�l�2�S�X�X�f�5E�5E�E�F�F�F��V��rc��t||��}|���dkr|St|��dkr
t|�gn|}|���dkr^|���t||��}|t|��dkr
t|�gn|z
}|���dk�^t|��dkr
t|�gn|S)zexpr ::= seq ( '|' seq )* ;�|r;)�	parse_seqr�r�rMr�rK)r�r��seqr�s    r
r�r�{s���
�F�G�
$�
$�C�
�~�~���3����
�!$�S���A���h��n�
�
�3�F�
�.�.�
�
�c�
!�
!����
�
�
����(�(���c�#�h�h��l�l�8�S�>�"�"��;���.�.�
�
�c�
!�
!�!$�F���a���F�F�O���V�;rc��g}|���dvrat||��}|���dkrt|�g}|���||z
}|���dv�a|S)zseq ::= ( atom [ '...' ] )* ;)N�]rjr�z...)r��
parse_atomrTr�)r�r�r��atoms    r
r�r��s���
�F�
�.�.�
�
�"7�
7�
7��&�'�*�*���>�>���u�$�$��t�$�%�D��K�K�M�M�M��$����.�.�
�
�"7�
7�
7��Mrc� �|���}g}|dvrv|���dtgdtgd�|\}}|t	||���}|���|kr|�d|z���|gS|dkr#|���t
��gS|�d��r|dkrt||��S|�d��r|d	vrt||��S|�d
��r|�
d��s|���r"t|�����gSt|�����gS)ziatom ::= '(' expr ')' | '[' expr ']' | 'options'
             | long | shorts | argument | command ;
    z([rjr�)rh�[zunmatched '%s'r�r�r�)r�r��<�>)r�r�rMrPr�r�rRr�r�r��endswith�isupperr@rE)r�r�r�r��matching�patterns      r
r�r��s���
�N�N���E�
�F���}�}����
�
�
�#&��/��h��H�H��O���'���*�V�W�5�5�6���;�;�=�=�H�$�$��,�,�/�%�7�8�8�8��x��	�)�	�	����
�
�
����~��	�	�	�$�	�	�(�E�T�M�M��&�'�*�*�*�	�	�	�#�	�	�(�5��#;�#;��F�G�,�,�,�	�	�	�#�	�	�(�5�>�>�#�#6�#6�(�%�-�-�/�/�(�������'�'�(�(�����
�
�&�&�'�'rFc�T�g}|�����|���dkr|d�|D��zS|����d��r|t||��z
}n�|����d��r,|���dkr|t||��z
}nF|r|d�|D��zS|�td|�������|�����|S)z�Parse command-line argument vector.

    If options_first:
        argv ::= [ long | shorts ]* [ argument ]* [ '--' [ argument ]* ] ;
    else:
        argv ::= [ long | shorts | argument ]* [ '--' [ argument ]* ] ;

    Nr�c�.�g|]}td|����Sr�r@�r8�vs  r
r9zparse_argv.<locals>.<listcomp>��"��?�?�?�1�X�d�A�.�.�?�?�?rr�c�.�g|]}td|����Srrrs  r
r9zparse_argv.<locals>.<listcomp>�rr)r�r�r�r�rXr@r�)r�r��
options_firstr�s    r
�
parse_argvr�s'���F�
�.�.�
�
�
&��>�>���t�#�#��?�?��?�?�?�?�?�
�^�^�
�
�
(�
(��
.�
.�	9��j���1�1�1�F�F�
�^�^�
�
�
(�
(��
-�
-�	9�&�.�.�2B�2B�c�2I�2I��l�6�7�3�3�3�F�F�
�	9��?�?��?�?�?�?�?��M�M�(�4������7�7�8�8�8��.�.�
�
�
&��Mrc��tjd|��dd�}d�t|ddd�|ddd���D��}d�|D��}|S)Nz
 *(<\S+?>|-\S+?)r;c��g|]
\}}||z��Srr)r8�s1�s2s   r
r9z"parse_defaults.<locals>.<listcomp>�s ��@�@�@���R�R�"�W�@�@�@rrUc�l�g|]1}|�d���t�|����2S)r�)r�rAr�)r8r�s  r
r9z"parse_defaults.<locals>.<listcomp>�s3��C�C�C�1����c�1B�1B�C�v�|�|�A���C�C�Cr)r�rD�zip)�docrDr�s   r
�parse_defaultsr�sh���H�)�3�/�/����3�E�@�@�3�u�S�S�q�S�z�5���A��;�#?�#?�@�@�@�E�C�C��C�C�C�G��Nrc�D�tjd|��}t|��dkrtd���t|��dkrtd���tjdd�|dd�����d���S)	Nz([Uu][Ss][Aa][Gg][Ee]:)�z&"usage:" (case-insensitive) not found.z*More than one "usage:" (case-insensitive).z\n\s*\nrr;r)r�rDr�rr�r)r
�usage_splits  r
�printable_usager�s����(�5�s�;�;�K�
�;���!���!�"J�K�K�K�
�;���!���!�"N�O�O�O�
�8�J�����A�B�B�� 8� 8�9�9�!�<�B�B�D�D�Drc���|���dd��dd��fd��dd�D����zdzS)Nr;z( r�c3�8�K�|]}|�dkrdn|V��dS)rz) | (Nr)r8r��pus  �r
r�zformal_usage.<locals>.<genexpr>�s3�����H�H�A�a�2�a�5�j�j�7�7�a�H�H�H�H�H�Hrz ))rDr�)rrs @r
�formal_usager�sV���	�	�	�	 �	 ����	$�B��#�(�(�H�H�H�H��A�B�B��H�H�H�H�H�H�4�O�Orc�(�|rNtd�|D����r5t|�d����tj��|r=td�|D����r&t|��tj��dSdSdS)Nc3�6K�|]}|jdvo|jV��dS))z-hz--helpNrcr�s  r
r�zextras.<locals>.<genexpr>�s1����N�N��Q�V�/�/�<�Q�W�N�N�N�N�N�Nrrc3�:K�|]}|jdko|jV��dS)z	--versionNrcr�s  r
r�zextras.<locals>.<genexpr>�s0����J�J�Q�q�v��,�8���J�J�J�J�J�Jr)�any�printr�sys�exit)�help�versionr�r
s    r
�extrasr �s������N�N�g�N�N�N�N�N��
�c�i�i��o�o������
�
�
���3�J�J�'�J�J�J�J�J��
�g������
�
�
�
�
����rc��eZdZd�ZdS)�Dictc��dd�d�t|�����D����zS)Nz{%s}z,
 c3� K�|]	}d|zV��
dS)z%r: %rNr)r8r2s  r
r�z Dict.__repr__.<locals>.<genexpr>�s&����#O�#O�Q�H�q�L�#O�#O�#O�#O�#O�#Or)r��sorted�itemsr#s r
rlz
Dict.__repr__�s8������#O�#O�&������:N�:N�#O�#O�#O�O�O�O�OrN)rrr	rlrrr
r"r"�s(������P�P�P�P�Prr"Tc��|�tjdd�}t|��t_t|��}t
ttj��|��}tt|t��t|��|��}t|�t����}|�t��D]5}t|��}	tt|	��|z
��|_�6t!||||��|����|��\}
}}|
r4|gkr.t'd�|���|zD����St���)a�Parse `argv` based on command-line interface described in `doc`.

    `docopt` creates your command-line interface based on its
    description that you pass as `doc`. Such description can contain
    --options, <positional-argument>, commands, which could be
    [optional], (required), (mutually | exclusive) or repeated...

    Parameters
    ----------
    doc : str
        Description of your command-line interface.
    argv : list of str, optional
        Argument vector to be parsed. sys.argv[1:] is used if not
        provided.
    help : bool (default: True)
        Set to False to disable automatic help on -h or --help
        options.
    version : any object
        If passed, the object will be printed if --version is in
        `argv`.
    options_first : bool (default: False)
        Set to True to require options preceed positional arguments,
        i.e. to forbid options and positional arguments intermix.

    Returns
    -------
    args : dict
        A dictionary, where keys are names of command-line elements
        such as e.g. "--verbose" and "<path>", and values are the
        parsed values of those elements.

    Example
    -------
    >>> from docopt import docopt
    >>> doc = '''
    Usage:
        my_program tcp <host> <port> [--timeout=<seconds>]
        my_program serial <port> [--baud=<n>] [--timeout=<seconds>]
        my_program (-h | --help | --version)

    Options:
        -h, --help  Show this screen and exit.
        --baud=<n>  Baudrate [default: 9600]
    '''
    >>> argv = ['tcp', '127.0.0.1', '80', '--timeout', '30']
    >>> docopt(doc, argv)
    {'--baud': '9600',
     '--help': False,
     '--timeout': '30',
     '--version': False,
     '<host>': '127.0.0.1',
     '<port>': '80',
     'serial': False,
     'tcp': True}

    See also
    --------
    * For video introduction see http://docopt.org
    * Full documentation is available in README.rst as well as online
      at https://github.com/docopt/docopt#readme

    Nr;c3�2K�|]}|j|jfV��dSrrcr�s  r
r�zdocopt.<locals>.<genexpr>Bs+����L�L�!�Q�V�Q�W�%�L�L�L�L�L�Lr)r�argvrrrrr�rrr�r,r-r.rArRr*r r(rxr")
r
r)rrrr�r��pattern_options�ao�doc_optionsr�rurvs
             r
rr�sT��~�|��x����|��&�s�+�+�J���S�!�!�G��L��)9�:�:�G�D�D�G��k�$�
�3�3�T�'�]�]�#�%�%�D��'�,�,�v�.�.�/�/�O��l�l�:�&�&�?�?��$�S�)�)���3�{�+�+�o�=�>�>�����4��$��$�$�$�&�{�{�}�}�2�2�4�8�8��G�T�9��M�4�2�:�:��L�L�������0J�L�L�L�L�L�L�
�,�,�rr�)NTNF)%r
rr��__all__�__version__�	Exceptionrrr�objectrrar}r@rErArMrPrRrTrKr,r�r�r�r�r�r�r�rrrrr �dictr"rrrr
�<module>r2s������
�
�
�	�	�	�	��*����?�?�?�?�?�)�?�?�?�
I�I�I�I�I��I�I�I�H4�H4�H4�H4�H4�f�H4�H4�H4�V0�0�0�0�0�7�0�0�0�B@�@�@�@�@�G�@�@�@�9�9�9�9�9�|�9�9�9�
�
�
�
�
�h�
�
�
� %F�%F�%F�%F�%F�\�%F�%F�%F�P
�
�
�
�
�}�
�
�
�%�%�%�%�%�}�%�%�%�5�5�5�5�5��5�5�5�
&�&�&�&�&�
�&�&�&�,&�&�&�&�&�]�&�&�&�
.�
.�
.�
.�
.�$�
.�
.�
.����B � � �F���
<�
<�
<�	�	�	�(�(�(�4����0���E�E�E�P�P�P�
���P�P�P�P�P�4�P�P�P�
V�V�V�V�V�Vr