
    i_                    t   U d Z ddlmZ ddlZddlZddlZddlZg dZ ej                  d      Z	 ej                  d      Z
dEdZ e       ZdFd	Z ej                  d
      Z e       ZdGdZdHdZ e       Z ej                  d      Z ej                  d      Z ej                  d      Zi  ed      d ed      d ed      d ed      d ed      d ed      d ed      d ed      d ed       d! ed"      d# ed$      d% ed&      d' ed(      d) ed*      d+ ed,      d- ed.      d/ ed0      d1 ed2      d3 ed4      d5 ed6      d7 ed8      d9 ed:      d;iZdId<Z e       Zd=d>d?d@dAdBZdedC<    ej                   dDj8                  dJi eej:                        Zy)Kzi
This gives other modules access to the gritty details about characters and the
encodings that use them.
    )annotationsN)
zlatin-1zsloppy-windows-1252zsloppy-windows-1251zsloppy-windows-1250zsloppy-windows-1253zsloppy-windows-1254zsloppy-windows-1257z
iso-8859-2macromancp437u   [ʼ‘-‛]u	   [“-‟]c            	         dt        j                  d      i} t        D ]S  }t        t	        t        dd            dgz         }|j                  |      }d| d}t        j                  |      | |<   U | S )a  
    ENCODING_REGEXES contain reasonably fast ways to detect if we
    could represent a given string in a given encoding. The simplest one is
    the 'ascii' detector, which of course just determines if all characters
    are between U+0000 and U+007F.
    asciiz^[ -]*$         z^[ --z]*$)recompileCHARMAP_ENCODINGSbyteslistrangedecode)encoding_regexesencoding
byte_rangecharlistregexs        i/home/developers/rajanand/mypropertyqr-fmb-refixing-v2/venv/lib/python3.12/site-packages/ftfy/chardata.py_build_regexesr       s      ,<!=>% 7 4dE 23tf<=
$$X. 'xj4%'ZZ%6"7     dict[str, str]c                 H   i } t         j                  j                  j                         D ]t  \  }}|j	                  d      s|| d|z   <   ||j                         k(  s4|j                         }d|z   }t        j                  |      |k(  sb|j                         | |<   v | S )N;&)htmlentitieshtml5itemsendswithlowerupperunescape)r   namechar
name_upperentity_uppers        r   _build_html_entitiesr*   >   s    H mm))//1 :
d==#'HS4Z 
 tzz|#!ZZ\
"Z/==.,>-1ZZ\H\*: Or   z&#?[0-9A-Za-z]{1,24};c                D    t        t        |   j                  |             S )z
    Given text and a single-byte encoding, check whether that text could have
    been decoded from that single-byte encoding.

    In other words, check whether it can be encoded in that encoding, possibly
    sloppily.
    )boolENCODING_REGEXESmatch)textr   s     r   possible_encodingr0   V   s       *00677r   c                     i } t        j                  t        dd      dgt        dd      dgt        dd      d	gt        d
d            D ]  }d| |<   	 | S )z
    Build a translate mapping that strips likely-unintended control characters.
    See :func:`ftfy.fixes.remove_control_chars` for a description of these
    codepoint ranges and why they should be removed.
    r   	                ij   ip   i  i  i  N)	itertoolschainr   )control_charsis     r   _build_control_char_mappingr;   a   sl     &(M__dD	dD	ff	ff 	   a	  r   se   [][ ]|[][ ][---]|[-][---][ ]|[][ ][-][-]|[][-][ ][-]|[][-][-][ ]s   [-][]|[-][?]|[-][?][-][?-]|[-][?-][-][?]|[-][?][-]|[-][-][?]|[-][?][-][-]|[-][-][?][-]|[-][-][-][?]|z[\x80-\x9f]u   ĲIJu   ĳiju   ŉu   ʼnu   ǱDZu   ǲDzu   ǳdzu   Ǆu   DŽu   ǅu   Džu   ǆu   džu   ǇLJu   ǈLju   ǉlju   ǊNJu   ǋNju   ǌnju   ﬀffu   ﬁfiu   ﬂflu   ﬃffiu   ﬄfflu   ﬅu   ſtu   ﬆstc                     ddi} t        dd      D ].  }t        |      }t        j                  d|      }||k7  s*|| |<   0 | S )zt
    Build a translate mapping that replaces halfwidth and fullwidth forms
    with their standard-width forms.
    i 0   i  i  NFKC)r   chrunicodedata	normalize)	width_mapr:   r'   	alternates       r   _build_width_maprU      sW     I66" %1v))&$7	$IaL	%
 r   u   ĂÂÄĀÅÃÆĆČÇĎĐÉĚÊËĖÈĒĘÐĞĢÍÎÏİÌĪĶĹĻŁŃŇŅÑÓÔÖŐÒŌØÕŘŚŠŞŢÞÚÛÜŰÙŪŲŮÝŹŽŻß×ΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫάέήίВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯu   áăâäàāąåãæćčçďéěêëėèēęęģíîïìīįķĺļŕźΰαβγδεζηθικλμνξοабвгдежзийклмнопu   đðğóšπσруu   -¿ ĄÆĽŁØŖŚŠŞŤŸŹŽŻŒąæƒľłøŗśšşťźžżœˆˇ˘˛˜˝΄΅ΆΈΉΊΌΎΏЁЂЃЄЅІЇЈЉЊЋЌЎЏёђѓєѕіїјљњћќўџҐґ–—―‘’‚“”„†‡•…‰‹›€№™u   -¿ĄÆĽŁØŖŚŠŞŤŸŹŽŻŒąæƒľłøŗśšşťźžżœˆˇ˘˛˜˝΄΅ΆΈΉΊΌΎΏЁЂЃЄЅІЇЈЉЊЋЌЎЏёђѓєѕіїјљњћќўџҐґ†‡‰‹›€№™)utf8_first_of_2utf8_first_of_3utf8_first_of_4utf8_continuationutf8_continuation_strict
UTF8_CLUESz
    (?<! [{utf8_continuation_strict}])
    (
        [{utf8_first_of_2}] [{utf8_continuation}]
        |
        [{utf8_first_of_3}] [{utf8_continuation}]{{2}}
        |
        [{utf8_first_of_4}] [{utf8_continuation}]{{3}}
    )+
    )returnzdict[str, re.Pattern[str]])r\   r   )r/   strr   r]   r\   r,   )r\   zdict[int, None])r\   zdict[int, str] )__doc__
__future__r   r   r7   r   rQ   r   r   SINGLE_QUOTE_REDOUBLE_QUOTE_REr   r-   r*   HTML_ENTITY_REHTML_ENTITIESr0   r;   CONTROL_CHARSALTERED_UTF8_RELOSSY_UTF8_REC1_CONTROL_REord	LIGATURESrU   	WIDTH_MAPr[   __annotations__formatVERBOSEUTF8_DETECTOR_REr^   r   r   <module>rp      s  
 #   	   "**45"**./6 "# ( 45$&8, ,-P "**($ 

	  

>*ItIt Iu It	
 It It Iu Iu Iu It It It It It It  J!" J#$ JJJJJ-	4" 	{	)~B	'N	&_	JS	w	P
N PF 2::	 	 		 	 JJ r   