+
     Bi*e                    `  a  0 t $ ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIHt ^RI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
]R&    ^ RItRt]'       d   ^ RI H!t!H"t"H#t# MR t# ! R R]$4      t%]	PL                  ]%3t'Rt(])! ]	RR4      t*])! ]	RR4      t+R R lt,. ROt-/ t.R]R&   ]- F  t/],! ].]/4       K  	  A/A,]P`                  ! R4      t1 ]Pd                  t2R]R&    ! R R]4      t5R#   ] d    Rt Li ; i  ]3 d     ! R R4      t4]4t2 L1i ; i)     )annotationsN)ioctl)terminfo)ConsoleEvent)	tcgetattr	tcsetattr)trace)
EventQueue)wlenztypes.ModuleType | NoneposixF)IOLiteraloverloadc                    R # N )funcs   &+/usr/lib/python3.14/_pyrepl/unix_console.py<lambda>r   8   s    D    c                      ] tR t^;tRtR# )InvalidTerminalr   N)__name__
__module____qualname____firstlineno____static_attributes__r   r   r   r   r   ;   s    r   r   repaintFIONREAD
TIOCGWINSZc               $    V ^8  d   QhRRRRRR/# )   
dictionarydict[int, int]rateintreturnNoner   )formats   "r   __annotate__r+   K   s!     ; ;. ; ; ;r   c                l    R V,          p\        \        V4      '       d   W\        \        V4      &   R# R# )zB%dN)hasattrtermiosgetattr)r$   r&   baudrate_names   && r   add_baudrate_if_supportedr1   K   s,    DLMw&&6:77M23 'r   r%   ratedicts   \$<([0-9]+)((?:/|\*){0,2})>ztype[select.poll]pollc                  2    ] tR t^ztR tR tRR R lltRtR# )MinimalPollc                	    R # r   r   selfs   &r   __init__MinimalPoll.__init__{   s    r   c                	    Wn         R # r   fd)r8   r=   flags   &&&r   registerMinimalPoll.register~   s    Gr   Nc                    V ^8  d   QhRRRR/# )r#   timeoutfloat | Noner(   z	list[int]r   )r*   s   "r   r+   MinimalPoll.__annotate__   s     	 	 		 	r   c                	    Vf)   \         P                   ! V P                  .. . 4      w  r#pV# \         P                   ! V P                  .. . VR,          4      w  r#pV# )N  )selectr=   )r8   rB   rwes   &&   r   r3   MinimalPoll.poll   sS     --	2r:a H !--	2r74<HaHr   r<   r   )r   r   r   r   r9   r?   r3   r   r   r   r   r5   r5   z   s    			 	r   r5   c                    a  ] tR t^tR6R V 3R llltR tR R ltR R ltR tR	 t	R
 t
R tR R ltR7R R lltR8R R lltR t]'       d   R tMR tR tR tR tR t]'       d   R tMR tR t]R 4       tR R ltR R  ltR! tR" tR# tR$ t R% t!R& t"R' t#R( R) lt$R* R+ lt%R, R- lt&R. t'R/ t(R0 t)R1 t*R2 t+R3 t,]-3R4 lt.R5t/V ;t0# )9UnixConsolec               (    V ^8  d   QhRRRRRRRR/# )r#   f_inzIO[bytes] | intf_outtermstrencodingr   )r*   s   "r   r+   UnixConsole.__annotate__   s8     G= G=G= G= 	G=
 G=r   c                  <a  \         SS `  WW44       \        4       S n        S P                  P	                  S P
                  \        P                  4       \        P                  ! T;'       g    R4      S n        VS n
        \        P                  ! 4       R8H  ;'       d    \        P                  ! R4      R8H  S n        \         R%R R ll4       p\         R R l4       pR%R	 V 3R
 lllpV! R4      S n        V! RRR7      S n        V! R4      S n        V! RRR7      S n        V! RRR7      S n        V! RRR7      S n        V! RRR7      S n        V! RRR7      S n        V! RRR7      S n        V! RRR7      S n        V! R4      S n        V! RRR7      S n        V! RRR7      S n        V! RRR7      S n        V! RRR7      S n        V! R4      S n         V! RRR7      S n!        V! RRR7      S n"        V! RRR7      S n#        V! R RR7      S n$        V! R!RR7      S n%        V! R"RR7      S n&        V! R#RR7      S n'        V! R$RR7      S n(        S PS                  4        \U        S P
                  S PV                  S P                  4      S n,        ^S n-        \\        P\                  ! \\        P^                  S P`                  4       R# )&a  
Initialize the UnixConsole.

Parameters:
- f_in (int or file-like object): Input file descriptor or object.
- f_out (int or file-like object): Output file descriptor or object.
- term (str): Terminal name.
- encoding (str): Encoding to use for I/O operations.
NDarwinTERM_PROGRAMApple_Terminalc               $    V ^8  d   QhRRRRRR/# )r#   caprR   optionalzLiteral[False]r(   bytesr   )r*   s   "r   r+   *UnixConsole.__init__.<locals>.__annotate__   s    PPCP>PePr   c                    R # r   r   rZ   r[   s   &&r   
_my_getstr(UnixConsole.__init__.<locals>._my_getstr   s    MPr   c               $    V ^8  d   QhRRRRRR/# r#   rZ   rR   r[   boolr(   zbytes | Noner   )r*   s   "r   r+   r]      s    EECE4ELEr   c                    R # r   r   r_   s   &&r   r`   ra      s    BEr   c               $    V ^8  d   QhRRRRRR/# rc   r   )r*   s   "r   r+   r]      s!     	 	C 	4 	L 	r   c                t   < SP                   P                  V 4      pV'       g   Vf   \        RV  R24      hV# )Nz#terminal doesn't have the required z capability)r   getr   )rZ   r[   rH   r8   s   && r   r`   ra      s>    !!#&A	%9#kJ  Hr   belcivisT)r[   clearcnormcubcub1cudcud1cufcuf1cupcuucuu1dch1dchelhpaichich1indpadrirmkxsmkx)F)1superr9   r3   pollobr?   input_fdrG   POLLINr   TermInforQ   platformsystemosgetenvis_apple_terminalr   _bel_civis_clear_cnorm_cub_cub1_cud_cud1_cuf_cuf1_cup_cuu_cuu1_dch1_dch_el_hpa_ich_ich1_ind_pad_ri_rmkx_smkx_UnixConsole__setup_movementr   rS   event_queuecursor_visiblesignalSIGCONT_sigcont_handler)r8   rO   rP   rQ   rS   r`   	__class__s   f&&&& r   r9   UnixConsole.__init__   sF     	d5fT]]FMM: ))$,,$7	OO) > >		.)-== 	
 
P 
P	E 
E	 	 u%	 48 ) 48ut4	6
ut4	6
ut4	6
u%	ut4	6
6
ut4	d#ut4	ut4	6
ut4	ut4	dT26
6
%dmmT]]DMMRfnnd&;&;<r   c                	F    V P                  4        V P                  4        R # r   )restorepreparer8   signumframes   &&&r   r   UnixConsole._sigcont_handler   s    r   c                    V ^8  d   QhRRRR/# )r#   nr'   r(   r\   r   )r*   s   "r   r+   rT      s     ) ) ) )r   c                	D    \         P                  ! V P                  V4      # r   )r   readr   )r8   r   s   &&r   __readUnixConsole.__read   s    wwt}}a((r   c                    V ^8  d   QhRRRR/# )r#   rS   rR   r(   r)   r   )r*   s   "r   r+   rT      s     ! ! ! !r   c                    Wn         R# )zb
Change the encoding used for I/O operations.

Parameters:
- encoding (str): New encoding to use.
N)rS   )r8   rS   s   &&r   change_encodingUnixConsole.change_encoding   s	     !r   c                   Vw  r4V P                   '       g   \        V P                  4      \        \        V4      V P                  4      8  d   V P                  4        V P                  ^ \        V P                  4      ^,
          4       V P                  R4       ^ \        V P                  4      3V n        V P                  P                  R4       K  M@\        V P                  4      \        V4      8  d   V P                  P                  R4       K@  \        V4      V P                  8  d   ^V n         V P                  V n        V P                  w  rVV P                  ;rxV P                  p	WH8  d   TpMgWHV	,           8  d   WI,
          ^,           pMJV^ 8  dD   \        V4      W,           8  d.   \        \        V4      V	,
          ^ 4      pVP                  R4       V P                  WwV	,            p
WW,            pWx8  d   V P                  '       d   V P                  4        V P                  V P                  ^ ^ 4       ^ V3V n        \!        Wx,
          4       FA  pV P                  V P                  4       V
P#                  R4       V
P%                  ^ R4       KC  	  MWx8  d   V P&                  '       d   V P                  4        V P                  V P                  V P                  ^,
          ^ 4       ^ WpP                  ,           ^,
          3V n        \!        W,
          4       F@  pV P                  V P&                  4       V
P#                  ^ 4       V
P                  R4       KB  	  Wn        \)        \!        WV	,           4      W4       F!  w  pppW8w  g   K  V P+                  WW4       K#  	  \        V4      pV\        V
4      8  dR   V P                  4        V P                  ^ V4       ^ V3V n        V P                  V P,                  4       V^,          pKa  V P/                  4        VP1                  4       V n        V P3                  W44       V P5                  4        R# )z
Refresh the console screen.

Parameters:
- screen (list): List of strings representing the screen contents.
- c_xy (tuple): Cursor position (x, y) on the screen.

 N)_UnixConsole__gone_talllenscreenminheight_UnixConsole__hide_cursor_UnixConsole__move_UnixConsole__writeposxyappend_UnixConsole__move_tall_UnixConsole__offsetmaxr   _UnixConsole__write_coder   rangepopinsertr   zip _UnixConsole__write_changed_liner   _UnixConsole__show_cursorcopymove_cursorflushoutput)r8   r   c_xycxcypxpy
old_offsetoffsetr   oldscrnewscriyoldlinenewlines   &&&             r   refreshUnixConsole.refresh   sQ    dkk"SVdkk%BB""$As4;;/!34T"DKK 00
""2& C dkk"S[0""2&v;$ D**DK"mm+
 ;FF?"[1_FaZCK&/9Vv-q1FMM"Zv*=>1 4888 diiA.JDJ:./!!$((+

2a$ 0  TYYY diiq!<J4q88DJ6./!!$)),

1b! 0
  v/@	
!))!gB A K#f+o KK1ADJdhh'FAkkm r   c                   W P                   8  g"   W P                   V P                  ,           8  d(   V P                  P                  \	        RR4      4       R# V P                  W4       W3V n        V P                  4        R# )zy
Move the cursor to the specified position on the screen.

Parameters:
- x (int): X coordinate.
- y (int): Y coordinate.
scrollN)r   r   r   r   r   r   r   r   r8   xr   s   &&&r   r   UnixConsole.move_cursor9  s\     }}]]T[[%@ @##E(D$9:KKDJr   c                   \        V P                  4      V n        V P                  P                  4       pV;P                  \
        P                  \
        P                  ,          \
        P                  ,          ( ,          un        V;P                  \
        P                  ( ,          un	        V;P                  \
        P                  \
        P                  ,          ( ,          un        V;P                  \
        P                  ,          un        V;P                  \
        P                  ,          un        V;P                   \
        P"                  \
        P$                  ,          \
        P&                  ,          ( ,          un        V;P                   \
        P(                  ,          un        ^VP*                  \
        P,                  &   ^ VP*                  \
        P.                  &    \1        V P                  \
        P2                  V4       V P<                  '       d"   \>        P@                  ! V PB                  R4       . V n"        V PG                  4       w  V n$        V n%        . V n&        RV n'        ^ V n(        V PR                  V n*        ^ V n+        V PY                  V PZ                  4        \\        P\                  ! \\        P^                  V P`                  4      V n1        V Pg                  4        R#   \
        P4                   d3   pTP6                  ^ ,          \8        P:                  8w  d   h  Rp?EL(Rp?ii ; i  \d         d     Lii ; i)z2
Prepare the console for input/output operations.
Ns   [?7lr   r   )4r   r   _UnixConsole__svtermstater   iflagr.   INPCKISTRIPIXONoflagOPOSTcflagCSIZEPARENBCS8BRKINTlflagICANONECHOIEXTENISIGccVMINVTIMEr	   	TCSADRAINerrorargserrnoEIOr   r   write	output_fdr   getheightwidthr   width_UnixConsole__bufferr   r   _UnixConsole__move_shortr   r   _UnixConsole__maybe_write_coder   r   SIGWINCH_UnixConsole__sigwinchold_sigwinch
ValueError$_UnixConsole__enable_bracketed_paste)r8   rawrJ   s   &  r   r   UnixConsole.prepareH  s    't}}5  %%'		w}}w~~5DEE			w}}%%			w}}w~~566			W[[ 			W^^#			w~~4w~~EFF			W\\!	 w|| !w}}	dmmW%6%6< !!!HHT^^[1"&"5"5"7TZ
''

+	 &foot OD 	%%'9 }} 	vvayEII% 	 &	2  		s*   .%K9 34M 9M 'L;;M MMc                ^   V P                  4        V P                  V P                  4       V P                  4         \	        V P
                  \        P                  V P                  4       V P                  '       d"   \        P                  ! V P                   R4       \#        V R4      '       d4   \$        P$                  ! \$        P&                  V P(                  4       V =R# R#   \        P                   d2   pTP                  ^ ,          \        P                  8w  d   h  Rp?LRp?ii ; i)z*
Restore the console to the default state
Ns   [?7hr  )%_UnixConsole__disable_bracketed_paster  r   r   r	   r   r.   r  r   r  r  r  r  r   r   r  r  r-   r   r  r  )r8   rJ   s   & r   r   UnixConsole.restorew  s     	&&(

+	dmmW%6%68J8JK
 !!!HHT^^[14((MM&//4+<+<=! ) }} 	vvayEII% &	s   /C& &D,;'D''D,c                    V ^8  d   QhRRRR/# )r#   charzint | bytesr(   r)   r   )r*   s   "r   r+   rT     s     $ $k $d $r   c                V    \        RVR7       V P                  P                  V4       R# )z.
Push a character to the console event queue.
zpush char {char!r})r  N)r
   r   push)r8   r  s   &&r   	push_charUnixConsole.push_char  s#     	".d#r   c                    V ^8  d   QhRRRR/# )r#   blockrd   r(   zEvent | Noner   )r*   s   "r   r+   rT     s     & &t &| &r   c                b   V'       g   V P                  ^ R7      '       g   R# V P                  P                  4       '       d%     V P                  V P	                  ^4      4       KD  V P                  P                  4       #   \
         d   pTP                  \        P                  8X  dF   T P                  P                  4       '       g    T P                  P                  4       u Rp?#  Rp?K  TP                  \        P                  8X  d   \        \        P                  4      hh Rp?ii ; i)z
Get an event from the console event queue.

Parameters:
- block (bool): Whether to block until an event is available.

Returns:
- Event: Event object from the event queue.
)rB   N)waitr   emptyr  _UnixConsole__readOSErrorr  EINTRrh   r  
SystemExit)r8   r  errs   && r   	get_eventUnixConsole.get_event  s     TYYqY11$$&&NN4;;q>2 ##%%  	yyEKK/#//5577#'#3#3#7#7#99$eii/(33	s*    B D.>D)D)$D.09D))D.c                    V ^8  d   QhRRRR/# )r#   rB   rC   r(   rd   r   )r*   s   "r   r+   rT     s     
 
L 
D 
r   c                    V P                   P                  4       '       * ;'       g%    \        V P                  P	                  V4      4      # )z!
Wait for events on the console.
)r   r!  rd   r   r3   )r8   rB   s   &&r   r   UnixConsole.wait  s?    
   &&(( / /DKK$$W-.	
r   c                Z    V'       d   V P                  4        R# V P                  4        R# )zS
Set the visibility of the cursor.

Parameters:
- visible (bool): Visibility flag.
N)r   r   )r8   visibles   &&r   set_cursor_visUnixConsole.set_cursor_vis  s       r   c                ~    \        \        P                  R,          4      \        \        P                  R,          4      3#   \        \        \
        3 de     \        T P                  \        R4      pM  \         d    Ru u # i ; i\        P                  ! RT4      R,          w  r#T'       g   Ru # Y#3u # i ; i)^
Get the height and width of the console.

Returns:
- tuple: Height and width of the console.
LINESCOLUMNShhhh:r   r#   Ns              P   )r'   r   environKeyError	TypeErrorr  r   r   r!   r#  structunpack)r8   sizer   r	  s   &   r   r  UnixConsole.getheightwidth  s    
%2::g./RZZ	5J1KKKi4 %" 
KHD "!M" &fd ;C @!M}$%s;   ?A B<A54B<5BB<B-B<6B<;B<c                     \        \        P                  R,          4      \        \        P                  R,          4      3#   \        \        \
        3 d    Ru # i ; i)r1  r2  r3  r5  )r'   r   r8  r9  r:  r  r7   s   &r   r  r>    sI    2::g./RZZ	5J1KKKi4 s   ?A AAc                d    \         P                  ! V P                  \         P                  4       R# )z+
Discard any pending input on the console.
N)r.   tcflushr   TCIFLUSHr7   s   &r   forgetinputUnixConsole.forgetinput  s     	w'7'78r   c                    V P                    F[  w  rV'       d   V P                  V4       K   \        P                  ! V P                  VP                  V P                  R4      4       K]  	  V P                   R R# )z
Flush the output buffer.
replace:NNNN)r
  _UnixConsole__tputsr   r  r  encoderS   )r8   textiscodes   &  r   r   UnixConsole.flushoutput  sR     !MMLDT"T]]I)NO	 *
 MM!r   c                P   \        V P                  4      ^,
          pV^ 8  d%   V P                  V,          '       g   V^,          pK+  V P                  ^ \        WP                  V P
                  ,           ^,
          4      4       V P                  R4       V P                  4        R# )z8
Finish console operations and flush the output buffer.
z
N)r   r   r   r   r   r   r   r   )r8   r   s   & r   finishUnixConsole.finish  sp     q 1fT[[^^FAAs1kkDMM9A=>?Vr   c                \    V P                  V P                  4       V P                  4        R# )z
Emit a beep sound.
N)r  r   r   r7   s   &r   beepUnixConsole.beep  s"     			*r   c                ^   \        RRR4      pV P                  P                  4       '       gc   V P                  P                  4       pV;P                  VP                  ,          un        V;P
                  VP
                  ,          un        K  \        P                  ! R\        V P                  \        R4      4      ^ ,          p\        RVR7       V P                  V4      p\        W@P                  R4      pV;P                  V,          un        V;P
                  V,          un        V# )	i
Get pending events from the console event queue.

Returns:
- Event: Pending event from the event queue.
keyr   r   r   s       zgetpending({a}))arF  )r   r   r!  rh   datar  r;  r<  r   r   r    r
   r"  rR   rS   r8   rJ   e2amountr  rV  s   &     r   
getpendingUnixConsole.getpending  s     eR%A&&,,..%%))+"''!]]3dmmX{(STUVWF#v.++f%CsMM95DFFdNFEESLEHr   c                   \        RRR4      pV P                  P                  4       '       gc   V P                  P                  4       pV;P                  VP                  ,          un        V;P
                  VP
                  ,          un        K  RpV P                  V4      p\        W@P                  R4      pV;P                  V,          un        V;P
                  V,          un        V# )rS  rT  r   r   i'  rF  )	r   r   r!  rh   rV  r  r"  rR   rS   rW  s   &     r   rZ  r[  &  s     eR%A&&,,..%%))+"''!F++f%CsMM95DFFdNFEESLEHr   c                    V P                  V P                  4       ^V n        V P                  V n        RV n        . V n        R# )z
Clear the console screen.
Nr   )r   r   r   r   r   r   r   r7   s   &r   rk   UnixConsole.clear;  s9     	$++&&&
r   c                	p    \         e.   \         P                  ! 4       '       d   \         P                  # R # R # r   )r   _is_inputhook_installed
_inputhookr7   s   &r   
input_hookUnixConsole.input_hookE  s-     !>!>!@!@### "Ar   c                   V ^8  d   QhRR/# r#   r(   r)   r   )r*   s   "r   r+   rT   L  s     1 1$ 1r   c                	H    \         P                  ! V P                  R 4       R# )s   [?2004hNr   r  r  r7   s   &r   __enable_bracketed_paste$UnixConsole.__enable_bracketed_pasteL      
0r   c                   V ^8  d   QhRR/# re  r   )r*   s   "r   r+   rT   O  s     1 14 1r   c                	H    \         P                  ! V P                  R 4       R# )s   [?2004lNrg  r7   s   &r   __disable_bracketed_paste%UnixConsole.__disable_bracketed_pasteO  rj  r   c                    T P                  '       d%   T P                  '       d   T P
                  T n        MAT P                  '       d%   T P                  '       d   T P                  T n        M\        R4      hT P                  '       d%   T P                  '       d   T P                  T n        MAT P                  '       d%   T P                  '       d   T P                   T n        M\        R4      hT P"                  '       d   T P"                  T n        M@T P&                  '       d(   \(        P*                  ! T P&                  ^4      T n        MRT n        T P,                  '       d   T P,                  T n        M@T P0                  '       d(   \(        P*                  ! T P0                  ^4      T n        MRT n        T P2                  T n        R# )zC
Set up the movement functions based on the terminal capabilities.
z"insufficient terminal (horizontal)z insufficient terminal (vertical)N)r   _UnixConsole__move_x_hpa_UnixConsole__move_xr   r   _UnixConsole__move_x_cub_cufr   r   _UnixConsole__move_x_cub1_cuf1RuntimeErrorr   r   _UnixConsole__move_y_cuu_cud_UnixConsole__move_yr   r   _UnixConsole__move_y_cuu1_cud1r   rv   r   r   tparmr   r{   r   r  r   r7   s   &r   __setup_movementUnixConsole.__setup_movementR  s    YYY4999 11DMZZZDJJJ 33DMCDD999 11DMZZZDJJJ 33DMABB:::

DIYYY tyy!4DIDI:::

DIYYY tyy!4DIDI''r   c                	   \        \        V4      \        V4      4      p^ p^ p^ p^ p	V F&  p
W8  d    MV	\        V
4      ,          p	V^,          pK(  	  Wu8  dD   W&,          W6,          8X  d1   W6,          R8w  d$   V\        W6,          4      ,          pV^,          pKI  W&R W6^,           R 8X  d   V P                  '       d   WP                  ^,          8X  d5   WpP                  ^ ,          8  d   W(V W8^,           V^,            8X  d   TpTp\        W6,          4      pV P	                  Wq4       V P                  V P                  4       V P                  W6,          4       W{,           V3V n        EM>Wu8  d   W&^,           R W6^,           R 8X  dp   \        W&,          4      \        W6,          4      8X  dK   \        W6,          4      pV P	                  Wq4       V P                  W6,          4       W{,           V3V n        EMV P                  '       Ed$   V P                  '       Ed   \        V4      V P                  8X  d   V\        V4      ^,
          8  d   W6^,           R W&R 8X  d   V P                  4        V P	                  V P                  ^,
          V4       V P                  ^,
          V3V n        V P                  V P                  4       \        W6,          4      pV P	                  Wq4       V P                  V P                  4       V P                  W6,          4       V^,           V3V n        MzV P                  4        V P	                  Wq4       \        V4      \        V4      8  d   V P                  V P                  4       V P                  W6R 4       \        V4      V3V n        RV9   d   V P                  ^ V4       R# R# )r   Nr   )r   r   r{   r   r   r   r   rv   r	  r   r   r   )r8   r   r   r   px_coordminlenx_posx_coordpx_posjccharacter_widths   &&&&&       r   __write_changed_line UnixConsole.__write_changed_linev  s   
 T']DM2A}aLAaKF	  '.0&(tGN++GQJE 6?gaik22tyyyZZ]"jjm+5)WaZ%!)-LL""7>2OKK#dii(LL( 2A5DJ 	$	(<<W^$W^(<<"7>2OKK#LL( 2A5DJ III			W+$w-!++	B'7+<< KK

Q*a*DJdii("7>2OKK#dii(LL((1,a/DJ  KK#G}tG},!!$((+LL)g)DJW Q"	 r   c                	@    V P                   P                  V^ 34       R# r   N)r
  r   )r8   rI  s   &&r   __writeUnixConsole.__write  s    dAY'r   c                	l    V P                   P                  \        P                  ! V.VO5!  ^34       R#    N)r
  r   r   rx  r8   fmtr  s   &&*r   __write_codeUnixConsole.__write_code  s'    hnnS848!<=r   c                	B    V'       d   V P                   ! V.VO5!   R # R # r   )r   r  s   &&*r   __maybe_write_codeUnixConsole.__maybe_write_code  s    c)D) r   c                	$   V P                   f   Q hV P                  f   Q hWP                  ^,          ,
          pV^ 8  d$   V P                  W P                   ,          4       R # V^ 8  d&   V P                  V) V P                  ,          4       R # R # r   )r   r   r   r   r8   r   dys   && r   __move_y_cuu1_cud1UnixConsole.__move_y_cuu1_cud1  sr    zz%%%zz%%%A6b::o.!Vsdjj01 r   c                	    WP                   ^,          ,
          pV^ 8  d   V P                  V P                  V4       R# V^ 8  d    V P                  V P                  V) 4       R# R# r  )r   r   r   r   r  s   && r   __move_y_cuu_cudUnixConsole.__move_y_cuu_cud  O    A6dii,!Vdii"- r   c                    V ^8  d   QhRRRR/# r#   r   r'   r(   r)   r   )r*   s   "r   r+   rT     s     , ,c ,d ,r   c                	p    WP                   ^ ,          8w  d   V P                  V P                  V4       R# R# r  )r   r   r   )r8   r   s   &&r   __move_x_hpaUnixConsole.__move_x_hpa  s)    

1dii+ r   c                    V ^8  d   QhRRRR/# r  r   )r*   s   "r   r+   rT     s     2 2C 2D 2r   c                	&   V P                   f   Q hV P                  f   Q hWP                  ^ ,          ,
          pV^ 8  d%   V P                  V P                   V,          4       R # V^ 8  d&   V P                  V P                  V) ,          4       R # R # r   )r   r   r   r   r8   r   dxs   && r   __move_x_cub1_cuf1UnixConsole.__move_x_cub1_cuf1  st    zz%%%zz%%%A6djj2o.!VdjjRC01 r   c                    V ^8  d   QhRRRR/# r  r   )r*   s   "r   r+   rT     s     . .# .$ .r   c                	    WP                   ^ ,          ,
          pV^ 8  d   V P                  V P                  V4       R# V^ 8  d    V P                  V P                  V) 4       R# R# r  )r   r   r   r   r  s   && r   __move_x_cub_cufUnixConsole.__move_x_cub_cuf  r  r   c                	J    V P                  V4       V P                  V4       R # r   )rq  rv  r   s   &&&r   __move_shortUnixConsole.__move_short  s    aar   c                	    ^ W P                   ,
          u;8:  d   V P                  8  g   M Q W P                   ,
          4       hV P                  V P                  W P                   ,
          V4       R# r  )r   r   r   r   r   s   &&&r   __move_tallUnixConsole.__move_tall  sI    A%33FQ5FF3$))Q%6:r   c                	    V P                  4       w  V n        V n        V P                  P	                  \        R R4      4       R# )resizeN)r  r   r	  r   r   r   r   s   &&&r   
__sigwinchUnixConsole.__sigwinch  s4    "&"5"5"7TZh 56r   c                	r    V P                   '       d%   V P                  V P                  4       ^ V n         R# R# r  )r   r  r   r7   s   &r   __hide_cursorUnixConsole.__hide_cursor  s-    ##DKK0"#D r   c                	r    V P                   '       g%   V P                  V P                  4       ^V n         R# R# r  )r   r  r   r7   s   &r   __show_cursorUnixConsole.__show_cursor  s-    """##DKK0"#D #r   c                	   V P                   '       gb   ^ V P                  ^,          3V n        V P                  R4       \        V P                  4      RV P
                  ,          .,          pWn        R# ^ V P                  3V n        V P                  ^ V P                  4       V P                  RV P
                  ,          .,          pWn        R# )r    N)	r   r   r   r   r   r	  r   r   r   )r8   nss   & r   r   UnixConsole.repaint  s    DJJqM)DJLLT[[!Vdjj%8$99BKDMM)DJKK4==) 344BKr   c                   \         P                  V P                  P                  4      p VP	                  V4      pV'       g$   \
        P                  ! V P                  V4       R# VP                  4       w  rV\
        P                  ! V P                  VRV 4       WR p\        VP                  ^4      4      pRVP                  ^4      9   d   WpP                  ,          pV P                  '       dI   VeE   W7,          R,          p\
        P                  ! V P                  V P                  V,          4       EK  \        P                  ! \        V4      R,          4       EK<  )zA Python implementation of the curses tputs function; the
curses one can't really be wrapped in a sane manner.

I have the strong suspicion that this is complexity that
will never do anyone any good.N   *rF   g     @@)r2   rh   r   ospeedsearchr   r  r  spanr'   groupr   r   timesleepfloat)	r8   r  progbpsmr   r   delayncharss	   &&&      r   __tputsUnixConsole.__tputs  s     ll4--445C A-668DAHHT^^S!W-b'C
OEqwwqz!$yyyS_+-V);<

5<&01r   )-__buffer__gone_tall__move__move_x__move_y__offset__svtermstater   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rv   rS   r   r   r{   r   r  r   r   r   rQ   r   r	  )r   r  r   r   )Tr   )1r   r   r   r   r9   r   r"  r   r   r   r   r   r  r'  r   r.  r!   r  rC  r   rM  rP  r    rZ  rk   propertyrb  r  r  r   r   r   r   r  rw  ru  rp  rs  rr  r  r   r  r   r   r   	delayprogrG  r   __classcell__)r   s   @r   rM   rM      s   G= G=R)!Qf-(^"($&>

! 	%*
	9		 	0	* $ $11"(HU#n(>*2.,2.;7$
$

 !* 2 2r   rM   )r   n   i  i        i  i K     i  i`	  i,  i   i  i  2   i   iX  K   i%  )6__conditional_annotations__
__future__r   r  r   rerG   r   r;  r.   r  typesr   fcntlr   r   r   consoler   r   fancy_termiosr   r	   r
   unix_eventqueuer   utilsr   __annotations__r   ImportErrorTYPE_CHECKINGtypingr   r   r   rt  r   r  _errorSIGWINCH_EVENTr/   r    r!   r1   potential_baudratesr2   r&   compiler  r3   AttributeErrorr5   rM   )r  s   @r   <module>r     sF  , # "  	 	          # /  '     ,, H	l 	 --	)7J-WlD1
; . . Dh-   	
# JJ78	$kkD
)*k
2' k
2y  EP    D#s$   'D *D 	DDD-,D-