ó
    Eñi¼—  ã                  ó4  • % S SK Jr  S SKrS SKJr  S SKJr  SSKJrJ	r	J
r
Jr  SSKJrJrJrJrJr  SSKJr  SS	KJrJr  SS
KJrJrJrJrJrJr  \R<                  " S5      r\R@                  " 5       r!\!RE                  \RF                  " S5      5        / r$S\%S'   / r&S\%S'   \ H5  r' \" \'5      (       a  \$RQ                  \'5        M$  \&RQ                  \'5        M7     \$\&-   r*S\%S'            S                     SS jjr+         S                     SS jjr,         S                     SS jjr-         S                     SS jjr.g! \) a    \&RQ                  \'5         Mò  f = f)é    )ÚannotationsN)ÚPathLike)ÚBinaryIOé   )Úcoherence_ratioÚencoding_languagesÚmb_encoding_languagesÚmerge_coherence_ratios)ÚIANA_SUPPORTEDÚIANA_SUPPORTED_SIMILARÚTOO_BIG_SEQUENCEÚTOO_SMALL_SEQUENCEÚTRACE)Ú
mess_ratio)ÚCharsetMatchÚCharsetMatches)Úany_specified_encodingÚcut_sequence_chunksÚ	iana_nameÚidentify_sig_or_bomÚis_multi_byte_encodingÚshould_strip_sig_or_bomÚcharset_normalizerz)%(asctime)s | %(levelname)s | %(message)sz	list[str]Ú_mb_supportedÚ_sb_supportedÚIANA_SUPPORTED_MB_FIRSTc
                óÄ!  • [        U [        [        45      (       d#  [        SR	                  [        U 5      5      5      eU(       aB  [        R                  n
[        R                  [        5        [        R                  [        5        [        U 5      nUS:X  ad  [        R                  S5        U(       a.  [        R                  [        5        [        R                  W
5        [        [!        U SSS/ S5      /5      $ UbG  [        R#                  [        S	S
R%                  U5      5        U Vs/ s H  n['        US5      PM     nnO/ nUbG  [        R#                  [        SS
R%                  U5      5        U Vs/ s H  n['        US5      PM     nnO/ nX²U-  ::  a!  [        R#                  [        SUUU5        SnUnUS:”  a  X±-  U:  a  [)        X±-  5      n[        U 5      [*        :  n[        U 5      [,        :¬  nU(       a*  [        R#                  [        SR	                  U5      5        O0U(       a)  [        R#                  [        SR	                  U5      5        / nU(       a  [/        U 5      OSnUb,  UR1                  U5        [        R#                  [        SU5        [3        5       n/ n/ n[3        5       n[3        5       n0 nSn[3        5       nSnSnSnSnSnSn[        5       n[        5       n [5        U 5      u  n!n"U!b6  UR1                  U!5        [        R#                  [        S[        U"5      U!5        UR1                  S5        SU;  a  UR1                  S5        U[6        -    G
H¬  n#U(       a  U#U;  a  M  U(       a  U#U;   a  M"  U#U;   a  M*  UR9                  U#5        Sn$U!U#:H  n%U%=(       a    [;        U#5      n&U#S;   a$  U%(       d  [        R#                  [        SU#5        M€  U#S;   a$  U%(       d  [        R#                  [        SU#5        Mª  U#U;   a  [        R#                  [        SU#5        MÍ  U#U;   a  [        R#                  [        SU#5        Mð   [=        U#5      n'U(       af  U'(       d  [3        [C        U#5      5      n(O[3        [E        U#5      5      n(U(RG                  U5      (       d   [        R#                  [        SU#U(U5        GMi  U(       a-  U'(       d&  UU:¼  a   [        R#                  [        SU#UU5        GM�  U(       a%  U'(       d  [        R#                  [        SU#5        GMÉ   U(       a8  U'SL a3  [I        U&SL a  U S[)        S5       OU [        U"5      [)        S5       U#S9  OKU#S :X  a'  U%(       a   [I        U U#S9n$U$(       a  U$S   S!:X  a  U$SS n$O[I        U&SL a  U OU [        U"5      S U#S9n$ [O        U%(       d  SO
[        U"5      U[)        X±-  5      5      n*U'=(       a    U$SL=(       a    [        U$5      U:  n+U+(       a  [        R#                  [        S#U#5        U$Gb&  U'(       Gd  [Q        U$5      n,URS                  U,5      n-U-Gbþ  U-u  n.n/n0U0(       GaŒ  [!        U U#U.U%U/USL d	  U#USS4;   a  U$OSUS$9n1UR1                  U15        UR9                  U#5        [        R#                  [        S%U#[U        U.S&-  S'S(95        U#USS4;   a€  U.S):  az  U.S:X  ac  [        R                  S*U1RV                  5        U(       a.  [        R                  [        5        [        R                  W
5        [        U1/5      s  $ U R1                  U15        [        U 5      (       aˆ  Ub  UU;   a  SU;   ay  SU;   as  U RY                  5       n2[        R                  S*U2RV                  5        U(       a.  [        R                  [        5        [        R                  W
5        [        U2/5      s  $ GMˆ  UR1                  U#5        [        R#                  [        S+U#5        U	(       a.  U#SSUS,S-4;   a#  [!        U U#UU%/ U$US$9n3U#U:X  a  U3nOU#S:X  a  U3nOU3nGMì  [)        [        U*5      S.-  5      n4[[        U4S/5      n4Sn5Sn6/ n7/ n8 []        U U#U*UU%U&U"U'U$5	       H{  n9U7R1                  U95        U8R1                  [_        U9UUS0L =(       a    S[        U5      s=:*  =(       a    S/:*  Os  5      5        U8S1   U:¼  a  U5S-  n5U5U4:¼  d  U%(       d  Mt  U&SL d  M{    O    U6(       d+  U(       a$  U'(       d   U [)        S35      S Ra                  U#S4S59  U8(       a  [c        U85      [        U85      -  OSn:U:U:¼  d  U5U4:¼  aÂ  UR1                  U#5        U#[d        ;   a  URg                  [d        U#   5        U$b%  U'(       d  URi                  [Q        U$5      U:/ S45        [        R#                  [        S7U#U5[U        U:S&-  S'S(95        U	(       a5  U#SSUS,S-4;   a*  U6(       d#  [!        U U#UU%/ U$US$9n3U#U:X  a  U3nOU#S:X  a  U3nOU3nGMË  [        R#                  [        S8U#[U        U:S&-  S'S(95        U'(       d  [C        U#5      n;O[E        U#5      n;U;(       a3  [        R#                  [        S9R	                  U#[I        U;5      5      5        / n<U#S:w  aK  U7 H9  n9[k        U9UU;(       a  S:R%                  U;5      OS5      n=U<R1                  U=5        M;     [m        U<5      n>O[m        U<5      n>U>(       a*  [        R#                  [        S;R	                  U>U#5      5        [!        U U#U:U%U>USL d	  U#USS4;   a  U$OSUS$9n?UR1                  U?5        U$b%  U'(       d  URi                  [Q        U$5      U:U>S045        U(       a  U'(       d  U:S<:  a  US-  nU#USS4;   a€  U:S):  az  U:S:X  ac  [        R                  S*U?RV                  5        U(       a.  [        R                  [        5        [        R                  W
5        [        U?/5      s  $ U R1                  U?5        [        U 5      (       aˆ  Ub  UU;   a  SU;   ay  SU;   as  U RY                  5       n2[        R                  S*U2RV                  5        U(       a.  [        R                  [        5        [        R                  W
5        [        U2/5      s  $ U(       dc  U'(       d\  U>(       a  [[        S= U> 5       SS>9OSn@U@S?:¼  a<  SU;   a6  SU;   a0  S0nURg                  U;5        [        R#                  [        S@U#U:W@5        U(       dn  U'(       ag  U+(       a`  U$b]  [        U$5      USA-  :  aK  U#SB;  aE  SU;   a?  SU;   a9  S0n[        R#                  [        SCU#U:[        U$5      U[        U$5      U-  S&-  5        U#U!:X  d  G
MS  [        R                  SDU#5        U(       a.  [        R                  [        5        [        R                  W
5        [        UU#   /5      s  $    [        U5      S:X  añ  U(       d  U(       d  U(       a  [        R#                  [        SE5        U(       a2  [        R                  SFURV                  5        UR1                  U5        O‰U(       a  Ub+  U(       a!  U(       a  URn                  URn                  :w  d  Ub'  [        R                  SG5        UR1                  U5        O-U(       a&  [        R                  SH5        UR1                  U5        U(       a<  [        R                  SIURY                  5       RV                  [        U5      S-
  5        O[        R                  SJ5        U(       a.  [        R                  [        5        [        R                  W
5        U$ s  snf s  snf ! [>        [@        4 a     [        R#                  [        SU#5         GMy  f = f! [J        [L        4 aW  n)[        U)[L        5      (       d%  [        R#                  [        S"U#[I        U)5      5        UR1                  U#5         Sn)A)GMß  Sn)A)ff = f! [J         a4  n)[        R#                  [        S2U#[I        U)5      5        U4n5S0n6 Sn)A)GNuSn)A)ff = f! [J         aB  n)[        R#                  [        S6U#[I        U)5      5        UR1                  U#5         Sn)A)GMo  Sn)A)ff = f)Ka2  
Given a raw bytes sequence, return the best possibles charset usable to render str objects.
If there is no results, it is a strong indicator that the source is binary/not text.
By default, the process will extract 5 blocks of 512o each to assess the mess and coherence of a given sequence.
And will give up a particular code page after 20% of measured mess. Those criteria are customizable at will.

The preemptive behavior DOES NOT replace the traditional detection workflow, it prioritize a particular code page
but never take it for granted. Can improve the performance.

You may want to focus your attention to some code page or/and not others, use cp_isolation and cp_exclusion for that
purpose.

This function will strip the SIG in the payload/sequence every time except on UTF-16, UTF-32.
By default the library does not setup any handler other than the NullHandler, if you choose to set the 'explain'
toggle to True it will alter the logger configuration to add a StreamHandler that is suitable for debugging.
Custom logging format and handler can be set manually.
z3Expected object of type bytes or bytearray, got: {}r   z<Encoding detection on empty bytes, assuming utf_8 intention.Úutf_8g        FÚ Nz`cp_isolation is set. use this flag for debugging purpose. limited list of encoding allowed : %s.z, zacp_exclusion is set. use this flag for debugging purpose. limited list of encoding excluded : %s.z^override steps (%i) and chunk_size (%i) as content does not fit (%i byte(s) given) parameters.r   z>Trying to detect encoding from a tiny portion of ({}) byte(s).zIUsing lazy str decoding because the payload is quite large, ({}) byte(s).z@Detected declarative mark in sequence. Priority +1 given for %s.é   zIDetected a SIG or BOM mark on first %i byte(s). Priority +1 given for %s.Úascii>   Úutf_16Úutf_32z\Encoding %s won't be tested as-is because it require a BOM. Will try some sub-encoder LE/BE.>   Úutf_7zREncoding %s won't be tested as-is because detection is unreliable without BOM/SIG.zY%s is deemed too similar to a code page that was already considered unsuited. Continuing!zESkipping %s: already fast-tracked from a similar successful encoding.z2Encoding %s does not provide an IncrementalDecoderzbSkipping %s: definitive match already found, this encoding targets different languages (%s vs %s).zXSkipping %s: already accumulated %d same-family results after definitive match (cap=%d).zCSkipping single-byte %s: multi-byte definitive match already found.g    €„A)Úencodingr$   u   ï»¿z9Code page %s does not fit given bytes sequence at ALL. %szpCode page %s is a multi byte encoding table and it appear that at least one character was encoded using n-bytes.)Úpreemptive_declarationzM%s fast-tracked (identical decoded payload to a prior encoding, chaos=%f %%).éd   é   )Úndigitsçš™™™™™¹?z.Encoding detection: %s is most likely the one.zZ%s fast-skipped (identical decoded payload to a prior encoding that failed chaos probing).r"   r#   é   é   TéÿÿÿÿzaLazyStr Loading: After MD chunk decode, code page %s does not fit given bytes sequence at ALL. %sg     jè@Ústrict)Úerrorsz^LazyStr Loading: After final lookup, code page %s does not fit given bytes sequence at ALL. %szc%s was excluded because of initial chaos probing. Gave up %i time(s). Computed mean chaos is %f %%.z=%s passed initial chaos probing. Mean measured chaos is %f %%z&{} should target any language(s) of {}Ú,z We detected language {} using {}g{®Gáz”?c              3  ó*   #   • U  H	  u  pUv •  M     g 7f)N© )Ú.0Ú_Úvs      ÚS/home/mande/repo/quber/.venv/lib/python3.13/site-packages/charset_normalizer/api.pyÚ	<genexpr>Úfrom_bytes.<locals>.<genexpr>ö  s   é € Ð4Ò#3™4˜1•QÒ#3ùs   ‚)Údefaultg      à?zyDefinitive match found: %s (chaos=%.3f, coherence=%.2f). Encodings targeting different language families will be skipped.g\�Âõ(\ï?>	   r$   r   r"   r#   Ú	utf_16_beÚ	utf_16_leÚ	utf_32_beÚ	utf_32_leÚ	utf_8_sigzjMulti-byte definitive match: %s (chaos=%.3f, decoded=%d/%d=%.1f%%). Single-byte encodings will be skipped.zoEncoding detection: %s is most likely the one as we detected a BOM or SIG within the beginning of the sequence.zONothing got out of the detection process. Using ASCII/UTF-8/Specified fallback.z7Encoding detection: %s will be used as a fallback matchz:Encoding detection: utf_8 will be used as a fallback matchz:Encoding detection: ascii will be used as a fallback matchz]Encoding detection: Found %s as plausible (best-candidate) for content. With %i alternatives.z=Encoding detection: Unable to determine any suitable charset.)8Ú
isinstanceÚ	bytearrayÚbytesÚ	TypeErrorÚformatÚtypeÚloggerÚlevelÚ
addHandlerÚexplain_handlerÚsetLevelr   ÚlenÚdebugÚremoveHandlerr   r   ÚlogÚjoinr   Úintr   r   r   ÚappendÚsetr   r   Úaddr   r   ÚModuleNotFoundErrorÚImportErrorr   r	   ÚintersectionÚstrÚUnicodeDecodeErrorÚLookupErrorÚrangeÚhashÚgetÚroundr%   ÚbestÚmaxr   r   ÚdecodeÚsumr   ÚupdateÚ
setdefaultr   r
   Úfingerprint)AÚ	sequencesÚstepsÚ
chunk_sizeÚ	thresholdÚcp_isolationÚcp_exclusionÚpreemptive_behaviourÚexplainÚlanguage_thresholdÚenable_fallbackÚprevious_logger_levelÚlengthÚcpÚis_too_small_sequenceÚis_too_large_sequenceÚprioritized_encodingsÚspecified_encodingÚtestedÚtested_but_hard_failureÚtested_but_soft_failureÚsoft_failure_skipÚsuccess_fast_trackedÚpayload_result_cacheÚdefinitive_match_foundÚdefinitive_target_languagesÚ post_definitive_sb_success_countÚPOST_DEFINITIVE_SB_CAPÚmb_definitive_match_foundÚfallback_asciiÚfallback_u8Úfallback_specifiedÚresultsÚearly_stop_resultsÚsig_encodingÚsig_payloadÚencoding_ianaÚdecoded_payloadÚbom_or_sig_availableÚstrip_sig_or_bomÚis_multi_byte_decoderÚenc_languagesÚeÚr_Úmulti_byte_bonusÚpayload_hashÚcachedÚcached_messÚ	cached_cdÚcached_passedÚ
fast_matchÚprobable_resultÚfallback_entryÚmax_chunk_gave_upÚearly_stop_countÚlazy_str_hard_failureÚ	md_chunksÚ	md_ratiosÚchunkÚmean_mess_ratioÚtarget_languagesÚ	cd_ratiosÚchunk_languagesÚcd_ratios_mergedÚcurrent_matchÚbest_coherencesA                                                                    r6   Ú
from_bytesr¥   9   sJ  € ô< �i¤)¬UÐ!3×4Ñ4ÜØA×HÑHÜ�Y“óó
ð 	
ö Ü%+§\¡\ÐÜ×Ñœ/Ô*Ü�‰œÔä�i“.€Fà�ƒ{Ü�‰ÐSÔTÞÜ× Ñ ¤Ô1Ü�O‰OÐ1Ô2Üœ|¨I°wÀÀUÈBÐPRÓSÐTÓUÐUàÑÜ�
‰
Üð5à�I‰I�lÓ#ô		
ñ 8DÓD²|°œ	 " eÖ,±|ˆÐDˆàˆàÑÜ�
‰
Üð6à�I‰I�lÓ#ô		
ñ 8DÓD²|°œ	 " eÖ,±|ˆÐDˆàˆà˜uÑ$Ó%Ü�
‰
ÜØlØØØô	
ð ˆØˆ
àˆqƒy�V‘^ jÓ0Ü˜™Ó(ˆ
ä"% i£.Ô3EÑ"EÐÜ"% i£.Ô4DÑ"DÐæÜ�
‰
ÜØL×SÑSØóõ	
ö 
Ü�
‰
ÜØW×^Ñ^Øóô	
ð (*Ðö .BÔ˜yÔ)Àtð ð Ñ%Ø×$Ñ$Ð%7Ô8Ü�
‰
ÜØNØô	
ô “u€FØ)+ÐØ)+ÐÜ"%£%ÐÜ%(£UÐð
 TVÐð $)ÐÜ,/«EÐð -.Ð$Ø"#Ðð ',Ðà*.€NØ'+€KØ.2Ðä,Ó.€Gä)7Ó)9Ðä 3°IÓ >Ñ€L�+àÑØ×$Ñ$ \Ô2Ü�
‰
ÜØWÜ�ÓØô		
ð × Ñ  Ô)àÐ+Ó+Ø×$Ñ$ WÔ-à.Ô1HÕHˆÞ˜M°Ó=Ùæ˜M¨\Ó9Ùà˜FÓ"Ùà�
‰
�=Ô!à&*ˆØ%1°]Ñ%BÐØ!5÷ "
Ô:QØó;
Ðð Ð0Ó0Ö9MÜ�J‰JÜØnØôñ
 Ø˜IÓ%Ö.BÜ�J‰JÜØdØôñ
 ð Ð-Ó-Ü�J‰JÜØkØôñ
 ð Ð0Ó0Ü�J‰JÜØWØôñ
 ð	Ü*@ÀÓ*OÐ!ö "Þ(Ü #Ô$6°}Ó$EÓ F‘ä #Ô$9¸-Ó$HÓ I�Ø ×-Ñ-Ð.I×JÑJÜ—
‘
ÜØxØ!Ø!Ø/ôò ö #Þ)Ø0Ð4JÓJä�J‰JÜØjØØ0Ø&ôò ö
 %Ö-BÜ�J‰JÜØUØôò
 ð*	Þ$Ð)>À%Ò)GÜð ,¨uÒ4ð " +¤C¨£IÑ.à&¤s¨;Ó'7¼#¸d»)ÐDà*óð ! GÓ+Ö0DÜ&)Ø!Ø!.ñ'�Oö '¨?¸1Ñ+=ÀÓ+IØ*9¸!¸"Ð*=˜øä&)ð  0°5Ò8ñ &à!*¬3¨{Ó+;Ð+=Ð!>à!.ñ'‘Oô& Þ)‰A¬s°;Ó/?ØÜ�‘Óó
ˆð "÷ .Ø tÐ+÷.ä�OÓ$ vÑ-ð 	ö Ü�J‰JÜð-àô	ð Ò&×/DÜ $ _Ó 5ˆLØ)×-Ñ-¨lÓ;ˆFØÒ!Ø8>Ñ5�˜Y¨ß ä!-Ø!Ø%Ø#Ø,Ø!ð !6¸Ò >Ø#0Ø$6¸ÀÐ#Ió$Jñ ,ð "&à/Añ"�Jð" —N‘N :Ô.Ø(×,Ñ,¨]Ô;Ü—J‘JÜØgØ%Ü˜k¨CÑ/¸Ñ;ô	ð &Ð*<¸gÀwÐ)OÓOØ'¨#Ó-à&¨#Ó-Ü"ŸL™LØ PØ *× 3Ñ 3ôö  'Ü &× 4Ñ 4´_Ô EÜ &§¡Ð0EÔ FÜ#1°:°,Ó#?Ò?Ø*×1Ñ1°*Ô=ô Ð.×/Ñ/Ø/Ñ7Ð;MÐQWÓ;WØ# vÓ-Ø# vÓ-à8J×8OÑ8OÓ8Q˜ÜŸ™ØLØ+×4Ñ4ôö #Ü"×0Ñ0´ÔAÜ"ŸO™OÐ,AÔBÜ-¨Ð.?Ó@Ò@âð ,×2Ñ2°=ÔAÜ—J‘JÜØtØ%ôö '¨=ØØØ*Ø Ø ð=ó ,ô *6Ø%Ø)Ø%Ø0ØØ+Ø3Eñ*˜ð )Ð,>Ó>Ø1?Ñ.Ø*¨gÓ5Ø-;™Nà*8˜KÚä!$¤S¨£W¨q¡[Ó!1ÐäÐ 1°1Ó5ÐØ !ÐØ %Ðà!ˆ	Øˆ	ð'	)Ü,ØØØØØ$Ø ØØ%Øö
�ð × Ñ  Ô'à× Ñ ÜØØ!Ø 4˜×G¨A´°\Ó1B×,GÓ,GÀaÔ,Góôð ˜R‘= IÓ-Ø$¨Ñ)Ð$à$Ð(9Ó9ß(Ð(Ð-=ÀÔ-Fáò7
öV &Þ%Þ)ð
Øœ#˜d›)˜+Ð&×-Ñ-¨mÀHÐ-ÑMö EN¤ Y£´#°i³.Ò!@ÐSVˆØ˜iÓ'Ð+;Ð?PÓ+PØ#×*Ñ*¨=Ô9ØÔ 6Ó6Ø!×(Ñ(Ô)?ÀÑ)NÔOð Ñ*Ö3HØ$×/Ñ/Ü˜Ó)¨O¸RÀÐ+Gôô �J‰JÜð0àØ Ü�o¨Ñ+°QÑ7ôö  Ø!Ø˜WÐ&8¸(ÀHÐMóNæ-ä!-ØØ!ØØ(ØØ#Ø+=ñ"�ð !Ð$6Ó6Ø)7Ñ&Ø" gÓ-Ø%3‘Nà"0�KÚä�
‰
ÜØKØÜ�/ CÑ'°Ñ3ô		
ö %Ü*<¸]Ó*KÑä4°]ÓCÐæÜ�J‰JÜØ8×?Ñ?Ø!¤3Ð'7Ó#8óôð ˆ	ð ˜GÓ#ó #�Ü"1ØØ&Þ2B�C—H‘HÐ-Ô.Èó#�ð × Ñ  Ö1ñ #ô  6°iÓ@Ñä5°iÓ@ÐæÜ�J‰JÜØ2×9Ñ9Ø$ móôô %ØØØØ Øð *¨UÒ2Ø$Ð);¸WÀgÐ(NÓNñ  ð
 à#5ñ
ˆð" 	�‰�}Ô%ð Ñ&Ö/DØ ×+Ñ+Ü�_Ó%Ø Ð"2°DÐ9ôö #Þ)Ø $Ó&à,°Ñ1Ð,ð Ð0°'¸7ÐCÓCØ #Ó%ð  #Ó%Ü—‘ØDØ!×*Ñ*ôö Ü×(Ñ(¬Ô9Ü—O‘OÐ$9Ô:Ü% } oÓ6Ò6à×%Ñ% mÔ4ô Ð"×#Ñ#Ø#Ñ+Ð/AÀVÓ/KØ˜6Ó!Ø˜6Ó!à0×5Ñ5Ó7ˆOÜ�L‰LØ@Ø×(Ñ(ôö Ü×$Ñ$¤_Ô5Ü—‘Ð 5Ô6ä! ?Ð"3Ó4Ò4ö &Ö.Cö $ô Ñ4Ñ#3Ó4¸cÒBàð ð
  Ó$¨°FÓ):¸wÈ&Ó?PØ)-Ð&Ø+×2Ñ2Ð3CÔDÜ—
‘
Üð PØ!Ø#Ø"ôö *Þ%Þ ØÑ+Ü�OÓ$ v°¡}Ó4Øð
óð ˜6Ó!Ø˜6Ó!à(,Ð%Ü�J‰JÜØ|ØØÜ�OÓ$ØÜ�OÓ$ vÑ-°Ñ3ôð ˜LÖ(Ü�L‰Lð1àôö
 Ü×$Ñ$¤_Ô5Ü—‘Ð 5Ô6Ü! 7¨=Ñ#9Ð":Ó;Ò;ñI IôL ˆ7ƒ|�qÓÞž.Ö,>Ü�J‰JÜØaôö
 Ü�L‰LØIØ"×+Ñ+ôð �N‰NÐ-Õ.æ˜^Ñ3æÞ"Ø×+Ñ+¨~×/IÑ/IÓIàÑ'ä�L‰LÐUÔVØ�N‰N˜;Õ'ÞÜ�L‰LÐUÔVØ�N‰N˜>Ô*æÜ�‰ØkØ�L‰L‹N×#Ñ#Ü�‹L˜1Ñõ	
ô 	�‰ÐTÔUæÜ×Ñœ_Ô-Ü�‰Ð-Ô.à€NùòU Eùò EøôL $¤[Ð1ó 	Ü�J‰JÜØDØôó
 ð	ûôt #¤KÐ0ó 		Ü˜a¤×-Ñ-Ü—
‘
ÜØOØ!Ü˜“Fô	ð $×*Ñ*¨=Ô9Þûð		ûôX ó
	)ô �J‰JÜØsØÜ�A“ô	ð  1ÐØ$(Ö!ûð
	)ûô* &ó Ü—
‘
ÜØtØ!Ü˜“Fô	ð (×.Ñ.¨}Ô=Þûðús›   Ä.~+Å:~0Ñ~5Ô5>(Õ4,(Ö!(âBAAä
AAäAAäAAä,ABþ5+%ÿ$%ÿ(AAÿ8AAA
ÁA
AAÁA
ABÁA)ABÁBABÁB
ACÁB6ACÁCACc
                óF   • [        U R                  5       UUUUUUUUU	5
      $ )zz
Same thing than the function from_bytes but using a file pointer that is already ready.
Will not close the file pointer.
)r¥   Úread)
Úfpre   rf   rg   rh   ri   rj   rk   rl   rm   s
             r6   Úfrom_fpr©   `  s5   € ô  Ø
�‰‹	ØØØØØØØØØóð ó    c
                óx   • [        U S5       n
[        U
UUUUUUUUU	5
      sSSS5        $ ! , (       d  f       g= f)z‰
Same thing than the function from_bytes but with one extra step. Opening and reading given file path in binary mode.
Can raise IOError.
ÚrbN)Úopenr©   )Úpathre   rf   rg   rh   ri   rj   rk   rl   rm   r¨   s              r6   Ú	from_pathr¯   ~  sB   € ô  
ˆd�DÔ	˜RÜØØØØØØØ ØØØó
÷ 
×	×	ús   �+«
9c
                ó  • [        U [        [        45      (       a  [        U UUUUUUUUU	S9
n
U
(       + $ [        U [        [
        45      (       a  [        U UUUUUUUUU	S9
n
U
(       + $ [        U UUUUUUUUU	S9
n
U
(       + $ )a  
Detect if the given input (file, bytes, or path) points to a binary file. aka. not a string.
Based on the same main heuristic algorithms and default kwargs at the sole exception that fallbacks match
are disabled to be stricter around ASCII-compatible but unlikely to be a string.
)	re   rf   rg   rh   ri   rj   rk   rl   rm   )r?   rV   r   r¯   rA   r@   r¥   r©   )Úfp_or_path_or_payloadre   rf   rg   rh   ri   rj   rk   rl   rm   Úguessess              r6   Ú	is_binaryr³   �  sÏ   € ô" Ð'¬#¬x¨×9Ñ9ÜØ!ØØ!ØØ%Ø%Ø!5ØØ1Ø+ñ
ˆðZ Œ;ÐôC 
ØäÜð	
÷
ñ 
ô Ø!ØØ!ØØ%Ø%Ø!5ØØ1Ø+ñ
ˆð4 Œ;Ðô Ø!ØØ!ØØ%Ø%Ø!5ØØ1Ø+ñ
ˆð Œ;Ðrª   )	é   é   çš™™™™™É?NNTFr*   T)rd   zbytes | bytearrayre   rO   rf   rO   rg   Úfloatrh   úlist[str] | Noneri   r¸   rj   Úboolrk   r¹   rl   r·   rm   r¹   Úreturnr   )r¨   r   re   rO   rf   rO   rg   r·   rh   r¸   ri   r¸   rj   r¹   rk   r¹   rl   r·   rm   r¹   rº   r   )r®   zstr | bytes | PathLikere   rO   rf   rO   rg   r·   rh   r¸   ri   r¸   rj   r¹   rk   r¹   rl   r·   rm   r¹   rº   r   )	r´   rµ   r¶   NNTFr*   F)r±   z!PathLike | str | BinaryIO | bytesre   rO   rf   rO   rg   r·   rh   r¸   ri   r¸   rj   r¹   rk   r¹   rl   r·   rm   r¹   rº   r¹   )/Ú
__future__r   ÚloggingÚosr   Útypingr   Úcdr   r   r	   r
   Úconstantr   r   r   r   r   Úmdr   Úmodelsr   r   Úutilsr   r   r   r   r   r   Ú	getLoggerrE   ÚStreamHandlerrH   ÚsetFormatterÚ	Formatterr   Ú__annotations__r   Ú_supported_encrP   rT   r   r¥   r©   r¯   r³   r2   rª   r6   Ú<module>rÊ      s2  ðÞ "ã Ý Ý ÷ó ÷õ õ ß 0÷÷ ð 
×	Ò	Ð/Ó	0€Ø×'Ò'Ó)€Ø × Ñ Ø×ÒÐAÓBôð €ˆyÓ Ø€ˆyÓ ã$€Nð-Ù! .×1Ñ1Ø× Ñ  Ö0à× Ñ  Ö0ñ %ð &3°]Ñ%BÐ ˜Ó Bð
 ØØØ%)Ø%)Ø!%ØØ #Ø ðdØ ðdàðdð ðdð ð	dð
 #ðdð #ðdð ðdð ðdð ðdð ðdð õdðR ØØØ%)Ø%)Ø!%ØØ #Ø ðØðàðð ðð ð	ð
 #ðð #ðð ðð ðð ðð ðð õð@ ØØØ%)Ø%)Ø!%ØØ #Ø ð
Ø
 ð
àð
ð ð
ð ð	
ð
 #ð
ð #ð
ð ð
ð ð
ð ð
ð ð
ð õ
ðB ØØØ%)Ø%)Ø!%ØØ #Ø!ð?Ø<ð?àð?ð ð?ð ð	?ð
 #ð?ð #ð?ð ð?ð ð?ð ð?ð ð?ð 
ö?øðU ó -Ø×Ñ˜^×,ð-ús   Â(E<ÃE<Å<FÆF