ó
    ÷Þ j¾‹  ã                  óx  • % S SK Jr  S SKrS SKJ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!\RD                  " 5       r#\#RI                  \RJ                  " S5      5        \&" \S S9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)é    )ÚannotationsN)Ú	lru_cache)Ú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)sc                ó"   • [        U 5      (       + $ ©N)r   ©Úencodings    ÚP/var/www/html/gaurav/venv/lib/python3.13/site-packages/charset_normalizer/api.pyÚ<lambda>r    .   s   € Ô-CÀHÓ-MÕ)Mó    )Úkeyz	list[str]Ú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bF  [        R#                  [        S	S
R%                  U5      5        U Vs/ sH  n['        US5      PM     nnO/ nUbF  [        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U5        O"U(       a  [        R#                  [        SU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[5        SS9" [6        5      n[5        SS9" [8        5      nSn[3        5       nSnSnSnSnSnSn[        5       n[        5       n [;        U 5      u  n!n"U!b7  UR=                  SU!5        [        R#                  [        S[        U"5      U!5        UR1                  S5        SU;  a  UR1                  S5        U[>        -    GHb  n#U(       a  U#U;  a  M  U(       a  U#U;   a  M"  U#U;   a  M*  URA                  U#5        Sn$U!U#:H  n%U%=(       a    [C        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Í   [E        U#5      n'U(       af  U'(       d  [3        [K        U#5      5      n(O[3        [M        U#5      5      n(U(RO                  U5      (       d   [        R#                  [        SU#U(U5        GMF  U(       a-  U'(       d&  UU:¼  a   [        R#                  [        SU#UU5        GMz  U(       a%  U'(       d  [        R#                  [        SU#5        GM¦  U'(       + =(       a    U(       + n) U(       a<  U'(       d5  [Q        U&(       d  U S[)        S5       OU [        U"5      [)        S5       U#S9  OSU)(       dL  U#S :X  a'  U%(       a   [Q        U U#S9n$U$(       a  U$S   S!:X  a  U$SS n$O[Q        U&(       d  U OU [        U"5      S U#S9n$[W        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+5      S$-  5      n-[Y        U-S%5      n-Sn.Sn// n0/ n1 [[        U U#U+UU%U&U"U'U$U)5
       Hx  n2U0R1                  U25        U1R1                  U" U2UU=(       a    S[        U5      s=:*  =(       a    S%:*  Os  5      5        U1S&   U:¼  a  U.S-  n.U.U-:¼  d  U%(       d  Mo  U&(       a  Mx    O    U1(       a  []        U15      [        U15      -  OSn3U/(       d7  U(       a0  U'(       d)  U3U:  a#  U.U-:  a   U [)        S)5      S R_                  U#S*S+9  U3U:¼  d  U.U-:¼  aÆ  UR1                  U#5        U#[`        ;   a  URc                  [`        U#   5        [        R#                  [        S-U#U.[e        U3S.-  S/S095        U	(       aa  U#SSUS1S24;   aV  U/(       dO  U$c)   [Q        U&(       d  U OU [        U"5      S U#S9n$U(       a  Sn$[!        U U#UU%/ U$US49n4U#U:X  a  U4nOU#S:X  a  U4nOU4nGM­  U)(       a    [Q        U&(       d  U OU [        U"5      S U#S9n$[        R#                  [        S5U#[e        U3S.-  S/S095        U'(       d  [K        U#5      n5O[M        U#5      n5U5(       a  [        R#                  [        S6U#U55        / n6U#S:w  a>  U5(       a  S7R%                  U55      OSn7U0 H  n2U" U2UU75      n8U6R1                  U85        M      [g        U65      n9U9(       a  [        R#                  [        S8U9U#5        [!        U U#U3U%U9U(       a	  U#USS4;   a  U$OSUS49n:UR1                  U:5        U(       a  U'(       d  U3S9:  a  US-  nU#USS4;   a€  U3S::  az  U3S:X  ac  [        R                  S;U:Rh                  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;   a~  SU;   ax  U Rk                  5       n;U;c   e[        R                  S;U;Rh                  5        U(       a.  [        R                  [        5        [        R                  W
5        [        U;/5      s  $ U(       dc  U'(       d\  U9(       a  [Y        S< U9 5       SS=9OSn<U<S>:¼  a<  SU;   a6  SU;   a0  S(nURc                  U55        [        R#                  [        S?U#U3U<5        U(       dn  U'(       ag  U,(       a`  U$b]  [        U$5      US@-  :  aK  U#SA;  aE  SU;   a?  SU;   a9  S(n[        R#                  [        SBU#U3[        U$5      U[        U$5      U-  S.-  5        U#U!:X  d  GM	  [        R                  SCU#5        U(       a.  [        R                  [        5        [        R                  W
5        [        UU#   /5      s  $    [        U5      S:X  añ  U(       d  U(       d  U(       a  [        R#                  [        SD5        U(       a2  [        R                  SEURh                  5        UR1                  U5        O‰U(       a  Ub+  U(       a!  U(       a  URl                  URl                  :w  d  Ub'  [        R                  SF5        UR1                  U5        O-U(       a&  [        R                  SG5        UR1                  U5        U(       a<  [        R                  SHURk                  5       Rh                  [        U5      S-
  5        O[        R                  SI5        U(       a.  [        R                  [        5        [        R                  W
5        U$ s  snf s  snf ! [F        [H        4 a     [        R#                  [        SU#5         G
M/  f = f! [R        [T        4 aW  n*[        U*[T        5      (       d%  [        R#                  [        S"U#[Q        U*5      5        UR1                  U#5         Sn*A*G
M•  Sn*A*ff = f! [R        [T        4 ax  n*U)(       a=  [        R#                  [        S"U#[Q        U*5      5        UR1                  U#5         Sn*A*G
Mñ  [        R#                  [        S'U#[Q        U*5      5        U-n.S(n/ Sn*A*GN£Sn*A*ff = f! [R         aB  n*[        R#                  [        S,U#[Q        U*5      5        UR1                  U#5         Sn*A*GMo  Sn*A*ff = f! [R        [T        4 a     [        R#                  [        S3U#5         GM¦  f = f! [R        [T        4 aB  n*[        R#                  [        S"U#[Q        U*5      5        UR1                  U#5         Sn*A*GM÷  Sn*A*ff = f)Ja2  
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 (%i) byte(s).zIUsing lazy str decoding because the payload is quite large, (%i) byte(s).z@Detected declarative mark in sequence. Priority +1 given for %s.)Úmaxsizeé   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!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    €„Ar   r,   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.é   é   éÿÿÿÿzaLazyStr Loading: After MD chunk decode, code page %s does not fit given bytes sequence at ALL. %sTg     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 %%.éd   é   )Úndigitsr*   r+   z>%s does not decode the whole payload: fallback entry withheld.)Úpreemptive_declarationz=%s passed initial chaos probing. Mean measured chaos is %f %%z&%s should target any language(s) of %sÚ,z We detected language %s using %sg{®Gáz”?çš™™™™™¹?z.Encoding detection: %s is most likely the one.c              3  ó(   #   • U H	  u  pUv •  M     g 7fr   © )Ú.0Ú_Úvs      r   Ú	<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.)7Ú
isinstanceÚ	bytearrayÚbytesÚ	TypeErrorÚformatÚtypeÚloggerÚlevelÚ
addHandlerÚexplain_handlerÚsetLevelr   ÚlenÚdebugÚremoveHandlerr   r   ÚlogÚjoinr   Úintr   r   r   ÚappendÚsetr   r   r   r   Úinsertr#   Úaddr   r   ÚModuleNotFoundErrorÚImportErrorr	   r
   ÚintersectionÚstrÚUnicodeDecodeErrorÚLookupErrorÚrangeÚmaxr   ÚsumÚdecoder   ÚupdateÚroundr   r   ÚbestÚfingerprint)=Ú	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Úcached_mess_ratioÚcached_coherence_ratioÚ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Údeferred_decodingÚeÚr_Úmulti_byte_bonusÚmax_chunk_gave_upÚearly_stop_countÚlazy_str_hard_failureÚ	md_chunksÚ	md_ratiosÚchunkÚmean_mess_ratioÚfallback_entryÚtarget_languagesÚ	cd_ratiosÚlg_inclusionÚchunk_languagesÚcd_ratios_mergedÚcurrent_matchÚprobable_resultÚbest_coherences=                                                                r   Ú
from_bytesr¥   2   s³  € ô< �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Øõ	
ö
 
Ü�
‰
ÜØWØô	
ð (*Ðö .BÔ˜yÔ)Àtð ð Ñ%Ø×$Ñ$Ð%7Ô8Ü�
‰
ÜØNØô	
ô “u€FØ)+ÐØ)+ÐÜ"%£%Ðô "¨$Ò/´
Ó;ÐÜ&¨tÒ4´_ÓEÐð $)ÐÜ,/«EÐð -.Ð$Ø"#Ðð ',Ðà*.€NØ'+€KØ.2Ðä,Ó.€Gä)7Ó)9Ðä 3°IÓ >Ñ€L�+àÑØ×$Ñ$ Q¨Ô5Ü�
‰
ÜØ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Øôñ
 ð	Ü*@ÀÓ*OÐ!ö "Þ(Ü #Ô$6°}Ó$EÓ F‘ä #Ô$9¸-Ó$HÓ I�Ø ×-Ñ-Ð.I×JÑJÜ—
‘
ÜØxØ!Ø!Ø/ôò ö #Þ)Ø0Ð4JÓJä�J‰JÜØjØØ0Ø&ôò ö
 %Ö-BÜ�J‰JÜØUØôò
 ð &Ô%×CÐ.CÔ*Cð 	ð*	Þ$Ö-BÜö  0ð " +¤C¨£IÑ.à&¤s¨;Ó'7¼#¸d»)ÐDà*óö 'ð ! GÓ+Ö0DÜ&)Ø!Ø!.ñ'�Oö '¨?¸1Ñ+=ÀÓ+IØ*9¸!¸"Ð*=˜øä&)ö $4ñ &à!*¬3¨{Ó+;Ð+=Ð!>à!.ñ'�Oô& Þ)‰A¬s°;Ó/?ØÜ�‘Óó
ˆð "÷ .Ø tÐ+÷.ä�OÓ$ vÑ-ð 	ö Ü�J‰JÜð-àô	ô "%¤S¨£W¨q¡[Ó!1ÐäÐ 1°1Ó5ÐØ !ÐØ %Ðà!ˆ	Øˆ	ð5	)Ü,ØØØØØ$Ø ØØ%ØØ!ö�ð × Ñ  Ô'à× Ñ Ù%ØØ!Ø×? A¬¨\Ó):×$?Ó$?¸aÔ$?óôð ˜R‘= IÓ-Ø$¨Ñ)Ð$à$Ð(9Ó9ß(Ð(×1AÐ1Aáò9öl EN¤ Y£´#°i³.Ò!@ÐSVˆö
 &Þ%Þ)Ø )Ó+Ø Ð#4Ó4ð
Øœ#˜d›)˜+Ð&×-Ñ-¨mÀHÐ-ÑMð ˜iÓ'Ð+;Ð?PÓ+PØ#×*Ñ*¨=Ô9ØÔ 6Ó6Ø!×(Ñ(Ô)?ÀÑ)NÔOÜ�J‰JÜð0àØ Ü�o¨Ñ+°QÑ7ôö  Ø!Ø˜WÐ&8¸(ÀHÐMóNæ-ð #Ñ*ð!Ü*-ö (8ñ !*à%.¬s°;Ó/?Ð/AÐ%Bà%2ñ+˜ö -à*.˜ä!-ØØ!ØØ(ØØ#Ø+=ñ"�ð !Ð$6Ó6Ø)7Ñ&Ø" gÓ-Ø%3‘Nà"0�KÚæðÜ"%ö  0ñ "à&¤s¨;Ó'7Ð'9Ð:à*ñ#�ô$ 	�
‰
ÜØKØÜ�/ CÑ'°Ñ3ô		
ö %Ü*<¸]Ó*KÑä4°]ÓCÐæÜ�J‰JÜØ8ØØ ô	ð ˆ	ð ˜GÓ#ö /?�—‘Ð)Ô*ÀDð ó #�Ù"8ØØ&Ø ó#�ð × Ñ  Ö1ñ #ô 2°)Ó<ÐæÜ�J‰JÜØ2Ø Øô	ô %ØØØØ Øö .Ø$Ð);¸WÀgÐ(NÓNñ  ð
 à#5ñ
ˆð" 	�‰�}Ô%ö #Þ)Ø $Ó&à,°Ñ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Ð":Ó;Ò;ñm Iôp ˆ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ùòw Eùò Eøôx $¤[Ð1ó 	Ü�J‰JÜØDØôó
 ð	ûôH #¤KÐ0ó 		Ü˜a¤×-Ñ-Ü—
‘
ÜØOØ!Ü˜“Fô	ð $×*Ñ*¨=Ô9Þûð		ûôN Üð
ó 	)ö !ô —
‘
ÜØOØ!Ü˜“Fô	ð (×.Ñ.¨}Ô=ÞÜ�J‰JÜØsØÜ�A“ô	ð  1ÐØ$(Ö!ûð/	)ûôL &ó Ü—
‘
ÜØtØ!Ü˜“Fô	ð (×.Ñ.¨}Ô=ÞûðûôV /´Ð<ó !ÜŸ
™
Ü!Ø\Ø)ôó
 !ð!ûôP '¬Ð4ó Ü—
‘
ÜØOØ!Ü˜“Fô	ð (×.Ñ.¨}Ô=Þûðús·   Ä.uÅ9u#Ð6u(Ô$AvÕ'3vÖvÙA?xÛxÛ xÛ"xÜ'zß{à|õ(+vövöxö+Aw=÷=xøzø=zù)zúzú
{ú6{û{û+|ü|ü}$ü"6}ý}$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)
Úfpri   rj   rk   rl   rm   rn   ro   rp   rq   s
             r   Úfrom_fpr©   *  s5   € ô  Ø
�‰‹	ØØØØØØØØØóð r!   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©   )Úpathri   rj   rk   rl   rm   rn   ro   rp   rq   r¨   s              r   Ú	from_pathr®   H  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.
)	ri   rj   rk   rl   rm   rn   ro   rp   rq   )rE   r]   r   r®   rG   rF   r¥   r©   )Úfp_or_path_or_payloadri   rj   rk   rl   rm   rn   ro   rp   rq   Úguessess              r   Ú	is_binaryr²   g  sÏ   € ô" Ð'¬#¬x¨×9Ñ9ÜØ!ØØ!ØØ%Ø%Ø!5ØØ1Ø+ñ
ˆðZ Œ;ÐôC 
ØäÜð	
÷
ñ 
ô Ø!ØØ!ØØ%Ø%Ø!5ØØ1Ø+ñ
ˆð4 Œ;Ðô Ø!ØØ!ØØ%Ø%Ø!5ØØ1Ø+ñ
ˆð Œ;Ðr!   )	é   é   çš™™™™™É?NNTFr7   T)rh   zbytes | bytearrayri   rU   rj   rU   rk   Úfloatrl   úlist[str] | Nonerm   r·   rn   Úboolro   r¸   rp   r¶   rq   r¸   Úreturnr   )r¨   r   ri   rU   rj   rU   rk   r¶   rl   r·   rm   r·   rn   r¸   ro   r¸   rp   r¶   rq   r¸   r¹   r   )r­   zstr | bytes | PathLikeri   rU   rj   rU   rk   r¶   rl   r·   rm   r·   rn   r¸   ro   r¸   rp   r¶   rq   r¸   r¹   r   )	r³   r´   rµ   NNTFr7   F)r°   z!PathLike | str | BinaryIO | bytesri   rU   rj   rU   rk   r¶   rl   r·   rm   r·   rn   r¸   ro   r¸   rp   r¶   rq   r¸   r¹   r¸   )-Ú
__future__r   ÚloggingÚ	functoolsr   Úosr   Útypingr   Úcdr   r	   r
   r   Úconstantr   r   r   r   r   Úmdr   Úmodelsr   r   Úutilsr   r   r   r   r   r   Ú	getLoggerrK   ÚStreamHandlerrN   ÚsetFormatterÚ	FormatterÚsortedr#   Ú__annotations__r¥   r©   r®   r²   r9   r!   r   Ú<module>rÊ      sÑ  ðÞ "ã Ý Ý Ý ÷ó ÷õ õ ß 0÷÷ ð 
×	Ò	Ð/Ó	0€Ø×'Ò'Ó)€Ø × Ñ Ø×ÒÐAÓBôñ &,ØÑMñ&Ð ˜ó ð ØØØ%)Ø%)Ø!%ØØ #Ø ðuØ ðuàðuð ðuð ð	uð
 #ðuð #ðuð ðuð ðuð ðuð ðuð õuðt ØØØ%)Ø%)Ø!%ØØ #Ø ðØðàðð ðð ð	ð
 #ðð #ðð ðð ðð ðð ðð õð@ ØØØ%)Ø%)Ø!%ØØ #Ø ð
Ø
 ð
àð
ð ð
ð ð	
ð
 #ð
ð #ð
ð ð
ð ð
ð ð
ð ð
ð õ
ðB ØØØ%)Ø%)Ø!%ØØ #Ø!ð?Ø<ð?àð?ð ð?ð ð	?ð
 #ð?ð #ð?ð ð?ð ð?ð ð?ð ð?ð 
ö?r!   