§
    Ìtºfã  ã                   ón   — d Z dZdZdZ	 dd lmZ dS # e$ r  ee¦  «        Z G d„ de	¦  «        ZY dS w xY w))ÚUtf8Validator(�  é    r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   é   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   é	   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   é   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   é   r   é   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   é
   é   r
   r
   r
   r
   r
   r
   r
   r
   r
   r
   r
   é   r
   r
   é   é   r   r   é   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
   r   r
   r   r   r   r   r   r   r   r
   r   r   r   r   r   r
   r   r
   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   c                   ó.   — e Zd ZdZdZd„ Zd„ Zd„ Zd„ ZdS )r   zö
        Incremental UTF-8 validator with constant memory consumption (minimal state).

        Implements the algorithm "Flexible and Economical UTF-8 Decoder" by
        Bjoern Hoehrmann (http://bjoern.hoehrmann.de/utf-8/decoder/dfa/).
        )Ú
_codepointÚ_stateÚ_indexc                 óX   — d | _         d | _        d | _        |                      ¦   «          d S )N)r   r   r   Úreset©Úselfs    ú_/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/autobahn/websocket/utf8validator.pyÚ__init__zUtf8Validator.__init__V   s(   € Ø"ˆDŒOØˆDŒKØˆDŒKØ�JŠJ‰LŒLˆLˆLˆLó    c                 óÐ   — t           |         }| j        t          k    r|dz  | j        dz  z  | _        nd|z	  |z  | _        t           d| j        dz  z   |z            | _        | j        S )a†  
            Eat one UTF-8 octet, and validate on the fly.

            Returns ``UTF8_ACCEPT`` when enough octets have been consumed, in which case
            ``self.codepoint`` contains the decoded Unicode code point.

            Returns ``UTF8_REJECT`` when invalid UTF-8 was encountered.

            Returns some other positive integer when more octets need to be eaten.
            é?   r   éÿ   é   é   )ÚUTF8VALIDATOR_DFA_Sr   ÚUTF8_ACCEPTr   )r   ÚbÚtts      r   ÚdecodezUtf8Validator.decode\   si   € õ % QÔ'ˆBØŒ{�kÒ)Ð)Ø#$ t¡8°´À1Ñ0DÑ"E�”�à#'¨2¡:°Ñ"2�”Ý-¨c°D´KÀ"Ñ4DÑ.DÀrÑ.IÔJˆDŒKØ”;Ðr   c                 ó:   — t           | _        d| _        d| _        dS )z[
            Reset validator to start new incremental UTF-8 decode/validation.
            r   N)r    r   r   r   r   s    r   r   zUtf8Validator.reseto   s   € õ &ˆDŒKØˆDŒOØˆDŒKˆKˆKr   c                 óR  — t          |¦  «        }d}| j        }||k     r_t          d|dz  z   t          ||                  z            }|t          k    r"|| _        | xj        |z  c_        dd|| j        fS |dz  }||k     °_|| _        | xj        |z  c_        d|t
          k    || j        fS )a‹  
            Incrementally validate a chunk of bytes provided as string.

            Will return a quad ``(valid?, endsOnCodePoint?, currentIndex, totalIndex)``.

            As soon as an octet is encountered which renders the octet sequence
            invalid, a quad with ``valid? == False`` is returned. ``currentIndex`` returns
            the index within the currently consumed chunk, and ``totalIndex`` the
            index within the total consumed sequence that was the point of bail out.
            When ``valid? == True``, currentIndex will be ``len(ba)`` and ``totalIndex`` the
            total amount of consumed bytes.
            r   r   r   Fr   T)Úlenr   r   ÚUTF8_REJECTr   r    )r   ÚbaÚlÚiÚstates        r   ÚvalidatezUtf8Validator.validatew   s¿   € õ" �B‘”ˆAØˆAØ”KˆEØ�a’%�%å+¨C°5¸A±:Ñ,>ÕATÐUWÐXYÔUZÔA[Ñ,[Ô\�Ø�KÒ'Ð'Ø"'�D”KØ�K”K 1Ñ$�K”KØ  %¨¨D¬KÐ7Ð7Ø�Q‘�ð �a’%�%ð  ˆDŒKØˆKŒK˜1ÑˆKŒKØ˜¥+Ò-¨q°$´+Ð=Ð=r   N)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r#   r   r,   © r   r   r   r   H   sa   € € € € € ð	ð 	ð
ˆ	ð	ð 	ð 	ð	ð 	ð 	ð&	ð 	ð 	ð	>ð 	>ð 	>ð 	>ð 	>r   r   N)
Ú__all__ÚUTF8VALIDATOR_DFAr    r'   Úwsaccel.utf8validatorr   ÚImportErrorÚbytesr   Úobjectr2   r   r   ú<module>r9      s´   ðð> €ðÐ ð" €Ø€ð\>Ø3Ð3Ð3Ð3Ð3Ð3Ð3Ð3øàð Y>ð Y>ð Y>ð  ˜%Ð 1Ñ2Ô2ÐðM>ð M>ð M>ð M>ð M>˜ñ M>ô M>ð M>ð M>ð M>ð M>ðY>øøøs   Š ’4³4