Ë
    ^Qêj¤9  ã                  ó2  — U d dl mZ d dlZd dlmZ d dlmZ d dlmZ	 d dl
mZ d dlmZ dZerd d	lmZmZ d d
lmZ ej*                  dd dk  Zded<   ej*                  dd dk\  Zded<   eefZded<   dZded<   ej:                  Zded<   esdZ ed„  e d«      D «       «      Z!ded<   d&d„Z"d'd„Z#ddœd(d„Z$d)d„Z%defdeddœ	 	 	 	 	 	 	 	 	 	 	 	 	 d*d „Zdefdeddœ	 	 	 	 	 	 	 	 	 	 	 	 	 d+d!„Z&	 d,dd d"œ	 	 	 	 	 	 	 	 	 d-d#„Z	 d,dd d"œ	 	 	 	 	 	 	 	 	 d.d$„Z'd/d%„Zy)0é    )ÚannotationsN)Ú	b64decode)Ú	b64encode)Úencodebytes)ÚError)Ú_UnspecifiedF)ÚFinalÚLiteral)ÚBufferé   )é   é   r	   Ú_SLOW_VALIDATION)r   é   Ú_PYTHON_3_15_APIÚ_BYTES_TYPESé=   Ú_EQUAL_ASCIIÚ_UNSPECIFIEDsA   ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=c              #  ó2   K  — | ]  }|t         vsŒ|–— Œ y ­w©N)Ú_BASE64_ALPHABET)Ú.0Úis     úW/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/pybase64/_fallback.pyú	<genexpr>r      s   è ø€ Ò.b°QÈÔQaÒHa¬qÑ.bùs   ‚�é   Ú_IGNORECHARS_VALIDATE_FALSEc                ó   — | dk(  sJ ‚y)Nr   Úfallback© )Úflagss    r   Ú_get_simd_namer#      s   € Ø�AŠ:Ðˆ:Øó    c                  ó   — y)Nr   r!   r!   r$   r   Ú_get_simd_pathr&   $   s   € Ør$   T©Ú	allow_strc               óÀ  — t        | t        «      r"|sd}t        |«      d ‚	 | j                  d«      S t        | t        «      r| S 	 t        | «      }|j                  s%| j                  j                  d›d�}t        |«      ‚|j                  «       S # t        $ r d}t        |«      d ‚w xY w# t        $ r' d| j                  j                  d›�}t        |«      d ‚w xY w)Nz&argument should be a bytes-like objectÚasciiz4string argument should contain only ASCII charactersÚsú': underlying buffer is not C-contiguousz<argument should be a bytes-like object or ASCII string, not )Ú
isinstanceÚstrÚ	TypeErrorÚencodeÚUnicodeEncodeErrorÚ
ValueErrorr   Ú
memoryviewÚc_contiguousÚ	__class__Ú__name__ÚBufferErrorÚtobytes)r+   r(   ÚmsgÚmvs       r   Ú
_get_bytesr;   (   sì   € Ü�!”SÔÙØ:ˆCÜ˜C“. dÐ*ð	,Ø—8‘8˜GÓ$Ð$ô �!”\Ô"Øˆð'Ü˜‹]ˆØ�ŠØ—[‘[×)Ñ)¨AÐ.Ð.UÐVˆCÜ˜cÓ"Ð"Ø�z‰z‹|Ðøô "ò 	,ØHˆCÜ˜S“/ tÐ+ð	,ûô ò 'ðØŸ;™;×/Ñ/°!Ð4ð6ð 	ô ˜‹n $Ð&ð'ús   ¢B ÁAB- ÂB*Â-0Cc                óJ   — t        | «      dk7  rd}t        |«      d ‚| dk(  ry | S )Nr   zlen(altchars) != 2ó   +/)Úlenr2   )Úaltcharsr9   s     r   Ú_validate_altcharsr@   B   s/   € Ü
ˆ8ƒ}˜ÒØ"ˆÜ˜‹o 4Ð'Ø�5ÒØØ€Or$   )ÚpaddedÚignorecharsÚ	canonicalc          
     ó–  — t        | «      } d}|�t        t        |«      «      }|t        u r|t        u}|t        ur|sd}t        |«      ‚t        r |||dœ}|t        ur||d<   t        | |fi |¤ŽS |t        urt        |d¬«      }	|�ë|t        u r<dD ]  }
|
|vsŒ|
| v sŒd} n t        j                  |d«      }| j                  |«      } n§t        d«      t        |«      z
  }t        |«      d	k(  rt        j                  |dz   d|z   «      }nCt        j                  |t        |«      z   dt        t        |«      t        d«      z
  «      z   «      }| j                  |«      } 	j                  |«      }	| }|r|t        uré|s	d}t        }	n(d
	v }t        t        |	«      t        t        «      z
  «      }	|	r| j                  d|	¬«      } |rŸ| r�| d   d
k7  r| j                  dd¬«      } n�t        | «      dz
  }|dk\  r| |   d
k(  r|dz  }|dk\  r	| |   d
k(  rŒ|dz  }t        | «      |z
  }| d| j                  dd¬«      }t        |«      dz  }|dv s
|d	k(  r|dk(  r|} n|dd|z
  z  z   } | rbt        | «      dz  }|s+|s)|dv r%| d   t        k(  s| d   t        k(  rd}t        |«      ‚|dk7  r"|s|dvr|rdnd}t        |«      ‚| dd|z
  z  z   } t        rdt        | d¬«      }d}| r8d}| d   t        k(  r|dz  }| d   t        k(  r|dz  }dt        | «      dz  z  |z
  }|t        |«      k7  rd}t        |«      ‚t        | d¬«      }|r:|r8d}| d   t        k(  r| d   dv}n| d   t        k(  r| d   dv}|rd}t        |«      ‚|rGddl}d|›�}|r|› d �}|j#                  |t$        d	¬!«       |S |› d"�}|j#                  |t&        d	¬!«       |S )#a§  Decode bytes encoded with the standard Base64 alphabet.

    Argument ``s`` is a :term:`bytes-like object` or ASCII string to
    decode.

    Optional ``altchars`` must be a :term:`bytes-like object` or ASCII
    string of length 2 which specifies the alternative alphabet used instead
    of the '+' and '/' characters.

    If ``ignorechars`` is specified, it should be a :term:`bytes-like object`
    containing characters to ignore from the input when ``validate`` is ``True``.
    If ``ignorechars`` contains the pad character ``'='``,  the pad characters
    presented before the end of the encoded data and the excess pad characters
    will be ignored.
    The default value of ``validate`` is ``True`` if ``ignorechars`` is specified,
    ``False`` otherwise.

    If ``validate`` is ``False``, characters that are neither in
    the normal base-64 alphabet nor the alternative alphabet are discarded
    prior to the padding check.
    If ``validate`` is ``True``, these non-alphabet characters in the input
    result in a :exc:`binascii.Error`.

    If ``padded`` is ``False``, padding in the input is not required or not allowed when
    ``validate`` is ``True`` and ``ignorechars`` does not contain the pad character
    ``'='``.

    If ``canonical`` is ``True``, non-zero padding bits are rejected.

    The result is returned as a :class:`bytes` object.

    A :exc:`binascii.Error` is raised if ``s`` is incorrectly padded.
    FNzBvalidate must be True or unspecified when ignorechars is specified)ÚvalidaterA   rC   rB   r'   r=   Tr   r   )Údeleteéÿÿÿÿó   =é   r   é   >   r   rI   >   r   r   éþÿÿÿzPadding not allowed>   r   r   zIncorrect paddingzInvalid len)rE   r   zNon-base64 digit foundéýÿÿÿs   AQgws   048AEIMQUYcgkoswzNon-zero padding bitsz;invalid characters '+' or '/' in Base64 data with altchars=z6 and validate=True will be an error in future versions)Ú
stacklevelz8 and validate=False will be discarded in future versions)r;   r@   r   r2   r   Úbuiltin_decodeÚbytesÚ	maketransÚ	translateÚsetr>   r   r   r   ÚBinAsciiErrorr   ÚwarningsÚwarnÚDeprecationWarningÚFutureWarning)r+   r?   rE   rA   rB   rC   Úhas_bad_charsr9   ÚkwargsÚignorechars_ÚbÚtransÚtrans_in_addÚignore_equalÚ
last_equalÚequal_countÚs2Úquad_posÚresultÚexpected_lenÚpaddingÚpadding_bitsrT   s                          r   r   r   K   sb  € ôT 	�1‹€AØ€MØÐÜ%¤j°Ó&:Ó;ˆà”<ÑØ¤lÐ2ˆàœ,Ñ&©xØRˆÜ˜‹oÐåà ØØ"ñ,
ˆð
 œlÑ*Ø$/ˆF�=Ñ!Ü˜a Ñ4¨VÑ4Ð4àœ,Ñ&Ü! +¸Ô?ˆàÐØœ,Ñ&Øò �Ø˜HÒ$¨¨aªØ$(�MÙðô —O‘O H¨eÓ4ˆEØ—‘˜EÓ"‰Aä˜u›:¬¨H«Ñ5ˆLÜ�<Ó  AÒ%äŸ™¨°5Ñ(8¸%À(Ñ:JÓK‘ô Ÿ™Øœu \Ó2Ñ2ØœE¤# h£-´#°e³*Ñ"<Ó=Ñ=ó�ð —‘˜EÓ"ˆAØ'×1Ñ1°%Ó8ˆLà�<€LÙ˜+¬\Ñ9áØˆLÜ6‰Là Ð-ˆLÜ ¤ \Ó!2´SÔ9IÓ5JÑ!JÓKˆLÙØ—‘˜D¨�Ó6ˆAÙ™AØ�‰u˜Š{Ø—K‘K ¨T�KÓ2‘ô ! ›V a™Z�
Ø! Q’¨A¨j©M¸RÒ,?Ø !‘O�Jð " Q’¨A¨j©M¸RÓ,?à˜a‘�
Ü! !›f zÑ1�Ø�{˜
�^×-Ñ-¨d¸4Ð-Ó@�Ü˜r›7 Q™;�Ø˜vÑ%Ø ’M k°QÒ&6à‘Aà˜T Q¨¡\Ñ2Ñ2�Añ 	Ü�q“6˜A‘:ˆáÙ Ø˜FÑ"Ø�2‘œ,Ò&¨!¨B©%´<Ò*?à'ˆCÜ Ó$Ð$Ø�qŠ=Ù˜¨Ñ/Ù-3Ñ)¸�Ü# CÓ(Ð(à�D˜A ™LÑ)Ñ)ˆAåÜ ¨EÔ2ˆð ˆÙØˆGà�‰uœÒ$Ø˜1‘�Ø�‰uœÒ$Ø˜1‘�Ø¤ A£¨!¡Ñ,¨wÑ6ˆLØœ3˜v›;Ò&Ø*ˆCÜ Ó$Ð$ä ¨DÔ1ˆÙ‘)àˆØˆR‰5”LÒ Ø˜R™5¨Ð/‰LØˆr‰U”lÒ"Ø˜R™5Ð(;Ð;ˆLÙØ)ˆCÜ Ó$Ð$ÙÛàKÈHÈ<ÐXˆÙØ�EÐOÐPˆCØ�M‰M˜#Ô1¸aˆMÔ@ð €Mð �EÐQÐRˆCØ�M‰M˜#œ}¸ˆMÔ;Ø€Mr$   c          
     ó6   — t        t        | |||||¬«      «      S )a«  Decode bytes encoded with the standard Base64 alphabet.

    Argument ``s`` is a :term:`bytes-like object` or ASCII string to
    decode.

    Optional ``altchars`` must be a :term:`bytes-like object` or ASCII
    string of length 2 which specifies the alternative alphabet used instead
    of the '+' and '/' characters.

    If ``ignorechars`` is specified, it should be a :term:`bytes-like object`
    containing characters to ignore from the input when ``validate`` is ``True``.
    If ``ignorechars`` contains the pad character ``'='``,  the pad characters
    presented before the end of the encoded data and the excess pad characters
    will be ignored.
    The default value of ``validate`` is ``True`` if ``ignorechars`` is specified,
    ``False`` otherwise.

    If ``validate`` is ``False``, characters that are neither in
    the normal base-64 alphabet nor the alternative alphabet are discarded
    prior to the padding check.
    If ``validate`` is ``True``, these non-alphabet characters in the input
    result in a :exc:`binascii.Error`.

    If ``padded`` is ``False``, padding in the input is not required or not allowed when
    ``validate`` is ``True`` and ``ignorechars`` does not contain the pad character
    ``'='``.

    If ``canonical`` is ``True``, non-zero padding bits are rejected.

    The result is returned as a :class:`bytearray` object.

    A :exc:`binascii.Error` is raised if ``s`` is incorrectly padded.
    )r?   rE   rA   rB   rC   )Ú	bytearrayr   )r+   r?   rE   rA   rB   rC   s         r   Úb64decode_as_bytearrayri   ý   s,   € ôT ÜØØØØØ#Øô	
ó	ð 	r$   ©rA   Úwrapcolc          	     óæ  ‡‡— t        | «      }|j                  s%| j                  j                  d›d�}t	        |«      ‚|�t        t        |«      «      }|dk  rd}t        |«      ‚t        rt        | |||¬«      S t        | |«      Š‰r%|s#‰d   t        k(  r‰dd Šn‰d   t        k(  r‰dd Š|dk(  s‰s‰S |d	z  d	z  xs d	Šd
j                  ˆˆfd„t        dt        ‰«      ‰«      D «       «      S )a  Encode bytes using the standard Base64 alphabet.

    Argument ``s`` is a :term:`bytes-like object` to encode.

    Optional ``altchars`` must be a byte string of length 2 which specifies
    an alternative alphabet for the '+' and '/' characters.  This allows an
    application to e.g. generate url or filesystem safe Base64 strings.

    Optional ``padded`` specifies whether to pad the encoded data with the '='
    character to a size multiple of 4.

    Optional ``wrapcol`` specifies after how many characters the output should
    be split with a newline character (``b'\n'``).  The value is rounded down
    to the nearest multiple of 4.  If ``wrapcol`` is 0 (the default), no
    newlines are added.

    The result is returned as a :class:`bytes` object.
    r+   r,   Nr   zwrapcol must be >= 0rj   rK   rG   rJ   ó   
c              3  ó.   •K  — | ]  }‰||‰z    –— Œ y ­wr   r!   )r   r   Úeffective_wrapcolÚencodeds     €€r   r   zb64encode.<locals>.<genexpr>a  s#   øè ø€ ò Ø/0ˆ��AÐ)Ñ)Ô*ñùs   ƒ)r3   r4   r5   r6   r7   r@   r;   r2   r   Úbuiltin_encoder   ÚjoinÚranger>   )r+   r?   rA   rk   r:   r9   ro   rp   s         @@r   r   r   3  s  ù€ ô2 
�A‹€BØ�?Š?Ø—‘×%Ñ%¨Ð*Ð*QÐRˆÜ˜#ÓÐØÐÜ%¤j°Ó&:Ó;ˆØ�‚{Ø$ˆÜ˜‹oÐÝÜ˜a °&À'ÔJÐJÜ˜Q Ó)€GÙ‘và�2‰;œ,Ò&Ø˜c˜r�l‰GØ�R‰[œLÒ(Ø˜c˜r�lˆGØ�!‚|™7ØˆØ  A™¨Ñ*Ò/¨aÐØ�:‰:ô Ü49¸!¼SÀ»\ÐK\Ó4]ôó ð r$   c               ó>   — t        | |||¬«      j                  d«      S )aÿ  Encode bytes using the standard Base64 alphabet.

    Argument ``s`` is a :term:`bytes-like object` to encode.

    Optional ``altchars`` must be a byte string of length 2 which specifies
    an alternative alphabet for the '+' and '/' characters.  This allows an
    application to e.g. generate url or filesystem safe Base64 strings.

    Optional ``padded`` specifies whether to pad the encoded data with the '='
    character to a size multiple of 4.

    Optional ``wrapcol`` specifies after how many characters the output should
    be split with a newline character (``'\n'``).  The value is rounded down
    to the nearest multiple of 4.  If ``wrapcol`` is 0 (the default), no
    newlines are added.

    The result is returned as a :class:`str` object.
    rj   r*   )r   Údecode)r+   r?   rA   rk   s       r   Úb64encode_as_stringrv   f  s    € ô2 �Q˜¨¸ÔA×HÑHÈÓQÐQr$   c                ó�   — t        | «      }|j                  s%| j                  j                  d›d�}t	        |«      ‚t        | «      S )a,  Encode bytes into a bytes object with newlines (b'\n') inserted after
    every 76 bytes of output, and ensuring that there is a trailing newline,
    as per :rfc:`2045` (MIME).

    Argument ``s`` is a :term:`bytes-like object` to encode.

    The result is returned as a :class:`bytes` object.
    r+   r,   )r3   r4   r5   r6   r7   Úbuiltin_encodebytes)r+   r:   r9   s      r   r   r   ‚  sD   € ô 
�A‹€BØ�?Š?Ø—‘×%Ñ%¨Ð*Ð*QÐRˆÜ˜#ÓÐÜ˜qÓ!Ð!r$   )r"   ÚintÚreturnr.   )rz   ry   )r+   ústr | Bufferr(   Úboolrz   úbytes | bytearray)r?   r}   rz   zbytes | bytearray | None)r+   r{   r?   ústr | Buffer | NonerE   ú(bool | Literal[_Unspecified.UNSPECIFIED]rA   r|   rB   ú*Buffer | Literal[_Unspecified.UNSPECIFIED]rC   r|   rz   rO   )r+   r{   r?   r~   rE   r   rA   r|   rB   r€   rC   r|   rz   rh   r   )
r+   r   r?   r~   rA   r|   rk   ry   rz   rO   )
r+   r   r?   r~   rA   r|   rk   ry   rz   r.   )r+   r   rz   rO   )(Ú
__future__r   ÚsysÚbase64r   rN   r   rq   r   rx   Úbinasciir   rS   Úpybase64._unspecifiedr   ÚTYPE_CHECKINGÚtypingr	   r
   Úpybase64._typingr   Úversion_infor   Ú__annotations__r   rO   rh   r   r   ÚUNSPECIFIEDr   r   rs   r   r#   r&   r;   r@   ri   rv   r!   r$   r   ú<module>rŒ      s)  ðÞ "ã 
Ý .Ý .Ý 5Ý +å .à€Ùß%å'ð ×*Ñ*¨2¨AÐ.°Ñ8Ð �%Ó 8Ø×*Ñ*¨2¨AÐ.°'Ñ9Ð �%Ó 9Ø˜iÐ(€ˆeÓ (Ø€ˆeÓ Ø"×.Ñ.€ˆeÓ .áà[Ðá).Ñ.b¹%À»*Ô.bÓ)bÐ Óbóó
ð 6:õ 'ó4ð %)Ø9Eðoð
 Ø>JØñoØðoà!ðoð 7ðoð
 ðoð <ðoð ðoð óoðh %)Ø9Eð3ð
 Ø>JØñ3Øð3à!ð3ð 7ð3ð
 ð3ð <ð3ð ð3ð ó3ðp %)ð0ð Øñ0Øð0à!ð0ð ð	0ð
 ð0ð ó0ðj %)ðRð ØñRØðRà!ðRð ð	Rð
 ðRð 	óRô8"r$   