§
    àŽ’jd�  ã                  óÊ  — 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
mZmZmZ ddlmZmZmZmZmZ dd	lmZ dd
lmZmZ ddlmZmZmZmZmZmZ  ej         d¦  «        Z! ej"        ¦   «         Z#e# $                     ej%        d¦  «        ¦  «          e&ed„ ¬¦  «        Z'de(d<   	 	 	 	 	 	 	 	 	 d3d4d)„Z)	 	 	 	 	 	 	 	 	 d3d5d,„Z*	 	 	 	 	 	 	 	 	 d3d6d/„Z+	 	 	 	 	 	 	 	 	 d7d8d2„Z,dS )9é    )Ú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                ó"   — t          | ¦  «         S ©N)r   ©Úencodings    úDC:\Projects\DSCons\.venv\Lib\site-packages\charset_normalizer\api.pyú<lambda>r    .   s   € Õ-CÀHÑ-MÔ-MÐ)M€ ó    )Úkeyz	list[str]ÚIANA_SUPPORTED_MB_FIRSTé   é   çš™™™™™É?TFçš™™™™™¹?Ú	sequencesúbytes | bytearrayÚstepsÚintÚ
chunk_sizeÚ	thresholdÚfloatÚcp_isolationúlist[str] | NoneÚcp_exclusionÚpreemptive_behaviourÚboolÚexplainÚlanguage_thresholdÚenable_fallbackÚreturnr   c
                óè   — t          | t          t          f¦  «        s/t          d                     t          | ¦  «        ¦  «        ¦  «        ‚|rJt          j        }
t                               t          ¦  «         t           
                    t          ¦  «         t          | ¦  «        }|dk    rwt                               d¦  «         |r9t                               t          ¦  «         t           
                    |
¦  «         t          t!          | dddg d¦  «        g¦  «        S |�At                               t          d	d
                     |¦  «        ¦  «         d„ |D ¦   «         }ng }|�At                               t          dd
                     |¦  «        ¦  «         d„ |D ¦   «         }ng }|||z  k    r't                               t          d|||¦  «         d}|}|dk    r||z  |k     rt'          ||z  ¦  «        }t          | ¦  «        t(          k     }t          | ¦  «        t*          k    }|r"t                               t          d|¦  «         n#|r!t                               t          d|¦  «         g }|rt-          | ¦  «        nd}|�6|                     |¦  «         t                               t          d|¦  «         t1          ¦   «         }g }g }t1          ¦   «         } t3          d¬¦  «        t4          ¦  «        } t3          d¬¦  «        t6          ¦  «        }d}t1          ¦   «         }d}d}d}d}d}d}t          ¦   «         }t          ¦   «         }t9          | ¦  «        \  } }!| �E|                     d| ¦  «         t                               t          dt          |!¦  «        | ¦  «         |                     d¦  «         d|vr|                     d¦  «         |t<          z   D �]}"|r|"|vrŒ
|r|"|v rŒ|"|v rŒ|                     |"¦  «         d}#| |"k    }$|$otA          |"¦  «        }%|"dv r$|$s"t                               t          d|"¦  «         Œl|"dv r$|$s"t                               t          d|"¦  «         Œ”|"|v r"t                               t          d|"¦  «         Œº	 tC          |"¦  «        }&n8# tD          tF          f$ r$ t                               t          d|"¦  «         Y Œÿw xY w|ru|&st1          tI          |"¦  «        ¦  «        }'nt1          tK          |"¦  «        ¦  «        }'|' &                    |¦  «        s%t                               t          d|"|'|¦  «         �Œz|r-|&s+||k    r%t                               t          d|"||¦  «         �Œ©|r%|&s#t                               t          d|"¦  «         �ŒÐ|& o| }(	 |rO|&sMtO          |%s| dt'          d ¦  «        …         n#| t          |!¦  «        t'          d ¦  «        …         |"¬!¦  «         n^|(s\|"d"k    r,|$r*tO          | |"¬!¦  «        }#|#r|#d         d#k    r
|#dd…         }#n*tO          |%s| n| t          |!¦  «        d…         |"¬!¦  «        }#nx# tP          tR          f$ rd})t          |)tR          ¦  «        s/t                               t          d$|"tO          |)¦  «        ¦  «         |                     |"¦  «         Y d})~)�Œ÷d})~)ww xY wtU          |$sdnt          |!¦  «        |t'          ||z  ¦  «        ¦  «        }*|&o|#duot          |#¦  «        |k     }+|+r!t                               t          d%|"¦  «         t'          t          |*¦  «        d&z  ¦  «        },tW          |,d'¦  «        },d}-d}.g }/g }0	 tY          | |"|*||$|%|!|&|#|(¦
  «
        D ]q}1|/                     |1¦  «         |0                      ||1||odt          |¦  «        cxk    od'k    nc ¦  «        ¦  «         |0d(         |k    r|-dz  }-|-|,k    s|$r|%s nŒrn�# tP          tR          f$ r‰})|(rJt                               t          d$|"tO          |)¦  «        ¦  «         |                     |"¦  «         Y d})~)�Œ�t                               t          d)|"tO          |)¦  «        ¦  «         |,}-d*}.Y d})~)nd})~)ww xY w|0rt[          |0¦  «        t          |0¦  «        z  nd}2|.sš|r˜|&s–|2|k     r�|-|,k     rŠ	 | t'          d+¦  «        d…          .                    |"d,¬-¦  «         n\# tP          $ rO})t                               t          d.|"tO          |)¦  «        ¦  «         |                     |"¦  «         Y d})~)�Œ„d})~)ww xY w|2|k    s|-|,k    �r|                     |"¦  «         |"t^          v r | 0                    t^          |"         ¦  «         t                               t          d/|"|-tc          |2d0z  d1¬2¦  «        ¦  «         |	r |"dd|d3d4fv r—|.s•|#€i	 tO          |%s| n| t          |!¦  «        d…         |"¬!¦  «        }#n9# tP          tR          f$ r% t                               t          d5|"¦  «         Y �Œ|w xY w|rd}#t!          | |"||$g |#|¬6¦  «        }3|"|k    r|3}n|"dk    r|3}n|3}�Œ°|(r�	 tO          |%s| n| t          |!¦  «        d…         |"¬!¦  «        }#nc# tP          tR          f$ rO})t                               t          d$|"tO          |)¦  «        ¦  «         |                     |"¦  «         Y d})~)�Œ9d})~)ww xY wt                               t          d7|"tc          |2d0z  d1¬2¦  «        ¦  «         |&stI          |"¦  «        }4ntK          |"¦  «        }4|4r"t                               t          d8|"|4¦  «         g }5|"dk    r@|4rd9                     |4¦  «        nd}6|/D ]$}1 ||1||6¦  «        }7|5                     |7¦  «         Œ%te          |5¦  «        }8|8r"t                               t          d:|8|"¦  «         t!          | |"|2|$|8|r|"|ddfv r|#nd|¬6¦  «        }9|                     |9¦  «         |r|&s|2d;k     r|dz  }|"|ddfv rŽ|2d<k     rˆ|2dk    rmt                               d=|9j3        ¦  «         |r9t                               t          ¦  «         t           
                    |
¦  «         t          |9g¦  «        c S |                     |9¦  «         t          |¦  «        r“|�||v r�d|v r‰d|v r…| 4                    ¦   «         }:|:€J ‚t                               d=|:j3        ¦  «         |r9t                               t          ¦  «         t           
                    |
¦  «         t          |:g¦  «        c S |si|&sg|8rtW          d>„ |8D ¦   «         d¬?¦  «        nd};|;d@k    rBd|v r>d|v r:d*}| 0                    |4¦  «         t                               t          dA|"|2|;¦  «         |so|&rm|+rk|#�it          |#¦  «        |dBz  k     rS|"dCvrOd|v rKd|v rGd*}t                               t          dD|"|2t          |#¦  «        |t          |#¦  «        |z  d0z  ¦  «         |"| k    rnt                               dE|"¦  «         |r9t                               t          ¦  «         t           
                    |
¦  «         t          ||"         g¦  «        c S �Œt          |¦  «        dk    rÙ|s|s|r t                               t          dF¦  «         |r6t                               dG|j3        ¦  «         |                     |¦  «         n{|r|�|r|r|j5        |j5        k    s|�0t                               dH¦  «         |                     |¦  «         n1|r/t                               dI¦  «         |                     |¦  «         |rDt                               dJ| 4                    ¦   «         j3        t          |¦  «        dz
  ¦  «         nt                               dK¦  «         |r9t                               t          ¦  «         t           
                    |
¦  «         |S )Laf  
    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, c                ó.   — g | ]}t          |d ¦  «        ‘ŒS ©F©r   ©Ú.0Úcps     r   ú
<listcomp>zfrom_bytes.<locals>.<listcomp>l   ó"   € ÐDÐDÐD°�	 " eÑ,Ô,ÐDÐDÐDr!   zacp_exclusion is set. use this flag for debugging purpose. limited list of encoding excluded : %s.c                ó.   — g | ]}t          |d ¦  «        ‘ŒS r<   r=   r>   s     r   rA   zfrom_bytes.<locals>.<listcomp>w   rB   r!   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   rI   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   é   )ÚndigitsrG   rH   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”?r'   z.Encoding detection: %s is most likely the one.c              3  ó    K  — | ]	\  }}|V — Œ
d S r   © )r?   Ú_Úvs      r   ú	<genexpr>zfrom_bytes.<locals>.<genexpr>À  s&   è è € Ð4Ð4™4˜1˜a�QÐ4Ð4Ð4Ð4Ð4Ð4r!   )Údefaultg      à?zyDefinitive match found: %s (chaos=%.3f, coherence=%.2f). Encodings targeting different language families will be skipped.g\�Âõ(\ï?>	   rI   r9   rG   rH   Ú	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.)6Ú
isinstanceÚ	bytearrayÚbytesÚ	TypeErrorÚformatÚtypeÚloggerÚlevelÚ
addHandlerÚexplain_handlerÚsetLevelr   ÚlenÚdebugÚremoveHandlerr   r   ÚlogÚjoinr+   r   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)<r(   r*   r,   r-   r/   r1   r2   r4   r5   r6   Úprevious_logger_levelÚlengthÚ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ÔTÐTØð 	3Ý× Ò ¥Ñ1Ô1Ð1Ý�OŠOÐ1Ñ2Ô2Ð2Ý�|¨I°wÀÀUÈBÐPRÑSÔSÐTÑUÔUÐUàÐÝ�
Š
Ýð5à�IŠI�lÑ#Ô#ñ		
ô 	
ð 	
ð EÐD°|ÐDÑDÔDˆˆàˆàÐÝ�
Š
Ýð6à�IŠI�lÑ#Ô#ñ		
ô 	
ð 	
ð EÐD°|ÐDÑDÔDˆˆàˆà�*˜uÑ$Ò%Ð%Ý�
Š
ÝØlØØØñ	
ô 	
ð 	
ð ˆØˆ
àˆq‚y€y�V˜e‘^ jÒ0Ð0Ý˜ %™Ñ(Ô(ˆ
å"% i¡.¤.Õ3EÒ"EÐÝ"% i¡.¤.Õ4DÒ"DÐàð 
Ý�
Š
ÝØLØñ	
ô 	
ð 	
ð 	
ð
 
ð 
Ý�
Š
ÝØWØñ	
ô 	
ð 	
ð (*Ðð .BÐKÕ˜yÑ)Ô)Ð)Àtð ð Ð%Ø×$Ò$Ð%7Ñ8Ô8Ð8Ý�
Š
ÝØNØñ	
ô 	
ð 	
õ ‘u”u€FØ)+ÐØ)+ÐÝ"%¡%¤%Ðð 0�	¨$Ð/Ñ/Ô/µ
Ñ;Ô;ÐØ4�Y¨tÐ4Ñ4Ô4µ_ÑEÔEÐð $)ÐÝ,/©E¬EÐð -.Ð$Ø"#Ðð ',Ðà*.€NØ'+€KØ.2Ðå,Ñ.Ô.€Gå)7Ñ)9Ô)9Ðå 3°IÑ >Ô >Ñ€L�+àÐØ×$Ò$ Q¨Ñ5Ô5Ð5Ý�
Š
ÝØWÝ�ÑÔØñ		
ô 	
ð 	
ð × Ò  Ñ)Ô)Ð)àÐ+Ð+Ð+Ø×$Ò$ WÑ-Ô-Ð-à.Õ1HÑHð V<ñ V<ˆØð 	˜M°Ð=Ð=Øàð 	˜M¨\Ð9Ð9Øà˜FÐ"Ð"Øà�
Š
�=Ñ!Ô!Ð!à&*ˆØ%1°]Ò%BÐØ!5ð "
Õ:QØñ;
ô ;
Ðð Ð0Ð0Ð0Ð9MÐ0Ý�JŠJÝØnØñô ð ð
 Ø˜IÐ%Ð%Ð.BÐ%Ý�JŠJÝØdØñô ð ð
 ð Ð-Ð-Ð-Ý�JŠJÝØkØñô ð ð
 ð	Ý*@ÀÑ*OÔ*OÐ!Ð!øÝ#¥[Ð1ð 	ð 	ð 	Ý�JŠJÝØDØñô ð ð
 ˆHð	øøøð "ð 	Ø(ð JÝ #Õ$6°}Ñ$EÔ$EÑ FÔ F��å #Õ$9¸-Ñ$HÔ$HÑ IÔ I�Ø ×-Ò-Ð.IÑJÔJð Ý—
’
ÝØxØ!Ø!Ø/ñô ð ñ ð #ð	à)ð	ð 1Ð4JÒJÐJå�JŠJÝØjØØ0Ø&ñô ð ñ ð
 %ð 	Ð-Bð 	Ý�JŠJÝØUØñô ð ñ
 ð &Ð%ÐCÐ.CÐ*Cð 	ð*	Ø$ð Ð-Bð Ýð  0ðE˜	 +¥C¨¡I¤I +Ô.Ð.à&¥s¨;Ñ'7Ô'7½#¸d¹)¼)Ð'CÔDà*ðñ ô ð ð ð 'ð ð ! GÒ+Ð+Ð0DÐ+Ý&)Ø!Ø!.ð'ñ 'ô '�Oð 'ð >¨?¸1Ô+=ÀÒ+IÐ+IØ*9¸!¸"¸"Ô*=˜øå&)ð $4ð?˜I˜Ià!*­3¨{Ñ+;Ô+;Ð+=Ð+=Ô!>à!.ð'ñ 'ô '�Oøøõ #¥KÐ0ð 		ð 		ð 		Ý˜a¥Ñ-Ô-ð Ý—
’
ÝØOØ!Ý˜‘F”Fñ	ô ð ð $×*Ò*¨=Ñ9Ô9Ð9ØˆHˆHˆH‰Høøøøð		øøøõ Ø)Ð?ˆAˆA­s°;Ñ/?Ô/?ØÝ�˜‘ÑÔñ
ô 
ˆð "ð .Ø tÐ+ð.å�OÑ$Ô$ vÒ-ð 	ð ð 	Ý�JŠJÝð-àñ	ô ð õ "%¥S¨¡W¤W¨q¡[Ñ!1Ô!1ÐåÐ 1°1Ñ5Ô5ÐØ !ÐØ %Ðà!ˆ	Øˆ	ð5	)Ý,ØØØØØ$Ø ØØ%ØØ!ñô ð ð �ð × Ò  Ñ'Ô'Ð'à× Ò Ø%Ð%ØØ!ØÐ? A­¨\Ñ):Ô):Ð$?Ð$?Ò$?Ð$?¸aÒ$?Ð$?Ð$?Ð$?ñô ñô ð ð ˜R”= IÒ-Ð-Ø$¨Ñ)Ð$à$Ð(9Ò9Ð9Ø(ð :Ø1Að :ð �EøøøåÝð
ð 	)ð 	)ð 	)ð !ð õ —
’
ÝØOØ!Ý˜‘F”Fñ	ô ð ð (×.Ò.¨}Ñ=Ô=Ð=Ø���‘Ý�JŠJÝØsØÝ�A‘”ñ	ô ð ð  1ÐØ$(Ð!Ð!Ð!Ð!Ð!Ð!øøøøð/	)øøøð2 ENÐ!V¥ Y¡¤µ#°i±.´.Ñ!@Ð!@ÐSVˆð
 &ð	à%ð	ð *ð	ð   )Ò+Ð+Ø Ð#4Ò4Ð4ð
Ø�#˜d™)œ)˜+˜+Ô&×-Ò-¨mÀHÐ-ÑMÔMÐMÐMøÝ%ð ð ð Ý—
’
ÝØtØ!Ý˜‘F”Fñ	ô ð ð (×.Ò.¨}Ñ=Ô=Ð=Ø���‘øøøøðøøøð ˜iÒ'Ð'Ð+;Ð?PÒ+PÑ+PØ#×*Ò*¨=Ñ9Ô9Ð9ØÕ 6Ð6Ð6Ø!×(Ò(Õ)?ÀÔ)NÑOÔOÐOÝ�JŠJÝð0àØ Ý�o¨Ñ+°QÐ7Ñ7Ô7ñô ð ð  ð-1à!Ø˜WÐ&8¸(ÀHÐMðNð Nà-ðNð #Ð*ð!Ý*-ð (8ð!C 	 	à%.­s°;Ñ/?Ô/?Ð/AÐ/AÔ%Bà%2ð+ñ +ô +˜˜øõ /µÐ<ð !ð !ð !ÝŸ
š
Ý!Ø\Ø)ñô ð ð
 !™ð!øøøð -ð /à*.˜å!-ØØ!ØØ(ØØ#Ø+=ð"ñ "ô "�ð !Ð$6Ò6Ð6Ø)7Ð&Ð&Ø" gÒ-Ð-Ø%3�N�Nà"0�KÙàð 	ðÝ"%ð  0ð;˜	˜	à&¥s¨;Ñ'7Ô'7Ð'9Ð'9Ô:à*ð#ñ #ô #��øõ '­Ð4ð ð ð Ý—
’
ÝØOØ!Ý˜‘F”Fñ	ô ð ð (×.Ò.¨}Ñ=Ô=Ð=Ø���‘øøøøðøøøõ 	�
Š
ÝØKØÝ�/ CÑ'°Ð3Ñ3Ô3ñ		
ô 	
ð 	
ð %ð 	DÝ*<¸]Ñ*KÔ*KÐÐå4°]ÑCÔCÐàð 	Ý�JŠJÝØ8ØØ ñ	ô ð ð ˆ	ð ˜GÒ#Ð#ð /?ÐH�—’Ð)Ñ*Ô*Ð*ÀDð ð #ð 2ð 2�Ø"8Ð"8ØØ&Ø ñ#ô #�ð × Ò  Ñ1Ô1Ð1Ð1å1°)Ñ<Ô<Ðàð 	Ý�JŠJÝØ2Ø Øñ	ô ð õ %ØØØØ Øð .ðð %Ð);¸WÀgÐ(NÐNÐNð  �ð
 à#5ð
ñ 
ô 
ˆð" 	�Š�}Ñ%Ô%Ð%ð #ð	2à)ð	2ð   $Ò&Ð&à,°Ñ1Ð,ð Ð0°'¸7ÐCÐCÐCØ #Ò%Ð%ð  #Ò%Ð%Ý—’ØDØ!Ô*ñô ð ð ð ;Ý×(Ò(­Ñ9Ô9Ð9Ý—O’OÐ$9Ñ:Ô:Ð:Ý% } oÑ6Ô6Ð6Ð6Ð6à×%Ò% mÑ4Ô4Ð4õ Ð"Ñ#Ô#ð	5à#Ð+Ð/AÀVÐ/KÐ/KØ˜6Ð!Ð!Ø˜6Ð!Ð!à0×5Ò5Ñ7Ô7ˆOØ"Ð.Ð.Ð.Ý�LŠLØ@ØÔ(ñô ð ð ð 7Ý×$Ò$¥_Ñ5Ô5Ð5Ý—’Ð 5Ñ6Ô6Ð6å! ?Ð"3Ñ4Ô4Ð4Ð4Ð4ð &ð 	Ð.Cð 	ð $ð•Ð4Ð4Ð#3Ð4Ñ4Ô4¸cÐBÑBÔBÐBàð ð
  Ò$Ð$¨°FÐ):Ð):¸wÈ&Ð?PÐ?PØ)-Ð&Ø+×2Ò2Ð3CÑDÔDÐDÝ—
’
Ýð PØ!Ø#Ø"ñô ð ð *ð	à%ð	ð !ð	ð  Ð+Ý�OÑ$Ô$ v°¡}Ò4Ð4Øð
ðð ð ˜6Ð!Ð!Ø˜6Ð!Ð!à(,Ð%Ý�JŠJÝØ|ØØÝ�OÑ$Ô$ØÝ�OÑ$Ô$ vÑ-°Ñ3ñô ð ð ˜LÒ(Ð(Ý�LŠLð1àñô ð ð
 ð 7Ý×$Ò$¥_Ñ5Ô5Ð5Ý—’Ð 5Ñ6Ô6Ð6Ý! 7¨=Ô#9Ð":Ñ;Ô;Ð;Ð;Ð;ñ )õ ˆ7�|„|�qÒÐØð 	˜.ð 	Ð,>ð 	Ý�JŠJÝØañô ð ð
 ð 	+Ý�LŠLØIØ"Ô+ñô ð ð �NŠNÐ-Ñ.Ô.Ð.Ð.àð	+Ø+Ð3àð 4ð #ð 4ð  Ô+¨~Ô/IÒIÐIàÐ'å�LŠLÐUÑVÔVÐVØ�NŠN˜;Ñ'Ô'Ð'Ð'Øð 	+Ý�LŠLÐUÑVÔVÐVØ�NŠN˜>Ñ*Ô*Ð*àð VÝ�ŠØkØ�LŠL‰NŒNÔ#Ý�‰LŒL˜1Ññ	
ô 	
ð 	
ð 	
õ 	�ŠÐTÑUÔUÐUàð /Ý×Ò�_Ñ-Ô-Ð-Ý�ŠÐ-Ñ.Ô.Ð.à€Ns�   Ò#R3Ò32S(Ó'S(Ö?B/Y/Ù/[$Ú A[Û[$ÞB
`àb2à)Ab-á53b-â-b2ã+,dä
e1ä"Ae,å,e1è*h/è/2i%é$i%ê*kël&ëAl!ì!l&Úfpr   c
                óV   — t          |                      ¦   «         |||||||||	¦
  «
        S )z†
    Same thing than the function from_bytes but using a file pointer that is already ready.
    Will not close the file pointer.
    )r³   Úread)
r´   r*   r,   r-   r/   r1   r2   r4   r5   r6   s
             r   Úfrom_fpr·   *  s<   € õ  Ø
�Š‰	Œ	ØØØØØØØØØñô ð r!   Úpathústr | bytes | PathLikec
                ó†   — t          | d¦  «        5 }
t          |
|||||||||	¦
  «
        cddd¦  «         S # 1 swxY w Y   dS )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·   )r¸   r*   r,   r-   r/   r1   r2   r4   r5   r6   r´   s              r   Ú	from_pathr½   H  s    € õ  
ˆd�DÑ	Ô	ð 
˜RÝØØØØØØØ ØØØñ
ô 
ð
ð 
ð 
ð 
ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
øøøð 
ð 
ð 
ð 
ð 
ð 
s   ‘6¶:½:Úfp_or_path_or_payloadú!PathLike | str | BinaryIO | bytesc
                ó  — t          | t          t          f¦  «        rt          | |||||||||	¬¦
  «
        }
nOt          | t          t
          f¦  «        rt          | |||||||||	¬¦
  «
        }
nt          | |||||||||	¬¦
  «
        }
|
 S )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.
    )	r*   r,   r-   r/   r1   r2   r4   r5   r6   )r_   rv   r   r½   ra   r`   r³   r·   )r¾   r*   r,   r-   r/   r1   r2   r4   r5   r6   Úguessess              r   Ú	is_binaryrÂ   g  så   € õ" Ð'­#­x¨Ñ9Ô9ð ,
ÝØ!ØØ!ØØ%Ø%Ø!5ØØ1Ø+ð
ñ 
ô 
ˆˆõ 
ØåÝð	
ñ
ô 
ð 
õ Ø!ØØ!ØØ%Ø%Ø!5ØØ1Ø+ð
ñ 
ô 
ˆˆõ Ø!ØØ!ØØ%Ø%Ø!5ØØ1Ø+ð
ñ 
ô 
ˆð ˆ;Ðr!   )	r$   r%   r&   NNTFr'   T)r(   r)   r*   r+   r,   r+   r-   r.   r/   r0   r1   r0   r2   r3   r4   r3   r5   r.   r6   r3   r7   r   )r´   r   r*   r+   r,   r+   r-   r.   r/   r0   r1   r0   r2   r3   r4   r3   r5   r.   r6   r3   r7   r   )r¸   r¹   r*   r+   r,   r+   r-   r.   r/   r0   r1   r0   r2   r3   r4   r3   r5   r.   r6   r3   r7   r   )	r$   r%   r&   NNTFr'   F)r¾   r¿   r*   r+   r,   r+   r-   r.   r/   r0   r1   r0   r2   r3   r4   r3   r5   r.   r6   r3   r7   r3   )-Ú
__future__r   ÚloggingÚ	functoolsr   Úosr   Útypingr   Úcdr   r	   r
   r   Úconstantr   r   r   r   r   Úmdr   Úmodelsr   r   Úutilsr   r   r   r   r   r   Ú	getLoggerre   ÚStreamHandlerrh   ÚsetFormatterÚ	FormatterÚsortedr#   Ú__annotations__r³   r·   r½   rÂ   rU   r!   r   ú<module>rÓ      sÅ  ðØ "Ð "Ð "Ð "Ð "Ð "Ð "à €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð Ð Ð Ð Ð Ð Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ð 0Ð 0ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð 
ˆÔ	Ð/Ñ	0Ô	0€Ø'�'Ô'Ñ)Ô)€Ø × Ò Ø€GÔÐAÑBÔBñô ð ð &, VØÐMÐMð&ñ &ô &Ð ð ð ð ñ ð ØØØ%)Ø%)Ø!%ØØ #Ø ðuð uð uð uð uðt ØØØ%)Ø%)Ø!%ØØ #Ø ðð ð ð ð ð@ ØØØ%)Ø%)Ø!%ØØ #Ø ð
ð 
ð 
ð 
ð 
ðB ØØØ%)Ø%)Ø!%ØØ #Ø!ð?ð ?ð ?ð ?ð ?ð ?ð ?r!   