§
    ŒŸj¾  ã                  óÈ   — d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	m
Z
mZ ddlmZ g d¢Z G d„ d	e¬
¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Zedd„¦   «         ZdS )z
Abstraction of CLI Input.
é    )Úannotations)ÚABCMetaÚabstractmethod)Úcontextmanager)ÚCallableÚContextManagerÚ	Generator)ÚKeyPress)ÚInputÚ	PipeInputÚ
DummyInputc                  óú   — e Zd ZdZedd„¦   «         Zedd„¦   «         Zedd„¦   «         Zdd	„Zdd„Z	e
edd„¦   «         ¦   «         Zedd„¦   «         Zedd„¦   «         Zedd„¦   «         Zedd„¦   «         Zdd„ZdS )r   zó
    Abstraction for any input.

    An instance of this class can be given to the constructor of a
    :class:`~prompt_toolkit.application.Application` and will also be
    passed to the :class:`~prompt_toolkit.eventloop.base.EventLoop`.
    ÚreturnÚintc                ó   — dS )z;
        Fileno for putting this in an event loop.
        N© ©Úselfs    úf/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/prompt_toolkit/input/base.pyÚfilenozInput.fileno   ó   € € € ó    Ústrc                ó   — dS )z@
        Identifier for storing type ahead key presses.
        Nr   r   s    r   Útypeahead_hashzInput.typeahead_hash#   r   r   úlist[KeyPress]c                ó   — dS )zT
        Return a list of Key objects which are read/parsed from the input.
        Nr   r   s    r   Ú	read_keyszInput.read_keys)   r   r   c                ó   — g S )zk
        Flush the underlying parser. and return the pending keys.
        (Used for vt100 input.)
        r   r   s    r   Ú
flush_keyszInput.flush_keys/   s	   € ð
 ˆ	r   ÚNonec                ó   — dS )z>The event loop can call this when the input has to be flushed.Nr   r   s    r   ÚflushzInput.flush6   ó   € àˆr   Úboolc                ó   — dS )z/Should be true when the input stream is closed.Fr   r   s    r   ÚclosedzInput.closed:   s	   € ð ˆur   úContextManager[None]c                ó   — dS )zE
        Context manager that turns the input into raw mode.
        Nr   r   s    r   Úraw_modezInput.raw_mode@   r   r   c                ó   — dS )zH
        Context manager that turns the input into cooked mode.
        Nr   r   s    r   Úcooked_modezInput.cooked_modeF   r   r   Úinput_ready_callbackúCallable[[], None]c                ó   — dS )zj
        Return a context manager that makes this input active in the current
        event loop.
        Nr   ©r   r-   s     r   ÚattachzInput.attachL   r   r   c                ó   — dS )z{
        Return a context manager that makes sure that this input is not active
        in the current event loop.
        Nr   r   s    r   ÚdetachzInput.detachS   r   r   c                ó   — dS )zClose input.Nr   r   s    r   ÚclosezInput.closeZ   r$   r   N©r   r   ©r   r   ©r   r   )r   r!   ©r   r%   ©r   r(   ©r-   r.   r   r(   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r    r#   Úpropertyr'   r*   r,   r1   r3   r5   r   r   r   r   r      sd  € € € € € ðð ð ðð ð ñ „^ðð
 ðð ð ñ „^ðð
 ðð ð ñ „^ðð
ð ð ð ðð ð ð ð Øðð ð ñ „^ñ „Xðð ðð ð ñ „^ðð
 ðð ð ñ „^ðð
 ðð ð ñ „^ðð ðð ð ñ „^ððð ð ð ð ð r   r   )Ú	metaclassc                  óB   — e Zd ZdZed
d„¦   «         Zedd„¦   «         Zd	S )r   z%
    Abstraction for pipe input.
    ÚdataÚbytesr   r!   c                ó   — dS )zFeed byte string into the pipeNr   ©r   rC   s     r   Ú
send_byteszPipeInput.send_bytesd   r   r   r   c                ó   — dS )z Feed a text string into the pipeNr   rF   s     r   Ú	send_textzPipeInput.send_texth   r   r   N)rC   rD   r   r!   )rC   r   r   r!   )r<   r=   r>   r?   r   rG   rI   r   r   r   r   r   _   s^   € € € € € ðð ð ð-ð -ð -ñ „^ð-ð ð/ð /ð /ñ „^ð/ð /ð /r   r   c                  ób   — e Zd ZdZdd„Zdd„Zdd„Zedd
„¦   «         Zdd„Z	dd„Z
dd„Zdd„ZdS )r   z¶
    Input for use in a `DummyApplication`

    If used in an actual application, it will make the application render
    itself once and exit immediately, due to an `EOFError`.
    r   r   c                ó   — t           ‚©N)ÚNotImplementedErrorr   s    r   r   zDummyInput.filenou   s   € Ý!Ð!r   r   c                ó&   — dt          | ¦  «        › �S )Nzdummy-)Úidr   s    r   r   zDummyInput.typeahead_hashx   s   € Ø"�˜4™œÐ"Ð"Ð"r   r   c                ó   — g S rL   r   r   s    r   r   zDummyInput.read_keys{   s   € Øˆ	r   r%   c                ó   — dS )NTr   r   s    r   r'   zDummyInput.closed~   s	   € ð ˆtr   r(   c                ó   — t          ¦   «         S rL   ©Ú_dummy_context_managerr   s    r   r*   zDummyInput.raw_mode„   ó   € Ý%Ñ'Ô'Ð'r   c                ó   — t          ¦   «         S rL   rS   r   s    r   r,   zDummyInput.cooked_mode‡   rU   r   r-   r.   c                ó2   —  |¦   «          t          ¦   «         S rL   rS   r0   s     r   r1   zDummyInput.attachŠ   s   € ð 	ÐÑÔÐå%Ñ'Ô'Ð'r   c                ó   — t          ¦   «         S rL   rS   r   s    r   r3   zDummyInput.detach”   rU   r   Nr6   r7   r8   r9   r:   r;   )r<   r=   r>   r?   r   r   r   r@   r'   r*   r,   r1   r3   r   r   r   r   r   m   sÊ   € € € € € ðð ð"ð "ð "ð "ð#ð #ð #ð #ðð ð ð ð ðð ð ñ „Xðð
(ð (ð (ð (ð(ð (ð (ð (ð(ð (ð (ð (ð(ð (ð (ð (ð (ð (r   r   r   úGenerator[None, None, None]c               #  ó   K  — d V — d S rL   r   r   r   r   rT   rT   ˜   s   è è € à	€E€E€E€E€Er   N)r   rY   )r?   Ú
__future__r   Úabcr   r   Ú
contextlibr   Útypingr   r   r	   Úprompt_toolkit.key_bindingr
   Ú__all__r   r   r   rT   r   r   r   ú<module>ra      sF  ððð ð #Ð "Ð "Ð "Ð "Ð "à 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø %Ð %Ð %Ð %Ð %Ð %Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6à /Ð /Ð /Ð /Ð /Ð /ðð ð €ðHð Hð Hð Hð H�gð Hñ Hô Hð HðV/ð /ð /ð /ð /�ñ /ô /ð /ð((ð ((ð ((ð ((ð ((�ñ ((ô ((ð ((ðV ð
ð 
ð 
ñ „ð
ð 
ð 
r   