+
    Ri
                    
   ^ RI Ht ^ RIt]P                  R8X  g   Q h^ RIHtHt ^ RIHtH	t	 ^ RI
HtHt ^ RIHt ^ RIHt ^R	IHt ^R
IHt ^RIHt ^RIHt R.t^t^t ! R R4      t]P:                  ! ]4       R R ltR# )    )annotationsNwin32)byrefwindll)DWORDHANDLE)AnyTextIOSize)STD_OUTPUT_HANDLE)Output)
ColorDepth)Vt100_Output)Win32OutputWindows10_Outputc                  d    ] tR t^tRtRR R lltR R lt]R R l4       tR	 R
 lt	R R lt
RtR# )r   zN
Windows 10 output abstraction. This enables and uses vt100 escape sequences.
Nc               $    V ^8  d   QhRRRRRR/# )   stdoutr
   default_color_depthzColorDepth | NonereturnNone )formats   "^/home/ubuntu/hermes-agent/venv/lib/python3.14/site-packages/prompt_toolkit/output/windows10.py__annotate__Windows10_Output.__annotate__!   s)     Q QQ3DQ	Q    c                	    W n         \        WR 7      V n        \        VR VR 7      V n        \        \        P                  P                  \        4      4      V n
        R# ))r   c                     \        ^ ^ 4      # )r   r   r   r   r   <lambda>+Windows10_Output.__init__.<locals>.<lambda>'   s
    DAJr   N)r   r   win32_outputr   vt100_outputr   r   kernel32GetStdHandler   	_hconsole)selfr   r   s   &&&r   __init__Windows10_Output.__init__!   sK     $7 'X(&<O
   < <=N OPr   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   +   s     J Jt Jr   c                   \        ^ 4      p\        P                  P                  V P                  \        V4      4       \        P                  P                  V P                  \        \        \        ,          4      4        V P                  P                  4        \        P                  P                  V P                  V4       R#   \        P                  P                  T P                  T4       i ; i)z#
Write to output stream and flush.
N)r   r   r&   GetConsoleModer(   r   SetConsoleModeENABLE_PROCESSED_INPUT"ENABLE_VIRTUAL_TERMINAL_PROCESSINGr%   flush)r)   original_modes   & r   r2   Windows10_Output.flush+   s     a 	&&t~~u]7KL 	&&NN(+MMN	

	J##% OO**4>>=IFOO**4>>=Is   C ,C4c                   V ^8  d   QhRR/# r   r   boolr   )r   s   "r   r   r   A   s       r   c                	    R # )Fr   r)   s   &r   responds_to_cpr Windows10_Output.responds_to_cpr@   s    r   c                    V ^8  d   QhRRRR/# )r   namestrr   r	   r   )r   s   "r   r   r   D   s     4 4 4 4r   c                	h    VR9   d   \        V P                  V4      # \        V P                  V4      # )get_size)r@   get_rows_below_cursor_positionscroll_buffer_to_promptget_win32_screen_buffer_info)getattrr$   r%   )r)   r=   s   &&r   __getattr__Windows10_Output.__getattr__D   s9      	
 	
 4,,d334,,d33r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   X   s     % % %r   c                V    V P                   e   V P                   # \        P                  # )z
Return the default color depth for a windows terminal.

Contrary to the Vt100 implementation, this doesn't depend on a $TERM
variable.
)r   r   
TRUE_COLORr9   s   &r   get_default_color_depth(Windows10_Output.get_default_color_depthX   s*     ##/+++ $$$r   )r(   r   r%   r$   )N)__name__
__module____qualname____firstlineno____doc__r*   r2   propertyr:   rE   rJ   __static_attributes__r   r   r   r   r      s6    QJ*  4(% %r   c                   V ^8  d   QhRR/# r6   r   )r   s   "r   r   r   o   s     @ @d @r   c                    \         P                  R8w  d   R# \        \        P                  P                  \        4      4      p \        ^ 4      p\        P                  P                  V \        V4      4        \        P                  P                  V \        \        \        ,          4      4      pV^8H  \        P                  P                  W4       #   \        P                  P                  Y4       i ; i)zS
Returns True when we're running Windows and VT100 escape sequences are
supported.
r   F)sysplatformr   r   r&   r'   r   r   r.   r   r/   r0   r1   )hconsoler3   results      r   is_win_vt100_enabledrY   o   s    
 ||wfoo223DEFH !HM
OO""8U=-AB@oo44e25WWX
 {&&x?&&x?s   9<C !C6)
__future__r   rU   rV   ctypesr   r   ctypes.wintypesr   r   typingr	   r
   prompt_toolkit.data_structuresr   prompt_toolkit.win32_typesr   baser   color_depthr   vt100r   r   r   __all__r0   r1   r   registerrY   r   r   r   <module>re      st    " 

||w    )  / 8  #   
   %+ "M% M%`   !@r   