
    khr3                        d dl  d dl d dl d dl d dl d dl dZ	 d dl dZddl
Z
ddiZd)dZ G d	 de      Zd
 ZefdZefdZefdZefdZd)dZd)dZd Zd Zd Zd Zd Zd ZdedddddfdZdeddddddddddfdZdefdZ dedddddddddddddfdZ!defdZ"d)dZ#d)dZ$ddefdZ%ddefdZ&d)d Z'd)d!Z(efd"Z)efd#Z* G d$ d%e+      Z, G d& d'e,(      Z-y# e	$ r dZY w xY w)*   )*z5.4.1TF    NYAMLLoadWarningc                 p    | t         S t        |       t        u r| D ]  }|t         v s| |   t         |<    y y N)_warnings_enabledtypedict)settingskeys     m/var/www/pru.catia.catastroantioquia-mas.com/tasa/lib/python3.12/site-packages/invoke/vendor/yaml/__init__.pywarningsr      sF      H~ 	7C'')1#!#&	7     c                       e Zd Zy)r   N)__name__
__module____qualname__ r   r   r   r   (   s    r   c                 ^    t         d   du ry dd l}d| z  }|j                  |t        d       y )Nr   Fr   zcalling yaml.%s() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.   )
stacklevel)r   r   warnr   )methodr   messages      r   load_warningr   +   s;    *+u4	8 		G MM'?qM9r   c              #      K    ||       }	 |j                         r#|j                          |j                         r#|j                          y# |j                          w xY ww)z9
    Scan a YAML stream and produce scanning tokens.
    N)check_token	get_tokendisposestreamLoaderloaders      r   scanr$   :   U      F^F  """$$   " 	   	A%2A A%A""A%c              #      K    ||       }	 |j                         r#|j                          |j                         r#|j                          y# |j                          w xY ww)z9
    Parse a YAML stream and produce parsing events.
    N)check_event	get_eventr   r    s      r   parser*   E   r%   r&   c                 ~     ||       }	 |j                         |j                          S # |j                          w xY w)zj
    Parse the first YAML document in a stream
    and produce the corresponding representation tree.
    )get_single_noder   r    s      r   composer-   P   s3    
 F^F%%'s   * <c              #      K    ||       }	 |j                         r#|j                          |j                         r#|j                          y# |j                          w xY ww)zb
    Parse all YAML documents in a stream
    and produce corresponding representation trees.
    N)
check_nodeget_noder   r    s      r   compose_allr1   [   sS     
 F^F!//## ! 	r&   c                     |t        d       t        } ||       }	 |j                         |j                          S # |j                          w xY w)zd
    Parse the first YAML document in a stream
    and produce the corresponding Python object.
    load)r   
FullLoaderget_single_datar   r    s      r   r3   r3   g   sE    
 ~VF^F%%'s	   = Ac              #      K   |t        d       t        } ||       }	 |j                         r#|j                          |j                         r#|j	                          y# |j	                          w xY ww)z\
    Parse all YAML documents in a stream
    and produce corresponding Python objects.
    Nload_all)r   r4   
check_dataget_datar   r    s      r   r7   r7   v   se     
 ~Z F^F!//## ! 	s   A82A# A8#A55A8c                 "    t        | t              S )z
    Parse the first YAML document in a stream
    and produce the corresponding Python object.

    Resolve all tags except those known to be
    unsafe on untrusted input.
    )r3   r4   r!   s    r   	full_loadr<           
##r   c                 "    t        | t              S )z
    Parse all YAML documents in a stream
    and produce corresponding Python objects.

    Resolve all tags except those known to be
    unsafe on untrusted input.
    )r7   r4   r;   s    r   full_load_allr?           FJ''r   c                 "    t        | t              S )z
    Parse the first YAML document in a stream
    and produce the corresponding Python object.

    Resolve only basic YAML tags. This is known
    to be safe for untrusted input.
    )r3   
SafeLoaderr;   s    r   	safe_loadrC      r=   r   c                 "    t        | t              S )z
    Parse all YAML documents in a stream
    and produce corresponding Python objects.

    Resolve only basic YAML tags. This is known
    to be safe for untrusted input.
    )r7   rB   r;   s    r   safe_load_allrE      r@   r   c                 "    t        | t              S )z
    Parse the first YAML document in a stream
    and produce the corresponding Python object.

    Resolve all tags, even those known to be
    unsafe on untrusted input.
    )r3   UnsafeLoaderr;   s    r   unsafe_loadrH      s     %%r   c                 "    t        | t              S )z
    Parse all YAML documents in a stream
    and produce corresponding Python objects.

    Resolve all tags, even those known to be
    unsafe on untrusted input.
    )r7   rG   r;   s    r   unsafe_load_allrJ      s     FL))r   c                     d}| t        j                         }|j                  } |||||||      }		 | D ]  }
|	j                  |
        	 |	j	                          |r |       S y# |	j	                          w xY w)zl
    Emit YAML parsing events into a stream.
    If stream is None, return the produced string instead.
    N)	canonicalindentwidthallow_unicode
line_break)ioStringIOgetvalueemitr   )eventsr!   DumperrL   rM   rN   rO   rP   rS   dumperevents              r   rT   rT      s     H~??Fie'J@F 	EKK	 	z  	s   A' 'A9c                 n   d}|7|t        j                         }nt        j                         }|j                  } |||||||||||	|
      }	 |j	                          | D ]  }|j                  |        |j                          |j                          |r |       S y# |j                          w xY w)z
    Serialize a sequence of representation trees into a YAML stream.
    If stream is None, return the produced string instead.
    N)
rL   rM   rN   rO   rP   encodingversiontagsexplicit_startexplicit_end)rQ   rR   BytesIOrS   open	serializecloser   )nodesr!   rV   rL   rM   rN   rO   rP   rZ   r]   r^   r[   r\   rS   rW   nodes                   r   serialize_allre      s     H~[[]FZZ\F??Fie'JwT)FF 	#DT"	#z  	s   8B" "B4c                 "    t        | g|fd|i|S )zx
    Serialize a representation tree into a YAML stream.
    If stream is None, return the produced string instead.
    rV   )re   )rd   r!   rV   kwdss       r   ra   ra      s    
 $??$??r   c                 t   d}|7|
t        j                         }nt        j                         }|j                  } |||||||||	|
|||||      }	 |j	                          | D ]  }|j                  |        |j                          |j                          |r |       S y# |j                          w xY w)z
    Serialize a sequence of Python objects into a YAML stream.
    If stream is None, return the produced string instead.
    N)default_styledefault_flow_stylerL   rM   rN   rO   rP   rZ   r[   r\   r]   r^   	sort_keys)rQ   rR   r_   rS   r`   	representrb   r   )	documentsr!   rV   ri   rj   rL   rM   rN   rO   rP   rZ   r]   r^   r[   r\   rk   rS   rW   datas                      r   dump_allro      s     H~[[]FZZ\F??F-1e'JwT)PY[F 	#DT"	#z  	s   8B% %B7c                 "    t        | g|fd|i|S )zr
    Serialize a Python object into a YAML stream.
    If stream is None, return the produced string instead.
    rV   )ro   )rn   r!   rV   rg   s       r   dumprq     s    
 TFF:6:T::r   c                 (    t        | |fdt        i|S )z
    Serialize a sequence of Python objects into a YAML stream.
    Produce only basic YAML tags.
    If stream is None, return the produced string instead.
    rV   ro   
SafeDumper)rm   r!   rg   s      r   safe_dump_allru   $  s     IvAjADAAr   c                 *    t        | g|fdt        i|S )z
    Serialize a Python object into a YAML stream.
    Produce only basic YAML tags.
    If stream is None, return the produced string instead.
    rV   rs   )rn   r!   rg   s      r   	safe_dumprw   ,  s     TFF>:>>>r   c                    |dt         j                  j                  | ||       t         j                  j                  | ||       t         j                  j                  | ||       n|j                  | ||       |j                  | ||       y)z
    Add an implicit scalar detector.
    If an implicit scalar value matches the given regexp,
    the corresponding tag is assigned to the scalar.
    first is a sequence of possible initial characters or None.
    N)r#   r"   add_implicit_resolverr4   rG   )tagregexpfirstr"   rV   s        r   ry   ry   4  ss     ~++C?//VUC11#vuE$$S&%8
  fe4r   c                    |dt         j                  j                  | ||       t         j                  j                  | ||       t         j                  j                  | ||       n|j                  | ||       |j                  | ||       y)z
    Add a path based resolver for the given tag.
    A path is a list of keys that forms a path
    to a node in the representation tree.
    Keys can be string values, integers, or None.
    N)r#   r"   add_path_resolverr4   rG   )rz   pathkindr"   rV   s        r   r~   r~   D  ss     ~''T48++Ct<--c4>  dD1
S$-r   c                     |at         j                  j                  | |       t         j                  j                  | |       t         j                  j                  | |       y|j                  | |       y)z
    Add a constructor for the given tag.
    Constructor is a function that accepts a Loader instance
    and a node object and produces the corresponding Python object.
    N)r#   r"   add_constructorr4   rG   )rz   constructorr"   s      r   r   r   S  sY     ~%%c;7))#{;++C=sK0r   c                     |at         j                  j                  | |       t         j                  j                  | |       t         j                  j                  | |       y|j                  | |       y)a  
    Add a multi-constructor for the given tag prefix.
    Multi-constructor is called for a node if its tag starts with tag_prefix.
    Multi-constructor accepts a Loader instance, a tag suffix,
    and a node object and produces the corresponding Python object.
    N)r#   r"   add_multi_constructorr4   rG   )
tag_prefixmulti_constructorr"   s      r   r   r   `  s]     ~++J8IJ//
<MN11*>OP$$Z1BCr   c                 (    |j                  | |       y)z
    Add a representer for the given type.
    Representer is a function accepting a Dumper instance
    and an instance of the given data type
    and producing the corresponding representation node.
    N)add_representer)	data_typerepresenterrV   s      r   r   r   n  s     9k2r   c                 (    |j                  | |       y)z
    Add a representer for the given type.
    Multi-representer is a function accepting a Dumper instance
    and an instance of the given data type or subtype
    and producing the corresponding representation node.
    N)add_multi_representer)r   multi_representerrV   s      r   r   r   w  s       ,=>r   c                   "     e Zd ZdZ fdZ xZS )YAMLObjectMetaclassz'
    The metaclass for YAMLObject.
    c                    t         t        |   |||       d|v r|d   t        | j                  t
              r8| j                  D ](  }|j                  | j                  | j                         * n0| j                  j                  | j                  | j                         | j                  j                  | | j                         y y y )Nyaml_tag)superr   __init__
isinstanceyaml_loaderlistr   r   	from_yamlyaml_dumperr   to_yaml)clsnamebasesrg   r#   	__class__s        r   r   zYAMLObjectMetaclass.__init__  s    !30udC$z"2">#//40!oo HF**3<<GH //cmmLOO++C= #?r   )r   r   r   __doc__r   __classcell__)r   s   @r   r   r     s    	> 	>r   r   c                   J    e Zd ZdZdZeeegZe	Z
dZdZed        Zed        Zy)
YAMLObjectza
    An object that can dump itself to a YAML stream
    and load itself from a YAML stream.
    r   Nc                 &    |j                  ||       S )zC
        Convert a representation node to a Python object.
        )construct_yaml_object)r   r#   rd   s      r   r   zYAMLObject.from_yaml  s    
 ++D#66r   c                 T    |j                  | j                  || | j                        S )zC
        Convert a Python object to a representation node.
        )
flow_style)represent_yaml_objectr   yaml_flow_style)r   rW   rn   s      r   r   zYAMLObject.to_yaml  s/    
 ++CLL$.. , 0 	0r   )r   r   r   r   	__slots__r"   r4   rG   r   rV   r   r   r   classmethodr   r   r   r   r   r   r     sO    
 I:|4KKHO7 7 0 0r   r   )	metaclassr   ).errortokensrU   rc   r#   rW   __version__cyaml__with_libyaml__ImportErrorrQ   r   r   RuntimeWarningr   r   r"   r$   r*   r-   r1   r3   r7   r<   r?   rC   rE   rH   rJ   rV   rT   re   ra   ro   rq   ru   rw   ry   r~   r   r   r   r   r	   r   r   r   r   r   <module>r      s         
 t 
7	n 	:  	   	 " 	  & 
 $($(&* Vt4t* !%Vt4td4	<   @  $Fut4td44B 6 ;B? .2F5  '+4 .1D 4: 3 @F ?>$ >0. 0A  s   C+ +C54C5