+
   >Vc                   s   ^ 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I Ht ^ RI Ht ^ R	I	t	]	P                  R:8  d   ^ R
I Ht M^ 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t^ R	It^ RIHtHt ^ RIHt ]! RR4       ^ RIHt ]! RR4       ^ RIH t  ]! RR4       ^ RIH!t! ^ R	I"t"^ R	I#t#^ R	I$t$^ R	I%t%^ R	I&t&^ R	I't'R	t( ^ R	I)t)R	t(Rt, ^ R	I-t-]-P\                  ]-n/        ]-t0Rt,Rt1 ^ R	I2t2Rt1Rt5 ^ RI6H7t7 ^ RI8H9t: ^ RI8H;t< Rt5Rt= ^ R	I>t?Rt=]P                  ! R4      tAR;tBRtCR R ltDR R ltER tFR!tGR"tHR#tI]P                  ]P                  ]P                  3tMR$ R% ltNR& R' ltO]!P                  tQ]!P                  tSR( R) ltTR* R+ ltU]T]!nP        ]U]!nR        ]! RR,7       ! R- R.4      4       tV ! R/ R04      tW ! R1 R2]P                  4      tY ! R3 R44      tZ ! R5 R64      t[ ! R7 R84      t\ ! R9 R]P                  4      t^R	#   ]*3 d   t+]+t( R	t+A+ELJR	t+A+ii ; i  ]* d    ^ R	I0t0Rt, ELFi ; i  ]*]3]43 d    Rt1 ELPi ; i  ]*3 d    Rt5 ELJi ; i  ]*3 d    Rt= ELRi ; i)<    Any)Dict)List)Tuple)Union)Optional)Iterable)CallableN)Literal)	dataclassfield)require_versionIBusz1.0)r   Gioz2.0)r   GLib)r   FT)speech)enums)typeszibus-typing-boosterTypingBoosterEnginec                0    V ^8  d   QhR\         R\         /#    textreturnstrformat   "7/usr/share/ibus-typing-booster/engine/hunspell_table.py__annotate__r    y   s     . .C .C .    c                 s8    \         P                  ! \        V 4      # N)gettextZdgettext
DOMAINNAMEr      &r   _r'   y   s    J--r!   c                r   r   r   r   r   r   r    r    }   s      S S r!   c                     V # r"    r%   r&   r   N_r*   }   s	    
 Kr!   u   ☐u   ☑u   🙂u   🕵c                s    V ^8  d   QhR\         R\        3,          R\        \        R3,          R\        \        \        3,          RR/# )r   func.argskwargsr   N)r	   r   r   r   r   r   r   r   r    r       sI     7 7sCx 7CHo7 S#X7 $(7r!   c           	      s    \         P                  ! 4       w  r4p\        V\        4      '       d   \         P                  ! W4V4       R # \        V R\        V 4      4      p\        P                  RWaVW4V3R7       R # )N__qualname__z;Unhandled exception in GLib callback %s(args=%r, kwargs=%r))exc_info)	sysr/   Z
issubclassZKeyboardInterruptZ__excepthook__getattrreprLOGGERerror)r+   r,   r-   Zexc_typeZ	exc_valueZexc_tracebackZ	func_name   &&&    r   log_glib_callback_exceptionr6      sj    
 *-&H (-..8>nd4j9I
LLE}5  7r!   c                sd    V ^8  d   QhR\         R\        3,          R\         R\        3,          /# )r   r+   .r   r	   r   r   r   r   r    r       s,     
 
hsCx0 
Xc3h5G 
r!   c                 s   a  R  V 3R llpV# )c                s<    V ^8  d   QhR\         R\         R\         /# )r   r,   r-   r   r   r   r   r   r    Z)_wrap_glib_callback.<locals>.__annotate__   s!         r!   c                  sR   <  S! V / VB #   \          d    \        SY4        R # i ; iF)	Exceptionr6   )r,   r-   r+   s   *,r   	safe_funcZ&_wrap_glib_callback.<locals>.safe_func   s4    	((( 	'd;	s    &&r)   )r+   r:   s   f r   _wrap_glib_callbackr;      s      r!   c                sb    V ^8  d   QhR\         R\        3,          R\        R\        R\        /# )r   r+   .r,   r-   r   r7   r   r   r   r    r       s?     F FsCx FF F Fr!   c                 s2    \        \        V 4      .VO5/ VB # r"   )_real_idle_addr;   )r+   r,   r-   s   &*,r   _idle_add_safer=      s     -d3EdEfEEr!   c          
      sn    V ^8  d   QhR\         R\        R\        3,          R\        R\        R\        /# )r   intervalr+   .r,   r-   r   )intr	   r   r   r   r   r    r       sJ     S SSsCx S S 	S 	Sr!   c                 s4    \        V \        V4      .VO5/ VB # r"   )_real_timeout_addr;   )r>   r+   r,   r-   s   &&*,r   _timeout_add_saferA      s!    
 X':4'@R4R6RRr!   )Zfrozenc                   sp   a  ] tR t^t o Rt^ t^ t]! ]P                  R7      t
V 3R lR ltV 3R ltRtV tR# )SurroundingText )Zdefault_factoryc                   < V ^8  d   QhRR/# )r   r   rB   r)   r   __classdict__   "r   r    SurroundingText.__annotate__   s      ' r!   c                s    \         P                  ! 4       pV P                  P                  4       '       d   VP	                  4        \        V P                  V P                  V P                  VR 7      # ))r   
cursor_pos
anchor_posevent)		threadingEventrK   is_setsetrB   r   rI   rJ   )selfZ	new_event   & r   copyZSurroundingText.copy   sQ     OO%	::MMO	 	r!   c                s^   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[P                  ;R&   # )r   r   rI   rJ   rK   )r   r?   rL   rM   rE   rG   r   r    rH      s<      N     ! & ??C' r!   r)   N)__name__
__module__r.   __firstlineno__r   rI   rJ   r   rL   rM   rK   rR   Z__annotate_func____static_attributes____classdictcell__rF      @r   rB   rB      s7      DJJ #9??CE +  r!   rB   c                   s  a  ] tR t^t o RV 3R lR lltV 3R lR lt]V 3R lR l4       t]P                  V 3R lR l4       t]V 3R	 lR
 l4       t	]V 3R lR l4       t
]V 3R lR l4       tV 3R lR ltV 3R lR ltRtV tR# )
ClientInfoc                $   < V ^8  d   QhRS[ RR/# r   clientr   Nr   rE   rG   r   r    ClientInfo.__annotate__   s     ' '' 
'r!   c                sR    R V n         R V n        R V n        V P                  V4       R# rC   N)
_im_module_program_name_window_title_parse_client_strrP   r]      &&r   __init__ZClientInfo.__init__   s)      ""$"$v&r!   c                r[   r\   r   rE   rG   r   r    r^      s     H H H Hr!   c                st    VP                  R ^4      . RO,           R,          pVw  V n        V n        V n        R# )::N   NN)rC   rC   rC   )splitr`   ra   rb   )rP   r]   Zparts   && r   rc   ZClientInfo._parse_client_str   s0    c1%4b9BG?+T-?r!   c                    < V ^8  d   QhRS[ /# r   r   r   rE   rG   r   r    r^      s     N N Nr!   c                sR    V P                    R V P                   R V P                   2# )rg   r`   ra   rb   rP   r&   r   r]   ClientInfo.client   s.     //"!D$6$6#7q9K9K8LMMr!   c                r[   r\   r   rE   rG   r   r    r^     s     ' 'S 'T 'r!   c                s(    V P                  V4       R # r"   )rc   rd   re   r   r]   ro     s     	v&r!   c                rk   rl   r   rE   rG   r   r    r^     s      3 r!   c                    V P                   # r"   )r`   rn   r&   r   	im_moduleZClientInfo.im_module  s     r!   c                rk   rl   r   rE   rG   r   r    r^          " "c "r!   c                rp   r"   )ra   rn   r&   r   program_nameZClientInfo.program_name       !!!r!   c                rk   rl   r   rE   rG   r   r    r^     rr   r!   c                rp   r"   )rb   rn   r&   r   window_titleZClientInfo.window_title  rt   r!   c                rk   rl   r   rE   rG   r   r    r^     s       r!   c                rp   r"   )r]   rn   r&   r   __str__ZClientInfo.__str__  s    {{r!   c                rk   rl   r   rE   rG   r   r    r^     s     9 9# 9r!   c                s\    R V P                   : RV P                  : RV P                  : R2# )zClientInfo(im_module=z, program_name=z, window_title=)rm   rn   r&   r   __repr__ZClientInfo.__repr__  s<    '': ;  $ 2 25 6  $ 2 25Q8 	9r!   rm   NrC   )rS   rT   r.   rU   rf   rc   propertyr]   setterrq   rs   ru   rv   rx   rV   rW   rX   rY   r   rZ   rZ      s     ' 'H H N N ]]' '   " " " " 9 9r!   rZ   c                   s   a  ] tR tRt o ]P
                  ! 4       t]P
                  ! 4       t]P
                  ! 4       t]P
                  ! 4       t	]P
                  ! 4       t
V 3R lR ltRtV tR# )LookupTableStatei  c                rk   rl   r   rE   rG   r   r    ZLookupTableState.__annotate__&  s     ! ! !r!   c                6    V P                   P                  4       # r"   )namelowerrn   r&   r   rv   ZLookupTableState.__str__&  s    yy  r!   r)   N)rS   rT   r.   rU   enumZautoNORMALSELECTION_INFORELATED_CANDIDATESCOMPOSE_COMPLETIONSM17N_CANDIDATESrv   rV   rW   rX   rY   r   r|   r|     sH     YY[FYY[N))+iikO! !r!   r|   c                   sP  a  ] tR tRt o ^	]P
                  P                  3V 3R lR lltV 3R lR ltV 3R lR lt	V 3R lR	 lt
V 3R
 lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R  lR! ltV 3R" lR# ltV 3R$ lR% ltV 3R& lR' ltV 3R( lR) lt]V 3R* lR+ l4       t]P:                  V 3R, lR- l4       t]V 3R. lR/ l4       t]P:                  V 3R0 lR1 l4       t]V 3R2 lR3 l4       t]P:                  V 3R4 lR5 l4       t]V 3R6 lR7 l4       t ] P:                  V 3R8 lR9 l4       t ]V 3R: lR; l4       t!]!P:                  V 3R< lR= l4       t!]V 3R> lR? l4       t"R@t#V t$RA# )BTypingBoosterLookupTablei)  c                >   < V ^8  d   QhRS[ RS[P                  RR/# )r   	page_sizeorientationr   N)r?   r   OrientationrE   rG   r   r    %TypingBoosterLookupTable.__annotate__>  s/     9 99 ))9 
	9r!   c                sd   \         P                  ! 4       V n        V P                  P                  4        V P                  P	                  V4       V P                  P                  V4       V P                  P                  R 4       V P                  P                  R 4       \        ^ ^	4       FN  p\        V^,           4      pV P                  P                  V\         P                  P                  V4      4       KP  	  \        P                  V n        R V n        RV n        R V n        R V n        R# FrC   N)r   LookupTable_ibus_lookup_tableclearset_page_sizeset_orientationset_cursor_visible	set_roundranger   	set_labelTextnew_from_stringr|   r   _state_hidden_related_candidates_phrase_enabled_by_tab_enabled_by_min_char_complete)rP   r   r   indexlabel   &&&  r   rf   Z!TypingBoosterLookupTable.__init__>  s    
 #'"2"2"4%%'--i8//<2259
 	))%01a[E	NE##--tyy0079 ! )9(?(?"/1'%*38*r!   c                rD   r   r   Nr)   rE   rG   r   r    r   f  s     ( (t (r!   c                s:    V P                   P                  4        R # r"   )r   r   rn   r&   r   r   ZTypingBoosterLookupTable.clearf  s    %%'r!   c                rk   rl   r?   rE   rG   r   r    r   j  s     B B# Br!   c                r}   r"   )r   get_number_of_candidatesrn   r&   r   r   Z1TypingBoosterLookupTable.get_number_of_candidatesj  s    &&??AAr!   c                r[   r   visibler   NboolrE   rG   r   r    r   n  s     < <$ <4 <r!   c                <    V P                   P                  V4       R # r"   )r   r   rP   r   re   r   r   Z+TypingBoosterLookupTable.set_cursor_visiblen  s    227;r!   c                rk   rl   r   rE   rG   r   r    r   r  s     ; ;4 ;r!   c                r}   r"   )r   is_cursor_visiblern   r&   r   r   Z*TypingBoosterLookupTable.is_cursor_visibler  s    &&88::r!   c                r[   r   rI   r   Nr   rE   rG   r   r    r   v  s     ; ; ; ;r!   c                r   r"   )r   set_cursor_posrP   rI   re   r   r   Z'TypingBoosterLookupTable.set_cursor_posv  s    ..z:r!   c                rk   rl   r   rE   rG   r   r    r   z       8 8 8r!   c                r}   r"   )r   get_cursor_posrn   r&   r   r   Z'TypingBoosterLookupTable.get_cursor_posz  s    &&5577r!   c                r[   )r   r   r   Nr   rE   rG   r   r    r   ~  s     9 9s 9t 9r!   c                r   r"   )r   r   )rP   r   re   r   r   Z&TypingBoosterLookupTable.set_page_size~  s    --i8r!   c                rk   rl   r   rE   rG   r   r    r     s     7 7s 7r!   c                r}   r"   )r   get_page_sizern   r&   r   r   Z&TypingBoosterLookupTable.get_page_size  s    &&4466r!   c                r[   )r   wrap_aroundr   Nr   rE   rG   r   r    r     s     7 7T 7d 7r!   c                r   r"   )r   r   )rP   r   re   r   r   Z"TypingBoosterLookupTable.set_round  s    ))+6r!   c                rk   rl   r   rE   rG   r   r    r          3 34 3r!   c                r}   r"   )r   	get_roundrn   r&   r   r   Z"TypingBoosterLookupTable.get_round      &&0022r!   c                r[   )r   r   r   Nr   rE   rG   r   r    r     s     = =3 =4 =r!   c                r   r"   )r   r   )rP   r   re   r   r   Z(TypingBoosterLookupTable.set_orientation  s    //<r!   c                rk   rl   r   rE   rG   r   r    r     s     9 9 9r!   c                r}   r"   )r   get_orientationrn   r&   r   r   Z(TypingBoosterLookupTable.get_orientation  s    &&6688r!   c                r   )r   r   r   r   Nr?   r   r   rE   rG   r   r    r     s&     7 7s 7$)) 7 7r!   c                s<    V P                   P                  W4       R # r"   )r   r   )rP   r   r      &&&r   r   Z"TypingBoosterLookupTable.set_label  s    ))%6r!   c                s:   < V ^8  d   QhRS[ RS[P                  /# r   r   r   r   rE   rG   r   r    r     s     8 8s 8tyy 8r!   c                s8    V P                   P                  V4      # r"   )r   	get_labelrP   r   re   r   r   Z"TypingBoosterLookupTable.get_label  s    &&0077r!   c                rk   rl   r   rE   rG   r   r    r     s     1 1 1r!   c                r}   r"   )r   page_uprn   r&   r   r   Z TypingBoosterLookupTable.page_up  s    &&..00r!   c                rk   rl   r   rE   rG   r   r    r     s     3 3$ 3r!   c                r}   r"   )r   	page_downrn   r&   r   r   Z"TypingBoosterLookupTable.page_down  r   r!   c                rk   rl   r   rE   rG   r   r    r     r   r!   c                r}   r"   )r   	cursor_uprn   r&   r   r   Z"TypingBoosterLookupTable.cursor_up  r   r!   c                rk   rl   r   rE   rG   r   r    r     s     5 5T 5r!   c                r}   r"   )r   cursor_downrn   r&   r   r   Z$TypingBoosterLookupTable.cursor_down  s    &&2244r!   c                8   < V ^8  d   QhRS[ P                  RR/# )r   r   r   Nr   r   rE   rG   r   r    r     s     7 7TYY 74 7r!   c                r   r"   )r   append_candidate)rP   r   re   r   r   Z)TypingBoosterLookupTable.append_candidate  s    006r!   c                rk   rl   r|   rE   rG   r   r    r     s      ' r!   c                rp   r"   )r   rn   r&   r   stateTypingBoosterLookupTable.state  s     {{r!   c                r[   r   valuer   Nr   rE   rG   r   r    r     s     1 1+ 1 1r!   c                sN    Wn         V\        P                  8w  d
   R V n        R# R# r_   )r   r|   r   r   rP   r   re   r   r   r     s%     $777.0D+ 8r!   c                rk   rl   r   rE   rG   r   r    r     s     $ $ $r!   c                rp   r"   r   rn   r&   r   enabled_by_tab'TypingBoosterLookupTable.enabled_by_tab  s     ###r!   c                r[   r   r   rE   rG   r   r    r     s     % %D %T %r!   c                    Wn         R # r"   r   r   re   r   r   r     s
      %r!   c                rk   rl   r   rE   rG   r   r    r     s     2 2d 2r!   c                rp   r"   r   rn   r&   r   enabled_by_min_char_complete5TypingBoosterLookupTable.enabled_by_min_char_complete  s     111r!   c                r[   r   r   rE   rG   r   r    r     s     3 3$ 34 3r!   c                r   r"   r   r   re   r   r   r     s
     .3*r!   c                rk   rl   r   rE   rG   r   r    r     s     / /3 /r!   c                rp   r"   r   rn   r&   r   related_candidates_phrase2TypingBoosterLookupTable.related_candidates_phrase       ...r!   c                r[   r   phraser   Nr   rE   rG   r   r    r     s     1 1 1 1r!   c                r   r"   r   rP   r   re   r   r   r     s
     +1'r!   c                rk   rl   r   rE   rG   r   r    r     s       r!   c                rp   r"   r   rn   r&   r   hiddenTypingBoosterLookupTable.hidden  s     ||r!   c                r[   )r   r   r   Nr   rE   rG   r   r    r     s      T d r!   c                r   r"   r   )rP   r   re   r   r   r     s	     r!   c                4   < V ^8  d   QhRS[ P                  /# rl   )r   r   rE   rG   r   r    r     s     ' '4#3#3 'r!   c                rp   r"   )r   rn   r&   r   ibus_lookup_tableZ*TypingBoosterLookupTable.ibus_lookup_table       &&&r!   )r   r   r   r   r   r   N)%rS   rT   r.   rU   r   r   ZSYSTEMrf   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rz   r   r{   r   r   r   r   r   rV   rW   rX   rY   r   r   r   )  s    . ,0,<,<,C,C9 9P( (B B< <; ;; ;8 89 97 77 73 3= =9 97 78 81 13 33 35 57 7   \\1 1 $ $ % % 2 2 "((3 )3 / / %%1 &1   ]]  ' 'r!   r   c                   s   a  ] tR tRt o V 3R lR lt]V 3R lR l4       t]P                  V 3R lR l4       t]V 3R lR	 l4       t]P                  V 3R
 lR l4       tRt	V t
R# )TypingBoosterAuxiliaryTexti  c                rD   r   r)   rE   rG   r   r    'TypingBoosterAuxiliaryText.__annotate__  s     A A$ Ar!   c                s\    R V n         \        P                  P                  R4      V n        R# r   )_visibler   r   r   _contentrn   r&   r   rf   Z#TypingBoosterAuxiliaryText.__init__  s    ##'99#<#<R#@r!   c                rk   rl   r   rE   rG   r   r    r            r!   c                rp   r"   r   rn   r&   r   r   "TypingBoosterAuxiliaryText.visible       }}r!   c                r[   r   r   rE   rG   r   r    r             t    r!   c                r   r"   r   r   re   r   r   r     	      r!   c                r   rl   r   rE   rG   r   r    r             r!   c                rp   r"   r   rn   r&   r   content"TypingBoosterAuxiliaryText.content  r   r!   c                r   r   r   r   Nr   rE   rG   r   r    r             tyy  T  r!   c                r   r"   r   rP   r   re   r   r   r     r   r!   )r   r   N)rS   rT   r.   rU   rf   rz   r   r{   r   rV   rW   rX   rY   r   r   r     si     A A   ^^      ^^   r!   r   c                   s~  a  ] tR tRt o V 3R lR lt]V 3R lR l4       t]P                  V 3R lR l4       t]V 3R lR	 l4       t]P                  V 3R
 lR l4       t]V 3R lR l4       t	]	P                  V 3R lR l4       t	]V 3R lR l4       t
]
P                  V 3R lR l4       t
]V 3R lR l4       tRtV tR# )TypingBoosterPreeditTexti	  c                rD   r   r)   rE   rG   r   r    %TypingBoosterPreeditText.__annotate__  s     < <$ <r!   c                s    \         P                  P                  R 4      V n        ^ V n        RV n        \         P                  P                  V n        R# )rC   FN)	r   r   r   r   _cursor_posr   PreeditFocusModeCLEAR_focus_modern   r&   r   rf   Z!TypingBoosterPreeditText.__init__  s;    #'99#<#<R#@ !# $ 5 5 ; ;r!   c                r   rl   r   rE   rG   r   r    r     r   r!   c                rp   r"   r   rn   r&   r   r    TypingBoosterPreeditText.content  r   r!   c                r   r   r   rE   rG   r   r    r     r   r!   c                r   r"   r   r   re   r   r   r     r   r!   c                rk   rl   r   rE   rG   r   r    r              C  r!   c                rp   r"   r   rn   r&   r   rI   #TypingBoosterPreeditText.cursor_pos       r!   c                r[   r   r   rE   rG   r   r    r   %       & &S &T &r!   c                r   r"   r   r   re   r   rI   r   $  
     &r!   c                rk   rl   r   rE   rG   r   r    r   *  r   r!   c                rp   r"   r   rn   r&   r   r    TypingBoosterPreeditText.visible)  r   r!   c                r[   r   r   rE   rG   r   r    r   /  r   r!   c                r   r"   r   r   re   r   r   r   .  r   r!   c                rk   rl   r   rE   rG   r   r    r   4  r   r!   c                rp   r"   r   rn   r&   r   
focus_mode#TypingBoosterPreeditText.focus_mode3  r   r!   c                r[   )r   r   r   Nr   rE   rG   r   r    r   9  r   r!   c                r   r"   r   )rP   r   re   r   r   r   8  r   r!   c                rk   rl   r   rE   rG   r   r    r   >  s     " "# "r!   c                s.    V P                   P                  # r"   )r   r   rn   r&   r   text_strZ!TypingBoosterPreeditText.text_str=  s     }}!!!r!   )r   r   r   r   N)rS   rT   r.   rU   rf   rz   r   r{   rI   r   r   r   rV   rW   rX   rY   r   r   r   	  s     < <   ^^        & &   ^^        & & " "r!   r   c                   sf   a a ] tR tRt oERV3R lV 3R llltV3R lV 3R lltV3R lV 3R lltV3R lV 3R	 lltV3R
 lV 3R lltV3R lV 3R llt	V3R lV 3R llt
V3R lV 3R lltV3R lV 3R lltV3R lV 3R lltV3R lV 3R llt]V3R lR l4       t]V3R lR l4       tV3R lR ltV3R lR ltV3R  lR! ltV3R" lR# ltV3R$ lR% ltV3R& lR' ltV3R( lR) ltV3R* lR+ ltV3R, lR- ltV3R. lR/ ltV3R0 lR1 ltV3R2 lR3 ltERV3R4 lR5 lltERV3R6 lR7 lltV3R8 lR9 lt V3R: lR; lt!V3R< lR= lt"V3R> lR? lt#V3R@ lRA lt$V3RB lRC lt%V3RD lRE lt&V3RF lRG lt'V3RH lRI lt(V3RJ lRK lt)V3RL lRM lt*V3RN lRO lt+V3RP lRQ lt,V3RR lRS lt-V3RT lRU lt.V3RV lRW lt/V3RX lRY lt0V3RZ lR[ lt1V3R\ lR] lt2ERV3R^ lR_ llt3ERV3R` lRa llt4V3Rb lRc lt5ERV3Rd lRe llt6V3Rf lRg lt7ERV3Rh lRi llt8V3Rj lRk lt9V3Rl lRm lt:V3Rn lRo lt;ERV3Rp lRq llt<ERV3Rr lRs llt=ERV3Rt lRu llt>ERV3Rv lRw llt?ERV3Rx lRy llt@ERV3Rz lR{ lltAV3R| lR} ltB]CP                  P                  3V3R~ lR lltFV3R lR ltGV3R lR ltHV3R lR ltIV3R lR ltJV3R lV 3R lltKV3R lR ltLV3R lR ltMV3R lR ltNV3R lR ltOV3R lR ltPV3R lR ltQV3R lR ltRV3R lR ltSV3R lR ltTV3R lR ltUV3R lR ltVV3R lR ltWV3R lR ltXERV3R lR lltYERV3R lR lltZV3R lR lt[V3R lR lt\ERV3R lV 3R lllt]ERV3R lV 3R lllt^V3R lR lt_V3R lR lt`V3R lR ltaERV3R lR lltbERV3R lR lltcV3R lR ltdERV3R lR llteV3R lR ltfERV3R lR lltgV3R lR lthERV3R lR lltiERV3R lR lltjV3R lR ltkERV3R lR lltlERV3R lR lltmV3R lR ltnERV3R lR lltoERV3R lR lltpV3R lR ltqERV3R lR lltrERV3R lR lltsV3R lR lttV3R lR ltuV3R lR ltvERV3R lR lltwERV3R lR lltxV3R lR ltyERV3R lR lltzV3R lR lt{ERV3R lR llt|V3R lR lt}ERV3R lR llt~ERV3R lR lltV3R lR ltERV3R lR lltERV3R lR lltV3R lR ltERV3R lR lltERV3R lR lltV3R lR ltERV3ER  lER lltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER	 ltERV3ER
 lER lltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER  lER! lltV3ER" lER# ltERV3ER$ lER% lltV3ER& lER' ltERV3ER( lER) lltV3ER* lER+ ltERV3ER, lER- lltV3ER. lER/ ltERV3ER0 lER1 lltV3ER2 lER3 ltERV3ER4 lER5 lltV3ER6 lER7 ltERV3ER8 lER9 lltV3ER: lER; ltERV3ER< lER= lltV3ER> lER? ltERV3ER@ lERA lltV3ERB lERC ltERV3ERD lERE lltV3ERF lERG ltERV3ERH lERI lltV3ERJ lERK ltERV3ERL lERM lltV3ERN lERO ltERV3ERP lERQ lltV3ERR lERS ltERV3ERT lERU lltV3ERV lERW ltERV3ERX lERY lltV3ERZ lER[ ltERV3ER\ lER] lltV3ER^ lER_ ltERV3ER` lERa lltV3ERb lERc ltERV3ERd lERe lltV3ERf lERg ltERV3ERh lERi lltV3ERj lERk ltERV3ERl lERm lltV3ERn lERo ltERV3ERp lERq lltV3ERr lERs ltERV3ERt lERu lltV3ERv lERw ltERV3ERx lERy lltV3ERz lER{ ltERV3ER| lER} lltV3ER~ lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltERV3ER lER lltV3ER lER ltERV3ER lER lltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER llt]ERV3ER lER ll4       tERV3ER lER lltV3ER lER ltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltERV3ER lER lltV3ER lER ltV3ER lV 3ER lltV3ER lER ltV3ER lER ltV3ER lER ltV3ER lER ltV3ER lER lEt V3ER lER lEtV3ER lER lEtV3ER lER lEtV3ER lER lEtV3ER lER lEtV3ER lER lEtV3ER lER lEtV3ER  lER lEtV3ER lER lEt	V3ER lER lEt
V3ER lER lEtV3ER lER	 lEtV3ER
 lER lEtV3ER lER lEtV3ER lER lEtV3ER lER lEtV3ER lER lEtV3ER lV 3ER llEtERV3ER lV 3ER lllEtV3ER lER lEtV3ER lV 3ER llEtV3ER lER lEtV3ER lER lEtV3ER  lER! lEtV3ER" lER# lEtV3ER$ lER% lEtV3ER& lER' lEtV3ER( lER) lEtV3ER* lER+ lEtV3ER, lER- lEtV3ER. lER/ lEtV3ER0 lER1 lEt V3ER2 lER3 lEt!V3ER4 lER5 lEt"V3ER6 lER7 lEt#V3ER8 lER9 lEt$V3ER: lER; lEt%V3ER< lER= lEt&V3ER> lV 3ER? llEt'V3ER@ lERA lEt(V3ERB lERC lEt)V3ERD lERE lEt*V3ERF lERG lEt+V3ERH lERI lEt,V3ERJ lERK lEt-V3ERL lERM lEt.V3ERN lERO lEt/V3ERP lERQ lEt0V3ERR lERS lEt1V3ERT lERU lEt2V3ERV lERW lEt3V3ERX lERY lEt4V3ERZ lER[ lEt5V3ER\ lER] lEt6V3ER^ lER_ lEt7V3ER` lERa lEt8V3ERb lERc lEt9V3ERd lERe lEt:V3ERf lERg lEt;V3ERh lERi lEt<V3ERj lERk lEt=V3ERl lERm lEt>V3ERn lERo lEt?V3ERp lERq lEt@V3ERr lERs lEtAV3ERt lERu lEtBV3ERv lERw lEtCV3ERx lERy lEtDV3ERz lER{ lEtEV3ER| lER} lEtFV3ER~ lER lEtGV3ER lER lEtHV3ER lER lEtIERV3ER lER llEtJV3ER lER lEtKV3ER lV 3ER llEtLERV3ER lER llEtMV3ER lER lEtNV3ER lV 3ER llEtOERV3ER lV 3ER lllEtPV3ER lER lEtQV3ER lER lEtRV3ER lV 3ER llEtSV3ER lER lEtTV3ER lER lEtUV3ER lER lEtVERV3ER lER llEtWV3ER lER lEtXV3ER lER lEtYV3ER lER lEtZV3ER lER lEt[V3ER lER lEt\V3ER lER lEt]V3ER lER lEt^V3ER lER lEt_V3ER lER lEt`V3ER lER lEtaV3ER lER lEtbERV3ER lER llEtcERV3ER lER llEtdV3ER lER lEteV3ER lER lEtfEREtgVEthV ;Eti# (  r   iB  c                sP   < V ^8  d   QhRS[ P                  RS[RS[RS[RS[RR/# )r   busobj_pathdatabaseengine_name	unit_testr   N)r   ZBusr   r   r   rE   rG   r   r     TypingBoosterEngine.__annotate__E  sS     w( w(w( w( 	w(
 w( w( )-w(r!   c                s:0  < \         P                  R WW4V4       \         P                  RRP                  \        \        \
        4      4      4       \        \        P                  P                  R4      '       d7   \        SV `-  VP                  4       VRR7       \         P                  R4       M4\        SV `-  VP                  4       VR7       \         P                  R4       W@n        R	V n        R	V n        R
pV P                  R8w  d    \         P"                  P%                  V P                  4      pV'       g   \'        R4      hVP)                  R4      V n        VP)                  R4      V n        RV P                   RV P                   R2p\0        P2                  ! RVR7      V n        \         P6                  ! 4       V n        \         P:                  ! 4       V n        WPn        ^ V n         ^ V n!        \E        4       V n#        \I        4       V n%        Wn&        W0n'        RV n(        RV n)        V PU                  4       V n+        / V n,        / V n-        \        P\                  ! 4       V n/        / V n0        / V n1        / V n2        / V n3        / V n4        / V n5        / V n6        / V n7        \        P\                  ! 4       V n8        / V n9        / V n:        \        P\                  ! 4       V n;        \y        4       V n=        . V n>        V PV                  R,          R,          V n?        V PV                  R,          R,          V n@        RV nA        RV nB        V PV                  R,          R,          V nC        V PV                  R,          R,          V nD        RV nE        . V nF        R	V nG        / V nH        R	V nI        RV nJ        RV nK        \        P                  ! 4       V nN        \        P                  ! ^PRRRRRR7      V nQ        ^ V nR        V PV                  R,          R,          V nS        \        V P                  ^ 4      V nS        \        V P                  \         P                  4      V nS        \         P                  RV P                  4       V PV                  R ,          R,          V nW        \         P                  R!V P                  4       V PV                  R",          R,          V nX        V P                  V P                  4      V nZ        V PV                  R#,          R,          V n[        V PV                  R$,          R,          V n\        RV n]        V PV                  R%,          R,          V n^        RV n_        V PV                  R&,          R,          V n`        R'V na        V PV                  R(,          R,          V nb        \        V P                  ^ 4      V nb        \        V P                  ^	4      V nb        V PV                  R),          R,          V nc        \        V P                  ^ 4      V nc        \         P                  R*V P                  4       V PV                  R+,          R,          V nd        \        V P                  ^4      V nd        \        V P                  ^	4      V nd        V PV                  R,,          R,          V ne        V PV                  R-,          R,          V nf        V PV                  R.,          R,          V ng        V PV                  R/,          R,          V nh        V PV                  R0,          R,          V ni        V PV                  R1,          R,          V nj        RV nk        V PV                  R2,          R,          V nl        V PV                  R3,          R,          V nm        V PV                  R4,          R,          V nn        V PV                  R5,          R,          V no        V PV                  R6,          R,          V np        V PV                  R7,          R,          V nq        RV nr        RV ns        V PV                  R8,          R,          V nt        V PV                  R9,          R,          V nu        V PV                  R:,          R,          V nv        V PV                  R;,          R,          V nw        V PV                  R<,          R,          V nx        V PV                  R=,          R,          V ny        V PV                  R>,          R,          V nz        V PV                  R?,          R,          V n{        V PV                  R@,          R,          V n|        V PV                  RA,          R,          V n}        V PV                  RB,          R,          V n~        V PV                  RC,          R,          V n        V PV                  RD,          R,          V n        \         EP                  ! V EP                   4      V n        V PV                  RE,          R,          V n        V PV                  RF,          R,          V n        \         EP                  ! V EP                  4      V n        V PV                  RG,          R,          V n        V PV                  RH,          R,          V n        \         EP                  ! V EP                  4      V n        V PV                  RI,          R,          V n        V PV                  RJ,          R,          V n        \         EP                  ! V EP                  4      V n        V PV                  RK,          R,          V n        V PV                  RL,          R,          V n        \         EP                  ! V EP                  4      V n        V PV                  RM,          R,          V n        V PV                  RN,          R,          V n        \         EP                  ! V EP                   4      V n        V PV                  RO,          R,          V n        V PV                  RP,          R,          V n        \         EP                  ! V EP&                  4      V n        V PV                  RQ,          R,          V n        V PV                  RR,          R,          V n        V PV                  RS,          R,          V n        V PV                  RT,          R,          V n        V PV                  RU,          R,          V n        R	V n        / V n        V EP9                  V PV                  RV,          R,          RRW7       V PV                  RX,          R,          V n        V PV                  RY,          R,          V n        V PV                  RZ,          R,          V n        RV n        R[V n        V PV                  R\,          R,          V n        / V n        RV n        RV n        RV n        V EPO                  V PV                  R],          R,          RRW7       . V n        V EPS                  V PV                  R^,          R,          RRW7       / V n        V PV                  R_,          R,          V n        V EPV                  '       d!   V PV                  R`,          R,          V ns        MV EPY                  RRRW7       V PV                  Ra,          R,          V n        RV n        R	V n        V PV                  Rb,          R,          V n        V EPc                  V PV                  Rc,          R,          RRW7       . V n        V PV                  Rd,          R,          p	\         EPf                  ! V	4      V n        ReP                  V EPd                  4      V	8w  dX   V P4                  EPi                  RdE\j        EPl                  EPo                  ReP                  V EPd                  4      4      4       V PN                  EPp                  EPs                  V EPd                  Rf,          4       \         EPt                  ! V EPd                  4      V n        V P                  '       d   V P                  ^8  d#   \         EPy                  RgV EPd                  4       E\z        EP|                  ! V EPd                  V P                  V P                  Rh7      V n(        V P                  ^8  d   \         EPy                  Ri4       MRV n(        V PV                  Rj,          R,          p
\         EP~                  ! V
4      V n>        ReP                  V P|                  4      V
8w  dW   V P4                  EPi                  RjE\j        EPl                  EPo                  ReP                  V P|                  4      4      4       RV n        RV n        ^ V n        E\        EP                  ! 4       V n        . V n        . V n        ^ V n        R	V n        R	V n        R	V n        RV n        / V n        / V n        R	V n        / V n        V EP                  4        . V n        . V n        RkV n        RkRlRmRnRoRpRq /RmRlRrRnRoRpRs /RtRlRrRnRmRpRu /RrRlRoRnRmRpE\        \        Rr4      /RoRlRmRnRrRpE\        \        Ro4      //V n        E\        V P                  V P                  Rv7      V n        \         EP                  ! 4       EP                  V P                  / 4      EP                  RwR	4      p\         P                  RxVV PV                  Ry,          R,          4       VV PV                  Ry,          R,          8w  d,   \         P                  Rz4       \         EP                  ! 4        R{R|^ RwV PV                  R},          R,          R~E\        R4      /RR|^RwV PV                  Ry,          R,          R~E\        R4      //V n5        RRR~E\        R4      RE\        R4      RE\        V EPF                  R,          4      RV Pj                  /V n4        RR|^ RwE\        E\        ,           R~E\        R4      /RR|^RwE\        E\        ,           R~E\        R4      //V n1        RRR~E\        R4      RE\        R4      RE\        V EPF                  R,          4      RV Pb                  /V n0        RR|^ RwE\        E\        ,           R~E\        R4      /RR|^RwE\        E\        ,           R~E\        R4      //V n3        RRR~E\        R4      RE\        R4      RE\        V EPF                  R,          4      RV Pf                  /V n2        V EP                  4        V EP                  4        V EP                  4        \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  3pV\        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  \        EP                  3,           V n        E\        4       V En        E\        4       V En        V EP                  RV EP                  4       RV En        V P4                  EP                  RV EP                  4       V EP                  4        \         P                  RE\        EP                  ! 4       4       \        EP                  ! V PN                  EP                  R7      pVEP                  4        R#   \&         d2   p\         P+                  RYHP,                  P.                  T4       h Rp?ii ; i)z\TypingBoosterEngine.__init__(bus=%s, obj_path=%s, database=%s, engine_name=%s, unit_test=%s)zibus version = %s.has_focus_idT)
connectionobject_pathr  zThis ibus version has focus id.)r  r  z+This ibus version does *not* have focus id.rC   z,/org/freedesktop/ibus/engine/typing-booster/typing-boosterzInvalid engine name.Zlangr~   z /org/freedesktop/ibus/engine/tb//z&Failed to match engine_name %s: %s: %sN*org.freedesktop.ibus.engine.typing-booster)schemapathaichatenableuseraisystemmessageu   🦙ollamamodelollamamaxcontextauxF)ZwidthZexpand_tabsZreplace_whitespaceZdrop_whitespaceZbreak_long_wordsZbreak_on_hyphenscandidatesdelaymillisecondsz&self._candidates_delay_milliseconds=%sibuseventsleepsecondsz!self._ibus_event_sleep_seconds=%s
ibuskeymapuseibuskeymapwordpredictionsemojipredictionsunicodedataalli'  mincharcomplete
debuglevelzself._debug_level=%spagesizelookuptableorientationpreeditunderlinepreeditstyleonlywhenlookupshownumberofcandidatesshowstatusinfoinauxshowrawinputautoselectcandidate	tabenabledisableinterminalsasciidigitsshowfinalformofftherecordavoidforwardkeyeventprefercommitarrowkeysreopenpreeditemojitriggercharacters
emojistyleautocommitcharactersrememberlastusedpreeditimeaddspaceoncommitinlinecompletion
recordmodeautocapitalizecolorpreeditspellcheckcolorpreeditspellcheckstringcolorinlinecompletioncolorinlinecompletionstringcolorcomposepreviewcolorcomposepreviewstringcolorm17npreeditcolorm17npreeditstringcoloruserdbcoloruserdbstringcolorspellcheckcolorspellcheckstringcolordictionarycolordictionarystringlabeluserdblabeluserdbstringlabelspellchecklabelspellcheckstringlabeldictionarylabeldictionarystringupdate_gsettingsflagdictionary	labelbusylabelbusystringu   🎙️googleapplicationcredentialskeybindingsautosettingsrememberinputmode	inputmodesoundbackend
errorsounderrorsoundfile
dictionary,NNNz'Instantiate EmojiMatcher(languages = %sZ	languagesZunicode_data_allZvariation_selectorzEmojiMatcher() instantiated.inputmethodorignext
capitalizepreviousr   functionc                 r(   r"   r)   xr&   r   <lambda>.TypingBoosterEngine.__init__.<locals>.<lambda>  s    ar!   upperc                 sX    \        \        R 4      ! V R,          4      V R,          ,           # )r\  N   Nre  NN)r1   r   r_  r&   r   ra  rb    s&    g'''(u'.01"'6r!   titlec                 sV    \        \        R 4      ! \        P                  ! V 4      4      # )rg  )r1   r   itb_util(normalize_nfc_and_composition_exclusionsr_  r&   r   ra  rb    s#    g'""*"S"STU"V'Xr!   )r   r   symbolz$Cached symbol: %r Current symbol: %rinputmodetruesymbolz3Cached symbol is outdated, call `ibus write-cache`.InputMode.Offnumberinputmodefalsesymbolr   ZOffInputMode.OnZOnkey	InputModez
Input modetooltipz2Here you can switch ibus-typing-booster on or off.shortcut_hinttoggle_input_mode_on_offsub_propertieszEmojiPredictionMode.OffzEmojiPredictionMode.OnEmojiPredictionModez%Unicode symbols and emoji predictionstoggle_emoji_predictionzOffTheRecordMode.OffzOffTheRecordMode.OnOffTheRecordModezOff the record modetoggle_off_the_recordzset-surrounding-textZchangedz<*** ibus-typing-booster %s initialized, ready for input: ***)target(  r3   infojoinZmapr   IBUS_VERSIONZhasattrr   EngineZpropssuperrf   Zget_connection_engine_name_m17n_ime_lang_m17n_ime_namerh  ZM17N_ENGINE_NAME_PATTERNsearch
ValueErrorgroup	exception	__class__rS   r   Settings
_gsettingsKeyvalsToKeycodes_keyvals_to_keycodesZComposeSequences_compose_sequences
_unit_test_input_purpose_input_hintsr   _current_auxiliary_textr   _current_preedit_text_busr   emoji_matcher_setup_process_init_settings_dict_settings_dict
_prop_dict_sub_props_dictPropListmain_prop_listemoji_prediction_mode_menu emoji_prediction_mode_propertiesoff_the_record_mode_menuoff_the_record_mode_propertiesinput_mode_menuinput_mode_propertiesdictionary_menudictionary_properties#dictionary_sub_properties_prop_listpreedit_ime_menupreedit_ime_properties$preedit_ime_sub_properties_prop_listrZ   _client_info_current_imes_ai_chat_enable_ai_system_message_ollama_client_ollama_server_label_ollama_model_ollama_max_context_ollama_response_style_ollama_messages_ollama_selection_text_ollama_prompt_ollama_response_ollama_chat_query_thread_ollama_chat_query_errorrL   rM   _ollama_stop_eventtextwrapZTextWrapper_ollama_aux_wrapper_timeout_source_id_candidates_delay_millisecondsmaxminZ
UINT32_MAX_ibus_event_sleep_seconds_ibus_keymapnew_ibus_keymap_ibus_keymap_object_use_ibus_keymap_word_predictions_temporary_word_predictions_emoji_predictions_temporary_emoji_predictions_unicode_data_all_emoji_match_limit_min_char_complete_debug_level
_page_size_lookup_table_orientation_preedit_underline_preedit_style_only_when_lookup_show_number_of_candidates#_show_status_info_in_auxiliary_text_show_raw_input_is_candidate_auto_selected_auto_select_candidate_tab_enable_disable_in_terminals_ascii_digits_show_final_form_off_the_record_hide_input_input_mode_avoid_forward_key_event_prefer_commit_arrow_keys_reopen_preedit_emoji_trigger_characters_emoji_style_auto_commit_characters_remember_last_used_preedit_ime_add_space_on_commit_inline_completion_record_mode_auto_capitalize_color_preedit_spellcheck _color_preedit_spellcheck_stringcolor_string_to_argb_color_preedit_spellcheck_argb_color_inline_completion_color_inline_completion_string_color_inline_completion_argb_color_compose_preview_color_compose_preview_string_color_compose_preview_argb_color_m17n_preedit_color_m17n_preedit_string_color_m17n_preedit_argb_color_userdb_color_userdb_string_color_userdb_argb_color_spellcheck_color_spellcheck_string_color_spellcheck_argb_color_dictionary_color_dictionary_string_color_dictionary_argb_label_userdb_label_userdb_string_label_spellcheck_label_spellcheck_string_label_dictionary_label_dictionary_string_label_dictionary_dictset_label_dictionary_string_flag_dictionary_label_busy_label_busy_string_label_speech_recognition _label_speech_recognition_string_google_application_credentials_keybindings_hotkeys"_normal_digits_used_in_keybindings"_keypad_digits_used_in_keybindingsset_keybindings_autosettingsset_autosettings_autosettings_revert_remember_input_modeset_input_mode_sound_backend_error_sound_object_error_sound_file_error_soundset_error_sound_file_dictionary_namesdictionaries_str_to_list	set_valuer   Variant
new_stringhunspell_objset_dictionary_names	get_flags_dictionary_flagsdebug	itb_emojiEmojiMatcherinput_methods_str_to_list_commit_happened_after_focus_in	_prev_key_translated_key_statem17n_translitTransliterationParts_m17n_trans_parts_typed_compose_sequence_typed_string_typed_string_cursor	_p_phrase
_pp_phrase_ppp_phrase_new_sentence_transliterated_strings&_transliterated_strings_before_compose$_transliterated_strings_compose_part_transliterators_init_transliterators_candidates_candidates_case_mode_orig_current_case_moder1   _case_modesr   _lookup_tableZibus_read_cachegetibus_write_cacher'   r2   MODE_OFF_SYMBOLEMOJI_PREDICTION_MODE_SYMBOLMODE_ON_SYMBOLOFF_THE_RECORD_MODE_SYMBOL_update_dictionary_menu_dicts_update_preedit_ime_menu_dicts_init_properties	KEY_RightKEY_KP_RightKEY_LeftKEY_KP_LeftZKEY_EndZ
KEY_KP_EndZKEY_HomeZKEY_KP_HomeZKEY_DownZKEY_KP_DownZKEY_UpZ	KEY_KP_UpZKEY_Page_DownZKEY_KP_Page_DownZKEY_KP_NextZKEY_Page_UpZKEY_KP_Page_UpZKEY_KP_Prior	KEY_spaceKEY_Tab
KEY_ReturnKEY_KP_Enter
KEY_DeleteKEY_KP_DeleteKEY_BackSpaceZ
KEY_Escape_commit_trigger_keysrB   _surrounding_text_surrounding_text_oldZconnect_on_set_surrounding_text!_is_context_from_surrounding_text_on_gsettings_value_changed_clear_input_and_update_uiitb_versionZget_versionThreadZcleanup_databasestart)rP   r   r   r   r  r  Zschema_pathmatchr4   rU  rY  Zcached_input_mode_true_symbolZkeys_which_select_with_shiftZcleanup_database_threadr  s   &&&&&&        r   rf   ZTypingBoosterEngine.__init__E  sJ    	, 8)		=
 	'#c<2H)IJ4;;$$n55G--/$!  # KK9:G--/$  & KKEF'  D 00 99@@))+$%;<<&+kk&&9#&+kk&&9#A"&"5"5!6a8K8K7LA O ,,? %-$>$>$@!"*";";"=##$!"&( 	$ %& 	"	 ?C?C"668469;-1]]_:<'?A-8:%>@+/157"/157"BF--/00268#CG==?1(2(*%)%8%8&"&$'+':':(%('DH$*!"&"5"5#!##(,(;(;)  &)( AF#68&(#.0 "EI&(-%3<??3D9A9M9M# !!:#  ()373F3F)4++143+.1///4+.1//1D1D/F+<77	9 150C0C#1%%+1-&79W9WX!%!4!4\!B6!J  !2!23 	 &*&9&9'#'% (,':':(%('+0((,(;(;)  &)(,1)'+':':($(&"('+':':(%('"%d&=&=q"A"%d&=&=q"A!%!4!4\!B6!J 1 115*D,=,=>#22:>vFdooq1dooq1.2.A.A$/&&,/.& (,':':(  &(( 6:5H5H(6**062, 150C0C$1&&,1.' :>9L9L!:##):+0 %)$7$7%"%$ ,1(+/+>+>!,##),+# "&!4!4""! ,0+>+> ,""(,*" $(#6#6}#Ef#M&*&9&9/&J6&R%)%8%8&"&$ !.2.A.A"/$$*/,% %)$7$7%"%$ 150C0C$1&&,1.' /3.A.A$/&&,/.& "&!4!4" "" -1,?,?"-$$*-,$ 6:5H5H(6**062, +/*=*=+  &+(! (,':':(  &(( "&!4!4\!B6!J&*&9&9'$'& 04/B/B$0&&,0.& 6:5H5H*6,,264-.6.K.K11/3+ /3.A.A#/%%+/-% 594G4G)5++153,-5-J-J00.2* -1,?,?!-##)-+# 372E2E'3))/31*+3+H+H..,0( *.)<)<*  &*(  04/B/B$0&&,0.'(0(E(E++)-% $(#6#6}#Ef#M)-)<)<*!!'*)!"*"?"?%%#' (,':':(%(' .2-@-@#.%%+.-%&.&C&C))'+# (,':':(%(' .2-@-@#.%%+.-%&.&C&C))'+# $(#6#6}#Ef#M)-)<)<*!!'*)! (,':':(%(' .2-@-@#.%%+.-% (,':':(%(' .0%68#(( 78@" 	) 	$ '+&9&9'$'& "&!4!4[!A&!I'+':':(%(' 04&5>-484G4G*5,,254, 354827/27/.v6 	 	P :</7" 	 	$ 57!*.*=*=+!!'+)!$$$#22;?GDt<#'#6#6~#Fv#NDH !#"&"5"5l"CF"K!! 01&9" 	" 	$ -/((6v>
!)!B!B:!N88D**+z9 OO%%''1G1G(HIK 	""77""1%	'191C1C""2$ ###  1$F!335!*!7!700!%!7!7#'#4#4"6D   1$;<!%D ))-8@%??L88D&&';6 OO%%''1C1C(DEG 05,6:%&"..0 	24$(*$%!"79$FH3461IK""$?ANP'"( GK) G 67
 L  XY LGC13 GGC137
B 8Poo6688 )1(@(@(B(F(Fr)##&3x#4 	&:1''(=>vF	H *""#89&ABKKEG%%' !$--.DEfM5
 !$--.CDVL4&
"6 ;Q|_qMNT!!"<=?d88 
 &!/,HH5(
 %!.+GG4'1
- (Q>?56T!!";<>dCC+
' #!/,FF5%
 "!.+EE4$/
+ %Q,-q./T$"3"34K"LMdAA)
% 	**,++- NND--MM4++LL$//MM4++MM4++KK 5 5t7G7Gd1143D3D(F$ %ANNDLLOOT..OOT//	D1 %1!
 "1!2%4%6"+T-J-JK16.	4+K+KL'')J##%	' #,"2"2==11#3%%'a    <!9!95B 	s'   0A_ >AA_ _A`_),A``A`c                rD   r   r)   rE   rG   r   r    r  ~  s     * *4 *r!   c                F   < \         SV `  4        R V P                  n        R# FN)r  show_lookup_tabler;  r   rP   r     &r   r]  Z%TypingBoosterEngine.show_lookup_table~  s    !#$)!r!   c                rD   r   r)   rE   rG   r   r    r    s     ) )4 )r!   c                r[  TN)r  hide_lookup_tabler;  r   r^  r_  r   ra  Z%TypingBoosterEngine.hide_lookup_table  s    !#$(!r!   c                sT   < V ^8  d   QhRS[ S[P                  S[3,          RS[RR/# )r   lookup_tabler   r   N)r   r   r   r   r   rE   rG   r   r    r    s:     ? ? 0 02J JK? ? #?r!   c                s   < \        V\        4      '       d)   \        SV `  VP                  V4       V'       * Vn        R # \        SV `  W4       R # r"   )
isinstancer   r  update_lookup_tabler   r   )rP   rb  r   r     &&&r   rd  Z'TypingBoosterEngine.update_lookup_table  s?     l$<==G'(F(FP&-+LG'>r!   c                rD   r   r)   rE   rG   r   r    r    s     4 4T 4r!   c                r[  r`  )r  show_auxiliary_textr  r   r^  r_  r   rf  Z'TypingBoosterEngine.show_auxiliary_text  s    #%/3$$,r!   c                rD   r   r)   rE   rG   r   r    r    s     5 5T 5r!   c                r[  r\  )r  hide_auxiliary_textr  r   r^  r_  r   rg  Z'TypingBoosterEngine.hide_auxiliary_text  s    #%/4$$,r!   c                >   < V ^8  d   QhRS[ P                  RS[RR/# )r   r   r   r   N)r   r   r   rE   rG   r   r    r    s)     7 7997/378<7r!   c                sf   < \         SV `  W4       W P                  n        WP                  n        R # r"   )r  update_auxiliary_textr  r   r   )rP   r   r   r  re  r   ri  Z)TypingBoosterEngine.update_auxiliary_text  s(    %g7/6$$,/6$$,r!   c                rD   r   r)   rE   rG   r   r    r    s     2 24 2r!   c                r[  r`  )r  show_preedit_textr  r   r^  r_  r   rj  Z%TypingBoosterEngine.show_preedit_text  s    !#-1""*r!   c                rD   r   r)   rE   rG   r   r    r    s     3 34 3r!   c                r[  r\  )r  hide_preedit_textr  r   r^  r_  r   rk  Z%TypingBoosterEngine.hide_preedit_text  s    !#-2""*r!   c                sD   < V ^8  d   QhRS[ P                  RS[RS[RR/# )r   r   rI   r   r   Nr   r   r?   r   rE   rG   r   r    r    s1     5 5995255@D5IM5r!   c                s   < \         SV `  WV4       WP                  n        W P                  n        W0P                  n        R # r"   )r  update_preedit_textr  r   rI   r   )rP   r   rI   r   r  s   &&&&r   rm  Z'TypingBoosterEngine.update_preedit_text  s6    #GA-4""*0:""--4""*r!   c          
      sJ   < V ^8  d   QhRS[ P                  RS[RS[RS[RR/# )r   r   rI   r   r   r   Nrl  rE   rG   r   r    r    sA     ; ;YY; ; 	;
 ;
 !%;r!   c                s   < \         SV `  WW44       WP                  n        W P                  n        W0P                  n        W@P                  n        R # r"   )r  update_preedit_text_with_moder  r   rI   r   r   )rP   r   rI   r   r   r  s   &&&&&r   rn  Z1TypingBoosterEngine.update_preedit_text_with_mode  sG     	-	6-4""*0:""--4""*0:""-r!   c                rk   rl   r   rE   rG   r   r    r    s     H H Hr!   c                j    \        V P                  \        P                  P                  ,          4      # r"   )r   client_capabilitiesrh  
CapabiliteZOSKrn   r&   r   has_oskZTypingBoosterEngine.has_osk  s&     D,,x/B/B/F/FFGGr!   c                rk   rl   r   rE   rG   r   r    r    s     M Md Mr!   c                ro  r"   )r   rp  rh  rq  ZSURROUNDING_TEXTrn   r&   r   has_surrounding_textZ(TypingBoosterEngine.has_surrounding_text  s-     $$x':':'K'KKM 	Mr!   c                rD   r   r)   rE   rG   r   r    r    s     $ $$ $r!   c                sn    V P                   P                  P                  4        V P                  4        R # r"   )rQ  rK   r   Zget_surrounding_textrn   r&   r    _trigger_surrounding_text_updateZ4TypingBoosterEngine._trigger_surrounding_text_update  s(     	$$**,!!#r!   c                s6   < V ^8  d   QhRS[ S[S[3,          /# rl   )r   r   r   rE   rG   r   r    r    s     q qT#s(^ qr!   c                s   / p/ R RV P                   RV P                  /bRRV P                  RV P                  /bRRV P                  /bRRV P
                  /bRRV P                  RV P                  /bRRV P                  RV P                  /bRRV P                  RV P                  /bR	RV P                  RV P                  /bR
RV P                  RV P                  /bRRV P                   RV P"                  /bRRV P$                  RV P&                  /bRRV P(                  RV P*                  /bRRV P,                  RV P.                  /bRRV P0                  RV P2                  /bRRV P4                  RV P6                  /bRRV P8                  RV P:                  /bRRV P<                  RV P>                  /b/ RRV P@                  RV PB                  /bRRV PD                  RV PF                  /bRRV PH                  RV PJ                  /bRRV PL                  RV PN                  /bRRV PP                  RV PR                  /bRRV PT                  RV PV                  /bRRV PX                  RV PZ                  /bRRV P\                  RV P^                  /bRRV P`                  RV Pb                  /bRRV Pd                  RV Pf                  /bRRV Ph                  RV Pj                  /bRRV Pl                  RV Pn                  /bRRV Pp                  RV Pr                  /bR RV Pt                  RV Pv                  /bR!RV Px                  RV Pz                  /bR"RV P|                  RV P~                  /bR#RV P                  RV P                  /bC/ R$RV P                  RV P                  /bR%RV P                  RV P                  /bR&RV P                  RV P                  /bR'RV P                  RV P                  /bR(RV P                  RV P                  /bR)RV P                  RV P                  /bR*RV P                  RV P                  /bR+RV P                  RV P                  /bR,RV P                  RV P                  /bR-RV P                  RV P                  /bR.RV P                  RV P                  /bR/RV P                  RV P                  /bR0RV P                  RV P                  /bR1RV P                  RV P                  /bR2RV P                  RV P                  /bR3RV P                  RV P                  /bR4RV P                  RV P                  /bC/ R5RV P                  RV P                  /bR6RV P                  RV P                  /bR7RV P                  RV P                  /bR8RV P                  RV P                  /bR9RV P                  RV P                  /bR:RV P                  RV P                  /bR;RV P                  RV P                  /bR<RV P                  RV P                  /bR=RV P                  RV P                  /bR>RV P                  RV P                  /bR?RV P                  RV P                  /bR@RV P                  RV P                  /bRARV P                  RV P                  /bRBRV P                  RV P                  /bRCRV EP                   RV EP                  /bRDRV EP                  RV EP                  /bRERV EP                  RV EP
                  /bCRFRV EP                  RV EP                  /RGRV EP                  RV EP                  /RHRV EP                  RV EP                  /RIRV EP                  RV EP                  /RJRV EP                  RV EP                  /RKRV EP                   RV EP"                  //CpE\$        EP&                  EP)                  4       pVEP+                  RLRM4      pRRNR V EP,                   ROV EP.                   2RRPRRPRRQRRMR^ /pV EP0                  RR8w  d`   RQpE\2        EP4                   F2  w  rxE\6        EP8                  ! WpEP0                  4      '       g   K0  Tp M	  V'       d   WeRG&   RSV 2VRH&   MDE\2        EP:                  ! RT4      '       d'   E\2        EP<                  ! 4       R^8  d   RUVRG&   RVVRH&   VEP?                  4        EF  p	V	RI8X  d   E\2        EP@                  ! V EPB                  EPE                  RI4      4      p
V EP0                  RR8w  d   . V
RW&   . R_OV
RX&   E\F        EPH                  ! V
4      pE\2        EP@                  ! V EPB                  EPK                  V	4      4      pV'       g   / pE\2        EPL                  ! W4       ME\2        EP@                  ! V EPB                  EPE                  V	4      4      p
V EP0                  RR8w  g   V	R`9   d   VEPO                  W4      p
E\2        EP@                  ! V EPB                  EPK                  V	4      4      pVf   T
pRYV
RZV/W&   W9   dS   RW),          9   d   W),          R,          VV	,          R[&   RW),          9   d   W),          R,          VV	,          R\&   EK  EK  E\P        EPS                  R]V	4       EK  	  V# )arY  rO   r<  rU  ZdictionaryinstalltimestampZinputmethodchangetimestampr)  r*  r0  r1  r2  r3  r+  r  r  r  r(  r,  r-  r.  r$  r/  rP  rQ  r%  r&  r'  r  r  r  r  r  r  r  r  r  r  rS  rT  rR  r   r!  r"  r#  r4  r5  r6  r7  r8  r9  r:  r;  r<  r=  r>  r?  r@  rA  rB  rC  rD  rE  rF  rG  rJ  rK  rL  r  r  r  r  rk  rn  rN  rO  rM  r
  TZNone-FrC   r  u   •Zgnomeu   🚀︎u   🐌︎rt  commit_and_forward_keyZdefaultr  set_functionget_functionz#key %s missing in set_get_functions)i0   rh   )ZLeftzControl+Leftz	Mod1+Left)rk  rn  )set_current_imesget_current_imesr  get_dictionary_names_reload_dictionaries_reload_input_methodsset_avoid_forward_key_eventget_avoid_forward_key_eventset_prefer_commitget_prefer_commitset_add_space_on_commitget_add_space_on_commitset_inline_completionget_inline_completionset_record_modeget_record_modeset_auto_capitalizeget_auto_capitalizeset_arrow_keys_reopen_preeditget_arrow_keys_reopen_preeditset_word_prediction_modeget_word_prediction_modeset_emoji_prediction_modeget_emoji_prediction_modeset_unicode_data_all_modeget_unicode_data_all_modeset_off_the_record_modeget_off_the_record_modeset_emoji_trigger_charactersget_emoji_trigger_charactersset_emoji_styleget_emoji_styleset_auto_commit_charactersget_auto_commit_charactersset_tab_enableget_tab_enable"set_remember_last_used_preedit_ime"get_remember_last_used_preedit_imeset_remember_input_modeget_remember_input_moder  get_input_modeset_disable_in_terminalsget_disable_in_terminalsset_ascii_digitsget_ascii_digitsset_show_final_formget_show_final_formr   r   set_lookup_table_orientationget_lookup_table_orientationset_preedit_underlineget_preedit_underline"set_preedit_style_only_when_lookup"get_preedit_style_only_when_lookupset_min_char_completeget_min_char_completeset_debug_levelget_debug_level!set_candidates_delay_milliseconds!get_candidates_delay_millisecondsset_ibus_event_sleep_secondsget_ibus_event_sleep_secondsset_use_ibus_keymapget_use_ibus_keymapset_ibus_keymapget_ibus_keymapset_error_soundget_error_soundr  get_error_sound_fileset_sound_backendget_sound_backendset_show_number_of_candidatesget_show_number_of_candidates&set_show_status_info_in_auxiliary_text&get_show_status_info_in_auxiliary_textset_show_raw_inputget_show_raw_inputset_auto_select_candidateget_auto_select_candidateset_color_preedit_spellcheckget_color_preedit_spellcheck#set_color_preedit_spellcheck_string#get_color_preedit_spellcheck_stringset_color_inline_completionget_color_inline_completion"set_color_inline_completion_string"get_color_inline_completion_stringset_color_compose_previewget_color_compose_preview set_color_compose_preview_string get_color_compose_preview_stringset_color_m17n_preeditget_color_m17n_preeditset_color_m17n_preedit_stringget_color_m17n_preedit_stringset_color_userdbget_color_userdbset_color_userdb_stringget_color_userdb_stringset_color_spellcheckget_color_spellcheckset_color_spellcheck_stringget_color_spellcheck_stringset_color_dictionaryget_color_dictionaryset_color_dictionary_stringget_color_dictionary_stringset_label_userdbget_label_userdbset_label_userdb_stringget_label_userdb_stringset_label_spellcheckget_label_spellcheckset_label_spellcheck_stringget_label_spellcheck_stringset_label_dictionaryget_label_dictionaryr  get_label_dictionary_stringset_flag_dictionaryget_flag_dictionaryset_label_busyget_label_busyset_label_busy_stringget_label_busy_stringset_ai_chat_enableget_ai_chat_enableset_ai_system_messageget_ai_system_messageset_ollama_modelget_ollama_modelset_ollama_max_contextget_ollama_max_contextset_input_mode_true_symbolget_input_mode_true_symbolset_input_mode_false_symbolget_input_mode_false_symbolr  get_keybindingsr  get_autosettings"set_google_application_credentials"get_google_application_credentialsr   ZSettingsSchemaSourceZget_defaultZlookupr  r  r  rh  ZM17N_IME_SYMBOLSreZ	fullmatchZ
is_desktopZget_gnome_shell_versionZ	list_keysvariant_to_valuer  get_default_valuerR   deepcopyZget_user_valuedict_update_existing_keysr<  r3   warning)rP   Zsettings_dictZset_get_functionsZschema_sourcer  Zspecial_defaultsrj  patternZpattern_symbolrp  Zdefault_valueZ
user_valueZuser_gsettingss   &            r   r  Z'TypingBoosterEngine._init_settings_dict  s      )+]8
t,,t,,.]8
 t00t002	]8
 )t00+2]8
 )t11+3]8
 #t77t77%9]8
 t--t--/]8
" t33t33!5#]8
( t11t11!3)]8
. t++t++-/]8
4 t//t//15]8
: %t99t99';;]8
@ t44t44 6A]8
F t55t55!7G]8
L t55t557M]8
R t33t335S]8
X %t88t88':Y]8
^ t++t++-_]8
d #t66t66%8e]8
j t**t**,k]8
p )t>>t>>+@q]8
v  t33t33"5w]8
| t**t**,}]8
B !t44t44#6C]8
H t,,t,,.I]8
N t//t//1O]8
T t))t))+U]8
Z %t88t88':[]8
` t11t11!3a]8
f )t>>t>>+@g]8
l t11t11 3m]8
r t++t++-s]8
x *t==t==,?y]8
~ $t88t88&:]8
D t//t//1E]8
J t++t++-K]8
P t++t++-Q]8
V t00t002W]8
\ t--t--/]]8
b %t99t99';c]8
h "tBBtBB$Di]8
n t..t..0o]8
t "t55t55$7u]8
z %t88t88':{]8
@ +t??t??-AA]8
F $t77t77&9G]8
L *t>>t>>,@M]8
R "t55t55$7S]8
X (t<<t<<*>Y]8
^ t22t22!4_]8
d %t99t99';e]8
j t,,t,,.k]8
p  t33t33"5q]8
v t00t00 2w]8
| $t77t77&9}]8
B t00t00 2C]8
H $t77t77&9I]8
N t,,t,,.O]8
T  t33t33"5U]8
Z t00t00 2[]8
` $t77t77&9a]8
f t00t00 2g]8
l $t77t77&9m]8
r t//t//1s]8
x t**t**,y]8
~ t11t11 3]8
D t..t..0E]8
J t11t11 3K]8
P t,,t,,.Q]8
V t22t22!4 "t66t66$8 #t77t77%9 t++t++- t,,t,,. +t>>t>>-@u]8
~ $$002 	%2%9%98$&@ &d112!D4G4G3HIu$bD
  00F+3+D+D'<<):):;;+F ,E :@!67=@> !78!!'**224? 7C237C34##%Cm# ( 9 9OO55mD!F$$(88@BM"<=?=M":;
 "]]=9
!)!:!:OO2237"9%%'N22:N ( 9 9OO55c:!<%%)99MM$4$8$8$LM%66OO22379
%!.J"+]FJ!OM'-22/@/Ee/L "+--22/@/Ee/L "+- 3 DcJI &J r!   c                rD   r   r)   rE   rG   r   r    r    s     . .t .r!   c                s   / V n         V P                   FP  p V P                  ^8  d   \        P	                  RRV/4       \
        P                  ! V4      V P                   V&   KR  	  V P                  4        R#   \         d>    \        P                  RY4       \
        P                  ! R4      T P                   T&    K  i ; i)re  z%instantiating Transliterator(%(ime)s)imezSError initializing Transliterator %s Maybe /usr/share/m17n/%s.mim is not installed?NoIMEN)
r5  r  r  r3   r!  r(  ZTransliteratorr  r  _update_transliterated_stringsrP   r
  rQ   r   r6  Z)TypingBoosterEngine._init_transliterators  s     "%%C$$q(LL?& .;-I-I#-N%%c* &  	++-    E
 .;-I-I.%%c*s   AA::ACCc                rk   rl   r   rE   rG   r   r    r    s     / /T /r!   c                s    \        V P                  ;'       gL    V P                  R 8g  ;'       g5    V P                  ;'       g!    V P                  ;'       g    V P
                  4      # ry   )r   r  r  r  r  r  rn   r&   r   _show_prediction_candidatesZ/TypingBoosterEngine._show_prediction_candidates  sn     D++ . .55;. .88. . 77. . --	/ 	/r!   c                rk   rl   r   rE   rG   r   r    r  '  s     U U4 Ur!   c                s   \        V P                  4       '       * ;'       d    \        V P                  4      ^8H  ;'       d    V P                  '       * ;'       d    V P
                  '       * ;'       dl    V P                  '       * ;'       dS    V P                  '       * ;'       d:    V P                  '       * ;'       d!    V P                  ^ ,          V P                  9  4      # re  )r   is_emptylenr  r+  r  r  r  r  r,  r  rn   r&   r   _try_early_commitZ%TypingBoosterEngine._try_early_commit'  s    
 ' T TD../14T T 888T T !222T T !<<<	T T
 !333T T !===T T **1-T5S5SSU 	Ur!   c                rk   rl   r   rE   rG   r   r    r  5  s     , ,$ ,r!   c                s2    \        V P                  4      ^ 8H  # r    )r  r,  rn   r&   r   r  ZTypingBoosterEngine.is_empty5  s    
 4%%&!++r!   c                rD   r   r)   rE   rG   r   r    r  <  s     2 2d 2r!   c                s   V P                   P                  4        V P                   P                  R 4       R V n        . V n        RV n        . V n        \        P                  ! 4       V n	        RV n
        ^ V n        . V n        ^ V n        V P                   F  pRV P                  V&   K  	  ^ V n        V P#                  4        R V P                   n        R V P                   n        \(        P*                  V P                   n        R V n        R V n        V P3                  \4        P6                  P9                  R4      ^ R \4        P:                  P<                  4       V P?                  \4        P6                  P9                  R4      R 4       R# )FrZ  NrC   ) r;  r   r   r  r7  r9  r+  r(  r)  r*  r&  r'  r,  r-  r  r2  r  ra  r   r   r|   r   r   r  r  rn  r   r   r   r   COMMITri  r  rQ   r   _clear_inputZ TypingBoosterEngine._clear_input<  sC     "--e4+0("(')$!.!C!C!E%&"$%!%%C02D((- &"# ,1):?7#3#:#: +0(,1)**II%%b)1e!!((	* 	""II%%b)5	2r!   c                s4   < V ^8  d   QhRS[ S[,          RR/# )r   string_to_insertr   Nr   r   rE   rG   r   r    r  X  s     . .c .t .r!   c                s   V P                   ^8  dW   \        P                  RV4       \        P                  RV P                  4       \        P                  RV P                  4       V P                  RV P                   V,           V P                  V P                  R ,           V n        V ;P                  \        V4      ,          un        V P                  4        R# )re  zstring_to_insert=%sself._typed_string=%szself._typed_string_cursor=%sN)r  r3   r!  r,  r-  r  r  )rP   r  re   r   _insert_string_at_cursorZ,TypingBoosterEngine._insert_string_at_cursorX  s    q LL.0@ALL0$2D2DELL7224!//0J1J1JK./"001J1J1KLM 	!!S)9%::!++-r!   c                rD   r   r)   rE   rG   r   r    r  e  s     2 2d 2r!   c                s    V P                   ^ 8  d8   V P                  V P                   R V n        ^ V n         V P                  4        R# R# r    Nr-  r,  r  rn   r&   r   _remove_string_before_cursorZ0TypingBoosterEngine._remove_string_before_cursore  sE    $$q(!%!3!3D4M4M4N!OD()D%//1 )r!   c                rD   r   r)   rE   rG   r   r    r  l  s     2 2T 2r!   c                s    V P                   \        V P                  4      8  d1   V P                  R V P                    V n        V P                  4        R # R # r"   r-  r  r,  r  rn   r&   r   _remove_string_after_cursorZ/TypingBoosterEngine._remove_string_after_cursorl  sH    $$s4+=+='>>!%!3!34NT5N5N!OD//1 ?r!   c                rD   r   r)   rE   rG   r   r    r  r  s     2 2 2r!   c                s   V P                   ^ 8  do   V P                  RV P                   ^,
           V P                  V P                   R ,           V n        V ;P                   ^,          un         V P                  4        R# R# r  r  rn   r&   r   _remove_character_before_cursorZ3TypingBoosterEngine._remove_character_before_cursorr  su    $$q(""#?D$=$=a$?@##D$=$=$>?@  %%*%//1 )r!   c                rD   r   r)   rE   rG   r   r    r  {  s     2 2 2r!   c                s    V P                   \        V P                  4      8  dV   V P                  R V P                    V P                  V P                   ^,           R  ,           V n        V P                  4        R # R # r"   r  rn   r&   r   _remove_character_after_cursorZ2TypingBoosterEngine._remove_character_after_cursor{  so    $$s4+=+='>>""#=D$=$=>##D$=$=a$?$@AB  //1	 ?r!   c                &   < V ^8  d   QhRS[ RS[/# )r   extra_msymbolr   )r   r?   rE   rG   r   r    r    s     A As AC Ar!   c                s"   V P                   ^ ,          pV P                  RV P                   pV'       d   V P                  '       g
   W1.,          pV P                  V,          P                  W0P                  R7      pV'       d9   V P                  '       g'   VP                  V4      '       d   VR\        V4      )  p\        V4      pV P                  '       d6   V\        V P                  P                  V P                  4      4      ,          pV# )r    NZascii_digits)r  r,  r-  r+  r5  transliterater  endswithr  r  preedit_representation)rP   r"  preedit_imetyped_stringZ"transliterated_string_up_to_cursorcaret   &&    r   	get_caretZTypingBoosterEngine.get_caret  s    b ((+))*D4+D+DE!=!=!=O+L!!+.<<+=+= = ? 	+ $">">">2;;MJJ23GS5G4GH /67'''S''>>0023 3E r!   c                s<   < V ^8  d   QhRS[ RS[RS[ RS[RS[RR/# )r   r   	user_freqcommentfrom_user_dbspell_checkingr   N)r   floatr   rE   rG   r   r    r    sM     Z5 Z5Z5Z5 Z5 	Z5
 !Z5
 .2Z5r!   c                s   \         P                  ! V4      p. pV'       dy   \         P                  ! V4      '       d]   \        V4      ^8X  dA   VR8X  d:   R\	        V4      R R2\         P
                  ! V4      P                  4       ,           p\        V4      pMk\        V4      ^8  d\   V'       gT   V P                  P                  '       g8   V P                  '       g&   V P                  P                  P                  V4      p\         P                  ! V4      p\         P                  ! V^PR7      p\         P"                  ! 4       p\         P                  ! V^PR7      pV'       d%   VR\         P                  ! V4      ,           ,          pRpV P$                  P'                  4       p	V P(                  P'                  4       p
V P*                  P'                  4       pV'       dz   V P,                  '       d   V	'       d   VRV	,           ,          pV P.                  '       d=   VP1                  \         P2                  ! V P4                  ^ \        V4      4      4       RpMV'       dy   V P6                  '       d   V
'       d   VRV
,           ,          pV P8                  '       d=   VP1                  \         P2                  ! V P:                  ^ \        V4      4      4       RpV'       Ed/   V P<                  '       Ed   VP?                  R4      '       gH   V	'       d   VP?                  V	4      '       g)   V
'       d   VP?                  V
4      '       g
   VR,          pV P@                  '       d   V F  pWP@                  9   d   WP@                  V,          ,          pK.  \C        V P@                  RR7       F;  p\D        PF                  ! W4      '       g   K!  WP@                  V,          ,          p K  	  K  	  MV'       d	   W,          pV PH                  '       d   VP?                  R4      '       gg   V	'       d   VP?                  V	4      '       gH   V
'       d   VP?                  V
4      '       g)   V'       d   VP?                  V4      '       g
   VR,          pV F%  pWPJ                  PM                  VR4      ,          pK'  	  V PN                  '       dE   V'       g=   VP1                  \         P2                  ! V PP                  ^ \        V4      4      4       RpVPS                  R	R
4      PS                  RR4      PS                  R\        R4      4      PS                  R\        R4      4      pV PT                  ^8  d   V PV                  '       g|   VR\Y        V4       2,          pVP1                  \         P2                  ! \         PZ                  ! R4      \        V4      \        \Y        V4      4      ,
          \        V4      4      4       \         P\                  P_                  V4      pVPa                  V4       V Pb                  Pe                  V4       V Pb                  Pg                  R4       R# )re  rC   zU+04X Z
max_lengthFT)Zreverse
u   ␤u   ␍u    u    ZHotPinkN)4rh  ri  Zis_invisibler  ordZunicode_namer   r2   r*  
candidatesr+  r   r  Zspellcheck_match_listZ
bidi_embedelide_middler   AttrListr  stripr  r   r  r  appendattr_foreground_newr  r  r  r  r  r%  r  sortedfnmatchZfnmatchcaser  r   r<  r  r  replacer  rr  r   r  r   r   set_attributesr;  r   r   )rP   r   r,  r-  r.  r/  Zdictionary_matchesattrsZ
color_usedZlabel_spellcheck_stringZlabel_userdb_stringZlabel_dictionary_stringrU  rp  r   s   &&&&&&         r   !_append_candidate_to_lookup_tableZ5TypingBoosterEngine._append_candidate_to_lookup_table  s    BB6J(*h++F336{ab= !#3v;s"3158M8M9  %(G&\F&kQ**555000**@@H 6 $$V, &&v"=''B?cH//888F
"&"?"?"E"E"G"77==?"&"?"?"E"E"G%%%*A# 777%%%T55//CKA B!

 !!!&9# 333!!!T55++QF= >!
 %%%,,0#__-DEE,#__-@AAcMF...&8
%)D)DD"&A&A*&MMF'-d.I.I6:(<#*#6#6z#G#G$*.I.I#.N$NF$)	(<	 '9 -5F$$$,,0#__-DEE,#__-@AA0#__-DEEcMF"4J4488RHHF #5%%%jT55//CKA B!
  % e$Wd8n..5g $x./2 	
 q #i.)**FLL11--i8Fc#i.11F  yy((0E"++D1--e4r!   c                rD   r   r)   rE   rG   r   r    r  b  s     w wD wr!   c                sH   V P                   ^8  d!   \        P                  RV P                  4       V P                  P                  4        V P                  P                  R4       V P                  4       '       d   R# . V n        / p. pRV P                  n	        V P                  '       g   V P                  '       Edx   V P                   EFP  pV P                  V,          '       g   K  . p^ pRp\        P                  ! V P                  V,          4      pVR9   d   \         P"                  ! RV4      pV'       d,   \%        V4      V P&                  8  d   RV P                  n	        V P                  P                  '       g/   V P                  P(                  '       g   V P*                  '       d~   \%        V P                  V,          4      \%        V4      ,
          pV'       d   V P                  V,          ^ V p V P,                  P/                  VV P0                  V P2                  R7      pV'       dJ   V'       dB   V U	u. uF5  p	\        P<                  ! WiP>                  ,           V	P@                  R	7      NK7  	  pp	. p
 V P,                  PC                  V P                  V,          4      p
WJ,            F`  pVP>                  V9   d5   \E        WP>                  ,          VP@                  4      WP>                  &   KH  VP@                  WP>                  &   Kb  	  EKS  	  \        PF                  ! V4      pV'       Ed)   \        PH                  ! V P                  V PK                  4       ^ ,          ,          4      p\        PH                  ! V^ ,          P>                  4      pW8X  d   / pV^ ,          P@                  p\%        V4      pV F  p\        PH                  ! VP>                  4      p\%        V4      V8  d9   VPM                  V4      '       d"   VP@                  V,           WP>                  &   Kk  VP@                  WP>                  &   K  	  \        PF                  ! V4      pV PN                  '       d   V P*                  '       dX   V PP                  '       gF   V P                  ^ ,          V PR                  9   g$   V P                  R,          V PR                  9   Ed!   V PT                  '       d*   V PT                  PW                  4       V PX                  8w  d=   \Z        P\                  ! V PX                  V P^                  V P`                  R7      V n*        / pRpV P                   EF3  pV P                  V,          '       g   K  \%        V P                  V,          4      V P&                  8  g'   V P*                  '       g   V Pb                  '       g   Kp  V PT                  Pe                  V P                  V,          V Pf                  V PR                  R7      pV Fz  p\E        VVP@                  4      pVP>                  V9  g,   VP@                  VVP>                  ,          ^ ,          8  g   KU  VP@                  VPh                  3VVP>                  &   K|  	  EK6  	  . pV EF  pRpVP>                  V9   d   VP>                  pMMVP>                  ^ ,          V PR                  9   d,   VP>                  R,          V9   d   VP>                  R,          pV'       d)   VVP@                  ,           VV,          ^,          3VV&   K  VPk                  \        P<                  ! VP>                  VP@                  V PT                  Pm                  VP>                  4      VP@                  ^ 8  VP@                  ^ 8  R7      4       EK  	  . p\o        VPq                  4       R R7      RV Pf                    F<  w  ppVPk                  \        P<                  ! VV^ ,          V^,          R7      4       K>  	  V P                  Ps                  4       pVRV^,
           pVV^,
          R pVRV pVVR pV Fi  pV P                  Pk                  \        P<                  ! VP>                  VP@                  VPh                  VPt                  VPv                  R7      4       Kk  	  V FU  pV P                  Pk                  \        P<                  ! VP>                  VP@                  VPh                  RRR7      4       KW  	  V Fi  pV P                  Pk                  \        P<                  ! VP>                  VP@                  VPh                  VPt                  VPv                  R7      4       Kk  	  V FU  pV P                  Pk                  \        P<                  ! VP>                  VP@                  VPh                  RRR7      4       KW  	  MkV Fe  pV P                  Pk                  \        P<                  ! VP>                  VP@                  RVP@                  ^ 8  VP@                  ^ 8  R7      4       Kg  	  V P                   FK  pV Py                  VP>                  VP@                  VPh                  VPt                  VPv                  R7       KM  	  V P                  P{                  4       V n>        V P~                  R8w  d   V P                  V P~                  R7       R#   \4         d7   p\        P7                  RTP8                  P:                  T4        Rp?E	L#Rp?ii ; iu up	i   \4         d7   p\        P7                  R
TP8                  P:                  T4        Rp?ELRp?ii ; i)re  r  FNrC   ZNFKDTp_phrase	pp_phrasez+Exception when calling select_words: %s: %s)r   r,  z/Exception when calling select_shortcuts: %s: %srX          )Zmatch_limitZtrigger_charactersrf  r   r,  r-  r.  r/  c                 sh    V ^,          ^ ,          ) \        V ^ ,          4      ) V ^,          ^,          3# r  r  r_  r&   r   ra  Z8TypingBoosterEngine._update_candidates.<locals>.<lambda>  s,    A$q'	ad)!Q#r!   rp  r   r,  r-  rZ  mode)	ko-romajazko-han2)Ar  r3   r!  r,  r;  r   r   r  r7  r   r  r  r  r2  rh  lstrip_tokenunicodedataZ	normalizer  r  r   rr  r   select_wordsr.  r/  r9   r  r  rS   PredictionCandidater   r,  Zselect_shortcutsr  Zbest_candidatesri  rz  
startswithr  r  r  r  get_languagesr  r"  r#  r  r  r  r7  r  r-  r;  r~   r=  itemsr   r.  r/  rB  rR   r8  r9  _case_mode_change)rP   Zphrase_frequenciesphrase_candidatesr
  r7  prefix_lengthZprefixZstripped_transliterated_stringr4   r`  Zshortcut_candidatescandr(  first_candidateZfirst_candidate_user_freqZfirst_candidate_lengthZcandidate_normalizedZemoji_scoresZemoji_max_scoreZemoji_matcher_candidatesZecandZphrase_candidates_emoji_nameemojiZemoji_candidatesrp  r   r   Zphrase_candidates_topZphrase_candidates_restZemoji_candidates_topZemoji_candidates_rests   &                              r   _update_candidatesZ&TypingBoosterEngine._update_candidatesb  s	    q LL0$2D2DE  "--e4==?? /1@B:?7!!!T%E%E%E))//44!#J$%MF --d.J.J3.OP 3660 :E9N9N"$B:D66 !?@ $ 7 78JN**G**GGG--<<<<<< < <S AB!"@AB & ) $ < <S A!M R #A)-)C)C >)-*.// *D *;J "f
 &0	&1 &0 %88'-hh*+++7 &0	 # &1
 DF'=.2mm.L.L 88=/?+ !+ @ @;;*<<>A 2;; ? $?0.{{; ?Cnn.{{; !AK *X !) 8 89K L #LL,,))+A.01L 'OO!!$++-O.%'",=a,@,J,J)),_)=&-D II KK) ) 014JJ0;;OLL NN-FF +;;7 ;?..*;;7 . %-$<$<&%(!$$$T\\\000!!!$(F(FF!!"%)G)GG
 &&&""002))*%.%;%;"44%)%;%;'+'8'8&:" :<L%(O))0055T99#>? 334 LLL ,,,/3/A/A/L/L44S9$($;$;+/+I+I 0M 0K, ":*-ou*O!LL<#(??\%,,5OPQ5R#R:?//5==9YL6	 ": * PR() ;;,. KKEkk!n(F(FFB<7 KKOE+:T^^+K+7+>q+A+CL' 177 44#';;&*nn$($6$6$;$;DKK$H)-!);+/>>A+=?@ ** DF & &&(! 0//!1e !''00"eAhaJK!1 **88:I$@)A+$N!%A)A+,%O"#3JY#? $4YZ$@!-  ''00#{{"&.. $%)%6%6'+':':<= . -  ''00#{{"&.. $%*',./ - /  ''00#{{"&.. $%)%6%6'+':':<= / .  ''00#{{"&.. $%*',./ . *  ''00#{{"&.. "%)^^a%7'+~~'9;< * $$D22{{..!..#22 3 4 % +/*:*:*?*?*A'""f,""(?(?"@a  ) A",, M % 8 8%A AA
&1 % =((M!OO44e= ==s6   >2l;m,m m"+mm n!++nn!c                rk   rl   r   rE   rG   r   r    r  [  s      T r!   c                s    V P                   P                  4       '       g   V P                   P                  R 4       R # V P                   P                  4       '       d   R # R# TF)r;  r   r   r   rn   r&   r   _arrow_downZTypingBoosterEngine._arrow_down[  sK     !!335511$7))++r!   c                rk   rl   r   rE   rG   r   r    r  e  s      4 r!   c                    V P                   P                  R 4       V P                   P                  4       '       d   R # R# r]  )r;  r   r   rn   r&   r   	_arrow_upZTypingBoosterEngine._arrow_upe  3     	--d3''))r!   c                rk   rl   r   rE   rG   r   r    r  m  s      D r!   c                r_  r]  )r;  r   r   rn   r&   r   
_page_downZTypingBoosterEngine._page_downm  ra  r!   c                rk   rl   r   rE   rG   r   r    r  u  s      $ r!   c                r_  r]  )r;  r   r   rn   r&   r   _page_upZTypingBoosterEngine._page_upu  s3     	--d3%%''r!   c                rk   rl   r   rE   rG   r   r    r  }  s     	 	 	r!   c                s    \        V P                  P                  4       V P                  P                  4       4      w  r\	        V4      # r"   )Zdivmodr;  r   r   r?   )rP   pageZdummy_pos_in_page   &  r   _get_lookup_table_current_pageZ2TypingBoosterEngine._get_lookup_table_current_page}  sA     #)--/,,.#0 4yr!   c                r!  r   r?   r   rE   rG   r   r    r    s      # $ r!   c                s   V P                   P                  4       pV^ 8  g   W8  d   R# V P                  4       pW2,          V,           pW@P                   P                  4       8  d   R# V P                   P	                  V4       R# )r    FT)r;  r   rf  r   r   )rP   r   r   rd  Znew_pos   &&   r   ,_set_lookup_table_cursor_pos_in_current_pageZ@TypingBoosterEngine._set_lookup_table_cursor_pos_in_current_page  sq     &&446	19*224"U*((AACC))'2r!   c                rk   rl   r   rE   rG   r   r    r    s     3 3 3r!   c                s    V P                   '       g   R # V P                  P                  4       pV\        V P                   4      8  d   R # \	        V P                   V,          P
                  4      # ry   )r7  r;  r   r  r   r   r   rQ   r   'get_string_from_lookup_table_cursor_posZ;TypingBoosterEngine.get_string_from_lookup_table_cursor_pos  sY    
 ""113C(())4##E*1122r!   c                r!  r   )r?   r   rE   rG   r   r    r    s     > >s >s >r!   c                sT    V P                  V4      '       g   R # V P                  4       # ry   )ri  rj  r   re   r   )get_string_from_lookup_table_current_pageZ=TypingBoosterEngine.get_string_from_lookup_table_current_page  s'     @@GG;;==r!   c                r!  r   rg  rE   rG   r   r    r    s     N N N Nr!   c                s   V P                   ^8  d   \        P                  RV4       V P                  V4      '       g   R# V P	                  4       pV'       g   R# V P
                  P                  4       p^ Tu;8:  d   \        V P                  4      8:  dd   M M`V P                  V,          P                  pV P                   ^8  d3   \        P                  RV4       V P                  P                  VR7       V P                  P                  4        F  w  rEVR,          ! V4      p\        P                  ! V4      pV'       dD   V P                   ^8  d   \        P                  RV4       V P                  P                  VR7       V P                   ^8  d   \        P                  RV4       V P                  P                  VR7       K  	  R# )re  z3Removing candidate with index=%s from user databaseFu0   Removing phrase with original case mode “%s”r   r^  u   Removing “%s”T)r  r3   r!  ri  rj  r;  r   r  r8  r   r   Zremove_phraser:  rU  rh  rO  )rP   r   Zdisplayed_phraseZcase_mode_orig_phraser'   Zcase_mode_valuer   Zstripped_phrases   &&      r   #remove_candidate_from_user_databaseZ7TypingBoosterEngine.remove_candidate_from_user_database  sz   < q LLEuN@@GGGGI""113=T<<==$($C$C%v "  1$O24++0 , 2"&"2"2"8"8":A$Z01ABF '33F;O$$q(LL!4oF++?+C   1$0&9MM''v'6= #;> r!   c                rk   rl   r   rE   rG   r   r    r  	  r   r!   c                sH    \        V P                  P                  4       4      # r"   )r?   r;  r   rn   r&   r   r   Z"TypingBoosterEngine.get_cursor_pos	  s    4%%44677r!   c                rk   rl   )r   rE   rG   r   r    r  	  s     " "": "r!   c                rp   r"   )r;  rn   r&   r   get_lookup_tableZ$TypingBoosterEngine.get_lookup_table	      !!!r!   c                rk   rl   r   rE   rG   r   r    r  
	  s      c r!   c                rp   r"   )r.  rn   r&   r   get_p_phraseZ TypingBoosterEngine.get_p_phrase
	  s    ~~r!   c                rk   rl   r   rE   rG   r   r    r  	        s r!   c                rp   r"   )r/  rn   r&   r   get_pp_phraseZ!TypingBoosterEngine.get_pp_phrase	      r!   c                rk   rl   r   rE   rG   r   r    r  	  s          r!   c                rp   r"   )r0  rn   r&   r   get_ppp_phraseZ"TypingBoosterEngine.get_ppp_phrase	      r!   c                r[   r   r   rE   rG   r   r    r  	  s        3  4  r!   c                s    V P                   ^8  d8   \        P                  RV P                  V P                  V P
                  V4       RV n        V P                  V n        V P
                  V n        Wn        R# )re  u0   context=“%s” “%s” “%s” push=“%s”FN)r  r3   r!  r0  r/  r.  rT  r   re   r   push_contextZ TypingBoosterEngine.push_context	  s_     q LLB  $//4>>6K 27.??..r!   c                rD   r   r)   rE   rG   r   r    r  #	  s     
# 
#t 
#r!   c                s    V P                   ^8  d7   \        P                  RV P                  V P                  V P
                  4       RV n        RV n        RV n        RV n        R# )re  u"   context=“%s” “%s” “%s”rC   FN)r  r3   r!  r0  r/  r.  r1  rn   r&   r   clear_contextZ!TypingBoosterEngine.clear_context#	  sW     q LL4  $//4>>C "r!   c                rD   r   r)   rE   rG   r   r    r  /	  s     . . .r!   c                s   / V n         V P                  '       d+   V P                  P                  V P                  4      V n        V P
                   EF*  pV P                  '       d   V P                  V,          P                  V P                  R V P                   V P                  R7      V P                  V&   V P                  V,          V P                  ,           V P                  V,          P                  V P                  V P                  R  V P                  R7      ,           V P                   V&   K  V P                  V,          P                  V P                  V P                  R7      V P                   V&   EK-  	  V P                  ^8  dC   \        P                  RV P                  4       \        P                  RV P                   4       R # R # )Nr#  r  zself._transliterated_strings=%s)r2  r+  r  r&  r4  r  r5  r$  r,  r-  r  r3  r  r3   r!  r  rQ   r   r  Z2TypingBoosterEngine._update_transliterated_strings/	  s    (*$'''''>>002 5 %%C+++))#.<<**+ED,E,EF%)%7%7 = 9 ;;C@
 ??D??@++C0>>**4+D+D+EF%)%7%7 ? 99 ,,S1 ))#.<<**%)%7%7 = 9 ,,S1 &" q LL0$2D2DELL1,,. !r!   c                0   < V ^8  d   QhRS[ S[,          /# rl   r  rE   rG   r   r    r  O	  s     % %$s) %r!   c                (    V P                   R ,          # rW  )r  rn   r&   r   rz  Z$TypingBoosterEngine.get_current_imesO	  s     !!!$$r!   c                T   < V ^8  d   QhRS[ S[S[S[,          S[3,          RS[RR/# )r   imesrI  r   Nr   r   r   r   r   rE   rG   r   r    r  W	  s9     )9 )9T#Y+,)9 #)9 /3)9r!   c                s   \         P                  R V\        V4      4       \        V\        4      '       d   \
        P                  ! V4      pWP                  8X  d   R# \        V4      \        V P                  4      8w  d   Wn        V P                  4        MWn        V P                  4        V P                  V P                  ^ R7       V P                  4       '       g   V P                  4        V'       dK   V P                  P!                  R\"        P$                  P'                  RP)                  V4      4      4       R# R# )zimes=%s type(imes)=%sNcurrent_moderY  rV  )r3   r!  typerc  r   rh  r$  r  rO   r6  rC  )_init_or_update_property_menu_preedit_imer  r  
_update_uir  r  r   r  r  r|  rP   r|  rI  r   r   ry  Z$TypingBoosterEngine.set_current_imesW	  s    " 	,dDJ?dC  55d;D%%%t9D..// "&&&(!%++-66!! 	7 	3}}OOOO%%''79 r!   c                r{  )r   dictionary_namesrI  r   Nr}  rE   rG   r   r    r  	  s>     -E -E#CcC$78-E #-E /3-Er!   c                s   \         P                  R V\        V4      4       \        V\        4      '       d   \
        P                  ! V4      pWP                  8X  d   R# Wn        V P                  P                  P                  V4       \
        P                  ! V P                  4      V n        V P                  4        V P                  V P                  ^ R7       V P                   '       dd   V P"                  '       d    V P"                  P%                  4       V8w  d3   \&        P(                  ! VV P*                  V P,                  R7      V n        V P/                  4       '       g   V P1                  4        V'       dK   V P2                  P5                  R\6        P8                  P;                  RP=                  V4      4      4       R# R# )z-dictionary_names=%s type(dictionary_names)=%sNr~  rX  rU  rV  )r3   r!  r  rc  r   rh  r  r  r   r  r  r  r   rB  (_init_or_update_property_menu_dictionaryr  r  r  rT  r"  r#  r  r  r  r  r  r  r   r  r  r|  )rP   r  rI  r   r   r  Z(TypingBoosterEngine.set_dictionary_names	  s\   $ 	D%t,<'=	?&,,'@@  "555!1""778HI!)!3!3D4J4J!K**,55  q 	6 	2"""&&&&&446'(%.%;%;.%)%;%;'+'8'8&:" }}OOOO%%''1A(BCE r!   c                rx  rl   r  rE   rG   r   r    r  	  s     ) )d3i )r!   c                ry  rz  )r  rn   r&   r   r{  Z(TypingBoosterEngine.get_dictionary_names	  s     %%a((r!   c                sj   < V ^8  d   QhRS[ S[S[S[S[S[3,          ,          S[3,          RS[RR/# )r   rO  rI  r   N)r   r   r   r   r   r   rE   rG   r   r    r  	  sC      U3S=%9 :C ?@ # /3r!   c                s`   V P                   ^ 8  d   \        P                  RV4       \        V\        4      '       g   R# WP
                  8X  d   R# Wn        V'       d   \        P                  P                  \        P                  ! R4      V UUu. uFd  p\        P                  P                  \        P                  ! R4      V Uu. uF"  p\        P                  P                  V4      NK$  	  up4      NKf  	  upp4      pV P                  P                  RV4       R# R# u upi u uppi )r    zautosettings=%sNZassrO  )r  r3   r!  rc  listr  r   r  	new_arrayVariantTyper  r  r  )rP   rO  rI  Zautosettingr`  variant_array   &&&   r   r  Z$TypingBoosterEngine.set_autosettings	  s     q LL*L9,-----) LL2243C3CD3I (4L (4 LL**4+;+;C+@<GCI<Gq//2KCI J'3L M
 OO%% CILs   7D*
(D%2D*%D*c                sJ   < V ^8  d   QhRS[ S[S[S[S[3,          ,          /# rl   )r   r   r   rE   rG   r   r    r  	  s$     ) )$uS#s]';"< )r!   c                r}   r"   )r  rR   rn   r&   r   r   Z$TypingBoosterEngine.get_autosettings	  s     !!&&((r!   c                sf   < V ^8  d   QhRS[ S[S[S[S[,          3,          S[3,          RS[RR/# )r   rN  rI  r   N)r   r   r   r   r   r   rE   rG   r   r    r  	  sE     J$ J$tCcN3S89J$ #J$ /3J$r!   c           
     s   / p\         P                  ! V P                  P                  R 4      4      p\         P                  ! W14       W0n        RV n        RV n        V F0  pW,           F!  pVR
9   d   RV n        VR9   g   K  RV n        K#  	  K2  	  \         P                  ! V P
                  4      V n	        V P                  '       Ed   V P                  '       d*   \        V P
                  R,          4      V P                  R&   V P                  '       d*   \        V P
                  R,          4      V P                  R&   V P                  '       d*   \        V P
                  R,          4      V P                  R&   V P                  '       d   V P!                  4        V P"                  '       d   V P%                  4        V P'                  4        V'       d   \(        P*                  ! \(        P,                  ! R/ 4      4      p\/        V P
                  4       F  p\(        P,                  P1                  \(        P2                  ! R4      V P
                  V,           Uu. uF"  p\(        P,                  P5                  V4      NK$  	  up4      pVP7                  WH4       K  	  V P                  P9                  R VP;                  4       4       R	# R	# u upi )rN  FTrt  rs  rw  ry  za{sv}r  N
Z0Z1Z2Z3Z4Z5Z6Z7Z8Z9)
KP_0KP_1KP_2KP_3KP_4KP_5KP_6KP_7KP_8KP_9)rh  r  r  r  r  r	  r  r  ZHotKeysr
  r  r  r2   r  r  r  rB  r  rC  rD  r   ZVariantDictr  r=  r  r  r  Zinsert_valuer  Zend)	rP   rN  rI  Znew_keybindingscommandZ
keybindingZvariant_dictr`  r  s	   &&&      r   r  Z#TypingBoosterEngine.set_keybindings	  sU    "33OO--m<> 	**?H+27/27/"G)22
11 ?CD;@@ ?CD; 3 # !(():):; ???###**+EFG $$_5...**+DEF //@,,,**+BCD --o>###224$$$335!!#++DLL",EFL!$"3"34 $ 6 6$$S)"//8:8 \\,,Q/8:!; ))'A 5 OO%%  "$ 
:s   (Kc                sF   < V ^8  d   QhRS[ S[S[S[,          3,          /# rl   )r   r   r   rE   rG   r   r    r  +
  s!     ( (c49n!5 (r!   c                r}   r"   )r	  rR   rn   r&   r   r  Z#TypingBoosterEngine.get_keybindings+
  s       %%''r!   c                rD   r   r)   rE   rG   r   r    r  4
  s     : :t :r!   c                s   / V n         V P                  4       p\        P                  p\	        ^ V4       F  pV\        V4      8  d   RVRW,          R,           \        P                  ! W,          4      ,           RW,          R,           \        P                  ! W,          4      ,           RR/V P                   R\        V4      ,           &   K  RVRRRRRR/V P                   R\        V4      ,           &   K  	  RR	R\        R
4      R\        R4      RR\        V P                  R,          4      ,           R,           \        V P                  R,          4      ,           RV P                   /V n        R# )r    rm  rj  r2  r   rr  rC   zDictionary.rp  Z
DictionaryzHighest priority dictionaryz"Choose highest priority dictionaryrs  Next: Znext_dictionary
Previous: Zprevious_dictionaryru  N)r  r{  rh  ZMAXIMUM_NUMBER_OF_DICTIONARIESr   r  get_flagr   r'   r2   r	  r  )rP   Zcurrent_dictionariesZcurrent_dictionaries_maxi   &   r   rB  Z1TypingBoosterEngine._update_dictionary_menu_dicts4
  sl    &("#88:#+#J#J q23A3+,, q36 %../C/FG H25%../C/FGH **!CF* q(BYK **!#a&( 4  <Q45q=>tD--.?@AAt001FGHI d88 :r!   c                rD   r   r)   rE   rG   r   r    r  T
  s     ; ; ;r!   c                s>   / V n         V P                  4       p\        P                  p\	        ^ V4       Fo  pV\        V4      8  d6   RVRW,          RW,          RR/V P                   R\        V4      ,           &   KH  RVRRRRRR/V P                   R\        V4      ,           &   Kq  	  RRR\        R	4      R\        R
4      RR\        V P                  R,          4      ,           R,           \        V P                  R,          4      ,           RV P                   /V n
        R# )r    rm  rj  r   rr  rC   zPreeditIme.rp  Z
PreeditImezPreedit input methodzSwitch preedit input methodrs  r  Znext_input_methodr  Zprevious_input_methodru  N)r  rz  rh  ZMAXIMUM_NUMBER_OF_INPUT_METHODSr   r  r   r'   r2   r	  r  )rP   Zcurrent_imesZcurrent_imes_maxr  r  r   rC  Z2TypingBoosterEngine._update_preedit_ime_menu_dictsT
  s&    ')#,,.#CCq*+A3|$$ q|lo ++!CF* q(BYK ++!#a&( , <Q-.q67tD--.ABCCt001HIJK d99!;r!   c                @   < V ^8  d   QhRS[ S[S[3,          RS[RR/# r   menur  r   Nr   r   r   r?   rE   rG   r   r    r  r
  1     +7 +7sCx.+7 +7 '++7r!   c                   VR ,          pVR,          pRpRpRpV FU  pWH,          R,          \        V4      8X  g   K"  WH,          R,          pVR,           RV R2pVR,           R	VR
,           2pKW  	  \        V P                  4       4      ^8  p	V P                  WBR7       W0P                  9  d   \
        P                  ! V\
        P                  P                  \
        P                  P                  V4      R\
        P                  P                  V4      \
        P                  P                  V4      V	V	\
        P                  P                  V P                  R7
      V P                  V&   V P                  P                  V P                  V,          4       R# V P                  V,          P!                  \
        P                  P                  V4      4       V P                  V,          P#                  \
        P                  P                  V4      4       V P                  V,          P%                  \
        P                  P                  V4      4       V P                  V,          P'                  V	4       V P                  V,          P)                  V	4       V P+                  V P                  V,          4       R# rp  ru  rC   rm  rj  r   z (rw   rr  r4  rs  r~  
rp  	prop_typer   iconrj  rr  	sensitiver   r   	sub_propsN)r?   r  r{  )_init_or_update_sub_properties_dictionaryr  r   PropertyPropTypeMENUr   r   	PropState	UNCHECKEDr  r  r;  r   
set_symbolset_tooltipset_sensitiveset_visibleupdate_property
rP   r  r  rp  ru  rj  r   rr  propr   
   &&&       r   r  Z<TypingBoosterEngine._init_or_update_property_menu_dictionaryr
  s    5k./"D#H-\1BB'-h7=/F815!)_-R_0E/FG	 #
 d//12Q666 	7 	7oo%#'==--,,ii//6yy008		11':!nn..BB
$DDOOC  &&ts';<OOC **		))%02OOC ++		))&13OOC ,,		))'24OOC ..w7OOC ,,W5  !56r!   c                r  r  r  rE   rG   r   r    r  
  r  r!   c                r  r  )r?   r  rz  *_init_or_update_sub_properties_preedit_imer  r   r  r  r  r   r   r  r  r  r  r;  r   r  r  r  r  r  r  r  r   r  Z=TypingBoosterEngine._init_or_update_property_menu_preedit_ime
  s    5k./"D#H-\1BB'-h7=/F815!)_-R_0E/FG	 #
 d++-.277 	8 	7oo%#'==--,,ii//6yy008		11':!nn..CC
$EDOOC  &&ts';<OOC **		))%02OOC ++		))&13OOC ,,		))'24OOC ..w7OOC ,,W5  !56r!   c                r  r   modesr  r   Nr  rE   rG   r   r    r  
  1     -< -<S>-< -< '+-<r!   c                F  a V P                   P                  ^ 4      f   Rp\        P                  ! 4       V n         MRp\	        V P                  4       4      p\        SV3R lR7       EF4  pSV,          R,          V8  pSV,          R,          \        V4      8X  d   \        P                  P                  pM\        P                  P                  pSV,          R,          pRSV,          9   d   SV,          R,          p	MR	p	V'       g   \        P                  ! V\        P                  P                  \        P                  P                  V4      R	\        P                  P                  V	4      VVVRR
7	      V P                   V&   V P                   P#                  V P                   V,          4       EKP  V P                   V,          P%                  \        P                  P                  V4      4       V P                   V,          P'                  \        P                  P                  V	4      4       V P                   V,          P)                  V4       V P                   V,          P+                  V4       V P-                  V P                   V,          4       EK7  	  R# )r    NFTc                 6   < \        SV ,          R ,          4      # rm  r   r`  r  r_  r   ra  ZOTypingBoosterEngine._init_or_update_sub_properties_dictionary.<locals>.<lambda>
      U1Xh5G1Hr!   rI  rm  r   rr  rC   	rp  r  r   r  rr  r  r   r   r  )r  r<  r   r  r  r{  r=  r?   r  CHECKEDr  r  r  RADIOr   r   r  r;  r   r  r  r  r  )
rP   r  r  updateZnumber_of_current_dictionariesrL  r   r   r   rr  
   &f&       r   r  Z=TypingBoosterEngine._init_or_update_sub_properties_dictionary
  s    3377:BF7;}}D4F),T-F-F-H)I&5&IJJDDk(+.LLGT{8$L(99..00$K(EE$K'+i0(,"mm11))33E: II55g>%#"	)$% 88??OOD)+ %//II--e46%11II--g68%33G<%11':$$T__T%:;? Kr!   c                r  r  r  rE   rG   r   r    r  
  r  r!   c                r  )r    NFTc                 r  r  r   r  r_  r   ra  ZPTypingBoosterEngine._init_or_update_sub_properties_preedit_ime.<locals>.<lambda>	  r  r!   rI  rm  r   rr  rC   r  )r  r<  r   r  r  rz  r=  r?   r  r  r  r  r  r  r   r   r  r;  r   r  r  r  r  )
rP   r  r  r  Znumber_of_current_imesrL  r   r   r   rr  r  r   r  Z>TypingBoosterEngine._init_or_update_sub_properties_preedit_ime
  s    4488;CF8<D5F!$T%:%:%<!=5&IJJDDk(+.DDGT{8$L(99..00$K(EE$K'+i0(,"mm11))33E: II55g>%#"	)$% 99@@OOD)+ %//II--e46%11II--g68%33G<%11':$$T__T%:;? Kr!   c                r  r  r  rE   rG   r   r    r  *  s1     7< 7<sCx.7< 7< '+7<r!   c                s   VR ,          pVR,          pRpRpRpV FO  pWH,          R,          \        V4      8X  g   K"  WH,          R,          pVR,          pVR,           RVR,           2pKQ  	  R	p	VR
8X  d   R	p	VR9   d   V P                  4       p	V P                  W4VR7       W0P                  9  d   \        P
                  ! V\        P                  P                  \        P                  P                  V4      R\        P                  P                  V4      \        P                  P                  V4      V	V	\        P                  P                  V P                  V,          R7
      V P                  V&   V P                  P                  V P                  V,          4       R# V P                  V,          P                  \        P                  P                  V4      4       V P                  V,          P!                  \        P                  P                  V4      4       V P                  V,          P#                  \        P                  P                  V4      4       V P                  V,          P%                  V	4       V P                  V,          P'                  V	4       V P)                  V P                  V,          4       R# )rp  ru  rC   rm  rj  r   rr  r4  rs  Trq  r~  r  Nrv  rx  )r?   r  _init_or_update_sub_propertiesr  r   r  r  r  r   r   r  r  r  r  r;  r   r  r  r  r  r  )
rP   r  r  menu_keyZsub_properties_dictrj  r   rr  r  r   r  r   _init_or_update_property_menuZ1TypingBoosterEngine._init_or_update_property_menu*  s(    ;"#34'D"(2c,6GG,28<W!)_-R_0E/FG	 (
 {" GBB668G++ 	, 	F??*(,--,,ii//6yy008		11':!nn....x8
):DOOH% &&tx'@AOOH%//		))%02OOH%00		))&13OOH%11		))'24OOH%33G<OOH%11':  !:;r!   c                sF   < V ^8  d   QhRS[ RS[S[ S[3,          RS[RR/# )r   r  r  r  r   N)r   r   r   r?   rE   rG   r   r    r  c  s;     :< :<:< S>:< 	:< '+	:<r!   c                sz  a WP                   9  d&   R p\        P                  ! 4       V P                   V&   MRpRpVR8X  d   RpVR9   d   V P                  4       p\	        SV3R lR7       EFJ  pSV,          R,          \        V4      8X  d   \        P                  P                  pM\        P                  P                  pSV,          R,          pRSV,          9   d   SV,          R,          p	MRp	V'       g   \        P                  ! V\        P                  P                  \        P                  P                  V4      R\        P                  P                  V	4      VVVR	R
7	      V P                  V&   V P                   V,          P                  V P                  V,          4       EKD  V P                  V,          P!                  \        P                  P                  V4      4       V P                  V,          P#                  \        P                  P                  V	4      4       V P                  V,          P%                  V4       V P                  V,          P'                  V4       V P                  V,          P)                  V4       V P+                  V P                  V,          4       EKM  	  R	# )FTrq  c                 r  r  r   r  r_  r   ra  ZDTypingBoosterEngine._init_or_update_sub_properties.<locals>.<lambda>~  r  r!   rI  rm  r   rr  rC   Nr  r  )r  r   r  r  r=  r?   r  r  r  r  r  r  r   r   r  r;  r   r  r  r  Z	set_stater  )
rP   r  r  r  r  r   rL  r   r   rr  s
   &&f&      r   r  Z2TypingBoosterEngine._init_or_update_sub_propertiesc  s    ///F-1]]_D  *F{" GBB668G5&IJJDT{8$L(99..00$K(EE$K'+i0(,"mm11))33E: II55g>%#"	)$% $$X.55OOD)+ %//II--e46%11II--g68%33G<%11':%//6$$T__T%:;? Kr!   c                rD   r   r)   rE   rG   r   r    r    s     F6 F6$ F6r!   c           
     s$   / V n         / V n        \        P                  ! 4       V n        \        P                  ! 4       V n        \        P                  ! 4       V n        V P                  R 8w  d   \        P                  ! 4       p\        P                  ! R\        P                  P                  V P                  4      VP                  V P                   RV P                   24      \        P                  P                  V P                  4      RRR7      pV P                  P!                  V4       V P#                  V P$                  V P&                  4       V P)                  4       '       dM   V P#                  V P*                  V P,                  4       V P#                  V P.                  V P0                  4       V P3                  V P4                  ^ R7       V P7                  V P8                  ^ R7       \        P                  ! R\        P                  P                  \;        R4      4      R	\        P                  P                  \;        R
4      4      RRR7      pV P                  P!                  V4       V P=                  V P                  4       R# )r  Z	m17n_iconru  TF)rp  r   r  rr  r  r   r~  setupZSetupzgtk-preferencesz#Preferences for ibus-typing-boosterN)r  r  r   r  r  r  r  r  rh  Z
M17nDbInfor  r   r   Zget_iconr  r  r;  r  r  r  r  r  r  r  r  r  r  r  r  r'   register_properties)rP   Zm17n_db_infoZm17n_icon_propertyZsetup_propertyr  r   rD  Z$TypingBoosterEngine._init_properties  s    !48MMO137==?0"mmo 00#..0L!%ii//0A0AB"++**+1T-@-@,ABD		11$2C2CD
  !"$ &&'9: 	**  	 ++-- ..//'') ..--$$& 	55  q 	6 	2 	66!! 	7 	3 ))++AgJ7"II--78: 	"">2  !4!45r!   c                r   )r   ibus_property
prop_stater   N)r   r   r  rE   rG   r   r    r    s/     7 77 7 GK7r!   c                s   V P                   ^8  d   \        P                  RW4       VR8X  d   V P                  4        R# V\        P
                  P                  8w  d   R# VP                  V P                  R,          R,           4      '       dh   V P                  V,          R,          pV^ 8w  dE   V P                  4       pV P                  WC,          .WC^,           R ,           VRV ,           RR7       R# VP                  V P                  R,          R,           4      '       dr   V P                  V,          R,          pV^ 8w  dO   V P                  4       pV P                  WS,          .WS^,           R ,           VRV ,           V P                   R7       R# VP                  V P"                  R,          R,           4      '       d3   V P%                  \'        V P(                  V,          R,          4      4       VP                  V P*                  R,          R,           4      '       d5   V P-                  \'        V P.                  V,          R,          4      4       R# VP                  V P0                  R,          R,           4      '       d5   V P3                  \'        V P4                  V,          R,          4      4       R# R# )	re  zibus_property=%s prop_state=%sr  Nrp  r  rm  TrH  )r  r3   r!  _start_setupr   r  r  rS  r  r  r{  r  r  r  rz  ry  r  r  r  r   r  r  r  r  r  r  r  )rP   r  r  rm  namesr|  r  r   do_property_activateZ(TypingBoosterEngine.do_property_activate  su    q LL0-MG#/// ##D$8$8$?$CDD//>xHF{ 113))]Oe1HI&66wG%) * + ##D$9$9%$@$DEE00?IF{ ,,.%%\NT()_4tGV}D%)%I%I & K ##$$U+c13 3T//#%%-/ 01 ##//6<> >**T::#%%-/ 01 ##--e4s:< <((T88#%%-/ 01 <r!   c                rD   r   r)   rE   rG   r   r    r     s     ' 'd 'r!   c                sN   V P                  4       '       d&   \        P                  R 4       V P                  4        \        P
                  ! R4      '       dF   \        P                  P                  \        P
                  ! RR4      R4      pVRV P                  .pM|\        P                  P                  \        P                  P                  \        P                  P                  \        4      4      R4      p\        P                  VRV P                  .p\        P                  RRP                  V4      4        \        P                  ! V4      V n        R	#   \"         d>   p\        P%                  RTP&                  P(                  T4       R	T n         R	p?R	# R	p?ii ; i)
z7Another setup tool is still running, terminating it ...Z IBUS_TYPING_BOOSTER_LIB_LOCATIONrC   zibus-setup-typing-boosterz--engine-namez../setup/main.pyzStarting setup tool: "%s"r2  z+Exception when starting setup tools: %s: %sN)_is_setup_runningr3   r{  _stop_setuposgetenvr  r|  r  dirnameZabspath__file__r0   
executable
subprocessPopenr  r9   r  r  rS   )rP   Z	setup_cmdZcmdZsetup_python_scriptr4      &    r   r  Z TypingBoosterEngine._start_setup   s/   !!##KKQR99788		<bA+-I ot/@/@AC"$'',, 9:"#$ >>#6IZIZ[C/#?	'","2"2#D 	'=((%1 #'D		's   ?E F$'2FF$c                rk   rl   r   rE   rG   r   r    r  :  s     2 24 2r!   c                sZ    V P                   f   R# V P                   P                  4       R J # )NF)r  Zpollrn   r&   r   r  Z%TypingBoosterEngine._is_setup_running:  s+    &""'')T11r!   c                rD   r   r)   rE   rG   r   r    r  @  s     / /T /r!   c                s    V P                  4       '       dF   V P                  '       d2   V P                  P                  4        \        P	                  R 4       R# R# R# )zStopped setup tool.N)r  r  Z	terminater3   r{  rn   r&   r   r  ZTypingBoosterEngine._stop_setup@  sC    !!##(;(;(;))+KK-. )<#r!   c                rD   r   r)   rE   rG   r   r    r  G  s     & &D &r!   c                sF    V P                  4        V P                  4        R # r"   )r  _update_ui_empty_inputrn   r&   r   rV  Z.TypingBoosterEngine._clear_input_and_update_uiG  s     	##%r!   c                rD   r   r)   rE   rG   r   r    r  M  s      D r!   c                s   < V P                   ^ 8  d   \        P                  R4       V P                  4        V P	                  4        \
        SV `  4        R# )r    entering functionN)r  r3   r!  rV  do_focus_outr  Zdestroyr^  r_  r   
do_destroyZTypingBoosterEngine.do_destroyM  sB     q LL,-'')r!   c                rk   rl   r   rE   rG   r   r    r  V  s      3 r!   c                sb   V P                   '       g   R # R P                  V P                   RV P                   4       RR P                  V P                   V P                  R 4       2pV P                  ^ ,          R8X  d0   VP	                  R P                  \
        P                  4      R 4      # V# )rC   Nu   │ja-anthy)r,  r|  r-  r  r?  rh  ANTHY_HENKAN_WIDE)rP   Zraw_input_reprrQ   r   _raw_input_representationZ-TypingBoosterEngine._raw_input_representationV  s    ( !!!wwt))*D4+D+DEFGswwt))$*C*C*DEFGI 	 a J. "))"''(2L2L*MrRRr!   c                s@   < V ^8  d   QhRS[ P                  RS[RS[/# )r   rA  r   r   )r   r9  r   r   rE   rG   r   r    r  u  s)      .16:r!   c           
     s   V P                   '       gR   V P                  P                  '       g6   V P                  4       ^ ,          R,          R9   g   V P                  '       g   R# \
        P                  ! V4      pVP                  V4      p\        V4      ^8  do   V P                  P                  P                  V4      '       gD   VP                  \        P                  ! V P                  VV\        V4      ,           4      4       R# R# )r    Nr   NFT)zhja)r+  r*  r7  rz  r  rh  strip_tokenfindr  r   r  
spellcheckr;  r   r<  r  )rP   rA  r   Zstripped_textrX  r   r   "_add_color_to_attrs_for_spellcheckZ6TypingBoosterEngine._add_color_to_attrs_for_spellchecku  s     (((%%000$$&q)"-=111 ,,T2		-0!#MM&&11-@@LL1133M 224 5 r!   c                :   < V ^8  d   QhRS[ P                  RS[/# r   rA  r   r   r9  r   rE   rG   r   r    r    s      T]] t r!   c                sP   V P                   '       d   V P                  '       g   R # V P                  4       ^ ,          p\        V P                  V,          4      p\        V P
                  4      pVP                  \        P                  ! V P                  VW4,           4      4       R# FT)
r+  r  rz  r  r3  r4  r;  r   r<  r  )rP   rA  r
  Zlength_before_composeZlength_composerh  r   _add_color_to_attrs_for_composeZ3TypingBoosterEngine._add_color_to_attrs_for_compose  s    
 ,,,...##%a( #77<!>557T--,,!!24 	5 r!   c                r  r  r  rE   rG   r   r    r    s!     # ##+/#r!   c                s   V P                   '       g   V P                  '       g   R # V P                  P                  '       dA   \	        V P                  P
                  4      p\	        V P                  P                  4      pEMV P                  4       ^ ,          pV P                  V,          pVP                  V P                  V P                  R7      pVP
                  p\	        V4      pVP                  p\	        V4      pV P                  '       dw   VP                  V P                  R.,           V P                  R7      p	V	P                  R4      '       d1   V	P                  V4      '       d   V	\	        V4      R p\	        V4      pV'       g   R # VP!                  \"        P$                  ! V P&                  VW#,           4      4       R# )Fr#  r2  TrN  )r+  r  r*  r7  r  	committedpreeditrz  r5  transliterate_partsr,  r  r  r$  r%  rS  r;  r   r<  r  )
rP   rA  Zlength_beforeZlength_inner_preeditr
  transtransliterated_partsbeforeinner_preedit	finalized
   &&        r   $_add_color_to_attrs_for_m17n_preeditZ8TypingBoosterEngine._add_color_to_attrs_for_m17n_preedit  s    (((+++!!,,, 6 6 @ @AM#&t'='='E'E#F '')!,C))#.E#(#<#<""1C1C $= $E )33FKM088M#&}#5 $$$!//&&#.T=O=O 0 Q	%%c**y/C/CF/K/K$-c&k"$=M+.}+=(#T--))02 	3 r!   c                rk   rl   r   rE   rG   r   r    r    s      .  .C  .r!   c                s   V P                  4       ^ ,          pV P                  V,          pV P                  V,          pV P                  '       d@   V P                  V,          pV P
                  pV\        V4      \        V4      ,           R pEM%V P                  P                  '       dL   V P                  P                  pV P                  P                  pV\        V4      \        V4      ,           R pMVP                  V P                  V P                  R7      pVP                  pVP                  pRpV P                  '       dl   VP                  V P                  R.,           V P                  R7      pVP!                  R4      '       d&   VP#                  V4      '       d   V\        V4      R pV P$                  V P&                  ,          R,          p	\)        V	! V4      4      p\)        V	! V4      4      pWE,           V,           # )r    Nr#  rC   r2  r^  rN  )rz  r5  r2  r+  r3  r4  r  r*  r7  r  r  r  r,  r  r  r$  r%  rS  r:  r9  r   )
rP   r
  r  r   r  r  Zafterr  r  Zcm_func
   &         r   *_get_preedit_string_with_case_mode_appliedZ>TypingBoosterEngine._get_preedit_string_with_case_mode_applied  s    ##%a(%%c*++C0'''@@EF EEMVs='99:;E##...++55F 22::MVs='99:;E#(#<#<""1C1C $= $E )33F088ME$$$!//&&#.T=O=O 0 Q	%%c**y/C/CF/K/K$-c&k"$=M""4#:#:;JGWV_%GEN#%--r!   c                rD   r   r)   rE   rG   r   r    r    s     6= 6= 6=r!   c           	     s(   V P                   ^8  d   \        P                  R4       V P                  ^8  d   V P                  '       d   V P
                  P                  '       g!   V P
                  P                  4       '       g_   V P                  \        P                  P                  V P                  4        4      R4       V P                  V P                  4       R4       V P                  4       pV P                   ^8  d   \        P                  RV4       V P                   '       d   R\#        V4      ,          pVR8X  d   V P$                  P&                  R8X  d)   V P                   ^8  d   \        P                  R4       R# V P)                  \        P                  P                  R4      ^ R\        P*                  P,                  4       R# \        P.                  ! 4       pV P0                  '       d9   V P
                  P2                  '       g   V P
                  P4                  '       d   VP7                  \        P8                  ! V P:                  ^ \#        V4      4      4       V P=                  V4      pRpV'       g   V P?                  V4      pV'       g   V'       g   V PA                  W!4       MHVP7                  \        P8                  ! \        PB                  PD                  ^ \#        V4      4      4       \        P                  P                  V4      pVPG                  V4       V PI                  4       pV PJ                  '       d   V PI                  R	R
7      pV P)                  WVR\        P*                  P,                  4       R# )re  r  TFu   _str=“%s”*rC   %Avoid clearing already empty preedit.Nr2  r"  )&r  r3   r!  r  r,  r;  r   r   ri  r   r   r   r  rd  rn  r  r  r  r  r   rn  r   r  r9  r  r   r   r;  attr_underline_newr  r  r  r  AttrUnderlineNONEr@  r+  r  )rP   Z_strrA  Zcompose_coloredm17n_coloredr   r)  s   &      r   _update_preeditZ#TypingBoosterEngine._update_preedit  s   q LL,-  A%"""##*****CCEE&&		))T-K-K-M,NP $$T%:%:%<eD>>@q LL$/T?D2:))22b8$$q(LL!HI..		))"-q%%%,,. 444!!000!!>>>LL00''CI7 8"BB5IO L"#HHO#|77D LL00""''CI7 8yy((.E"    NNN5E**t44;;	=r!   c                rD   r   r)   rE   rG   r   r    r     s     S2 S2T S2r!   c           	     sN   R pV P                   P                  \        P                  8X  dz   VR P	                  V P
                  V P                  P                  V P                   4      P                  R P	                  \        P                  4      R 4      ,          pVR,          pV P                  ^8  dC   V P                   P                  \        P                  8X  d   WP                  4        R2,          pV P                  '       dH   VRV P                   P!                  4       ^,            RV P                   P#                  4        R2,          pV P$                  '       Ed   V P                   P                  \        P&                  8X  d   VR,          pEMV P                   P                  \        P(                  8X  d   VR,          pEMoV P                   P                  \        P*                  8X  d   VR,          pEM;V P                   P                  \        P                  8X  d#   VRV P                  P,                   R2,          pMV P.                  '       d   V\0         \2         R	2,          pMV\4         \2         R	2,          pV P6                  '       d   V\0         \8         R	2,          pMV\4         \8         R	2,          pV P;                  4       pV'       d0   W^ ,           R\        P<                  ! V^ ,          4       2,          pV P?                  4       ^ ,          pVR
8w  d   VRV R2,          p\@        PB                  ! 4       pVPE                  \@        PF                  ! \        PH                  ! R4      ^ \K        V4      4      4       V PL                  ^ 8  d   V PN                  '       g   RV PP                  PR                   2pW,          pVPE                  \@        PF                  ! \        PH                  ! R4      \K        V4      \K        V4      ,
          \K        V4      4      4       V PL                  ^8  d   RpV PT                  '       d   Rp\K        V4      pW V PW                  4        R	V PY                  4        R	V P[                  4        2,          pVPE                  \@        PF                  ! \        PH                  ! R4      V\K        V4      4      4       \@        P\                  P_                  V4      pVPa                  V4       Rp	V P                   P#                  4       ^ 8X  g[   V Pb                  '       gI   V Pd                  '       d/   V Pf                  '       g   V P                   Ph                  '       d	   V'       g   Rp	V Pk                  W4       R# )rC       Z(z / z) u   ⎄ u   🔗 u   🔬 u   🦜 r2  r  Z	SlateGrayu   🪟ZPurpleu   🔴u   🟢ZDeepPinkTFN)6r;  r   r|   r   r|  r,  r*  committed_indexr-  r?  rh  r  r  r   r  r  r   r   r  r   r   r   Zstatusr  r@  r?  r>  r  rA  r{  r  rz  r   r9  r;  r<  r  r  r  r  r  r]   rT  rt  rr  rp  r   r   r@  r  r  rr  r   ri  )
rP   Z
aux_stringr  r'  rA  r]   Zcontext_indicatorZlen_aux_string_origr   r   r  r   _update_auxZTypingBoosterEngine._update_aux   s   
##'7'G'GG"''""**::..01 29#%778+E+E#F2LLJ
 %J  A%""((,<,C,CC;;=>cBBJ***D&&557!;<C%%>>@AEFJ 333!!''+;+O+OOh&
##))-=-P-PPi'
##))-=-L-LLi'
##))-=-M-MM(>(>(E(E'FcJJ
 ***)*+G*HJLJ *+,H+IKMJ''')*+E*FaHJJ *+,F+GqIKJ1131XJc(2C2CE!H2M1N"OOJ"335a8')C}C"88J T--))+6
O 	 q D--4456F JLL11--h7JF+J! " q  &555$*!"%j/0"1134A"00231"//124 5J LL11--j9#J! " yy((4E"779Q>   **999G""41r!   c                rD   r   r)   rE   rG   r   r    r  u  s     _ _d _r!   c           
     sV   V P                  4       '       do   V P                  '       g]   V P                  ^ 8w  dL   V P                  P                  \
        P                  \
        P                  39  d   V P                  '       dr   V P                  '       g`   V P                  P                  4       ^ 8X  gA   V P                  '       dQ   V P                  '       g?   V P                  P                  '       g#   V P                  4        V P                  4        R# V P                  '       d   V P                  '       gz   V P                  '       gh   V P                  P                  \
        P                   \
        P                  \
        P                  39   g    V P                  P#                  4       ^ 8w  d3   V P%                  V P'                  4       R4       V P                  4        R# \(        P*                  ! V P,                  V P/                  4       ^ ,          ,          4      p\(        P*                  ! V P0                  ^ ,          P2                  4      pVP5                  V4      '       d   W!8X  d   V P                  ^8  g!   V P                  P7                  4       '       d"   V P%                  V P'                  4       R4       MAV P                  4        \8        P:                  P=                  R4      pV P?                  VR4       V P                  4        R# V\A        V4      R pV P                  4        \8        P:                  P=                  R4      pV P?                  VR4       \8        P:                  P=                  W,           4      p\8        PB                  ! 4       pVPE                  \8        PF                  ! V PH                  ^ \A        V4      4      4       V P                  P7                  4       '       dK   VPE                  \8        PF                  ! V PH                  \A        V4      \A        W,           4      4      4       MV PK                  V4      pV'       g   V PM                  WQ4       V PN                  '       dJ   VPE                  \8        PP                  ! V PR                  \A        V4      \A        W,           4      4      4       VPE                  \8        PF                  ! \8        PT                  PV                  \A        V4      \A        W,           4      4      4       VPY                  V4       V P                  P7                  4       '       d   V PZ                  '       g   \A        V4      pMV P]                  4       pV P_                  W7R\8        P`                  Pb                  4       R# )r    NTrC   F)2r  rr  r  r;  r   r|   r   r   r+  r  r   r  r   ra  r   r  r   r   rd  rn  rh  ri  r2  rz  r7  r   rS  r   r   r   r   ri  r  r9  r;  r  r  r  r  r  r<  r  r  r  r@  r  r+  rn  r   r  )rP   r(  rZ  r   Z
completionrA  r  r)     &       r   _update_lookup_tableZ(TypingBoosterEngine._update_lookup_tableu  s1    ]]__\\\((A-##))!44!0022 2 111!!::<A   **999""$  "'''|||+++!!'' 00 33 //,1 1 !!002a7$$T%:%:%<dC  "  HH((%%'*,- #KKQ&&(**<88. ''!+%%7799(()>)>)@$G &&(yy004**47  " %S%6%78
 yy((,""4/yy(()BCT,,##QL(9; 	<//11LL00''L!3|'@#AC D  DDUKL77L,,,T5566%s<+D'EG H LL00""''L!3|'@#AC D 	E"0022444(ENN$E**t44;;	=r!   c                rD   r   r)   rE   rG   r   r    r    s     '$ '$d '$r!   c                s   V P                  4        R V n        V P                  P                  4       '       Ed   V P                  P	                  4       '       Egl   V P
                  ^8X  d%   V P                  P                  R4       RV n        EM6V P
                  ^8X  Ed%   RpRpRpV P                  '       d;   V P                  ^ ,          P                  pV P                  ^ ,          P                  p\        P                  ! V P                  V P                  4       ^ ,          ,          4      pV P                  P                  P!                  V P"                  V P$                  V34      pV'       dS   V'       dK   W18w  dE   \        P&                  ! V4      V8X  d*   VR8  d#   V P                  P                  R4       RV n        V P)                  4        ^ V n        R# )FTrC   rF  g?N)r  r  r;  r   r   r  r   r7  r   r,  rh  ri  r2  rz  r   r  spellcheck_single_dictionaryr.  r/  Zremove_accentsr  r  )rP   rZ  r,  r(  r  r  r   _update_lookup_table_and_auxZ0TypingBoosterEngine._update_lookup_table_and_aux  s}    	 ,1(7799&&88::**a/""55d;370,,1"$	!###&*&6&6q&9&@&@O $ 0 0 3 = =I'PP001F1F1H1KL N MM..KK/JL - 1$$7 //@#$!C&&99$?7;D4!!#"#r!   c                rD   r   r)   rE   rG   r   r    r    s     J JT Jr!   c                s&   V P                   '       di   V P                  P                  4       '       dI   V P                  \        P
                  P                  V P                  P                  4       4      R 4       M/V P                  \        P
                  P                  R4      R4       V P                  4        V P                  4        V P                  ^8  d   R# V P                  '       g   R# \        P                  RV P                  4       R# )TrC   FNself._surrounding_text=%r)r  r  r:  ri  r   r   r   r\  r  r  rs  r3   r!  rQ  rn   r&   r   +_update_candidates_and_lookup_table_and_auxZ?TypingBoosterEngine._update_candidates_and_lookup_table_and_aux  s      7 7 = = ? ? &&		))++11356:< &&		))"-u6!))+q (((0$2H2HIr!   c                rD   r   r)   rE   rG   r   r    r    s     2 2 2r!   c                s   V P                   ^8  d   \        P                  R4       V P                  4        V P                  P                  4        V P                  P                  R4       V P                  4        RV P                  n        \        P                  V P                  n        V P                  \        P                  P                  R4      R4       R# re  r  FrC   N)r  r3   r!  r   r;  r   r   ra  r   r|   r   r   ri  r   r   r   rn   r&   r   r  Z*TypingBoosterEngine._update_ui_empty_input  s     q LL,-  "--e4 ,1)#3#:#: ""II%%b)5	2r!   c                rD   r   r)   rE   rG   r   r    r  ,  s     N6 N6t N6r!   c                s.	   V P                   ^8  d   \        P                  R4       V P                  4       '       g   V P	                  4        R# V P                  4        V P                  '       gu   V P                  P                  P                  4       '       d   V P                  '       g9   V P                   ^8  d   \        P                  R4       V P                  4        R# V P                  ^ 8w  d   V P                  '       de   V P                  '       gS   V P                  '       dA   V P                   '       dA   V P                  '       g/   V P"                  P$                  '       g   V P                  4        R# RV P"                  n        \&        P(                  V P"                  n        V P,                  P/                  RV P1                  4       V P3                  4       R7      pV P                   ^8  d   \        P                  RV4       V'       g   V P                  4        R# V P"                  P5                  4        V P"                  P7                  R4       V P9                  4        V P:                  '       di   V P<                  P?                  4       '       dI   V PA                  \B        PD                  PG                  V P<                  P?                  4       4      R4       M/V PA                  \B        PD                  PG                  R4      R4       V Uu. uF2  p\H        PJ                  ! VPL                  VPN                  RRRR	7      NK4  	  upV n(        V PP                   FK  pV PS                  VPL                  VPN                  VPT                  VPV                  VPX                  R	7       KM  	  V PP                  P[                  4       V n.        V P^                  R
8w  d   V Pa                  V P^                  R7       V P	                  4        V Pb                  '       d(   \d        Pf                  ! V Pb                  4       ^ V n1        V Ph                  pV P                  '       d   ^ p\d        Pj                  ! W0Pl                  4      V n1        R# u upi )re  r  NzSFailed to get context from surrounding text. Do not try to complete on empty input.FrC   rC  zphrase_candidates=%sTrG  rZ  rK  )7r  r3   r!  r  r   get_contextr  rQ  rK   rN   rT  r  r  rr  r  r  r  r;  r   r|   r   r   r   rQ  rp  rr  r   r   ra  r  r  r:  ri  r   r   r   rh  rR  r   r,  r7  rB  r-  r.  r/  rR   r8  r9  rV  r  r   source_remover  timeout_addr  )rP   rW  rY  delayr  r   %_update_ui_empty_input_try_completionZ9TypingBoosterEngine._update_ui_empty_input_try_completion,  s|   q LL,-}}  "''--4466:::  1$=> '')$$)$,,,)))   **999
 ''),1)#3#:#:  MM66**,8J8J8L 7 Nq LL/1BC '')  "--e4  7 7 = = ? ? &&		))++11356:< &&		))"-u6 *+ * (({{..!$& *+ $$D22{{..!..#22 3 4 % +/*:*:*?*?*A'""f,""(?(?"@"""t667&'D#33<<<E"&"2"244#63+s   8Rc                rD   r   r)   rE   rG   r   r    r  |  s     -E -ED -Er!   c                s   V P                   ^8  d   \        P                  R4       V P                  4       '       d   RV P                  n        V P                  4       '       gi   V P                  '       gW   V P                  4       '       dA   V P                  '       d   V P                  '       g   V P                  P
                  '       g   V P                  P                  4        V P                  P                  R4       V P                  4        V P                  \        P                  P!                  R4      R4       V P#                  4        R# \$        P&                  V P                  n        V P#                  4        V P                  P                  4        V P                  P                  R4       V P                  4        V P                  \        P                  P!                  R4      R4       V P*                  '       d(   \,        P.                  ! V P*                  4       ^ V n        V P0                  pV P                  '       d   ^ p\,        P2                  ! WP4                  4      V n        R# r
  )r  r3   r!  r  r;  r   r  r  r  rr  r   r   ra  ri  r   r   r   r   r|   r   r   r  r   r  r  r  r	  )rP   r  rQ   r   r  ZTypingBoosterEngine._update_ui|  s   q LL,-==?? 16D-MMOO3355   **999
 $$&11%8""$&&		))"-u6  "#3#:#:  	  "--e4 ""II%%b)5	2"""t667&'D#33<<<E"&"2"2CC#Er!   c                r!  )r   r   r   r   r   rE   rG   r   r    r    s     | | |T |r!   c                s   V P                   P                  \        P                  \        P                  39   d)   V P
                  ^8  d   \        P                  R4       R# V P                  '       d@   V P                  '       g.   V P                   P                  '       g   RV P                   n
        VR8X  dz   V P                   P                  4       '       d2   V P                   P                  4       '       d   V P                  4       pM(V P                  V P                  4       ^ ,          ,          pV'       g   R# V P                   P"                  pV P                   P$                  pV P                   P                  4       '       d   V P'                  4        V P(                  '       di   V P*                  P-                  4       '       dI   V P/                  \0        P2                  P5                  V P*                  P-                  4       4      R4       M/V P/                  \0        P2                  P5                  R4      R4       . pV P6                  '       d*   V P6                  P9                  4       V P:                  8w  d=   \<        P>                  ! V P:                  V P@                  V PB                  R7      V n        V P
                  ^ 8  d   V P6                  PE                  V4      pMV P6                  PE                  VRR7      p\F        '       g   \        PI                  R4       M\        PI                  RV4        \J        PL                  ! VRR	7       F+  pVPO                  \P        PR                  ! V^ R
R7      4       K-  	  \J        PT                  ! VRR	7       F+  pVPO                  \P        PR                  ! V^ RR7      4       K-  	  \J        PV                  ! VRR	7       F+  pVPO                  \P        PR                  ! V^ RR7      4       K-  	  V P
                  ^8  d   \        P                  RW4       V'       gU   V P/                  VV4       V P                   P                  4       '       d!   V Pa                  V Pc                  4       R4       R# . V n2        V P                   Pg                  4        V P                   Pi                  R4       V F  p	V Pd                  PO                  \P        PR                  ! V	Pj                  V	Pl                  V	Pn                  RRR7      4       V Pq                  V	Pj                  V	Pl                  V	Pn                  R7       K  	  \        Pr                  V P                   n        WP                   n:        V Pw                  4        R#   \X        3 d7   p\        P[                  RTP\                  P^                  T4        Rp?ELRp?ii ; i)re  zSCompose completions or m17n candidates are shown, not looking up related candidatesFTrC   rX  )Zshow_keywordsznltk is not availableu-   Getting related words from nltk for: “%s”)Zkeep_originalz	[synonym]rJ  z
[hypernym]z	[hyponym]z)Exception when trying to use nltk: %s: %sNu$   related_candidates of “%s” = %s
rG  )<r;  r   r|   r   r   r  r3   r!  r  rr  r   r   r   rj  r2  rz  r  r   r   ra  r  r  r:  ri  r   r   r   r  rT  r  r"  r#  r  r  ZsimilarIMPORT_ITB_NLTK_SUCCESSFULr{  itb_nltkZsynonymsr;  rh  rR  Z	hypernymsZhyponymsLookupErrorr  r  rS   rd  rn  r7  r   r   r   r,  r-  rB  r   r   r  )
rP   r   Zoriginal_auxiliary_text_contentZoriginal_auxiliary_text_visibleZrelated_candidatesZsynonymZhypernymZhyponymr4   rY  r  r   _lookup_related_candidatesZ.TypingBoosterEngine._lookup_related_candidates  s    $$ 44 00)2 2   1$89  LLL&&55504D-R<"";;==''99;;EEG55))+A.0 +/*F*F*N*N'*.*F*F*N*N'6688""$ 7 7 = = ? ? &&		))++11356:< &&		))"-u6 """,,.%%&!*!7!700!%!7!7#'#4#4"6D q !%!3!3!;!;" "&!3!3!;!;e "< "-))KK/0KKGP6'00uMG&--h.J.J&![/J K  N !) 2 26 OH&--h.J.J'1l/L M !P  (00uMG&--h.J.J&![/J K  N q LL7, " &&//1 !!::<<(()>)>)@$G  "--e4&D##,,;;"nn LL!&#(*+ 22{{dnndll 3 T ' $4#F#F 7=4))+C  > 6  ?__--u6 66s   >CV   W",+WW"c                r!  )r   rL  r   r  rE   rG   r   r    r  )  s     = ==#'=r!   c                sf   V P                   ^8  d   \        P                  R4       VR9  d   R# V P                  4       '       d   R# VR9   d+   V P                  V P
                  ,          V,          V n        MWn        V P                  '       d!   V P                  P                  4       '       g   R# . pV P                   F  pVP                  \        P                  ! V P                  V P
                  ,          R,          ! VP                  4      VP                  VP                  VP                   VP"                  R7      4       K  	  W n        V P                  P%                  4       pV P                  P'                  4       pV P                  P)                  4        V P                   FK  pV P+                  VP                  VP                  VP                  VP                   VP"                  R7       KM  	  V P                  P-                  V4       V P                  P/                  V4       R# )re  u   ⎆FTr^  rG  )r[  r]  rZ  r\  rg  rc  r   )r[  r]  )r  r3   r!  r  r:  r9  r7  r;  r   r8  r;  rh  rR  r   r,  r-  r.  r/  r   r   r   rB  r   r   )rP   rL  Znew_candidatesrY  Zcursor_visiblerI   r*  r   rV  Z%TypingBoosterEngine._case_mode_change)  s   " q LL   ==??''&*&6&6'''))-'/D# '+#   %%>>@@33D!!,,++//11;==A[[J"nn LL!%!2!2#'#6#689 4 *++==?''668
  "$$D22{{..!..#22 3 4 % 	))*5--n=r!   c                s6   < V ^8  d   QhRS[ S[,          RS[/# )r   msymbol_listr   )r   r   r   rE   rG   r   r    r  h  s      c t r!   c                sB   V P                  4        Fc  pV P                  V,          P                  V4      R P                  V4      8w  g   K;  V P                  ^8  d   \
        P                  RV4        R# 	  V P                  ^8  d   \
        P                  RV4       R# )rC   z!_has_transliteration(%s) == True
Tz"_has_transliteration(%s) == False
F)rz  r5  r$  r|  r  r3   r!  )rP   r  r
  rj   r   _has_transliterationZ(TypingBoosterEngine._has_transliterationh  s    
 ((*C$$S)77 "%'WW\%:;$$q(LL<lL + q LL5|Er!   c                r!  r   rg  rE   rG   r   r    r  y  s      s t r!   c                sh   V P                   P                  4       '       g   R # V P                  4       V P                  ,          V,           pVV P                   P                  4       8  d   ^ Tu;8:  d   V P                  8  g    R #  R # V P	                  V4      '       d   V P                  4        R# R # r  )r;  r   rf  r  rm  r  )rP   r   candidate_numberrj   r   _remove_candidateZ%TypingBoosterEngine._remove_candidatey  s     !!::<<//1DOOCeK 	   99;<U,T__, -33E::OOr!   c                s,   < V ^8  d   QhRS[ RS[RS[/# )r   r   
extra_textr   )r?   r   r   rE   rG   r   r    r    s.     i ii i &*ir!   c                s  <a V P                   '       d   \        P                  R V4       R# V P                  P	                  4       '       d   V P                  P
                  '       d   R# V P                  4       V P                  ,          V,           pVV P                  P	                  4       8  d   ^ Tu;8:  d   V P                  8  g    R#  R# V P                  V4      pV'       g   R# V P                  P                  \        P                  8X  Ed
   \        P                  V P                  n	        . V n        V P                  P                  4        V P                  P                  R4       V P!                  4        . V n        V P%                  4        V P'                  4        V P)                  4       '       d-   V P+                  \-        V4      4       V P/                  4        R# \0        SV `e  \4        P6                  P9                  V4      4       RV n        R# V P                  P                  \        P<                  8X  Ed   V P>                  ^8  d   \        PA                  RV4       \        P                  V P                  n	        . V n        V P                  P                  4        V P                  P                  R4       V P!                  4        \C        V4      oTp\D        ;QJ d3    V3R lV PF                  PH                   4       F  '       d   K   RM(	  RM$! V3R lV PF                  PH                   4       4      '       dt   V PF                  PJ                  RV PF                  PL                   R\C        V4      )  V,           V PF                  PJ                  V PF                  PL                  R ,           pV P>                  ^8  dV   \        PA                  RV\O        V PF                  4      4       \        PA                  RV PP                  V PR                  4       V PP                  RV PF                  PT                   \-        V4      ,           V PP                  V PR                  R ,           V n(        V PF                  PT                  \C        \-        V4      4      ,           V n)        V P>                  ^8  d,   \        PA                  RV PP                  V PR                  4       V P%                  4        \V        PX                  ! 4       V n#        V P/                  4        R# V P[                  4       '       d   V P]                  WB,           VR	7       MV P]                  WB,           4       V P_                  4        VR
8X  d4   V Pa                  4        \b        Pd                  ! ^V Pf                  4       R# V Pi                  4        R# )z3OSK is visible: do not commit candidate by index %sFTu   Commit m17n candidate “%s”c              3   @   <"   T F  p\        V4      S8H  x  K  	  R # 5ir"   rH  .0	candidateselected_candidate_length   & r   	<genexpr>Z8TypingBoosterEngine._commit_candidate.<locals>.<genexpr>  #      G$Ey 	N&??$E   N0   m17n_preedit_replacement=“%s” trans_parts=%s8OLD: self._typed_string=%s, self._typed_string_cursor=%sz8NEW: self._typed_string=%s, self._typed_string_cursor=%sinput_phraser2  )5rr  r3   r{  r;  r   r   rf  r  rk  r   r|   r   r   r7  r   r   r  r+  r  r   r  r  r  r  r  commit_textr   r   r   r%  r   r  r!  r  allr*  r7  r  rI   r2   r,  r-  r  r(  r)  r  _commit_stringr  rt  r   r  r  r  )rP   r   r  r  selected_candidatem17n_preedit_replacementr  r  s   &&&   @r   _commit_candidateZ%TypingBoosterEngine._commit_candidate  s    <<<KKEuN"";;==!!(((//1DOOCeK 	   99;<U,T__, -::5A 	!##'7'K'KK'7'>'>D$!D$$&11%8--/+-D(//1  """$$--d3E.FG!G		))*<=?37D0##'7'G'GG  1$=?QR'7'>'>D$!D$$&11%8--/(+,>(?%'9$ G$($:$:$E$EG G$($:$:$E$EG G G **22://::<5c"4557 )) ,,44..99:<	< )   1$F,d43I3I.JL N&&(A(AC ""#JD$:$:$J$JK/01$$T%>%>%?@A 
 &&66d3456 %   1$N&&(A(AC //1%2%G%G%ID"OO==?? 2 ?-?   A  2 ?@113 Q J JK  '')r!   c          
      s6   < V ^8  d   QhRS[ RS[ RS[RS[RR/# )r   commit_phraser&  rv  fix_sentence_endr   Nr  rE   rG   r   r    r    sD     H6 H6H6 H6 	H6
 #H6
 /3H6r!   c                s  < V P                   ^8  d*   \        P                  R\        V4      \        V4      4       V'       g   R# RV P                  n        RV P                  n        V'       g)   V P                  V P                  4       ^ ,          ,          pV'       g   TpVP                  4       '       gO   RV n
        V P                  4       pV'       d
   V^ ,          MRp\        P                  ! WR7      '       d   RV n
        V'       d   V P                  V4      V,           pVP                  R4      pV P                   ^ 8  d*   \        P                  R\        V4      \        V4      4       RpR	p	\!        V4      ^8  d   V P                   ^ 8  d+   \        P                  RV P"                  P$                  4       V F`  w  r\&        P(                  ! WP"                  P$                  4      '       g   K7  V P                   ^ 8  d   \        P                  RW4       Tp	 M	  V	R
8X  d   V P*                  '       d   Rp	V P                   ^ 8  d   \        P                  RV	4       V	P-                  R4      '       Ed   \/        V4       EF  w  rV\!        V4      ^,
          8  d   V'       dM   \0        SV `e  \4        P6                  P9                  V4      4       \:        P<                  ! V P>                  4       V	R
8X  db   V PA                  \4        PB                  V PD                  PG                  \4        PB                  4      \4        PH                  PJ                  4       M\0        SV `e  \4        P6                  P9                  R4      4       M\V P                   ^ 8  d    \        P                  R\        V4      4       \0        SV `e  \4        P6                  P9                  V4      4       \:        P<                  ! V P>                  4       EK  	  M,\0        SV `e  \4        P6                  P9                  V4      4       RV n&        V PN                  '       gU   V PP                  ^8X  gD   V PR                  '       g2   V PT                  \        PV                  PX                  ,          '       d)   V P                   ^8  d   \        P                  R4       R# \        PZ                  ! V4      pV P                   ^8  d   \        P                  RW!V P]                  4       V P_                  4       V Pa                  4       V PP                  V Pb                  Pd                  Pg                  V4      V Pb                  Pi                  V4      4	       V PP                  ^8X  d   V Pb                  Pi                  V4      '       g`   V Pb                  Pd                  Pg                  V4      '       g5   V P                   ^8  d"   \        P                  RV PP                  V4       R# V PP                  ^8X  d`   V Pb                  Pd                  Pg                  V4      '       g5   V P                   ^8  d"   \        P                  RV PP                  V4       R# V P                   ^8  d   \        P                  R4       V Pb                  Pk                  VVV P]                  4       V P_                  4       R7       V'       Ed_   V P]                  4       '       EdH   V P_                  4       '       Ed1   V Pa                  4       '       Ed   V PP                  ^8X  d   V Pb                  Pi                  V P]                  4       4      '       g   V Pb                  Pd                  Pg                  V P]                  4       4      '       gQ   V P                   ^8  d>   \        P                  RV PP                  V P]                  4       R,           V,           4       R# V PP                  ^8X  d   V Pb                  Pd                  Pg                  V P]                  4       4      '       gQ   V P                   ^8  d>   \        P                  RV PP                  V P]                  4       R,           V,           4       R# V P                   ^8  d3   \        P                  RV P]                  4       R,           V,           4       V Pb                  Pk                  V P]                  4       R,           V,           V P]                  4       R,           V,           V P_                  4       V Pa                  4       R7       V'       d   V Pm                  V4       R# R# )re  u,   commit_phrase=“%s” input_phrase=“%s”NFrC   )ZlanguageTr4  z commit_phrase=%s commit_lines=%ssinglemulti-forward-shift-returnu!   self._client_info.client=“%s”z-commit_mode_pattern match: pattern=%s mode=%szmulti-commit-returnzcommit_mode=%sZmultir5  z	commit %s+Privacy: NOT recording and pushing context.z{input_phrase=%r commit_phrase=%r p_phrase=%r pp_phrase=%r ppp_phrase=%r record_mode=%d spellcheck=%r previously recorded=%d'self._record_mode=%d: Not recording: %rrecording and pushing context.r&  r   rD  rE  z-self._record_mode=%d: Not recording multi: %rr2  zRecording multi: %r)	)z^gnome-shell:r/  )z	^gtk4-im:r/  )z^(Qt|QIBusInputContext):r/  )z^xim:r/  )z	^gtk3-im:r0  )z(?i)^:.*firefox.*:r0  )z(?i)^:.*google-chrome.*:r0  )z(?i)^:.*thunderbird.*:r0  )z^:r/  )7r  r3   r!  r2   r;  r   r   r2  rz  Zisspacer1  r{  rh  Ztext_ends_a_sentence_commit_string_fix_sentence_endri   r  r  r]   r  r  r  rS  	enumerater  r'  r   r   r   timesleepr  forward_key_eventrK  r  ibus_keycodeModifierType
SHIFT_MASKr%  r  r  r  r  
InputHintsPRIVATEr  rp  rr  rt  r   r  r  phrase_exists!check_phrase_and_update_frequencyrv  )rP   r-  r&  rv  r.  r  r~   Zcommit_linesZcommit_mode_patternsZcommit_moder	  rL  r   Zcommit_linestripped_commit_phraser  s   &&&&&          r   r)  Z"TypingBoosterEngine._commit_string  s>   D q LLGm,d<.@B -2)
 ;@777%%'*,L(L$$&& "'D--/E$58"D,,]JJ%)"44]C  \ %**40q LL;m,d<.@B 
* |!  1$79J9J9Q9QS!599W&7&7&>&>??((1,K#+ #'K "6 77---/Kq LL);7!!'**&/&="3|,q00"+ II55kBD 

4#A#AB"&BB.. OO 55BB $1 --88	: + II55d;= ((1,[${2CDG'		11+>@

499:1 '>4 G		))-8:/3,     A%  8#6#6#>#>>>  1$JK!)!5!5m!Dq LL @ &**,d.@.@.B,,.0A0A33>>}M44]CE "MM//>>MM..99-HH  1$F!..?"MM..99-HH  1$F!..?q LL9:77% &&(((*	 	8 	,
 #"!!##""$$##%% !!Q&33D4E4E4GHH**55d6G6G6IJJ$$q(LLG))))+c14JJL !!Q&**55d6G6G6IJJ$$q(LLG))))+c14JJL   1$)%%'#-0FFH MM;;!!#c),BB((*S03II++---/ < 1 45 r!   c                s&   < V ^8  d   QhRS[ RS[ /# )r   r-  r   r   rE   rG   r   r    r  C  s     T TS TS Tr!   c                s   V P                   '       d5   V P                  \        P                  P                  P
                  39   d   R # Rp0 RmP                  V P                  4      pV'       d   V P                  ^ ,          V9   d   V P                  ^ ,          pMoVP                  V P                  P                  P                  V P                  V P                  V P                  34      4      pV'       d   \        V4      ^ ,          pV P                  ^8  d   \         P#                  RV4       \        P$                  P'                  V\        P$                  R,          4      pVP)                  4        EF  w  rg\*        P,                  ! R\*        P.                  ! V4      ,           R,           4      pVP1                  V4      '       g   KW  V P2                  P4                  p	V P2                  P6                  p
V P                  ^8  d!   \         P#                  RWP2                  4       \*        P,                  ! R4      pV P8                  P:                  R8X  dl   V P8                  P<                  R9   dQ   R\*        P.                  ! V4      ,           R	,           p\         P#                  R
V4       \*        P,                  ! V4      pVP1                  V	RV
 4      pV'       g   EKo  \?        VPA                  R4      4      pV PC                  V) V4       V P                  ^8  dO   V P2                  P4                  p	V P2                  P6                  p
\         P#                  RVV P2                  V4       Vu # 	  R # )rC   r  zlanguage_code=%rz^[z]+[\s]*$zJChecking for whitespace before commit_phrase %r: self._surrounding_text=%rz(?P<white_space>[\s]+)$QIBusInputContextz(?P<white_space>[\s]+)Z$z/Special hack for kate and kwrite, use regexp=%rNZwhite_spacezURemoved whitespace before commit_phrase %r: self._surrounding_text=%r Replace with %r>   Zfr_BEZfr_CAZfr_CHZfr_FRZfr_LUZfr_MC)ZkateZkwrite)"rs  r  rh  InputPurposeTERMINALr   Zintersectionr  r   r  r  r.  r/  r0  r  r  r3   r!  ZFIX_WHITESPACE_CHARACTERSr<  rU  r  compileZescaper  rQ  r   rI   r  rq   rs   r  r  delete_surrounding_text)rP   r-  language_codeZ used_french_spacing_dictionariesZ#matched_french_spacing_dictionariesZ
chars_dictZcharsZnew_whitespaceZpattern_sentence_endr   rI   r	  regexprZ  Zncharss   &&             r   r5  Z3TypingBoosterEngine._commit_string_fix_sentence_endC  s    )))H$9$9$B$B$H$H#II,

,t--
. 	) ,%%a(,LL!%!7!7!: 5AA22OO$:J:JKMN 4 7$()L$Ma$PMq LL+];77;;8==cBD
%/%5%5%7!E#%::		%((;6$8 #**=99--22!33>>
$$q(LL4%'='=? **%?@%%//3FF))66:LL 8 "		- 89 $%F LLI  !jj0GtKZ'895 ]!;<F00&&A((1,#55::%)%;%;%F%F
. * 22ND *)_ &8` r!   c                r  r   rp  r   rh  KeyEventr   rE   rG   r   r    r    s'     Q Q((Q-1Qr!   c                s   V P                   ^8  d7   \        P                  RV4       \        P                  RV P                  4       V P                  '       g)   V P                   ^8  d   \        P                  R4       R# V P	                  4       '       g)   V P                   ^8  d   \        P                  R4       R# V P
                  eN   V P
                  P                  VP                  8w  d)   V P                   ^8  d   \        P                  R4       R# VP                  \        P                  \        P                  \        P                  \        P                  \        P                  \        P                  \        P                  39  d)   V P                   ^8  d   \        P                  R4       R# VP                  '       g   VP                   '       g   VP"                  '       g   VP$                  '       g   VP&                  '       g   VP(                  '       g   VP*                  '       g   VP,                  '       gm   VP.                  '       g[   VP0                  '       gI   VP2                  '       g7   VP4                  '       g%   VP6                  '       g   VP8                  '       d)   V P                   ^8  d   \        P                  R	4       R# V P:                  '       d5   V P<                  \>        P@                  PB                  PD                  39   d)   V P                   ^8  d   \        P                  R
4       R# V P                   ^8  d!   \        P                  RV PF                  4       V PF                  PH                  pV PF                  PJ                  pV PF                  PL                  pV'       g   \        P                  R4       R# W48w  d.   \        P                  RW44       \        P                  R4       R# V PN                  PP                  PS                  RR7       V PN                  PP                  PU                  4       '       g   \        P                  R4       R# V P                   ^8  d!   \        P                  RV PN                  4       V PN                  PH                  pV PN                  PJ                  pV PN                  PL                  pVR8X  d   \        P                  R4       R# Wg8w  d.   \        P                  RWg4       \        P                  R4       R# VP                  \        P                  \        P                  \        P                  39   EdG   Wc^,
          8w  d   \        P                  R4       R# \V        PX                  ! R4      pVP[                  WVR 4      p	V	'       g)   V P                   ^8  d   \        P                  R4       R# \V        PX                  ! R4      pVP[                  VRV 4      p	V	'       g)   V P                   ^8  d   \        P                  R4       R# V	P]                  R4      p
V P_                  \a        V
4      ) \a        V
4      4       V Pc                  \        Pd                  Pg                  R4      ^ R\        Ph                  Pj                  4       V Pl                  Pn                  Pq                  R4      '       Ed   \a        V
4      V8X  Edx   \        P                  R4       \r        Pt                  ! V Pv                  4       V Py                  \        Pz                  \        P|                  P~                  R7       V Py                  \        Pz                  \        P|                  P~                  \        P|                  P                  ,          R7       V Py                  \        P                  \        P|                  P~                  R7       V Py                  \        P                  \        P|                  P~                  \        P|                  P                  ,          R7       \r        Pt                  ! V Pv                  4       V P                  4        V P                  \        V
4      4       V P                  4        R# VP                  \        P                  \        P                  \        P                  \        P                  39   Ed   VP                  \        P                  \        P                  39   d   Wc8:  d   \        P                  R 4       R# VP                  \        P                  \        P                  39   d   Wc8w  d   \        P                  R!4       \V        PX                  ! R"4      pVP[                  VRV 4      p	V	'       g)   V P                   ^8  d   \        P                  R#4       R# \V        PX                  ! R$4      pVP[                  WVR 4      p	V	'       g)   V P                   ^8  d   \        P                  R%4       R# V	P]                  R4      p
V P_                  ^ \a        V
4      4       V Pc                  \        Pd                  Pg                  R4      ^ R\        Ph                  Pj                  4       V Pl                  Pn                  Pq                  R4      '       Ed   VRV P                  4       '       Egx   \        P                  R4       \r        Pt                  ! V Pv                  4       V Py                  \        Pz                  \        P|                  P~                  R7       V Py                  \        Pz                  \        P|                  P~                  \        P|                  P                  ,          R7       V Py                  \        P                  \        P|                  P~                  R7       V Py                  \        P                  \        P|                  P~                  \        P|                  P                  ,          R7       \r        Pt                  ! V Pv                  4       V P                  4        V P                  \        V
4      4       ^ V nG        V P                  4        R# R# )&re  KeyEvent object: %sz"self._arrow_keys_reopen_preedit=%sz?self._arrow_keys_reopen_preedit not set. Do not reopen preedit.Fz*There is input already, no need to reopen.NzdPrevious key not set or not equal to the just released key. Better do not try to reopen the preedit.zbRelease key was not in list of keys allowed to reopen a preedit. Do not try to reopen the preedit.z4Not reopening the preedit because a modifier is set.z=Surrounding text is not supported. No way to repopen preedit.zself._surrounding_text_old=%rz5Old surrounding text is empty. Cannot reopen preedit.z+cursor_pos_old=%s anchor_pos_old=%s differ.zCannot reopen preedit.皙?)Ztimeoutz}Surrounding text has not been set since last key event. Something is wrong with the timing. Do not try to reopen the preedit.r  rC   z5New surrounding text is empty. Cannot reopen preedit.z#cursor_pos=%s anchor_pos=%s differ.z<Cursor has not moved one column left, cannot reopen preedit.z^($|[\s]+.*)z>No whitespace or end of line or buffer to the right of cursor.z(^|.*[\s]+)(?P<token>[\S]+)$z%Could not match token left of cursor.tokenTWhatsAppKApply WhatsApp workaround for reopening preedit at the beginning of a line.keystatez2Cursor has not moved right, cannot reopen preedit.z@Unexpected cursor movement on Delete key, cannot reopen preedit.z(^|.*[\s]+)$zCNo whitespace or beginning of line or buffer to the left of cursor.z^(?P<token>[\S]+)($|[\s]+.*)z&Could not match token right of cursor.)Hr  r3   r!  r  r  r&  valr   rG  rH  rE  rF  rO  rM  rN  shiftcontrolmod1Zmod3mod4mod5Zbutton1Zbutton2Zbutton3Zbutton4Zbutton5r  hypermetars  r  rh  rC  rD  r   rR  r   rI   rJ   rQ  rK   ZwaitrN   r  rE  rZ  r  rF  r  rn  r   r   r   r  r  ru   rS  r7  r8  r  _forward_generated_key_eventKEY_cr;  CONTROL_MASKRELEASE_MASKKEY_vr  r  r  r  r:  r-  )rP   rp  Ztext_oldZcursor_pos_oldZanchor_pos_oldr   rI   rJ   r	  rZ  rN  s   &&         r   _maybe_reopen_preeditZ)TypingBoosterEngine._maybe_reopen_preedit  s%	    q LL.4LL=88:...  1$ 6 7}}  1$IJ>>%$..*<*<*G  1$DE GGDMM4+;+; NND,=,= .. OOT-?-?A A   1$JK III{{{xxxxxxxxxxxx{{{{{{{{{{{{{{{yyyyyyxxx,   1$JL)))""x'<'<'E'E'K'K&LL  1$ : ;q LL/1K1KM--2233>>33>>LLGI+LLF'9LL12$$))#)6%%++2244LL  q LL4d6L6LM%%**++66
++66
2:LLGI#LL>#1LL1277t))4==$:J:JKKa// 6 7jj1GMM${"34E$$q(LL23 jj!@AGMM${
"34E$$q(LL!HIKK(E((#e*c%jA ..		))"-q$%%,,. !!..99*EEJ*,& 23 

499:11JJ):):)G)G 2 I11JJ%%2243D3D3Q3QQ 2 S 11JJ):):)G)G 2 I11JJ%%2243D3D3Q3QQ 2 S 

499:))$u+6OO77t(:(:~~t'8'8: :ww4>>4+<+<==/ LLLN ww4??D,>,>??/LL ": ;jj1GMM${
"34E$$q(LL12 jj!@AGMM${"34E$$q(LL!IJKK(E((CJ7 ..		))"-q$%%,,. !!..99*EE[j)//11$ 23 

499:11JJ):):)G)G 2 I11JJ%%2243D3D3Q3QQ 2 S 11JJ):):)G)G 2 I11JJ%%2243D3D3Q3QQ 2 S 

499:))$u+6()D%OOr!   c                rD   r   r)   rE   rG   r   r    r    s     06 06T 06r!   c                s\   R V n         V P                  '       d5   V P                  \        P                  P
                  P                  39   d)   V P                  ^8  d   \        P                  R4       R# V P                  P                  pV P                  P                  pV P                  ^8  d!   \        P                  RV P                  4       VR8X  d)   V P                  ^8  d   \        P                  R4       R# \        P                  ! VRV 4       Uu. uF  p\        P                  ! V4      NK  	  upR	R pV P                  ^8  d    \        P                  R\        V4      4       RV n        RV n        RV n        V'       d   VR
,          V n        \'        V4      ^8  d   VR,          V n        \'        V4      ^8  d   VR	,          V n        V P                  ^8  d7   \        P                  RV P$                  V P"                  V P                   4       RV n         R# u upi )FzSurrounding text not supported.Nr  rC   z.Surrounding text is empty, cannot get context.z&Found from surrounding text: tokens=%su@   Updated context from surrounding text=“%s” “%s” “%s”TirN  i)rT  rs  r  rh  rC  rD  r   r  r3   r!  rQ  r   rI   Ztokenizer  r2   r.  r/  r0  r  )rP   r   rI   rN  Ztokensr  r   r  ZTypingBoosterEngine.get_context  s    27.)))""x'<'<'E'E'K'K&LL   1$>?%%**++66
q LL4d6L6LM2:  1$MN "**4+<=?=   '=?@BE q LL8$v,H#BZDNv;?$RjDOv;?%bzDq LLR  $//4>>C 26.'?s   H)c                @   < V ^8  d   QhRS[ S[S[3,          RS[RR/# r   rL  rI  r   Nr   r   r   rE   rG   r   r    r    2     0 0c	"0 #0 /30r!   c                
   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# Wn        V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# )re  (%s, update_gsettings = %s)Nr0  )	r  r3   r!  r  r  r  r   r  new_booleanrP   rL  rI  r   r   r  Z+TypingBoosterEngine.set_add_space_on_commit  sh     q LL-tG,,,$(!OO%%"((.0 r!   c                r[   r   rI  r   Nr   rE   rG   r   r    r    s     = =$(=48=r!   c                H    V P                  V P                  '       * V4       R # r"   )r  r  rP   rI  re   r   toggle_add_space_on_commitZ.TypingBoosterEngine.toggle_add_space_on_commit  s!     	$$)))+;	=r!   c                rk   rl   r   rE   rG   r   r    r    s     ) ) )r!   c                rp   r"   )r  rn   r&   r   r  Z+TypingBoosterEngine.get_add_space_on_commit  s     (((r!   c                r  rb  r   r?   r   r   rE   rG   r   r    r    s1     . .S/. #. /3.r!   c                re  )re  rf  Nr1  )	r  r3   r!  r  r  r  r   r  	new_int32rh  r   r   r  Z)TypingBoosterEngine.set_inline_completion  sh     q LL-tG***"&OO%%"&&t,. r!   c                rk   rl   r   rE   rG   r   r    r  %  s     ' 's 'r!   c                rp   r"   )r  rn   r&   r   r  Z)TypingBoosterEngine.get_inline_completion%  s    
 &&&r!   c                r  rb  rm  rE   rG   r   r    r  ,  1     . .S/. #. /3.r!   c                re  )re  rf  Nr2  )	r  r3   r!  r  r  r  r   r  rn  rh  r   r   r  Z#TypingBoosterEngine.set_record_mode,  sh    " q LL-tG$$$ OO%%&&t,. r!   c                rk   rl   r   rE   rG   r   r    r  H       ! ! !r!   c                rp   r"   )r  rn   r&   r   r  Z#TypingBoosterEngine.get_record_modeH         r!   c                ra  rb  rc  rE   rG   r   r    r  L  2     0 0c	"0 #0 /30r!   c                re  )re  rf  Nr3  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z'TypingBoosterEngine.set_auto_capitalizeL  sh     q LL-tG((( $OO%% ((.0 r!   c                r[   ri  r   rE   rG   r   r    r  d       
9 
9t 
9t 
9r!   c                rj  r"   )r  r  rk  re   r   toggle_auto_capitalizeZ*TypingBoosterEngine.toggle_auto_capitalized  !     	  %%%'7	9r!   c                rk   rl   r   rE   rG   r   r    r  p  s     % %T %r!   c                rp   r"   )r  rn   r&   r   r  Z'TypingBoosterEngine.get_auto_capitalizep  s     $$$r!   c                ra  rb  rc  rE   rG   r   r    r  v  rr  r!   c                re  )re  rf  Nr)  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r~  Z/TypingBoosterEngine.set_avoid_forward_key_eventv  sh     q LL-tG000(,%OO%%&((.0 r!   c                r[   ri  r   rE   rG   r   r    r    s!     A A$(A48Ar!   c                rj  r"   )r~  r  rk  re   r   toggle_avoid_forward_key_eventZ2TypingBoosterEngine.toggle_avoid_forward_key_event  s"     	((---/?	Ar!   c                rk   rl   r   rE   rG   r   r    r         - -T -r!   c                rp   r"   )r  rn   r&   r   r  Z/TypingBoosterEngine.get_avoid_forward_key_event      ,,,r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  Nr*  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z%TypingBoosterEngine.set_prefer_commit  sh     q LL-tG&&&"OO%%((.0 r!   c                r[   ri  r   rE   rG   r   r    r    s     7 7$(7487r!   c                rj  r"   )r  r  rk  re   r   toggle_prefer_commitZ(TypingBoosterEngine.toggle_prefer_commit  s!     	###%5	7r!   c                rk   rl   r   rE   rG   r   r    r    s     # #4 #r!   c                rp   r"   )r  rn   r&   r   r  Z%TypingBoosterEngine.get_prefer_commit       """r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  Nr+  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z1TypingBoosterEngine.set_arrow_keys_reopen_preedit  sh     q LL-tG222*.'OO%%(((.0 r!   c                r[   ri  r   rE   rG   r   r    r    s!     C C$(C48Cr!   c                rj  r"   )r  r  rk  re   r    toggle_arrow_keys_reopen_preeditZ4TypingBoosterEngine.toggle_arrow_keys_reopen_preedit  s"     	**///1A	Cr!   c                rk   rl   r   rE   rG   r   r    r    s     / /t /r!   c                rp   r"   )r  rn   r&   r   r  Z1TypingBoosterEngine.get_arrow_keys_reopen_preedit  s     ...r!   c                rD   r   r)   rE   rG   r   r    r    s     * *4 *r!   c                s    R P                  V P                  4      pV P                  '       d   R P                  V P                  RV P                   4      V P                  P                  V P                  4      ,           R P                  V P                  V P                  R 4      ,           pV P                  WR7       V P                  V P                  R  F"  pV P                  \        P                  4       K$  	  V P                  4        R# )rC   Nr%  )r|  r,  r+  r-  r  r&  r)  r[  r   rG  rV  )rP   commit_stringr'   re  r   _commit_raw_inputZ%TypingBoosterEngine._commit_raw_input  s     2 23'''**+ED,E,EFG))@@0022 ''$,,T-F-F-GHIJ 
 	MF##D$=$=$>?A--dmm< @'')r!   c                rD   r   r)   rE   rG   r   r    r    s     ;A ;At ;Ar!   c                s   V P                   '       d   V P                  P                  \        P                  8X  d   V P                  P                  4       '       d   \        P                  V P                  n        V P                  4       p. V n        V P                  P                  4        V P                  P                  R 4       V P                  4        . V n         V P                  \        V4      4       V P                  4        V P                  ^ ,          pV P                   V,          pVP#                  V P$                  R.,           V P&                  R7      pVP)                  R4      '       d   VRR	 pV P*                  V P,                  ,          R,          ! V4      pV P                  P/                  4       '       d2   V P                  P                  4       '       d   V P                  4       pMTpV'       g)   V P0                  ^ 8  d   \2        P5                  R4       R# R pV P                  P                  4       '       d   Rp\6        P8                  ! WPP;                  RR7      4      pV P=                  WTR7       V P?                  4        V'       g5   \A        ^ V4       F"  pV PC                  \D        PF                  4       K$  	  R# R# )
Fr2  r#  Nr^  !commit string unexpectedly empty.Tr  r%  rN  )$r+  r;  r   r|   r   r   r   rj  r7  r   r   r  r  r  r  r  r5  r$  r,  r  r%  r:  r9  r   r  r3   r4   rh  estimate_left_stepsr+  r)  rV  r   r[  r   rG  )	rP   compose_resultr'  r  r&  r|  candidate_was_selected
left_stepsr'   	   &        r   _commit_current_inputZ)TypingBoosterEngine._commit_current_input  sD    (((""((,<,P,PP""4466'7'>'>D$!IIKN!D$$&11%8--/+-D())$~*>?//1((+%%k2**#&T5G5G + I  %%',L''##%%/11=?7799""4466 !HHJM )M   1$@A "'//11%)"11>>><>
ME'')%1j)11$--@ * &r!   c                *   < V ^8  d   QhRS[ RS[ RR/# rb  r   rE   rG   r   r    r  @  s%     % %%04%AE%r!   c                s,   V P                   ^8  d   \        P                  RV4       WP                  8X  d   R# Wn        V P                  '       g   RV n        V P
                  '       d/   V P                  '       d   V P                  V P                  V4       V'       d:   V P                  P                  R\        P                  P                  V4      4       V P                  4       '       d   V P                  '       g   R# V P                  4        R# )re  (%s)NFrQ  )r  r3   r!  r  r  r  r  r  r  r  r   r  rg  r  r+  r  rh  r   r   r  Z"TypingBoosterEngine.set_input_mode@  s     q LL&###$D???t333..$$d,OO%%((.0 ==??4#?#?#? 	""$r!   c                r[   ri  r   rE   rG   r   r    r  [  s     D D$ D$ Dr!   c                rj  r"   )r  r  rk  re   r   toggle_input_modeZ%TypingBoosterEngine.toggle_input_mode[  s     	 0 002BCr!   c                rk   rl   r   rE   rG   r   r    r  `            r!   c                rp   r"   )r  rn   r&   r   r  Z"TypingBoosterEngine.get_input_mode`  ru  r!   c                *   < V ^8  d   QhRS[ RS[RR/# r   rj  rI  r   Nr  rE   rG   r   r    r  d  s%     2 22152BF2r!   c                s   V P                   ^8  d   \        P                  RV4       WP                  4       8X  d   R# WP                  R,          R&   V P
                  '       d/   V P                  '       d   V P                  V P                  ^4       \        P                  ! 4        V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# )re  r  Nro  rj  rk  )r  r3   r!  r  r  r  r  r  rh  r=  r  r  r   r  rg  rP   rj  rI  r   r   r  Z.TypingBoosterEngine.set_input_mode_true_symbold  s     q LL(4466?E"">28<???t333..$$a)!!#OO%%%((02 r!   c                rk   rl   r   rE   rG   r   r    r  x  s     I IC Ir!   c                H    \        V P                  R ,          R,          4      # )ro  rj  r   r  rn   r&   r   r  Z.TypingBoosterEngine.get_input_mode_true_symbolx  s    4--n=hGHHr!   c                r  r  r  rE   rG   r   r    r  |  s%     2 22152BF2r!   c                s   V P                   ^8  d   \        P                  RV4       WP                  4       8X  d   R# WP                  R,          R&   V P
                  '       d/   V P                  '       d   V P                  V P                  ^ 4       V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# )re  r  Nrl  rj  rn  )r  r3   r!  r  r  r  r  r  r  r  r   r  rg  r  r   r   r  Z/TypingBoosterEngine.set_input_mode_false_symbol|  s     q LL(5577@F""?3H=???t333..$$a)OO%%&((02 r!   c                rk   rl   r   rE   rG   r   r    r    s     J JS Jr!   c                r  )rl  rj  r  rn   r&   r   r  Z/TypingBoosterEngine.get_input_mode_false_symbol  s    4--o>xHIIr!   c                r  rb  r   rE   rG   r   r    r    s%     0 00040@D0r!   c                *   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# Wn        V P	                  4        V'       d<   V P
                  P                  R\        P                  P                  V4      4       R# R# )re  rf  Nr  )
r  r3   r!  r  r  r  r  r   r  rg  rh  r   r   r  Z,TypingBoosterEngine.set_word_prediction_mode  sr     q LL-tG)))!%OO%%!((.0 r!   c                r[   ri  r   rE   rG   r   r    r    s     : :$(:48:r!   c                rj  r"   )r  r  rk  re   r   toggle_word_prediction_modeZ/TypingBoosterEngine.toggle_word_prediction_mode  s!     	%%&&&(8	:r!   c                rk   rl   r   rE   rG   r   r    r    s     & &$ &r!   c                rp   r"   )r  rn   r&   r   r  Z,TypingBoosterEngine.get_word_prediction_mode      %%%r!   c                r  rb  r   rE   rG   r   r    r    s%      0  0 004 0@D 0r!   c                st   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# Wn        V P	                  V P
                  V4       V P                  '       dx   V P                  '       d*   V P                  P                  4       V P                  8w  d=   \        P                  ! V P                  V P                  V P                  R7      V n        V P                  4        V'       d<   V P                  P                  R\         P"                  P%                  V4      4       R# R# )re  rf  NrX  r  )r  r3   r!  r  r  r  r  rT  r  r"  r#  r  r  r  r  r  r   r  rg  rh  r   r   r  Z-TypingBoosterEngine.set_emoji_prediction_mode  s     q LL-tG***"&**++T	3###'''##113**+!*!7!700!%!7!7#'#4#4"6D 	OO%%"((.0 r!   c                r[   ri  r   rE   rG   r   r    r    s     ; ;$(;48;r!   c                rj  r"   )r  r  rk  re   r   toggle_emoji_prediction_modeZ0TypingBoosterEngine.toggle_emoji_prediction_mode  s!     	&&''')9	;r!   c                rk   rl   r   rE   rG   r   r    r    s     ' '4 'r!   c                rp   r"   )r  rn   r&   r   r  Z-TypingBoosterEngine.get_emoji_prediction_mode      &&&r!   c                r  rb  r   rE   rG   r   r    r    s%     0 00040@D0r!   c                s   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# Wn        V P                  '       dc   V P                   ^8  d   \        P                  R4       \
        P                  ! V P                  V P                  V P                  R7      V n        V P                  4        V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# )re  rf  NUpdating EmojiMatcherrX  r  )r  r3   r!  r  r  r"  r#  r  r  r  r  r  r   r  rg  rh  r   r   r  Z-TypingBoosterEngine.set_unicode_data_all_mode  s     q LL-tG)))!%  1$45!*!7!700!%!7!7#'#4#4"6D 	OO%% ((.0 r!   c                r[   ri  r   rE   rG   r   r    r    s     : :$(:48:r!   c                rj  r"   )r  r  rk  re   r   toggle_unicode_data_all_modeZ0TypingBoosterEngine.toggle_unicode_data_all_mode  s!     	&&&&&(8	:r!   c                rk   rl   r   rE   rG   r   r    r    s     & &4 &r!   c                rp   r"   )r  rn   r&   r   r  Z-TypingBoosterEngine.get_unicode_data_all_mode       %%%r!   c                ra  rb  rc  rE   rG   r   r    r  "  s2     0 0c	"0 #0 /30r!   c                sb   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# Wn        V P	                  V P
                  V4       V P                  4        V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# )re  rf  Nr(  )r  r3   r!  r  r  r  r  r  r  r   r  rg  rh  r   r   r  Z+TypingBoosterEngine.set_off_the_record_mode"  s     q LL-tG'''#**))4	1OO%%((.0 r!   c                r[   ri  r   rE   rG   r   r    r  >  s     8 8$(8488r!   c                rj  r"   )r  r  rk  re   r   toggle_off_the_record_modeZ.TypingBoosterEngine.toggle_off_the_record_mode>  s!     	$$$$$&6	8r!   c                rk   rl   r   rE   rG   r   r    r  K  s     $ $ $r!   c                rp   r"   )r  rn   r&   r   r  Z+TypingBoosterEngine.get_off_the_record_modeK      ###r!   c                r  )r   emoji_trigger_charactersrI  r   Nr   r   r   r   rE   rG   r   r    r  O  s6     C C&+CHoC #C /3Cr!   c                re  )re  rf  Nr,  )	r  r3   r!  r  r  r  r   r  r  )rP   r  rI  r   r   r  Z0TypingBoosterEngine.set_emoji_trigger_charactersO  sl     q LL-(< $'E'EE)A&OO%%(''(@AC r!   c                rk   rl   r   rE   rG   r   r    r  i       . .c .r!   c                rp   r"   )r  rn   r&   r   r  Z0TypingBoosterEngine.get_emoji_trigger_charactersi      ---r!   c                r  )r   stylerI  r   Nr  rE   rG   r   r    r  m  s1     )0 )0c?)0 #)0 /3)0r!   c                s   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# Wn        V P                  '       dL   V P                   ^8  d   \        P                  R4       V P                  P                  V P                  4       V P                  P                  \        P                  8X  d'   V P                  V P                  P                  4       M9V P                  P                  \        P                  8X  d   V P                  4        V'       d<   V P                  P                  R\         P"                  P%                  V4      4       R# R# )re  z(%r, update_gsettings = %s)Nr  r-  )r  r3   r!  r  r  Zset_variation_selectorr;  r   r|   r   r  r   r   r  r  r  r   r  r  )rP   r  rI  r   r   r  Z#TypingBoosterEngine.set_emoji_stylem  s     q LL-) %%%!  1$4555!!###'7'J'JJ ++""<<>%%)9)@)@@ OOOO%%''.0 r!   c                r[   ri  r   rE   rG   r   r    r    s      $(48r!   c                sj    R RRR /pV P                  VP                  V P                  R 4      V4       R# )r[  r   N)r  r<  r  )rP   rI  Z
next_stylerj   r   toggle_emoji_styleZ&TypingBoosterEngine.toggle_emoji_style  s7     vvw7
NN4,,g6	r!   c                rk   rl   r   rE   rG   r   r    r    rp  r!   c                rp   r"   )r  rn   r&   r   r  Z#TypingBoosterEngine.get_emoji_style  rq  r!   c                r  )r   auto_commit_charactersrI  r   Nr  rE   rG   r   r    r    s6     A A$)#s(OA #A /3Ar!   c                re  )re  rf  Nr.  )	r  r3   r!  r  r  r  r   r  r  )rP   r  rI  r   r   r  Z.TypingBoosterEngine.set_auto_commit_characters  sl     q LL-&: "%A%AA'=$OO%%&''(>?A r!   c                rk   rl   r   rE   rG   r   r    r    s     , ,C ,r!   c                rp   r"   )r  rn   r&   r   r  Z.TypingBoosterEngine.get_auto_commit_characters  s    +++r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  Nr4  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z0TypingBoosterEngine.set_color_preedit_spellcheck  sh     q LL-tG111)-&OO%%(((.0 r!   c                rk   rl   r   rE   rG   r   r    r    s     . .d .r!   c                rp   r"   )r  rn   r&   r   r  Z0TypingBoosterEngine.get_color_preedit_spellcheck  r  r!   c                r  r   color_stringrI  r   Nr  rE   rG   r   r    r    1     7 7S/7 #7 /37r!   c                T   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# Wn        \        P
                  ! V P                  4      V n        V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# )re  rf  Nr5  )r  r3   r!  r  rh  r  r  r  r  r   r  r  rP   r  rI  r   r   r  Z7TypingBoosterEngine.set_color_preedit_spellcheck_string  s    & q LL-|O@@@0<-.6.K.K11/3+OO%%.''57 r!   c                rk   rl   r   rE   rG   r   r    r  	  s     5 5S 5r!   c                rp   r"   )r  rn   r&   r   r  Z7TypingBoosterEngine.get_color_preedit_spellcheck_string	  s     444r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  Nr6  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z/TypingBoosterEngine.set_color_inline_completion  sh     q LL-tG000(,%OO%%'((.0 r!   c                rk   rl   r   rE   rG   r   r    r  &  rw  r!   c                rp   r"   )r  rn   r&   r   r  Z/TypingBoosterEngine.get_color_inline_completion&  rx  r!   c                r  r  r  rE   rG   r   r    r  *  r  r!   c                r  )re  rf  Nr7  )r  r3   r!  r  rh  r  r  r  r  r   r  r  r  r   r   r  Z6TypingBoosterEngine.set_color_inline_completion_string*  s    & q LL-|O???/;,-5-J-J00.2*OO%%-''57 r!   c                rk   rl   r   rE   rG   r   r    r  J  s     4 4C 4r!   c                rp   r"   )r  rn   r&   r   r  Z6TypingBoosterEngine.get_color_inline_completion_stringJ      333r!   c                ra  rb  rc  rE   rG   r   r    r  N  rr  r!   c                re  )re  rf  Nr8  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z-TypingBoosterEngine.set_color_compose_previewN  sh     q LL-tG...&*#OO%%%((.0 r!   c                rk   rl   r   rE   rG   r   r    r  f  s     + +4 +r!   c                rp   r"   )r  rn   r&   r   r  Z-TypingBoosterEngine.get_color_compose_previewf  s    ***r!   c                r  r  r  rE   rG   r   r    r  j  r  r!   c                r  )re  rf  Nr9  )r  r3   r!  r  rh  r  r  r  r  r   r  r  r  r   r   r  Z4TypingBoosterEngine.set_color_compose_preview_stringj  s    & q LL-|O===-9*+3+H+H..,0(OO%%+''57 r!   c                rk   rl   r   rE   rG   r   r    r    s     2 2# 2r!   c                rp   r"   )r  rn   r&   r   r  Z4TypingBoosterEngine.get_color_compose_preview_string  s    111r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  Nr:  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z*TypingBoosterEngine.set_color_m17n_preedit  sh     q LL-tG+++#' OO%%"((.0 r!   c                rk   rl   r   rE   rG   r   r    r    s     ( ( (r!   c                rp   r"   )r  rn   r&   r   r  Z*TypingBoosterEngine.get_color_m17n_preedit      '''r!   c                r  r  r  rE   rG   r   r    r    r  r!   c                r  )re  rf  Nr;  )r  r3   r!  r  rh  r  r  r  r  r   r  r  r  r   r   r  Z1TypingBoosterEngine.set_color_m17n_preedit_string  s    & q LL-|O:::*6'(0(E(E++)-%OO%%(''57 r!   c                rk   rl   r   rE   rG   r   r    r    s     / /s /r!   c                rp   r"   )r  rn   r&   r   r  Z1TypingBoosterEngine.get_color_m17n_preedit_string  s    ...r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  Nr<  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z$TypingBoosterEngine.set_color_userdb  h     q LL-tG%%%!OO%%((.0 r!   c                rk   rl   r   rE   rG   r   r    r         " "$ "r!   c                rp   r"   )r  rn   r&   r   r  Z$TypingBoosterEngine.get_color_userdb  ro  r!   c                r  r  r  rE   rG   r   r    r    r  r!   c                r  )re  rf  Nr=  )r  r3   r!  r  rh  r  r  r  r  r   r  r  r  r   r   r  Z+TypingBoosterEngine.set_color_userdb_string  s    & q LL-|O444$0!"*"?"?%%#'OO%%#''57 r!   c                rk   rl   r   rE   rG   r   r    r  
       ) ) )r!   c                rp   r"   )r  rn   r&   r   r  Z+TypingBoosterEngine.get_color_userdb_string
      (((r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  Nr>  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z(TypingBoosterEngine.set_color_spellcheck  h     q LL-tG)))!%OO%%!((.0 r!   c                rk   rl   r   rE   rG   r   r    r  &       & &d &r!   c                rp   r"   )r  rn   r&   r   r  Z(TypingBoosterEngine.get_color_spellcheck&  r  r!   c                r  r  r  rE   rG   r   r    r  *  r  r!   c                r  )re  rf  Nr?  )r  r3   r!  r  rh  r  r  r  r  r   r  r  r  r   r   r  Z/TypingBoosterEngine.set_color_spellcheck_string*      & q LL-|O888(4%&.&C&C))'+#OO%%'''57 r!   c                rk   rl   r   rE   rG   r   r    r  J       - -S -r!   c                rp   r"   )r  rn   r&   r   r  Z/TypingBoosterEngine.get_color_spellcheck_stringJ  rx  r!   c                ra  rb  rc  rE   rG   r   r    r  N  rr  r!   c                re  )re  rf  Nr@  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z(TypingBoosterEngine.set_color_dictionaryN  r  r!   c                rk   rl   r   rE   rG   r   r    r  f  r  r!   c                rp   r"   )r  rn   r&   r   r  Z(TypingBoosterEngine.get_color_dictionaryf  r  r!   c                r  r  r  rE   rG   r   r    r  j  r  r!   c                r  )re  rf  NrA  )r  r3   r!  r  rh  r  r  r  r  r   r  r  r  r   r   r  Z/TypingBoosterEngine.set_color_dictionary_stringj  r  r!   c                rk   rl   r   rE   rG   r   r    r    r  r!   c                rp   r"   )r  rn   r&   r   r  Z/TypingBoosterEngine.get_color_dictionary_string  rx  r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  NrB  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z$TypingBoosterEngine.set_label_userdb  r  r!   c                rk   rl   r   rE   rG   r   r    r    r  r!   c                rp   r"   )r  rn   r&   r   r  Z$TypingBoosterEngine.get_label_userdb  ro  r!   c                r  r   label_stringrI  r   Nr  rE   rG   r   r    r    1     7 7S/7 #7 /37r!   c                re  )re  rf  NrC  )	r  r3   r!  r  r  r  r   r  r  rP   r  rI  r   r   r  Z+TypingBoosterEngine.set_label_userdb_string  sh     q LL-|O444$0!OO%%#''57 r!   c                rk   rl   r   rE   rG   r   r    r    r  r!   c                rp   r"   )r  rn   r&   r   r  Z+TypingBoosterEngine.get_label_userdb_string  r  r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  NrD  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z(TypingBoosterEngine.set_label_spellcheck  r  r!   c                rk   rl   r   rE   rG   r   r    r    r  r!   c                rp   r"   )r  rn   r&   r   r  Z(TypingBoosterEngine.get_label_spellcheck  r  r!   c                r  r  r  rE   rG   r   r    r    r  r!   c                re  )re  rf  NrE  )	r  r3   r!  r  r  r  r   r  r  r  r   r   r  Z/TypingBoosterEngine.set_label_spellcheck_string  sh     q LL-|O888(4%OO%%'''57 r!   c                rk   rl   r   rE   rG   r   r    r    r  r!   c                rp   r"   )r  rn   r&   r   r  Z/TypingBoosterEngine.get_label_spellcheck_string  rx  r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  NrF  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z(TypingBoosterEngine.set_label_dictionary  r  r!   c                rk   rl   r   rE   rG   r   r    r    r  r!   c                rp   r"   )r  rn   r&   r   r  Z(TypingBoosterEngine.get_label_dictionary  r  r!   c                r  r  r  rE   rG   r   r    r    s1     #7 #7S/#7 ##7 /3#7r!   c                s   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# Wn        / V n        VP                  R4      '       dD    \        P                  ! V4      V n        \        V P                  \        4      '       g   / V n        V P                   ^8  d*   \        P                  R\        V P                  4      4       V'       d<   V P                   P#                  R\$        P&                  P)                  V4      4       R# R#   \        \        3 d6   p\        P                  RTP                  P                  T4        Rp?LRp?ii ; i)re  rf  NZ{z)Cannot parse label_string as dict: %s: %szself._label_dictionary_dict=%srG  )r  r3   r!  r   r  rS  astZliteral_evalrc  dictZSyntaxErrorr  r  r  rS   r2   r  r  r   r  r  )rP   r  rI  r4      &&& r   r  Z/TypingBoosterEngine.set_label_dictionary_string  s    q LL-|O888(4%&(#""3''5.1.>.>|.L+!$"="=tDD24D/
 q LL9d99:<OO%%'''57   , 5  ?OO,,e5 55s   AD   E&1+E!!E&c                rk   rl   r   rE   rG   r   r    r  ?  r  r!   c                rp   r"   )r   rn   r&   r   r  Z/TypingBoosterEngine.get_label_dictionary_string?  rx  r!   c                ra  rb  rc  rE   rG   r   r    r  C  2     0 0c	"0 #0 /30r!   c                re  )re  rf  NrJ  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z'TypingBoosterEngine.set_flag_dictionaryC  sh     q LL-tG((( $OO%% ((.0 r!   c                rk   rl   r   rE   rG   r   r    r  \       % %T %r!   c                rp   r"   )r  rn   r&   r   r  Z'TypingBoosterEngine.get_flag_dictionary\      $$$r!   c                ra  rb  rc  rE   rG   r   r    r  `  rr  r!   c                re  )re  rf  NrK  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z"TypingBoosterEngine.set_label_busy`  h     q LL-tG###OO%%((.0 r!   c                rk   rl   r   rE   rG   r   r    r  x  r  r!   c                rp   r"   )r  rn   r&   r   r  Z"TypingBoosterEngine.get_label_busyx  ru  r!   c                r  r  r  rE   rG   r   r    r  |  r  r!   c                re  )re  rf  NrL  )	r  r3   r!  r  r  r  r   r  r  r  r   r   r  Z)TypingBoosterEngine.set_label_busy_string|  sh     q LL-|O222".OO%%!''57 r!   c                rk   rl   r   rE   rG   r   r    r         ' 's 'r!   c                rp   r"   )r  rn   r&   r   r  Z)TypingBoosterEngine.get_label_busy_string  r  r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  Nr  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z&TypingBoosterEngine.set_ai_chat_enable  sh     q LL-tG'''#OO%%((.0 r!   c                rk   rl   r   rE   rG   r   r    r    s     $ $D $r!   c                rp   r"   )r  rn   r&   r   r  Z&TypingBoosterEngine.get_ai_chat_enable  s     ###r!   c                r  )r   ai_system_messagerI  r   Nr  rE   rG   r   r    r    s1     < <$S#X< #< /3<r!   c                re  )re  rf  Nr  )	r  r3   r!  r  r  r  r   r  r  )rP   r  rI  r   r   r  Z)TypingBoosterEngine.set_ai_system_message  sj     q LL-/@T 7 77"3OO%%!''(9:< r!   c                rk   rl   r   rE   rG   r   r    r    r  r!   c                rp   r"   )r  rn   r&   r   r  Z)TypingBoosterEngine.get_ai_system_message  r  r!   c                r  )r   ollama_modelrI  r   Nr  rE   rG   r   r    r    r  r!   c                re  )re  rf  Nr  )	r  r3   r!  r  r  r  r   r  r  )rP   r  rI  r   r   r  Z$TypingBoosterEngine.set_ollama_model  sh     q LL-|O---)OO%%''57 r!   c                rk   rl   r   rE   rG   r   r    r    s     " "# "r!   c                rp   r"   )r  rn   r&   r   r  Z$TypingBoosterEngine.get_ollama_model  ro  r!   c                r  )r   max_contextrI  r   Nrm  rE   rG   r   r    r    s1     6 6sCx6 #6 /36r!   c                s    \         P                  R W4       WP                  8X  d   R# Wn        V'       d<   V P                  P	                  R\
        P                  P                  V4      4       R# R# )rf  Nr  )r3   r!  r  r  r  r   r  
new_uint32)rP   r  rI  r   r   r  Z*TypingBoosterEngine.set_ollama_max_context  sZ     	);	J222#. OO%%"''46 r!   c                rk   rl   r   rE   rG   r   r    r    s     ( ( (r!   c                rp   r"   )r  rn   r&   r   r  Z*TypingBoosterEngine.get_ollama_max_context  r  r!   c                r  r   r  rI  r   Nr  rE   rG   r   r    r  
  s1     / /S// #/ /3/r!   c                s   V P                   ^8  d   \        P                  RW4       V P                  V8X  d   R# Wn        V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# )re  rf  NrM  )	r  r3   r!  r  r  r  r   r  r  rP   r  rI  r   r   r  Z6TypingBoosterEngine.set_google_application_credentials
  sj     q LL-tG//47/3,OO%%.''-/ r!   c                rk   rl   r   rE   rG   r   r    r  #  s     4 4C 4r!   c                rp   r"   )r  rn   r&   r   r  Z6TypingBoosterEngine.get_google_application_credentials#       333r!   c                ra  rb  rc  rE   rG   r   r    r  )  rr  r!   c                re  )re  rf  Nr$  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z"TypingBoosterEngine.set_tab_enable)  r  r!   c                rk   rl   r   rE   rG   r   r    r  A  r  r!   c                rp   r"   )r  rn   r&   r   r  Z"TypingBoosterEngine.get_tab_enableA  ru  r!   c                ra  rb  rc  rE   rG   r   r    r  E  rr  r!   c                re  )re  rf  Nr%  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z,TypingBoosterEngine.set_disable_in_terminalsE  sh     q LL-tG---%)"OO%%$((.0 r!   c                rk   rl   r   rE   rG   r   r    r  ]  s     * *$ *r!   c                rp   r"   )r  rn   r&   r   r  Z,TypingBoosterEngine.get_disable_in_terminals]  s    )))r!   c                ra  rb  rc  rE   rG   r   r    r  a  r  r!   c                re  )re  rf  Nr&  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z$TypingBoosterEngine.set_ascii_digitsa  sh     q LL-tG%%%!OO%%((.0 r!   c                rk   rl   r   rE   rG   r   r    r  z  r  r!   c                rp   r"   )r  rn   r&   r   r  Z$TypingBoosterEngine.get_ascii_digitsz  ro  r!   c                r[   ri  r   rE   rG   r   r    r  ~  s     
6 
6D 
6D 
6r!   c                rj  r"   )r  r  rk  re   r   toggle_ascii_digitsZ'TypingBoosterEngine.toggle_ascii_digits~  s!     	"""$4	6r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  Nr'  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z'TypingBoosterEngine.set_show_final_form  sh     q LL-tG((( $OO%%((.0 r!   c                rk   rl   r   rE   rG   r   r    r    r  r!   c                rp   r"   )r  rn   r&   r   r  Z'TypingBoosterEngine.get_show_final_form  r  r!   c                r[   ri  r   rE   rG   r   r    r    rs  r!   c                rj  r"   )r  r  rk  re   r   toggle_show_final_formZ*TypingBoosterEngine.toggle_show_final_form  ru  r!   c                ra  rb  rc  rE   rG   r   r    r    r  r!   c                re  )re  rf  Nr/  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z6TypingBoosterEngine.set_remember_last_used_preedit_ime  sh     q LL-tG777/3,OO%%,((.0 r!   c                rk   rl   r   rE   rG   r   r    r    s     4 4D 4r!   c                rp   r"   )r  rn   r&   r   r  Z6TypingBoosterEngine.get_remember_last_used_preedit_ime  r  r!   c                ra  rb  rc  rE   rG   r   r    r    rr  r!   c                re  )re  rf  NrP  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z+TypingBoosterEngine.set_remember_input_mode  sh     q LL-tG,,,$(!OO%%#((.0 r!   c                rk   rl   r   rE   rG   r   r    r    s     ) ) )r!   c                rp   r"   )r  rn   r&   r   r  Z+TypingBoosterEngine.get_remember_input_mode  r  r!   c                r  )r   r   rI  r   Nrm  rE   rG   r   r    r    s1     7 7S#X7 #7 /37r!   c                s   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# ^Tu;8:  d   ^	8:  d   M R# Wn        V P                  P                  V P                  4       V P                  4        V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# R# )re  rf  Nr  )r  r3   r!  r  r;  r   rV  r  r  r   r  rn  )rP   r   rI  r   r   r   Z!TypingBoosterEngine.set_page_size  s     q LL-yL'	Q'O,,T__=++-))LL**957  	 r!   c                rk   rl   r   rE   rG   r   r    r  	  rq  r!   c                rp   r"   )r  rn   r&   r   r   Z!TypingBoosterEngine.get_page_size	  rs  r!   c                r  )r   r   rI  r   Nrm  rE   rG   r   r    r    s1     9 9sCx9 #9 /39r!   c                s   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# ^ Tu;8:  d   ^8:  d   M R# Wn        V P                  P                  V P                  4       V P                  4        V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# R# )re  rf  Nr  )r  r3   r!  r  r;  r   rV  r  r  r   r  rn  )rP   r   rI  r   r   r  Z0TypingBoosterEngine.set_lookup_table_orientation  s    " q LL-{N888 q  -8*..t/M/MN++-)),LL**;79  	 !r!   c                rk   rl   r   rE   rG   r   r    r  ,  r  r!   c                rp   r"   )r  rn   r&   r   r  Z0TypingBoosterEngine.get_lookup_table_orientation,  r  r!   c                r  )r   underline_moderI  r   Nrm  rE   rG   r   r    r  0  s1     < <!#s(O< #< /3<r!   c                s   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# ^ Tu;8:  d    \        P
                  P                  8  d`   M R# Wn        V P                  4        V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# R# )re  rf  Nr  )r  r3   r!  r  r   r  ZERRORr  r  r  r   r  rn  )rP   r  rI  r   r   r  Z)TypingBoosterEngine.set_preedit_underline0  s    & q LL-2 4449!3!3!9!999&4#OO))&LL**>:<   :r!   c                rk   rl   r   rE   rG   r   r    r  Q  r  r!   c                rp   r"   )r  rn   r&   r   r  Z)TypingBoosterEngine.get_preedit_underlineQ  r  r!   c                ra  rb  rc  rE   rG   r   r    r  U  r  r!   c                re  )re  z(%s, update_gsettings=%s)Nr  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z6TypingBoosterEngine.set_preedit_style_only_when_lookupU  sh     q LL+TE777/3,OO%%,((.0 r!   c                rk   rl   r   rE   rG   r   r    r  n  s     4 4D 4r!   c                rp   r"   )r  rn   r&   r   r  Z6TypingBoosterEngine.get_preedit_style_only_when_lookupn  r  r!   c                r  )r   min_char_completerI  r   Nrm  rE   rG   r   r    r  r  s1     ? ?$S#X? #? /3?r!   c                sT   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# ^ Tu;8:  d   ^	8:  d`   M R# Wn        V P	                  4        V'       d<   V P
                  P                  R\        P                  P                  V4      4       R# R# R# )re  rf  Nr  )
r  r3   r!  r  rV  r  r  r   r  rn  )rP   r  rI  r   r   r  Z)TypingBoosterEngine.set_min_char_completer  s     q LL-!5  7 77!&Q&&&7#++-))%LL**+<=?   'r!   c                rk   rl   r   rE   rG   r   r    r    s     ' 's 'r!   c                rp   r"   )r  rn   r&   r   r  Z)TypingBoosterEngine.get_min_char_complete  r   r!   c                r  )r   debug_levelrI  r   Nrm  rE   rG   r   r    r    s1     9 9sCx9 #9 /39r!   c                sT   V P                   ^8  d   \        P                  RW4       WP                   8X  d   R# ^ Tu;8:  d   ^8:  d`   M R# Wn         V P                  4        V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# R# )re  rf  Nr  )	r  r3   r!  rV  r  r  r   r  rn  )rP   r  rI  r   r   r  Z#TypingBoosterEngine.set_debug_level  s     q LL-{N+++"s"" +++-)) LL**;79   #r!   c                rk   rl   r   rE   rG   r   r    r    rp  r!   c                rp   r"   )r  rn   r&   r   r  Z#TypingBoosterEngine.get_debug_level  rq  r!   c                r  )r   millisecondsrI  r   Nrm  rE   rG   r   r    r    s6     N NS/N #N /3Nr!   c                    \         P                  R W4       WP                  8X  d   R# Wn        V'       dF   V P                  P	                  R\
        P                  P                  V P                  4      4       R# R# )rf  Nr  )r3   r!  r  r  r  r   r  r  )rP   r  rI  r   r   r  Z5TypingBoosterEngine.set_candidates_delay_milliseconds  sa     	)<	K>>>.:+OO%%-''(K(KLN r!   c                rk   rl   r   rE   rG   r   r    r    s     3 33 3r!   c                rp   r"   )r  rn   r&   r   r  Z5TypingBoosterEngine.get_candidates_delay_milliseconds  s    222r!   c                r  )r   secondsrI  r   N)r   r0  r   r   rE   rG   r   r    r    s7     I I5#:&I #I /3Ir!   c                r  )rf  Nr  )r3   r!  r  r  r  r   r  Z
new_double)rP   r  rI  r   r   r  Z0TypingBoosterEngine.set_ibus_event_sleep_seconds  sa     	)7	F444)0&OO%%'''(F(FGI r!   c                rk   rl   )r0  rE   rG   r   r    r    s     . .e .r!   c                rp   r"   )r  rn   r&   r   r  Z0TypingBoosterEngine.get_ibus_event_sleep_seconds  r  r!   c                r  rb  r   rE   rG   r   r    r    s%     0 00040@D0r!   c                re  )re  rf  Nr  )	r  r3   r!  r  r  r  r   r  rg  rh  r   r   r  Z'TypingBoosterEngine.set_use_ibus_keymap  sh     q LL-tG((( $OO%%((.0 r!   c                sJ   < V ^8  d   QhRS[ RS[S[P                  ,          /# )r   keymapr   )r   r   r   KeymaprE   rG   r   r    r     s$       x/D r!   c                s>   V \         P                  9  d/   \        P                  R V \	        \         P                  4      4        \
        P                  ! V 4      #   \         d7   p\        P                  RYP                  P                  T4        Rp?R# Rp?ii ; i)z3keymap %s not in itb_util.AVAILABLE_IBUS_KEYMAPS=%sz7Exception in IBus.Keymap("%s"): %s: %s. Returning None.N)rh  ZAVAILABLE_IBUS_KEYMAPSr3   r  r2   r   r  r9   r4   r  rS   )r  r4   rQ   r   r  Z#TypingBoosterEngine.new_ibus_keymap  sx    
 888NNEX<<=?	;;v&& 	LLI00%9 		s   A B&+BBc                r  )r   r  rI  r   Nr  rE   rG   r   r    r    s1     1 1#s(O1 #1 /31r!   c                sJ   V P                   ^8  d   \        P                  RW4       WP                  8X  d   R# Wn        V P                  P                  V4      V n        V'       d<   V P                  P                  R\        P                  P                  V4      4       R# R# )re  rf  Nr  )r  r3   r!  r  r  r  r  r  r  r   r  r  )rP   r  rI  r   r   r  Z#TypingBoosterEngine.set_ibus_keymap  s     q LL-vI&&&"#'>>#A#A&#I OO%%''/1 r!   c                rk   rl   r   rE   rG   r   r    r  )  r  r!   c                rp   r"   )r  rn   r&   r   r  Z'TypingBoosterEngine.get_use_ibus_keymap)  r  r!   c                rk   rl   r   rE   rG   r   r    r  -  s     ! ! !r!   c                rp   r"   )r  rn   r&   r   r  Z#TypingBoosterEngine.get_ibus_keymap-  s        r!   c                r  )r   error_soundrI  r   Nr   rE   rG   r   r    r  3  s%     7 7#77;7GK7r!   c                re  )re  rf  NrS  )	r  r3   r!  r  r  r  r   r  rg  )rP   r  rI  r   r   r  Z#TypingBoosterEngine.set_error_sound3  sh     q LL-{N+++'OO%%((57 r!   c                rk   rl   r   rE   rG   r   r    r  I  s     ! ! !r!   c                rp   r"   )r  rn   r&   r   r  Z#TypingBoosterEngine.get_error_soundI  rq  r!   c                r  r  r  rE   rG   r   r    r  M  s1     / /S// #/ /3/r!   c                s   V P                   ^8  d   \        P                  RW4       \        V\        4      '       g   R# WP
                  8X  d   R# Wn        V'       d:   V P                  P                  R\        P                  P                  V4      4       \        P                  ! \        P                  P                  V4      V P                   R7      V n        R# )re  rf  NrT  Zaudio_backend)r  r3   r!  rc  r   r  r  r  r   r  r  	itb_soundSoundObjectr  r  
expanduserr  r  r  r   r   r  Z(TypingBoosterEngine.set_error_sound_fileM  s     q LL-tG$$$)))!%OO%% ''-/ $-#8#8GGt$--$/ r!   c                rk   rl   r   rE   rG   r   r    r  k  s     & &c &r!   c                rp   r"   )r  rn   r&   r   r  Z(TypingBoosterEngine.get_error_sound_filek  r  r!   c                r  )r   sound_backendrI  r   Nr  rE   rG   r   r    r  q  s1     / / c?/ #/ /3/r!   c                s   V P                   ^8  d   \        P                  RW4       \        V\        4      '       g   R# WP
                  8X  d   R# Wn        V'       d:   V P                  P                  R\        P                  P                  V4      4       \        P                  ! \        P                  P                  V P                   4      V P
                  R7      V n        R# )re  rf  NrR  r  )r  r3   r!  rc  r   r  r  r  r   r  r  r  r  r  r  r  r  r  )rP   r  rI  r   r   r  Z%TypingBoosterEngine.set_sound_backendq  s     q LL-}P---///+OO%%''68 $-#8#8GGt556--$/ r!   c                rk   rl   r   rE   rG   r   r    r    s     # #3 #r!   c                rp   r"   )r  rn   r&   r   r  Z%TypingBoosterEngine.get_sound_backend  rz  r!   c                ra  rb  rc  rE   rG   r   r    r    rd  r!   c                r  )re  rf  Nr   )
r  r3   r!  r  rV  r  r  r   r  rg  rh  r   r   r  Z1TypingBoosterEngine.set_show_number_of_candidates  st     q LL-tG222*.''')OO%%(((.0 r!   c                rk   rl   r   rE   rG   r   r    r    s     / /t /r!   c                rp   r"   )r  rn   r&   r   r  Z1TypingBoosterEngine.get_show_number_of_candidates  r   r!   c                ra  rb  rc  rE   rG   r   r    r    s2     0 0c	"0 #0 /30r!   c                r  )re  rf  Nr!  )
r  r3   r!  r  rV  r  r  r   r  rg  rh  r   r   r  Z:TypingBoosterEngine.set_show_status_info_in_auxiliary_text  st    & q LL-tG;;;370'')OO%%%((.0 r!   c                rk   rl   r   rE   rG   r   r    r    s     8 8 8r!   c                rp   r"   )r  rn   r&   r   r  Z:TypingBoosterEngine.get_show_status_info_in_auxiliary_text  s     777r!   c                r  rb  rm  rE   rG   r   r    r    ro  r!   c                r  )re  rf  Nr"  )
r  r3   r!  r  rV  r  r  r   r  rn  rh  r   r   r  Z&TypingBoosterEngine.set_show_raw_input  st      q LL-tG'''#'')OO%%&&t,. r!   c                rk   rl   r   rE   rG   r   r    r    s     $ $C $r!   c                rp   r"   )r  rn   r&   r   r  Z&TypingBoosterEngine.get_show_raw_input  r  r!   c                r  rb  rm  rE   rG   r   r    r    s1     . .S/. #. /3.r!   c                r  )re  z4set_auto_select_candidate(%s, update_gsettings = %s)Nr#  )
r  r3   r!  r  rV  r  r  r   r  rn  rh  r   r   r  Z-TypingBoosterEngine.set_auto_select_candidate  sv     q LLF( ...&*#'')OO%%%&&t,. r!   c                rk   rl   r   rE   rG   r   r    r    s     + +3 +r!   c                rp   r"   )r  rn   r&   r   r  Z-TypingBoosterEngine.get_auto_select_candidate  s     ***r!   c                s0   < V ^8  d   QhRS[ RS[ RS[ RR/# )r   r   buttonr   r   Nr   rE   rG   r   r    r    s3     A AA&)A25A:>Ar!   c                s  < V P                   ^8  d   \        P                  RWV4       V P                  V4      '       g   R# V P                  P                  R4       V P                  P                  \        P                  8X  Ed*   V^8X  Ed    V P                  4       p\        P                  V P                  n        . V n        V P                  P                  4        V P                  P                  R4       V P                  4        . V n        V P                  4        V'       d   V P!                  4       '       d-   V P#                  \%        V4      4       V P'                  4        R# V P)                  4        \*        SV `Y  \.        P0                  P3                  V4      4       RV n        R# V^8X  dK   V\.        P6                  P8                  ,          '       d$   V P;                  V4       V P'                  4        R# V^8X  d   V P                  4       pV'       d   V P<                  '       d
   VR,          pV P?                  V4       V P<                  '       g   V P@                  '       dD   V PC                  4        V PE                  4        \F        PH                  ! ^V PJ                  4       R# V PM                  4        R# V^8X  da   V\.        P6                  PN                  ,          '       d:   V\.        P6                  P8                  ,          '       d   V PQ                  4        R# V^8X  d:   V\.        P6                  P8                  ,          '       d   V PS                  4        R# V^8X  d:   V\.        P6                  PN                  ,          '       d   V PU                  4        R# V^8X  d   V PW                  4        R# R# )re  z"index = %s button = %s state = %s
NTFr2  ),r  r3   r!  ri  r;  r   r   r|   r   rj  r   r7  r   r  r+  r  r  r  r  r  r   r  r'  r   r   r   r%  r;  r]  rm  r  r)  rr  r  rt  r   r  r  rV  	MOD1_MASKr  r  r  r  )rP   r   r  r   r   r  s   &&&& r   do_candidate_clickedZ(TypingBoosterEngine.do_candidate_clicked  s   
 q LL5ueM@@GG--d3##'7'K'KK{EEG+;+B+B""(#% ""((*""55e<113/1,335**,,55d6lC)((*G'		11&9;;?D8Q;ED$5$5$B$BBB44U;OOQ;AACF,,,cMF##F+,,,%%'99; $$Q(R(RS  335aK**4444**7777Q;ED$5$5$B$BBB--/Q;ED$5$5$?$???++-Q;++- r!   c                r[   )r   error_messager   Nr   rE   rG   r   r    r  [  s      s t r!   c                sh   R pV P                   '       d;   V P                  P                  4       '       d   V P                  P                  4       pV P                  \        P
                  P                  VR,           V,           4      R4       \        P                  ! ^4       V P                  4        R# )rC   u   ⚠️TN)
r  r  r:  ri  r   r   r   r7  r8  r  )rP   r  auxiliary_text_labelrj   r   _speech_recognition_errorZ-TypingBoosterEngine._speech_recognition_error[  s      "***55;;== 55;;= !""II%%$x/-?ABF	H 	

1r!   c                rD   r   r)   rE   rG   r   r    r  n  s     m mT mr!   c           	     st   V P                   '       d   \        P                  R 4       V P                  4        \        '       g   V P                  \        R4      4       R# \        P                  '       g   V P                  \        R4      4       R# \        P                  '       g   V P                  \        R4      4       R# V P                  ^ ,          pV'       g   V P                  \        R4      4       R# \        P                  P                  V P                  4      '       g.   V P                  \        R4      V P                  ,          4       R# V P                  \        P                  R&    \         P"                  ! 4       p\,        P.                  ! \0        P.                  P2                  P4                  \        P6                  TR
7      p\,        P8                  ! TRR7      pRpT P:                  '       d;   T P<                  P?                  4       '       d   T P<                  P?                  4       pYa,          p\        P@                  ! TPC                  RR4      4      pT'       d   TRT,           ,          pTPC                  RR4      \        PD                  9  d
   TR,          pTR,          pT PG                  \H        PJ                  PM                  T4      R4       Rp\        PN                  ! \        P6                  \        PP                  4      ;_uu_ 4       p	T	PS                  4       p
R T
 4       pTPU                  Y[4      p T EF  pTPV                  '       g   K  TPV                  ^ ,          pTPX                  '       g   K?  TPX                  ^ ,          PZ                  pT P                   ^8  d]   \        P                  R\]        TPX                  4      4       TPX                   F#  p\        P                  RTPZ                  4       K%  	  T PG                  \H        PJ                  PM                  Yh,           4      R4       TP^                  '       g   EK   M	   RRR4       T'       Ed.   T P`                  '       d5   T Pb                  \        Pd                  Pf                  Ph                  39   d'   T^ ,          Pk                  4       TR,          ,           pMT Pl                  Pn                  pT Pl                  Pp                  pTRT P?                  4       pT P                   ^8  d7   \        P                  RT Pl                  4       \        P                  RT4       T'       d   TR,          R9   d&   T^ ,          Pk                  4       TR,          ,           pT Ps                  \u        T4      4       T Pw                  4        T Py                  4        R#   \$         dQ   p\        P'                  RTP(                  P*                  T4       T P                  \        R	4      4        Rp?R# Rp?ii ; i  \$         dY   p\        P'                  RTP(                  P*                  T4       T P                  \        R4      4        Rp?RRR4       R# Rp?ii ; i  + '       g   i     ELG; i)zspeech_recognition()
z'Failed to import Google speech-to-text.NzFailed to import pyaudio.zFailed to import queue.z-No supported language for speech recognition.u=   “Google application credentials” file “%s” not found.ZGOOGLE_APPLICATION_CREDENTIALSz8Exception when intializing Google speech-to-text: %s: %sz4Failed to init Google speech-to-text. See debug.log.)ZencodingZsample_rate_hertzrG  T)configZinterim_resultsrC   ru  r'   r  u   ❌z: c              3   sP   "   T F  p\         P                  ! VR 7      x  K  	  R# 5i))Zaudio_contentN)speech_typesZStreamingRecognizeRequest)r  r   rQ   r   r   Z:TypingBoosterEngine._speech_recognition.<locals>.<genexpr>  s%      8'6G %>>WUU'6s   $&z&-------------------  %s alternative(s)z%sz#Google speech-to-text error: %s: %sz+Google speech-to-text error. See debug.log.rf  r  ztext_left = %rz.;:?!rN  )=r  r3   r!  rV  'IMPORT_GOOGLE_SPEECH_TO_TEXT_SUCCESSFULr  r'   rh  ZIMPORT_PYAUDIO_SUCCESSFULZIMPORT_QUEUE_SUCCESSFULr  r  r  Zisfiler  Zenvironr   ZSpeechClientr9   r  r  rS   r  ZRecognitionConfigspeech_enumsZAudioEncodingZLINEAR16Z
AUDIO_RATEZStreamingRecognitionConfigr  r  r:  r  r?  ZGOOGLE_SPEECH_TO_TEXT_LANGUAGESri  r   r   r   ZMicrophoneStreamZAUDIO_CHUNKZ	generatorZstreaming_recognizeZresultsZalternatives
transcriptr  Zis_finalrs  r  rC  rD  r   rc  rQ  r   rI   r  r  r  r  )rP   rG  r]   r4   r  Zstreaming_configr  Zflagr  streamZaudio_generatorZrequestsZ	responsesZresponseresultZalternativer   rI   Z	text_lefts   &                  r   _speech_recognitionZ'TypingBoosterEngine._speech_recognitionn  s_   
 LL12'')66**;<>111**1-H+IJ///**1-F+GH..q1**ABDww~~dBBCC**QR6678  00 	

34	((*F //!33AAJJ&11') (BB "  "***55;;== 55;;= !-  !6!6sC!@A EDL0 !!#s+;;<H !E) $""II%%&:;T	C 
&&##X%9%9; ;>D$..0O8'68H223CNI' )H#+++ 
 &--a0F!... !'!4!4Q!7!B!BJ((1,D 3 346 ,2+>+>K"LL{/E/EF ,? ..		110=? A !*;^ : ---##(=(=(F(F(L(L'MM']002Z^C
--22!33>>
 *-335	$$q(LL3T5K5KMLL!19= IbMW$<!+A!4!4!6B!GJ%%d:&67++-Y  	J((%1 **HIK	Z    !F!&!9!95B..CDF[; ;PQ; ; ;si   5W" "+Z&>Y CY #Y $Z&%Y 'Z&"X=-AX88X= Z#AZZ&Z##Z&&Z7	c                rk   rl   r   rE   rG   r   r    r          4 r!   c                &    V P                  4        R # T)r  rn   r&   r   !_command_toggle_input_mode_on_offZ5TypingBoosterEngine._command_toggle_input_mode_on_off  s    
 	 r!   c                rk   rl   r   rE   rG   r   r    r  %        T r!   c                r  r  )r  rn   r&   r   _command_speech_recognitionZ/TypingBoosterEngine._command_speech_recognition%      
 	  "r!   c                rk   rl   r   rE   rG   r   r    r  -  s       r!   c                    V P                   P                  \        P                  \        P                  \        P
                  \        P                  39   d   R # V P                  RR7       V P                  4        R# )Fr[  rK  T	r;  r   r|   r   r   r   r   rV  r  rn   r&   r   _command_next_case_modeZ+TypingBoosterEngine._command_next_case_mode-  sf    
 $$ 00 44 // 33	)5 5
 F+))+r!   c                rk   rl   r   rE   rG   r   r    r  <  s      T r!   c                r  )Fr]  rK  Tr  rn   r&   r   _command_previous_case_modeZ/TypingBoosterEngine._command_previous_case_mode<  sf    
 $$ 00 44 // 33	)5 5
 J/))+r!   c                rk   rl   r   rE   rG   r   r    r  K  s     C C Cr!   c                sR   V P                   '       d   V P                  R R7       R # V P                  4       '       d   V P                  '       g   V P                  P
                  \        P                  8w  dY   V P                  P                  4       '       g%   V P                  '       g   V P                  '       d   V P                  4        R # R# V P                  '       Ed   V P                  P
                  \        P                  8X  d   V P                  P                  4       '       dI   V P                  P                  R4       V P                  P                  ^ 4       V P!                  4        R # \        P"                  V P                  n        V P                  P%                  4        V P                  P                  R4       V P!                  4        V P'                  4        . V n        R # V P*                  ^8  d   \,        P/                  R4       . V n        V P1                  4        V P3                  4       '       d   V P5                  4        R # V P'                  4        R # V P6                  P8                  '       Ed   V P                  P
                  \        P:                  8X  Ed   V P                  P                  4       '       dI   V P                  P                  R4       V P                  P                  ^ 4       V P!                  4        R # V P*                  ^8  d   \,        P/                  R4       \        P"                  V P                  n        V P<                  '       g   V P>                  ^8  d.   V P                  P@                  '       d   RV P                  n         V PB                  ^ ,          R8X  d   V PD                  RV PF                   pV\I        \J        PL                  4      ) R \J        PL                  8X  dy   V P*                  ^8  d   \,        P/                  R4       VR\I        \J        PL                  4      )  pVV PD                  V PF                  R ,           V n"        \I        V4      V n#        V PO                  4        MqV PD                  RV P6                  PP                   V PD                  V PF                  R ,           V n"        V P6                  PP                  V n#        V P1                  4        \R        PT                  ! 4       V n        V P5                  4        R # V P                  P                  4       '       d{   V P                  P                  R4       V P                  P                  ^ 4       V PW                  V PY                  4       R 4       V PZ                  '       g   V P!                  4        R # V P                  P
                  \        P\                  8X  g   V P^                  R8w  d   RV n/        V P5                  4        R # V P<                  '       g   V P>                  ^8  d   V P`                  '       g   V P                  P@                  '       d   V P                  P                  4       '       dw   RV P                  n         V P                  P%                  4        V P                  P                  R4       V P!                  4        V P'                  4        . V n        RV n/        R # V P                  4        V P5                  4        R # )	Tcommit_selectionFzCompose sequence cancelled.z#Cancel m17n candidates lookup tabler  N-ja-anthy: removing itb_util.ANTHY_HENKAN_WIDErZ  )1r  _ollama_chat_query_cancelr  r+  r;  r   r|   r   r   r  r  rV  r   r   r   r   r  r   r   r   r7  r  r3   r!  r  r  r  r*  r7  r   r  r  r   r  r,  r-  r  rh  r  r  r  r(  r)  rd  rn  r  r   r9  rr  )rP   typed_string_up_to_cursorrQ   r   _command_cancelZ#TypingBoosterEngine._command_cancelK  s   
 )))**D*AMMOO000""((,<,K,KK"";;==333444 //1'''!!''+;+O+OO%%7799 &&99%@&&55a8557+;+B+B""(""((*""55e<113$$&#%   1$:;+-D(//1""$$!  $$&""---""((,<,L,LL!!3355 ""55e<""11!4113  1$BC'7'>'>D$!!!T%<%<q%@&&55549""1!!!$
2 &&'A(A(AB *-X77889;112 ((1,KM0I9#h88991;- 2,,T-F-F-GHI & 144M0ND-446 &&?//??A(()B)B)CDE "
 **:: )335%2%G%G%ID"OO//11 11%8--a0$$T%:%:%<dC333113$$(8(K(KK&&&0&,D#OO!8!81!<LLL""111"";;== 16D-$$&11%8--/  "!D&,D#'')r!   c                rk   rl   r   rE   rG   r   r    r    s     c c cr!   c                s
   V P                   '       d   \        P                  R 4       R# V P                  '       Ed   V P                  P
                  \        P                  8X  d   R# V P                  P                  V P                  V P                  P                  4       4      p. V n        V P                  P                  4        V P                  P                  R4       V EF  pV P                  P                  V P                  V,           4      pV'       g   K:  V P                  P!                  \"        P$                  ! V^ RRRR7      4       V P                  P'                  V4      pV P                  P)                  4       \*        P,                  P.                  8X  d   VRV,           ,          pMVRV,           ,          pV P                  P)                  4       \*        P,                  P.                  8X  d{   \1        V4      ^8  d)   VR,          pV F  pVR\3        V4      R 2,          pK  	  \1        V4      ^8X  d3   VR\4        P6                  ! V4      P9                  4       ,           ,          pV P;                  VR	7       EK  	  R
V P                  n        \        P                  V P                  n        V P?                  4        R
# V P@                  PB                  '       Ed   V P@                  PD                  '       g   V PF                  ^ ,          R8X  EdV   V P                  P
                  \        PH                  8X  d   V PF                  ^ ,          R8w  d   R# V PJ                  ^8  d   \        PM                  R4       V PN                  '       d(   \P        PR                  ! V PN                  4       ^ V n'        R
V P                  n        \        PH                  V P                  n        V P?                  4        V P                  P                  R
4       R
V n*        V PF                  ^ ,          R8X  d   V PW                  4        RV n*        V PY                  V P[                  4       R
4       R
# V P\                  '       g.   V P^                  ^8  dr   V P                  P`                  '       gV   V P                  P<                  '       g:   V Pc                  4       '       g$   R
V P                  n        V Pe                  4        R
# R# )z2enable_lookup command ignored because OSK is used.FrC   rG  z   	r2  z  	 U+r1  rl  Tr  zEnabling m17n lookup table)3rr  r3   r{  r+  r;  r   r|   r   r  Zfind_compose_completionsr  keyvalsr7  r   r   composer;  rh  rR  Zlookup_representationr   r   r   ZVERTICALr  r6  rP  r~   r   rB  r   r  r*  r7  candidate_showr  r   r  r!  r  r   r  r  _command_select_next_candidaterd  rn  r  r  r   r  r  )rP   Zcompose_completionsZcompose_completionr  Ztext_for_lookup_tablechar   &     r   _command_enable_lookupZ*TypingBoosterEngine._command_enable_lookup  s   
 <<<KKLM'''!!''+;+O+OO''@@00--5579    "D$$&11%8&9"!%!8!8!@!@003EE"G!>$$++ 44#1&'$&).+023 //EE.0 * **::<++445->1II--~1EE-**::<++445~.21V;1(6 53s4yo9N N 5 )7~.!31S;;K;K .<00568 81::4 ; 69 ':< 15D-'7'K'KD$--/""---''666&&q)Z7""((,<,L,LL&&q)Z7   1$9:&&&
 ""4#:#:;*+'04D-'7'G'GD$--/ 11$7/3D,!!!$
2335380$$T%:%:%<dC((1,''DDD&&555MMOO04D- OOr!   c                rk   rl   r   rE   rG   r   r    r  5  s     	 	t 	r!   c                F    \         P                  ! V P                  4       R # r  )r   idle_add#_selection_to_preedit_get_selectionrn   r&   r   _command_selection_to_preeditZ1TypingBoosterEngine._command_selection_to_preedit5  s     	d>>?r!   c                rk   rl   r   rE   rG   r   r    r  @  s     W WT Wr!   c                s  a a R oS P                   '       d   S P                  P                  P                  4       '       g'   S P                  ^8  d   \
        P                  R4       S P                  ^8  d!   \
        P                  RS P                  4       S P                  P                  pS P                  P                  pS P                  P                  p\        W#4      p\        W#4      pWV o\
        P                  RS4       SR 8w  Edb   XX8  d'   S P                  \        S4      ) \        S4      4       MS P                  ^ \        S4      4       S P                  \         P"                  P%                  R 4      ^ R\         P&                  P(                  4       S P*                  P,                  P/                  R4      '       Ed   XRV P1                  4       '       Egx   \
        P                  R4       \2        P4                  ! S P6                  4       S P9                  \         P:                  \         P<                  P>                  R7       S P9                  \         P:                  \         P<                  P>                  \         P<                  P@                  ,          R7       S P9                  \         PB                  \         P<                  P>                  R7       S P9                  \         PB                  \         P<                  P>                  \         P<                  P@                  ,          R7       \2        P4                  ! S P6                  4       S PE                  S4       R	# S P                  ^8  d   \
        P                  R
4       \F        PH                  ! 4       o\
        P                  RS4       SR 8w  d   \J        PL                  ! VV 3R l4       R	# )rC   ,Surrounding text not set since last trigger.r  zselection_text=%rTrO  NrP  rQ  FHSurrounding text not supported or failed. Fallback to primary selection.c                  s&   < SP                  S 4      # r"   )"_selection_to_preedit_open_preeditselection_textrP      r   ra  ZITypingBoosterEngine._selection_to_preedit_get_selection.<locals>.<lambda>  s    77Gr!   )'rs  rQ  rK   rN   r  r3   r  r!  r   rI   rJ   r  r  rF  r  rn  r   r   r   r   r  r  ru   rS  r:  r7  r8  r  r[  r\  r;  r]  r^  r_  r  rh  get_primary_selection_textr   r  )rP   r   rI   rJ   selection_startselection_endr   s   f     @r   r  Z7TypingBoosterEngine._selection_to_preedit_get_selection@  s    $$$))//6688$$q(NNFH  1$8!335))..D//::J//::J!*9O
7M!-@NLL,n=RJ&,,((#n*=? ,,QN0CD ..		))"-q$%%,,. !!..99*EE[j)//11$ 23 

499:11JJ):):)G)G 2 I11JJ%%2243D3D3Q3QQ 2 S 11JJ):):)G)G 2 I11JJ%%2243D3D3Q3QQ 2 S 

499:33NCq LL : ;!<<>(.9 RMM H Ir!   c                r!  )r   r   r   r  rE   rG   r   r    r    s     	 	 	 	r!   c                sz    V P                  4        V P                  \        V4      4       V P                  4        R # r8   )r  r  r  r  )rP   r   re   r   r  Z6TypingBoosterEngine._selection_to_preedit_open_preedit  s0     	%%d>&:;r!   c                rk   rl   r   rE   rG   r   r    r    s     	 	d 	r!   c                r  r  )r   r  "_show_selection_info_get_selectionrn   r&   r   _command_show_selection_infoZ0TypingBoosterEngine._command_show_selection_info  s     	d==>r!   c                rk   rl   r   rE   rG   r   r    r    s     = =D =r!   c                s  a aa R oR oS P                   '       Ed   S P                  P                  P                  4       '       g'   S P                  ^8  d   \
        P                  R4       S P                  ^8  d!   \
        P                  RS P                  4       S P                  P                  pS P                  P                  pS P                  P                  p\        W#4      p\        W#4      pWV oVRV oS P                  ^8  d   \
        P                  RSS4       SR 8w  d   \        P                  ! VV 3R l4       R# S P                  ^8  d   \
        P                  R4       \        P                   ! 4       o^pSR 8w  d   \        P"                  ! VVV 3R l4       R# SR 8w  d   \        P"                  ! VV V3R	 l4       R# )
rC   r  r  Nz(selection_text=%r text_left_of_cursor=%rc                  (   < SP                  S S 4      # r"   $_show_selection_info_show_candidatesr  r  r   ra  HTypingBoosterEngine._show_selection_info_get_selection.<locals>.<lambda>      990r!   Fr  c                  r  r"   r  r  r  r   ra  r
    r  r!   c                  s(   < S P                  R S4      # ry   r  )rP   text_left_of_cursorr  r   ra  r
    s    99')r!   )rs  rQ  rK   rN   r  r3   r  r!  r   rI   rJ   r  r  r   r  rh  r  r  )	rP   r   rI   rJ   r  r  r  r   r  	   f      @@r   r  Z6TypingBoosterEngine._show_selection_info_get_selection  s     $$$))//6688$$q(NNFH  1$8!335))..D//::J//::J!*9O
7M!-@N #'{
"3  1$G+-@BRMM 0 1 q LL : ;!<<> RU01 "$U)* r!   c                ,   < V ^8  d   QhRS[ RS[ RS[/# )r   r   text_to_analyzer   r  rE   rG   r   r    r    s*     P P"%P8;P@DPr!   c           
     s   V P                   ^8  d   \        P                  RW4       VR8X  d   R# \        V4      p\        '       d   \
        P                  ! RV4      pVR8X  d   VRR pV P                  '       d*   V P                  P                  4       V P                  8w  d=   \        P                  ! V P                  V P                  V P                  R7      V n        . pRpRpV EF  pV P                  P                  V4      p\        V4      ^8X  de   RV R\!        V4      R	 R
V 2p	T	p
VP#                  \$        P&                  ! W,           V
R7      4       Wi,          pVR\!        V4      R	 2,          pK  RV 2p	V'       d   V	R
V 2,          p	T	p
VP#                  \$        P&                  ! W,           V
R7      4       \)        V4       F  w  rV P                  P                  V4      pRV R\!        V4      R	 2p	V'       d   V	R
V 2,          p	V\        V4      ^,
          8  d   RV	 2p
MRV	 2p
VP#                  \$        P&                  ! W,           V
R7      4       Wi,          pVR\!        V4      R	 2,          pK  	  EK  	  V'       g)   V P                   ^8  d   \        P                  R4       R# VP#                  \$        P&                  ! W,           \$        P*                  ! V^(R7      R7      4       VP#                  \$        P&                  ! W,           \$        P*                  ! V^(R7      R7      4       W@n        V P.                  P1                  4        V P.                  P3                  R4       V P,                   F   pV P5                  RVP6                  R7       K"  	  \8        P:                  V P.                  n        V P?                  4        R# )re  z$selection_text=%r text_to_analyze=%rrC   Fz\XNrX  t    r  r1  r2  r   r-  u    ├─u    └─zNo candidates found.r3  rN  ) r  r3   r!  r  USING_REGEXr  Zfindallr  rT  r  r"  r#  r  r  r~   r  r6  r;  rh  rR  r6  r8  r7  r;  r   r   rB  r-  r|   r   r   r  )rP   r   r  Zgrapheme_clustersr7  Zcode_point_list_phraseZfull_breakdown_phraseZclusterr~   r   r-  r   r  r  s   &&&           r   r	  Z8TypingBoosterEngine._show_selection_info_show_candidates  s    q LL?':b  1; "

5/ B R 1"# 6 """!!//1T5K5KK!*!7!700!%!7!7#'#4#4"6D 
!# "(G%%**73D7|q !'#c'l3-?qG !!(">">)2G#E F%/%&CGS/A*BB&gY'FAdV*$Gh::%.A B(1))..t4!$s3t9S/:$j(F3w<!++ 'x0G 'x0G!!(">">)2G#E F%/%&CD	#*??&  2! ):   1$34(66!:))&278 	9 	(66!9))%"67 	8 &  "--e4))I229#4#4 3 6 * $4#B#B ))+r!   c                rk   rl   r   rE   rG   r   r    r  @  s      D r!   c                s\    V P                   '       g   R # . V n        V P                  4        R# r  )r  r  _ai_chatrn   r&   r   _command_ai_chat_start_newZ.TypingBoosterEngine._command_ai_chat_start_new@  s'     ### "r!   c                rk   rl   r   rE   rG   r   r    r  O  s      4 r!   c                sN    V P                   '       g   R # V P                  4        R# r  )r  r  rn   r&   r   _command_ai_chat_continueZ-TypingBoosterEngine._command_ai_chat_continueO  s     ###r!   c                rD   r   r)   rE   rG   r   r    r  \  s     (0 (0$ (0r!   c           
     sV   \         '       d   \        P                  R \         4       R# V P                  R8X  d   \        P                  R4       R# \        P
                  ! 4       V n        V P                  P                  4       R9  d   RV n        \        P                  R4       R# V P                  P                  4       R8X  d   RV n        V P                  P                  4       R8X  d   RV n        V P                  P                  V P                  4      '       g   \        P                  \        P                  P                  \        P                  P                  \         4      R	4      R
V P                   .p \#        \        P$                  R4      ;_uu_ 4       p\&        P(                  ! VVVVRR7      pRRR4       R# \.        P0                  ! V P2                  4       R#   + '       g   i     R# ; i  \*         d"   p\        P-                  RY4        Rp?R# Rp?ii ; i)u"   “import itb_ollama” failed: %rNrC   zollama model is not set.ollamaramalamaz#Failed to connect to ollama server.u   🦙🔵u   🦙🔴zollama_pull.pyz--modelZwbT)ZstdoutZstderrZstdinZstart_new_sessionzException when calling %r: %s)r  r  )IMPORT_ITB_OLLAMA_ERRORr3   r4   r  
itb_ollamaZItbOllamaClientr  Z
get_serverr  Zis_availabler0   r  r  r  r|  r  r  Zopendevnullr  r  r9   r  r   r  _ai_chat_get_prompt)rP   r  r  r'   r4   r  r   r  ZTypingBoosterEngine._ai_chat\  s    #"LL46MO#LL34(88:))+3II"&DLL>?))+x7(2D%))+z9(2D%""//0B0BCC~~ww||77??846FH T%7%7$8;GE"**d++w"((&&%*.0A , d../ ,+   E  3WE EEs6   >"G<  G(<G< (G9	3G< 9G< <H(H##H(c                rk   rl   r   rE   rG   r   r    r    s     P PT Pr!   c                s~  a aa R oS P                   '       d   S P                  ^8  d!   \        P                  RS P                  4       S P                  P
                  pS P                  P                  pS P                  P                  p\        W#4      p\        W#4      pWV oSR 8w  d>   S P                  4        S P                  4        \        P                  ! VV 3R l4       R# S P                  ^8  d   \        P                  R4       \        P                  ! 4       o^pSR 8w  d?   S P                  4        S P                  4        \        P                   ! VVV 3R l4       R# S P                  ^8  d   \        P                  R4       S P                   '       g   \        P#                  R4       R# S P                  ^8  d!   \        P                  RS P                  4       S P                  P
                  RS P                  P                   P%                  R	4      R,          oS P&                  P(                  R 8w  dY   SP+                  S P&                  P(                  4      '       g   SS P&                  P(                  ,          oS P-                  4        \        P                   ! VVV 3R
 l4       R# )rC   r  c                  r  r"   _ai_chat_queryr  r  r   ra  9TypingBoosterEngine._ai_chat_get_prompt.<locals>.<lambda>  s    --,n>r!   Fz[Surrounding text not supported or failed to get a selection. Fallback to primary selection.c                  r  r"   r  r  r  r   ra  r    s    !00!/Ar!   z(Could not get a selection by any method.z:Surrounding text not supported, giving up to get a prompt.Nr4  c                  s(   < SP                  R S 4      # ry   r  )promptrP   r  r   ra  r    s    (;(;B(Gr!   rN  )rs  r  r3   r!  rQ  r   rI   rJ   r  r  r  ra  r   r  rh  r  r  r4   ri   r  r   r%  r  )	rP   r   rI   rJ   r  r  r  r  r   r  r   r  Z'TypingBoosterEngine._ai_chat_get_prompt  s3    $$$  1$8!335))..D//::J//::J!*9O
7M!-@NR ""$MM > ? q LL12 "<<>R ""$ UAB q LLCD(((LLLNq LL4d6L6LM'',,.T##..005dB@%%.."4??4#=#=#F#FGG$44===&&( GHr!   c                r  )r   r   r  r   r  rE   rG   r   r    r    s"     + +S +# +$ +r!   c                s   V P                   ^8  d   \        P                  RW4       V P                  '       d   V P                  P                  4       '       d   RP                  V P                  P                  V4      .4      pV P                  \        P                  P                  V P                  P                  4        V P                   R\        V P                  4       RV P                    RV 24      R4       M/V P                  \        P                  P                  R4      R4       VR8X  dH   \"        P$                  ! ^4       V P                  \        P                  P                  R4      R4       R# V P&                  ^ 8X  d   . M V P                  V P&                  ) ^,          R V n        Wn        R	R
RV/V n        V P,                  '       d   V P,                  P/                  4        \0        P2                  ! RV P4                  R	RRV P6                  /.\8        P:                  ! V P                  4      ,           V P*                  .,           V P,                  3R7      V n        V P<                  P?                  4        R# )re  zselection_text=%r prompt=%rr4  [] TrC   FNroler  r   Zsystem)Zdaemonrz  r,   ) r  r3   r!  r  r  r:  r|  r  fillri  r   r   r   r  r  r  r  r7  r8  r  r  r  r  r   rL   rX  "_ollama_chat_query_thread_functionr  rR   r  r  rY  )rP   r   r  Zwrapped_promptr  r   r  Z"TypingBoosterEngine._ai_chat_query  s#    q LL6O 7 7 = = ? ?!YY(@(@(E(Ef(M'NON &&		))..4467001D11232d6H6H5I%&() +/0 &&		))"-u6R< JJqM&&tyy'@'@'DeL**a/B&&(@(@'@1'D'FG 	 '5#%vy&A"""##))+)2)9)9::Hi1H1HIJMM$"7"789(()* ))+*,& 	&&,,.r!   c                sd   < V ^8  d   QhRS[ S[S[S[3,          ,          RS[P                  RR/# )r   messages
stop_eventr   N)r   r   r   rL   rM   rE   rG   r   r    r     s?     #L #L4S>*#L "#L -1#Lr!   c                s   V P                   ^8  d   \        P                  RV4       V P                  f   \        P	                  R4       R# RV n         V P                  P                  V P                  VRR7      p\        P                  R4       V EF  pVP                  4       '       d   \        P                  R4        M\        V\        4      '       d   R	V9   d   VP                  R	4      p\        V\        4      '       d   \        V4      ^ 8  dz   V^ ,          p\        V\        4      '       d[   R
V9   dT   VR
,          p\        V\        4      '       d5   RV9   d.   VR,          pVe!   V ;P
                  VR,          ,          un        \        P                   ! V P"                  4       EK!  	  V P
                  P%                  4       V n        \        P                   ! V P"                  4       \        P                   ! V P&                  4       R#   \(         dL   p	\        P	                  RT	4       \        P                   ! T P*                  \-        T	4      4        Rp	?	R# Rp	?	ii ; i)re  zStarting ollama chat stream %rNzOllama client not connected.rC   T)r$  r  zOllama chat stream started.z$Ollama chat stream stopped by event.choicesdeltar   zError in ollama chat stream: %s)r  r3   r!  r  r4   r  Zchatr  r{  rN   rc  r  r<  r  r  r   r  "_ollama_chat_query_update_responser:   _ollama_chat_query_finalize_chatr9   _ollama_chat_query_handle_errorr   )
rP   r$  r%  r  Zchunkr&  Zchoice0r'  r   r4   r  r   r#  Z6TypingBoosterEngine._ollama_chat_query_thread_function   s   
 q LL98D&LL78 "	L((--""Xd . DFKK56$$&&KK FGeT**yE/A#ii	2G!'400S\A5E")!*%gt44G9K$+G$4E)%669;M*/	*:#*#6$($9$9U9=M$M$9dEEF   %)$9$9$?$?$AD!MM$AABMM$??@ 	LLL:EBMM$>>E
KK	Ls   GH I.#A I))I.c                rk   rl   r   rE   rG   r   r    r  *   s     $ $D $r!   c           	     s   V P                   R 8X  d   \        P                  ! 4       pVP                  \        P                  ! V P
                  ^ \        V P                  4      4      4       \        P                  P                  V P                  4      pVP                  V4       V P                  V\        V P                  4      R\        P                  P                  4       R# V P                   R8X  EdH   RpV P                  '       dm   V P                  P!                  4       '       dM   V P                  P!                  4        V P"                   R\        V P$                  4       RV P&                   R2pRP)                  V P                  P+                  4        Uu. uF  pV P,                  P/                  V4      NK   	  up4      p^
pVP+                  4       p\        V4      V8  d   RP)                  R.Wv) R	 ,           4      pV P1                  \        P                  P                  W5,           4      R4       R# \2        P5                  R
V P                   4       R# u upi )r  TFr  rC   r  r   r4  u   […]N(Invalid self._ollama_response_style = %r)r  r   r9  r;  r  r  r  r  r   r   r@  rn  r   r   r  r  r:  r  r  r  r|  
splitlinesr  r"  ri  r3   r4   )rP   rA  Z	ibus_textZ
aux_prefixlineZ	aux_linesZmax_aux_lines_streamZaux_lines_splitr  r   r(  Z6TypingBoosterEngine._ollama_chat_query_update_response*   s    &&)3MMOELL00''C0E0E,FH I		11$2G2GHI$$U+..3t445t%%++- &&%/JD$;$;$A$A$C$C..4467001D11232d6H6H5IM  		!22==?#A?T $(#;#;#@#@#F?#A BI#% '224O?#&:: III0E0F GGI	&&		))**@A ?00	2#As   $I!c                rk   rl   r   rE   rG   r   r    r  P   s      $ r!   c                s&   V P                   ^8  d!   \        P                  RV P                  4       V P                  R8X  d2   V P                  \        P                  P                  R4      R4       R# V P                  R8X  d   V P                  P                  R4      '       dF   \        P                  ! RRV P                  \        P                  R7      P                  4       V n        T P                  \        P                  P                  R	P                  V P                  P!                  4        Uu. uF  pV P"                  P%                  V4      NK   	  up4      4      R
4       R# \        P'                  RV P                  4       R# u upi )re  zself._ollama_response=%rr  rC   Fr  Zdeepseekz<think>.*?</think>)Zflagsr4  Tr+  )r  r3   r!  r  r  ri  r   r   r   r  rS  r  ZsubZDOTALLr:  r|  r,  r  r"  r4   )rP   r-  rQ   r   r)  Z4TypingBoosterEngine._ollama_chat_query_finalize_chatP   sC    q LL3T5J5JK&&)3&&tyy'@'@'DeL&&%/!!,,Z88(*)2)))<<AEG % &&		))II%)%:%:%E%E%GI%GT 1166t<%GIJK  ?00	2Is   6$Fc                r!  )r   r  r   r  rE   rG   r   r    r  k   s      S T r!   c                s  < \         P                  R V4       RV n        \        SV `  \
        P                  P                  V P                   4      4       V P                  \
        P                  P                  R4      ^ R\
        P                  P                  4       V P                  \
        P                  P                  R4      R4       R# )zOllama chat error: %sTrC   F)r3   r4   r  r  r'  r   r   r   r  rn  r   r  ri  )rP   r  r     &&r   r*  Z3TypingBoosterEngine._ollama_chat_query_handle_errork   s     	,m<(,%DII55**+. 	/**II%%b)1d!!((	* 	""499#<#<R#@%Hr!   c                r[   )r   r  r   Nr   rE   rG   r   r    r  {   s     > >$(>48>r!   c                s*  < \         P                  R 4       V P                  '       g   R# V P                  '       g   R# V P                  P	                  4       '       dO   V P                  P                  4        V P                  P                  4        V P                  P                  4        RV n        V'       d8   \        SV `%  \        P                  P                  V P                   4      4       \        P                  ! V P                   4       R# )zOllama chat cancel.N)r3   r{  r  r  is_aliverO   r|  r   r  r'  r   r   r   r  r   r  !_ollama_chat_query_cancel_hide_ui)rP   r  r  r.  r   r  Z-TypingBoosterEngine._ollama_chat_query_cancel{   s    
 	)*---&&&))2244##'')**//1##))+)-&G		 9 9../!2 3d<<=r!   c                rk   rl   r   rE   rG   r   r    r     s     
 
4 
r!   c                s    V P                  \        P                  P                  R 4      ^ R\        P                  P
                  4       V P                  \        P                  P                  R 4      R4       R# )rC   TF)rn  r   r   r   r   r  ri  rn   r&   r   r0  Z5TypingBoosterEngine._ollama_chat_query_cancel_hide_ui   s[     	**II%%b)1d!!((	* 	""499#<#<R#@%Hr!   c                r  rI  rJ  rE   rG   r   r    r     s!     2 2(2C2C 2 2r!   c                s  < V P                   '       g   R # V P                  VR.R7      w  r#V'       d   V# V P                   P                  4       '       d   R# VP                  \        P
                  \        P                  \        P                  \        P                  \        P                  \        P                  \        P                  \        P                  \        P                  \        P                  \        P                  39   d   R# RV n         V P                   '       d
   R V n        R# V P"                  P%                  V P&                  4       V P"                  P%                  RRRV P(                  /4       VP*                  '       d9   \,        SV `]  \        P0                  P3                  V P(                   4      4       MVP4                  '       d9   \,        SV `]  \        P0                  P3                  V P6                   4      4       ME\,        SV `]  \        P0                  P3                  V P6                   RV P(                   24      4       V P9                  \        P0                  P3                  R	4      ^ R\        P:                  P<                  4       V P?                  \        P0                  P3                  R	4      R 4       R # )
FcancelcommandsTNr!  Z	assistantr   r4  rC   ) r  _handle_hotkeysr/  rS  r   KEY_Shift_RKEY_Shift_LKEY_ISO_Level3_ShiftKEY_Control_LKEY_Control_R	KEY_Alt_L	KEY_Alt_R
KEY_Meta_L
KEY_Meta_RKEY_Super_LKEY_Super_Rr  r  r;  r  r  rU  r  r'  r   r   rV  r  rn  r   r  ri  )rP   rp  rZ  return_valuer  s   &&  r   _ollama_chat_query_process_keyZ2TypingBoosterEngine._ollama_chat_query_process_key   s    --- $ 4 4SH: 4 N))2244 GG((((11****((((
* 
* )-&(((,1D)$$T%8%89$$[)T-B-BC	E;;;G		 9 9(()!, -XXXG		 9 9../!2 3 G		 9 9../r$2G2G1HI!K L**II%%b)1d!!((	* 	""499#<#<R#@%Hr!   c                rk   rl   r   rE   rG   r   r    r     s      D r!   c                s   V P                  4       p\        V4      ^8  d   V P                  pRV P                  9   d   RpV P	                  VR,          VR,          ,           VR7       V P                  4       '       df   V P                  \        P                  P                  V P                  4       ^ ,           4      R4       V P                  V P                  4       R4       R# R# )re  rY  Frf  rd  rH  Trz  r  r  r  ry  r  ri  r   r   r   rd  rn  r  re  r   _command_next_input_methodZ.TypingBoosterEngine._command_next_input_method   s    
 $$&t9q=!AA 9 99#( !!R48#!1 " 3 }}**II--1F1F1H1K0LN (()>)>)@%Hr!   c                rk   rl   r   rE   rG   r   r    r     s       r!   c                s   V P                  4       p\        V4      ^8  d   V P                  pRV P                  9   d   RpV P	                  VRR VRR ,           VR7       V P                  4       '       df   V P                  \        P                  P                  V P                  4       ^ ,           4      R4       V P                  V P                  4       R4       R# R# )re  rY  FNrH  TrN  rB  r  re  r   _command_previous_input_methodZ2TypingBoosterEngine._command_previous_input_method   s    
 $$&t9q=!AA 9 99#( !!RS	D"I%!1 " 3 }}**II--1F1F1H1K0LN (()>)>)@%Hr!   c                rk   rl   r   rE   rG   r   r    r  !  s      $ r!   c                s    V P                  4       p\        V4      ^8  d@   RpRV P                  9   d   RpV P                  VR,          VR,          ,           VR7       R# R# )re  TrU  Frf  rd  rH  r{  r  r  r  rP   r  rI  re  r   _command_next_dictionaryZ,TypingBoosterEngine._command_next_dictionary!  sg    
 ))+u:>  $t888#( %%b	E"I%!1 & 3 r!   c                rk   rl   r   rE   rG   r   r    r  !  s      d r!   c                s    V P                  4       p\        V4      ^8  d8   RpRV P                  9   d   RpV P                  VRR VRR ,           VR7       R# R# )re  TrU  FNrH  rN  rE  rF  re  r   _command_previous_dictionaryZ0TypingBoosterEngine._command_previous_dictionary!  si    
 ))+u:>#t888#( %%bc
U3BZ'!1 & 3 r!   c                rk   rl   r   rE   rG   r   r    r  $!  s       r!   c                *   V P                   P                  '       d5   V P                   P                  '       g   V P                  ^ ,          R8w  g!   V P                  P                  4       '       g   R# V P                  4       pV P                  4        R# r    r  FT)r*  r7  r  r  r;  r   r^  r  rP   Z_dummyrQ   r   r  Z2TypingBoosterEngine._command_select_next_candidate$!  sp    
 ##...''666##A&*4&&??AA!!#))+r!   c                rk   rl   r   rE   rG   r   r    r  2!  s      D r!   c                rI  rJ  )r*  r7  r  r  r;  r   r`  r  rK  rQ   r   "_command_select_previous_candidateZ6TypingBoosterEngine._command_select_previous_candidate2!  sn    
 ##...''666##A&*4%%>>@@!))+r!   c                rk   rl   r   rE   rG   r   r    r  @!  s       r!   c                rI  rJ  )r*  r7  r  r  r;  r   rb  r  rK  rQ   r   _command_lookup_table_page_downZ3TypingBoosterEngine._command_lookup_table_page_down@!  sn    
 ##...''666##A&*4%%>>@@"))+r!   c                rk   rl   r   rE   rG   r   r    r  N!  s      t r!   c                rI  rJ  )r*  r7  r  r  r;  r   rc  r  rK  rQ   r   _command_lookup_table_page_upZ1TypingBoosterEngine._command_lookup_table_page_upN!  sm    
 ##...''666##A&*4%%>>@@))+r!   c                rk   rl   r   rE   rG   r   r    r  \!  s      $ r!   c                r  r  )r  rn   r&   r    _command_toggle_emoji_predictionZ4TypingBoosterEngine._command_toggle_emoji_prediction\!  s    
 	))+r!   c                rk   rl   r   rE   rG   r   r    r  d!  r  r!   c                r  r  )r  rn   r&   r   _command_toggle_emoji_styleZ/TypingBoosterEngine._command_toggle_emoji_styled!  s    
 	!r!   c                rk   rl   r   rE   rG   r   r    r  l!  s      D r!   c                    R V n         R # r  )r  rn   r&   r   "_command_trigger_emoji_predictionsZ6TypingBoosterEngine._command_trigger_emoji_predictionsl!  s    
 -1)r!   c                rk   rl   r   rE   rG   r   r    r  t!  r  r!   c                rQ  r  )r  rn   r&   r   !_command_trigger_word_predictionsZ5TypingBoosterEngine._command_trigger_word_predictionst!  s    
 ,0(r!   c                rk   rl   r   rE   rG   r   r    r  |!  s       r!   c                r  r  )r  rn   r&   r   _command_toggle_off_the_recordZ2TypingBoosterEngine._command_toggle_off_the_record|!  s    
 	'')r!   c                rk   rl   r   rE   rG   r   r    r  !  s      d r!   c                r  r  )r  rn   r&   r   _command_toggle_ascii_digitsZ0TypingBoosterEngine._command_toggle_ascii_digits!  r  r!   c                rk   rl   r   rE   rG   r   r    r  !  s       r!   c                sR    V P                  4       '       g   V P                  4       # R # r8   )r  r  rn   r&   r   _command_lookup_relatedZ+TypingBoosterEngine._command_lookup_related!  s!    
 }}2244r!   c                rk   rl   r   rE   rG   r   r    r  !  s      D r!   c                sR    V P                   '       * V n         V P                  4        R # r  )r  r  rn   r&   r   _command_toggle_hide_inputZ.TypingBoosterEngine._command_toggle_hide_input!  s"    
  $///r!   c                rk   rl   r   rE   rG   r   r    r  !  s       r!   c                r  r  )r  rn   r&   r   _command_setupZ"TypingBoosterEngine._command_setup!  s    
 	r!   c                r[   )r   	directionr   Nr   rE   rG   r   r    r  !  s     { { { {r!   c           	     sn  < \         P                  R WP                  P                  4       V P                  '       d5   V P
                  \        P                  P                  P                  39   d   \         P                  R4       R# V P                  P                  R-9   g,   V P                  P                  P                  R4      '       d   \         P                  R4       R# V P                  4       '       d   V P                  '       d=   \         P                  R4       V P                  4        \         P                  R4       R# \         P                  RV P                  V P                   4       V P                   P"                  R8X  d)   V P$                  ^8  d   \         P                  R	4       R# V P                   P"                  pV P                   P&                  pV P                   P(                  pV P$                  ^8  d+   \         P                  R
V P                   \+        V4      4       W48w  d   \         P                  R4       R# TpRpVP-                  RR7       F)  p\/        V4      V8  d   V\/        V4      ,          pK'  Tp M	  VP1                  R4      '       d   VRR. p\         P                  RV\/        V4      V4       VP3                  4       '       g   \         P                  R4       R# VR8X  d!   Rp\        P4                  ! V4      '       d   Rp\         P                  RV4       RRRRRRR/RRRRRRR//pW,          R,          \        P4                  ! V4      8X  d   \         P                  RV4       R# V P7                  V) \/        V4      4       WeR p	. R/Op
RpV
 F  pW9  g   K  Tp M	  V'       g   \         P                  R4       R# \         P                  RV4       VRV  V WeR  2pW,          R,          p\9        W,          R,          4      p\9        W,          R,          4      pVP                  V4      '       d)   \         P                  RV4       VR,          pVR,          pV\        P4                  ! V4      8w  dU   \         P                  R V4       V V 2pV V 2pV\        P4                  ! V4      8w  d   \         P;                  R!4       R# \<        SV `}  \@        PB                  PE                  V4      4       RV n        \F        PH                  ! V PJ                  4       V P                  PL                  R"8X  d   \         P                  R#4       \@        PN                  pVR8X  d   \@        PP                  pV	 F\  p\         P                  R$V\R        PT                  ! V4      4       \R        PT                  ! V4      R09  g   KK  V PW                  V4       K^  	  R# V P                  PL                  R19   Ed   V P                  PL                  p\         P                  R'V4       VR%8X  d   \         P                  R(4       R# VR&8X  d   \         P                  R)4       R# \X        '       g   \         P                  R*4       R# \Z        P\                  P_                  V4      pVPa                  V4      pV^ 8  d   \         P                  R+4       R# \@        PN                  pVV\/        V4      ,           R pVR8X  d   \@        PP                  pVRV p\         P                  R,VVVV4       V F\  p\         P                  R$V\R        PT                  ! V4      4       \R        PT                  ! V4      R09  g   KK  V PW                  V4       K^  	  R# )2z@Trying to change line direction to %rself._client_info.client=%sz=Surrounding text not supported, cannot change line direction.Nlibreofficea  firefox, libreoffice, or google-chrome detected. Cannot change line direction in these programs. These programs already have their own support to change direction between RTL and LTR for the whole buffer, use this instead of changing the direction of single lines with typing booster.z"Committing pending input first ...zTo make the committed text appear in the surrounding text, another key event is needed. Therefore, a return is unfortunately necessary here and to really change the line direction, one has to press the keybinding again.zAself._commit_happened_after_focus_in=%r self._surrounding_text=%rrC   z5Surrounding text empty. Cannot change line direction.z'self._surrounding_text=%r list(text)=%rz%cursor_pos != anchor_pos, do nothing.T)Zkeependsr4  zCcurrent_line=%r len(current_line)=%d cursor_pos_in_current_line=%d z2Current line empty or whitespace only, do nothing.togglertlltrz-Current line needs to change direction to %r.addmarku   ‎
removemarku   ‏is_right_to_leftFz:Current_line already has desired direction %r, do nothing.z%Could not find suitable cursor markerzUsing cmarker=%rz)Wrong direction mark %r found, remove it.rf  zAdd direction mark %rz0Line direction still wrong, should never happen.rB  z.QIBusInputContext detected, correcting cursor.z%cursor correction char=%r category=%rgtk4-imgnome-shellz&%r detected, trying to correct cursor.uV   forward_key_event() does not work in “gtk4-im”, cursor correction cannot not work.zgnome-shell, i.e. wayland input in gnome wayland detected. Probably typing into some Gtk program. But correcting the cursor does not seem to work with gnome wayland input. uj   "import bidi.algorithm" didn’t work, no cursor correction possible. Try `pip install --user python-bidi`zHFailed to find cursor marker in new line. No cursor correction possible.zicurrent_line_with_cmarker=%r, new_line_with_cmarker=%r, cmarker_pos=%d cursor_correction_chars_display=%r)Zfirefoxzgoogle-chromesofficerN  )u   _�_u   _￼_u   _☺_☺_☺_)ZMn)gtk3-imra  rb  )1r3   r!  r  r]   rs  r  rh  rC  rD  r   rs   rS  r  r+  r  r%  rQ  r   r  rI   rJ   r  r,  r  r%  r:  r`  rF  r   r4   r  r'  r   r   r   r7  r8  r  rq   rG  rE  rP  categoryr[   IMPORT_BIDI_ALGORITHM_SUCCESSFULbidiZ	algorithmZget_displayr  )rP   rY  r   rI   rJ   Zcursor_pos_in_current_lineZcurrent_liner-  Z
directionsZcursor_correction_chars_logicalZmarkersZcmarkerZmarkerZcurrent_line_with_cmarkerr`  r_  r^  Zarrow_key_valuer  rq   Znew_line_with_cmarkerZcmarker_posZcursor_correction_chars_displayr  s   &&                     r   _change_line_directionZ*TypingBoosterEngine._change_line_direction!  s    	 3 1 1 8 8	: )))H$9$9$B$B$H$H#IILLOQ** /7 7  --88GGLL @ A }}$">">">LL=>&&(LLMN
  199++	- !!&&",  1$KM%%**++66
++66
q LLB//d=#LL@A%/"OOTO2D4y55*c$i7*L 3   &&',L-#l+&		(
 !!##LLMN I((66!	D	  Ix (&/ Ix (&.	

 !"45((67LLL $$''\):	<*67R*S'
 F)   LL@A'17789i789; 	" &01CD.|<=
j+I67"":..LLD#%'+L(A"(E%x88FFLL0':%Y|n5L+2)4M3N(O%8#<#<\#JJOPII%%l3	5/3,

4112&&)<<LLIJ"mmOE!"&..7D!;#7#7#=?''-W<55oF	 8h 	_ ((,QQ))33ILLA9MI% B CM) 5 6
 33;< $(NN$>$>)%+!/44W=KQ > ?"mmO.CCL()/++E!"&..2G [3"/LL > 3.$8: 8D!;#7#7#=?''-W<55oF	 8
 	r!   c                rk   rl   r   rE   rG   r   r    r  c"        d r!   c                (    V P                  R 4       R# )r]  Trh  rn   r&   r   ,_command_change_line_direction_left_to_rightZ@TypingBoosterEngine._command_change_line_direction_left_to_rightc"      ##E*r!   c                rk   rl   r   rE   rG   r   r    r  h"  ri  r!   c                rj  )r\  Trk  rn   r&   r   ,_command_change_line_direction_right_to_leftZ@TypingBoosterEngine._command_change_line_direction_right_to_lefth"  rm  r!   c                rk   rl   r   rE   rG   r   r    r  m"  s      t r!   c                rj  )r[  Trk  rn   r&   r   %_command_change_line_direction_toggleZ9TypingBoosterEngine._command_change_line_direction_togglem"  s     	##H-r!   c                rk   rl   r   rE   rG   r   r    r  t"  s      4 r!   c                z    V P                  4       '       d   V P                  '       g   R # V P                  4        R# r  r  r+  r}  rn   r&   r   _command_commit_raw_inputZ-TypingBoosterEngine._command_commit_raw_inputt"  ,    
 ==??4#?#?#? r!   c                rk   rl   r   rE   rG   r   r    r  ~"  s      4 r!   c                rp  r  rq  rn   r&   r   )_command_commit_raw_input_and_forward_keyZ=TypingBoosterEngine._command_commit_raw_input_and_forward_key~"  rs  r!   c                rk   rl   r   rE   rG   r   r    r  "  s       r!   c                rp  r  r  r+  r  rn   r&   r   _command_commitZ#TypingBoosterEngine._command_commit"  ,    
 ==??4#?#?#?""$r!   c                rk   rl   r   rE   rG   r   r    r  "  s       r!   c                rp  r  ru  rn   r&   r   _command_commit_and_forward_keyZ3TypingBoosterEngine._command_commit_and_forward_key"  rw  r!   c                rk   rl   r   rE   rG   r   r    r  "       8 8T 8r!   c                (    V P                  ^ RR7      # )r    rC   r  r,  rn   r&   r   _command_commit_candidate_1Z/TypingBoosterEngine._command_commit_candidate_1"      
 %%aB%77r!   c                rk   rl   r   rE   rG   r   r    r  "       9 9 9r!   c                rz  )r    r2  r{  r|  rn   r&   r   &_command_commit_candidate_1_plus_spaceZ:TypingBoosterEngine._command_commit_candidate_1_plus_space"      
 %%aC%88r!   c                rk   rl   r   rE   rG   r   r    r  "       ) )T )r!   c                s$    V P                  ^ 4      # r  r  rn   r&   r   _command_remove_candidate_1Z/TypingBoosterEngine._command_remove_candidate_1"      
 %%a((r!   c                rk   rl   r   rE   rG   r   r    r  "  ry  r!   c                (    V P                  ^RR7      # )re  rC   r{  r|  rn   r&   r   _command_commit_candidate_2Z/TypingBoosterEngine._command_commit_candidate_2"  r~  r!   c                rk   rl   r   rE   rG   r   r    r  "  r  r!   c                r  )re  r2  r{  r|  rn   r&   r   &_command_commit_candidate_2_plus_spaceZ:TypingBoosterEngine._command_commit_candidate_2_plus_space"  r  r!   c                rk   rl   r   rE   rG   r   r    r  "  r  r!   c                s$    V P                  ^4      # r  r  rn   r&   r   _command_remove_candidate_2Z/TypingBoosterEngine._command_remove_candidate_2"  r  r!   c                rk   rl   r   rE   rG   r   r    r  "  ry  r!   c                (    V P                  ^RR7      # )r   rC   r{  r|  rn   r&   r   _command_commit_candidate_3Z/TypingBoosterEngine._command_commit_candidate_3"  r~  r!   c                rk   rl   r   rE   rG   r   r    r  "  r  r!   c                r  )r   r2  r{  r|  rn   r&   r   &_command_commit_candidate_3_plus_spaceZ:TypingBoosterEngine._command_commit_candidate_3_plus_space"  r  r!   c                rk   rl   r   rE   rG   r   r    r  "  r  r!   c                s$    V P                  ^4      # )r   r  rn   r&   r   _command_remove_candidate_3Z/TypingBoosterEngine._command_remove_candidate_3"  r  r!   c                rk   rl   r   rE   rG   r   r    r  "  ry  r!   c                (    V P                  ^RR7      # )rh   rC   r{  r|  rn   r&   r   _command_commit_candidate_4Z/TypingBoosterEngine._command_commit_candidate_4"  r~  r!   c                rk   rl   r   rE   rG   r   r    r  "  r  r!   c                r  )rh   r2  r{  r|  rn   r&   r   &_command_commit_candidate_4_plus_spaceZ:TypingBoosterEngine._command_commit_candidate_4_plus_space"  r  r!   c                rk   rl   r   rE   rG   r   r    r  "  r  r!   c                s$    V P                  ^4      # )rh   r  rn   r&   r   _command_remove_candidate_4Z/TypingBoosterEngine._command_remove_candidate_4"  r  r!   c                rk   rl   r   rE   rG   r   r    r  "  ry  r!   c                (    V P                  ^RR7      # )   rC   r{  r|  rn   r&   r   _command_commit_candidate_5Z/TypingBoosterEngine._command_commit_candidate_5"  r~  r!   c                rk   rl   r   rE   rG   r   r    r  "  r  r!   c                r  )r  r2  r{  r|  rn   r&   r   &_command_commit_candidate_5_plus_spaceZ:TypingBoosterEngine._command_commit_candidate_5_plus_space"  r  r!   c                rk   rl   r   rE   rG   r   r    r  "  r  r!   c                s$    V P                  ^4      # )r  r  rn   r&   r   _command_remove_candidate_5Z/TypingBoosterEngine._command_remove_candidate_5"  r  r!   c                rk   rl   r   rE   rG   r   r    r  #  ry  r!   c                (    V P                  ^RR7      # )   rC   r{  r|  rn   r&   r   _command_commit_candidate_6Z/TypingBoosterEngine._command_commit_candidate_6#  r~  r!   c                rk   rl   r   rE   rG   r   r    r  #  r  r!   c                r  )r  r2  r{  r|  rn   r&   r   &_command_commit_candidate_6_plus_spaceZ:TypingBoosterEngine._command_commit_candidate_6_plus_space#  r  r!   c                rk   rl   r   rE   rG   r   r    r  #  r  r!   c                s$    V P                  ^4      # )r  r  rn   r&   r   _command_remove_candidate_6Z/TypingBoosterEngine._command_remove_candidate_6#  r  r!   c                rk   rl   r   rE   rG   r   r    r  #  ry  r!   c                (    V P                  ^RR7      # )   rC   r{  r|  rn   r&   r   _command_commit_candidate_7Z/TypingBoosterEngine._command_commit_candidate_7#  r~  r!   c                rk   rl   r   rE   rG   r   r    r  !#  r  r!   c                r  )r  r2  r{  r|  rn   r&   r   &_command_commit_candidate_7_plus_spaceZ:TypingBoosterEngine._command_commit_candidate_7_plus_space!#  r  r!   c                rk   rl   r   rE   rG   r   r    r  (#  r  r!   c                s$    V P                  ^4      # )r  r  rn   r&   r   _command_remove_candidate_7Z/TypingBoosterEngine._command_remove_candidate_7(#  r  r!   c                rk   rl   r   rE   rG   r   r    r  /#  ry  r!   c                (    V P                  ^RR7      # )   rC   r{  r|  rn   r&   r   _command_commit_candidate_8Z/TypingBoosterEngine._command_commit_candidate_8/#  r~  r!   c                rk   rl   r   rE   rG   r   r    r  6#  r  r!   c                r  )r  r2  r{  r|  rn   r&   r   &_command_commit_candidate_8_plus_spaceZ:TypingBoosterEngine._command_commit_candidate_8_plus_space6#  r  r!   c                rk   rl   r   rE   rG   r   r    r  =#  r  r!   c                s$    V P                  ^4      # )r  r  rn   r&   r   _command_remove_candidate_8Z/TypingBoosterEngine._command_remove_candidate_8=#  r  r!   c                rk   rl   r   rE   rG   r   r    r  D#  ry  r!   c                (    V P                  ^RR7      # )   rC   r{  r|  rn   r&   r   _command_commit_candidate_9Z/TypingBoosterEngine._command_commit_candidate_9D#  r~  r!   c                rk   rl   r   rE   rG   r   r    r  K#  r  r!   c                r  )r  r2  r{  r|  rn   r&   r   &_command_commit_candidate_9_plus_spaceZ:TypingBoosterEngine._command_commit_candidate_9_plus_spaceK#  r  r!   c                rk   rl   r   rE   rG   r   r    r  R#  r  r!   c                s$    V P                  ^4      # )r  r  rn   r&   r   _command_remove_candidate_9Z/TypingBoosterEngine._command_remove_candidate_9R#  r  r!   c                sf   < V ^8  d   QhRS[ P                  RS[S[,          RS[S[S[3,          /# )r   rp  r3  r   )rh  rK  r   r   r   r   rE   rG   r   r    r  Y#  sA     K K""K smK .34:->Kr!   c                s^   V P                   ^8  d   \        P                  RV4       V P                   ^8  d*   \        P                  R\        V P                  4      4       V'       g$   \        V P                  P                  4       4      pRpV EF  pV P                  W3V P                  9   g   K#  V P                   ^8  d   \        P                  RV4       V P                  '       du   V'       gm   V P                  P                  V P                  4      pVR8w  d   R	u # V P                  P                  4        V P                  4        V P                  4        RpRV 2p \        W4      pT! 4       '       g   K  TP(                  R
9   d   Ru # TR9   d   Ru # Ru # 	  V'       d&   V P                  P%                  VP&                  4       R	#   \         3 dK    \        P#                  RT4       T'       d&   T P                  P%                  TP&                  4       R	u u # i ; i)re  zKeyEvent object: %s
zself._hotkeys=%s
Fzmatched command=%srC   TZ	_command_zThere is no function %s)FF)Shift_LShift_R	Control_L	Control_RAlt_LAlt_RZMeta_LZMeta_RSuper_LSuper_RISO_Level3_Shiftr]  )rv   commit_raw_input_and_forward_key)TT)r  r3   r!  r   r
  r=  r	  Zkeysr&  r+  r  r  popr  r   r1   ZAttributeErrorr  r;  rS  r~   )rP   rp  r3  Z$hotkey_removed_from_compose_sequencer  r  Zcommand_function_nameZcommand_function   &&&     r   r4  Z#TypingBoosterEngine._handle_hotkeysY#  s   & q LL0#6q LL-s4==/AB d//4467H/4,G->$$q(LL!5w?000@%)%<%<%D%D44&6N%+  .-00446779((*;?8*3G9(=%*'.t'K$ $%%xx $8 8  -,@@  -,''Q  R 0((//8+ '( *$$%>%:<;44;;CGGD))*s   'G)H, 'H,+H,c                r  rI  rJ  rE   rG   r   r    r  #  s!       1 1 d r!   c                s(   V P                   ^ 8  d   \        P                  RV4       Wn        \        P                  ! 4       V P                  n        RV P                  n        V P                  P                  4       V n        V P                  4        R# )r    key=%sT)
r  r3   r{  r&  r7  handledrQ  rR   rR  rt  )rP   rp  re   r   _return_trueZ TypingBoosterEngine._return_true#  si     q KK#&"iik!%%)%;%;%@%@%B"--/r!   c                r  rI  rJ  rE   rG   r   r    r  #  s%     n n!2!2 nt nr!   c                s
  < V P                   ^ 8  d   \        P                  RV4       Wn        \        P                  ! 4       V P                  n        RV P                  n        V P                  P                  4       V n        V P                  4        VP                  '       g   \        P                  R4       V P                  '       Edd   VP                  '       EdQ   \        P                  ! VP                  4      R9  Ed+   VP                   \"        P$                  \"        P&                  \"        P(                  \"        P*                  \"        P,                  39  d   VP.                  \"        P0                  P2                  ,          '       g   VP.                  \4        P6                  ,          '       gw   V P                   ^ 8  d   \        P                  R4       \8        SV `u  \"        P<                  P?                  VP                  4      4       RV n         RV P                  n        R# V PB                  '       d4   V PE                  VP                   VP                  VP.                  4       R# V PF                  '       gh   V PH                  PJ                  R8X  gM   V PH                  PJ                  R8X  g2   V PL                  \4        PN                  PP                  ,          '       d)   V P                   ^ 8  d   \        P                  R4       R# V PH                  PJ                  R	8X  d   \R        PT                  ! R
4      R8X  d   VPV                  '       d   VPX                  R9   gm   VPZ                  '       g[   VP8                  '       gI   VP\                  '       g7   VP^                  '       g%   VP`                  '       g   VPb                  '       d   \        P                  R4       R# VP                  '       g   \        P                  RVP                  4       V Pd                  Pg                  VP                   4      Vn
        VP                  '       d"   \        P                  RVP                  4       M\        P                  R4       \        P                  R4       V PE                  VP                   VP                  VP.                  4       R# V P                   ^ 8  d   \        P                  R4       R# )r    r  Fz:key.code=0 is not a valid keycode. Probably caused by OSK.u6   Committing instead of forwarding or “return False”Tra  ZSDL2_ApplicationzReturning Falserb  ZXDG_SESSION_TYPEZwaylandztReturning False: gnome-shell client in wayland session and possibly a Gnome keyboard shortcut involving a modifier. z9key.code= %s, probably coming from OSK, try to fix it ...zFixed key.code = %sz+Could not fix key.code, still key.code == 0zForwarding key event)ZCc)ZF1ZF2ZF3ZF4ZF5ZF6ZF7ZF8ZF9ZF10ZF11ZF12)4r  r3   r{  r&  r7  r  rQ  rR   rR  rt  coder  r  unicoderP  re  rS  r   rK  rL  KEY_ISO_EnterrO  rM  r   r;  r^  rh  KEYBINDING_STATE_MASKr  r'  r   r   r%  r  r9  r  r  rq   rp  rq  ZSYNC_PROCESS_KEYr  r  rT  r~   rU  rY  rZ  rV  rW  r  r:  )rP   rp  r  r.  r   _return_falseZ!TypingBoosterEngine._return_false#  sN   | q KK#&"iik!&%)%;%;%@%@%B"--/xxxNNLN $$S[[1@!2!2D4F4F""DOO!5 5 II 1 1 > >>>II > >>>  1$TUG		))#++6837D0%)DNN" ???""377CHHcii@
 )))  **i7  **.@@%%(;(;(L(LLL  1$-.''=8		,-:))):!: KKKIIIIIIHHHHHHHHH KKCD xxxKKK 00==cggFCHxxx1388<IJKK./""377CHHcii@q KK)*r!   c                r  )r   keyvalrR  r   Nr   rE   rG   r   r    r  f$  s"     ? ?3 ?# ?d ?r!   c                s   V P                   '       g<   V P                  '       d*   V P                  ^ 8  d   \        P	                  RV4       R# V P
                  P                  V4      pV P
                  P                  V4      pV P                  ^ 8  d   \        P	                  RWWB4       V P                  WV4       R# )r    zVreturn without doing anything because self._avoid_forward_key_event is True. keyval=%sNz0keyval=%s keycode=%s ibus_keycode=%s keystate=%s)	r  r  r  r3   r!  r  keycoder:  r9  )rP   r  rR  r  r:  r   r   r[  Z0TypingBoosterEngine._forward_generated_key_eventf$  s     4#@#@#@  1$ !') ++33F;00==fEq LLK,BvX>r!   c                rD   r   r)   rE   rG   r   r    r  $  s     B B4 Br!   c                s   V P                   '       d2   V P                  '       d    V P                  P                  4        R# R# R#   \         d7   p\        P                  R TP                  P                  T4        Rp?R# Rp?ii ; i)z"Playing error sound failed: %s: %sN)r  r  Zplayr9   r3   r  r  rS   )rP   r4   rQ   r   _play_error_soundZ%TypingBoosterEngine._play_error_sound$  st    !9!9!9B((--/ ":  B  !E!&!9!95B BBs   A B+BBc                r  rI  rJ  rE   rG   r   r    r  $  s%     g g8+<+< g gr!   c                s6  <a V P                   ^8  d   \        P                  RV4       V P                  '       d)   V P                   ^8  d   \        P                  R4       R# VP                  \
        P                  P                  ,          '       d)   V P                   ^8  d   \        P                  R4       R# V P                  P                  '       g{   V P                  '       gi   V P                  P                  4       '       dI   V P                  P                  4       '       d)   V P                   ^8  d   \        P                  R4       R# V P                  P                  '       g;   VP                  '       g)   V P                   ^8  d   \        P                  R4       R# V P                  P                  '       g   VP                  V P                   9   dq   V P"                  ^ ,          R<9  dY   VP                  \
        P$                  8X  d:   VP                  R8X  d)   V P                   ^8  d   \        P                  R	4       R# V P                  P                  '       d   VP                  \
        P&                  \
        P(                  \
        P*                  \
        P,                  \
        P.                  \
        P0                  \
        P2                  \
        P4                  \
        P6                  \
        P8                  \
        P:                  39   dH   V P                   ^8  d5   \        P                  R
\
        P<                  ! VP                  4      4       R# V P                  P                  '       dI   V P?                  V. R=OR7      w  r#V'       d*   V P                   ^8  d   \        P                  RW#4       V# V P                  P                  \@        PB                  8X  Ed   V P                  P                  4       '       Ed   V P                  '       Eg   VP                  \
        PD                  39  Ed   V P                   ^8  d   \        P                  R4       V P"                  ^ ,          R8X  di   VP                  \
        P$                  8X  dJ   VP                  R8X  d9   V P                   ^8  d   \        P                  R4       V PG                  4        R# V P                   ^8  d   \        P                  R4       V PI                  4       p. V n%        V P                  PM                  4        V P                  PO                  R4       V PQ                  4        \@        PR                  V P                  n        \U        V4      oTp\V        ;QJ d3    V3R lV P                  P                   4       F  '       d   K   RM(	  RM$! V3R lV P                  P                   4       4      '       dt   V P                  PX                  RV P                  PZ                   R\U        V4      )  V,           V P                  PX                  V P                  PZ                  R ,           pV P                   ^8  dV   \        P                  RV\]        V P                  4      4       \        P                  RV P^                  V P`                  4       V Pc                  4       '       d   V P                   ^8  d2   \        P                  RV P                  Pd                  V,           4       V P^                  V P`                  R V n/        ^ V n0        \f        SV `  \
        Pj                  Pm                  V P                  Pd                  V,           4      4       \n        Pp                  ! V Pr                  4       MV P^                  RV P                  Pt                   \w        V4      ,           V P^                  V P`                  R ,           V n/        V P                  Pt                  \U        \w        V4      4      ,           V n0        V P                   ^8  d,   \        P                  RV P^                  V P`                  4       V Py                  4        \z        P|                  ! 4       V n        V P"                  ^ ,          P                  R4      '       di   VP                  \
        P$                  8X  dJ   VP                  R8X  d9   V P                   ^8  d   \        P                  R4       V P                  4        R# V P"                  ^ ,          R8X  dw   VP                  \
        P                  \
        P                  \
        P                  39   d9   V P                   ^8  d   \        P                  R4       V P                  4        R# V P                   ^8  d   \        P                  R4       V P                  V4      # V P                  P                  '       Ed   VP                  V P                   9   Ed   V P"                  ^ ,          R>9   d$   V P^                  RV P`                   R?R R.8X  Eg   VP                  \
        PD                  39  Edz   V P                   ^8  d   \        P                  R4       V P"                  ^ ,          R8X  di   VP                  \
        P$                  8X  dJ   VP                  R8X  d9   V P                   ^8  d   \        P                  R4       V P                  4        R# V P                  PX                  p. V n%        V P                  PM                  4        V P                  PO                  R4       V PQ                  4        \@        PR                  V P                  n        V P                   ^8  dV   \        P                  RV\]        V P                  4      4       \        P                  RV P^                  V P`                  4       V Pc                  4       '       d   V P                   ^8  d2   \        P                  RV P                  Pd                  V,           4       V P^                  V P`                  R V n/        ^ V n0        \f        SV `  \
        Pj                  Pm                  V P                  Pd                  V,           4      4       \n        Pp                  ! V Pr                  4       MV P^                  RV P                  Pt                   \w        V4      ,           V P^                  V P`                  R ,           V n/        V P                  Pt                  \U        V4      ,           V n0        V P                   ^8  d,   \        P                  RV P^                  V P`                  4       V Py                  4        \z        P|                  ! 4       V n        V P"                  ^ ,          P                  R4      '       di   VP                  \
        P$                  8X  dJ   VP                  R8X  d9   V P                   ^8  d   \        P                  R4       V P                  4        R# V P"                  ^ ,          R8X  dw   VP                  \
        P                  \
        P                  \
        P                  39   d9   V P                   ^8  d   \        P                  R 4       V P                  4        R# R# V P^                  RV P`                   pV P                   ^8  d    \        P                  R!\]        V4      4       V P"                  ^ ,          R8X  Ed   V\U        \        P                  4      ) R \        P                  8X  Ed   V P                   ^8  d   \        P                  R"4       VR\U        \        P                  4      )  pVV P^                  V P`                  R ,           V n/        \U        V4      V n0        VP                  \
        P$                  8X  dQ   VP                  R8X  d@   V P                   ^8  d   \        P                  R#4       V\        P                  ,          pEMVP                  \
        PD                  39   d9   V P                   ^8  d   \        P                  R$4       VP                  4        EMV P                   ^8  d   \        P                  R%4       VP                  VP                  4       EMVP                  \
        P$                  8X  dY   VP                  R8X  dH   V P                   ^8  d   \        P                  R&4       VR.\        P                  ,           ,          pEM	VP                  \
        PD                  39   d8   V P                   ^8  d   \        P                  R'4       VP                  4        MV P                   ^8  d   \        P                  R(4       VP                  VP                  4       MpV'       g   VP                  VP                  4       MLVP                  \
        PD                  39   d   VP                  4        MVP                  VP                  4       V P                  V P"                  ^ ,          ,          P                  WpP                  R)7      pV P                   ^8  d   \        P                  R*VV4       V Pc                  4       '       Ed9   V P                   ^8  d   \        P                  R+4       VP                  '       d   VPd                  '       d   VPt                  '       d   V P                   ^8  d!   \        P                  R,VPd                  4       VVPt                  R p\f        SV `  \
        Pj                  Pm                  VPd                  4      4       V P                  V P"                  ^ ,          ,          P                  VV P                  R)7      pM&V P                   ^8  d   \        P                  R-4       VP                  '       Eg   V P                  P                  '       d   V P                   ^8  d   \        P                  R.4       V P                  PM                  4        V P                  PO                  R4       V P                  4        V P                  \
        Pj                  Pm                  R/4      R4       RV P                  nO        \@        PR                  V P                  n        \z        P|                  ! 4       V n        VPd                  R/8X  d   VPt                  ^ 8X  d   VPX                  R/8X  d   VPZ                  ^ 8X  d   VP                  R08X  d   V P"                  ^ ,          R@9   go   V P                   ^8  d   \        P                  R1V4       V P^                  V P`                  R V n/        ^ V n0        V Py                  4        V P                  4        R# V P                   ^8  d   \        P                  R24       R# VV P^                  V P`                  R ,           V n/        \U        V4      V n0        V Py                  4        Wn        V P                   ^8  d   \        P                  R34       \@        PR                  V P                  n        . V n%        V P                  PM                  4        V P                  PO                  R4       V P                  4        V P                  \
        Pj                  Pm                  R/4      R4       V P                  P                   FV  p	V	'       g   K  \        P                  ! V	^ R/RRR47      p
V PJ                  P                  V
4       V P                  V	R/R57       KX  	  V P                  P                  4       '       g   \        P                  R64       V P                  PM                  4        V P                  PO                  R4       V P                  4        V P                  \
        Pj                  Pm                  R/4      R4       RV P                  nO        \@        PR                  V P                  n        \z        P|                  ! 4       V n        R# V P                  '       d(   \        P                  ! V P                  4       ^ V nS        RV P                  nO        V P                  '       dK   V P                  '       g9   V P                   ^8  d   \        P                  R74       V P                  4        R# V P                  P                  '       d   V P                   ^8  d   \        P                  R84       \@        PB                  V P                  n        V PQ                  4        V P                  PO                  R4       RV n
        V P                  V P                  4       R4       R# V P                   ^8  d   \        P                  R94       V P"                  ^ ,          R<9   dK   V P                   ^8  d(   \        P                  R:V P"                  ^ ,          4       V P                  4        R# V P                   ^8  d   \        P                  R;4       V P                  4        R# )Are  rL  z&Do not interfere with compose sequenceFIgnoring release event.z=Manual selection in lookup table. Do not interfere with that.z9Empty key.msymbol cannot start a m17n candidate sequence.r  r2  zdCommit trigger keys usually cannot start a m17n candidate sequence except the space key for ja-anthyz0Inside m17n candidates sequence, ignoring key %sTr2  zhotkey matched %s %sz m17n candidate manually selectedzja-anthy: select next candidatez"Candidate selected -> typed stringc              3   r  r"   rH  r  r  r   r   Z>TypingBoosterEngine._handle_m17n_candidates.<locals>.<genexpr> %  r!  r"  Nr#  r$  zEarly commit %rz7NEW:self._typed_string=%s, self._typed_string_cursor=%sr  z.zh: manually selected m17n commit, avoid spacez5ja-anthy: manually selected m17n commit, avoid Returnz,Manually selected m17n commit, try recursionr	  z"m17n candidates commit trigger keyzja-anthy: enable lookupzphrase=%s, trans_parts=%sz1zh: commit key triggered m17n commit, avoid spacez8ja-anthy: commit key triggered m17n commit, avoid Returnztyped_string_up_to_cursor=%sr  zja-anthy: continue henkan modez"ja-anthy: BackSpace in henkan modez"ja-anthy: other key in henkan modezja-anthy: start henkan modez ja-anthy: BackSpace in kana modez ja-anthy: other key in kana moder#  zMAfter processing key: typed_string_up_to_cursor=%r -> transliterated_parts=%rzMaybe commit early.zCommit %r early.zNothing to commit early.z+Clear and hide m17n candidates lookup tablerC   Zz3Removing input which changed only m17n-lib state %rzNo m17n candidates.z$Filling m17n candidate lookup table.rG  r  z4All m17n candidates were empty. Should never happen.z#Tab enable set, just update preeditz Show m17n candidate lookup tablez0m17n candidate lookup table exists but is hiddenzJust update preedit for %sz"Show standard lookup table instead)r  )r1  commitrv  commit_raw_inputr  rt  enable_lookupselect_next_candidateselect_previous_candidatelookup_table_page_downlookup_table_page_upcommit_candidate_1commit_candidate_1_plus_spacecommit_candidate_2commit_candidate_2_plus_spacecommit_candidate_3commit_candidate_3_plus_spacecommit_candidate_4commit_candidate_4_plus_spacecommit_candidate_5commit_candidate_5_plus_spacecommit_candidate_6commit_candidate_6_plus_spacecommit_candidate_7commit_candidate_7_plus_spacecommit_candidate_8commit_candidate_8_plus_spacecommit_candidate_9commit_candidate_9_plus_space)z	t-lsymbolrN  )	rM  zvi-hanzvi-nomtelexzvi-nomviz
zh-cangjiezzh-quickz	zh-tonepyz	zh-zhuyinzzh-py)\r  r3   r!  r+  r   r   r;  r^  r*  r7  r  r;  r   r   msymbolrS  rP  r  rI  r5  r6  r7  r8  r9  r:  r;  r<  r=  r>  r?  keyval_namer4  r|   r   rO  r  rj  r7  r   r   r  r   r  r(  r  rI   r2   r,  r-  r  r  r  r'  r   r   r7  r8  r  r  r  r  r(  r)  rS  r  rK  rL  r  _handle_m17n_candidatesr  rh  r  r  r;  r5  r  r  ra  ri  r   r  rR  rB  r  r   r  r  rr  r   r  rd  rn  )rP   rp  rZ  r@  r*  r+  r   r  r  r  Zprediction_candidater  r  s   &&         @r   r  Z+TypingBoosterEngine._handle_m17n_candidates$  s   q LL.4'''  1$EF99t((5555  1$67&&111444"";;==""4466  1$ ; <&&111KKK  1$ : ;&&1114444""1%]:4>>)s"
   1$ 0 1 ""---&&^^^^____
&   1$O!--cgg68!!,,,$($8$8 #D %9 %E!U< $$q(LL!7M##$$(8(H(HH""4466444 2 244  1$?@""1%3GGt~~-#++2D$$q(LL!BC335  1$AB!%!M!M!O!D$$&11%8--/'7'>'>D$(+,>(?%'9$ G$($:$:$E$EG G$($:$:$E$EG G G **22://::<5c"4557 )) ,,44..99:<	< )   1$F,T$2H2H-IK N&&(A(AC %%''$$q(LL)..88234
 &&t'@'@'AB ",-)#II--..882345 

499: &&'N(>(>(N(NO345(()B)B)CDE "
 **::$789: )   1$M&&(A(AC //1%2%G%G%ID"""1%0066GGt~~-#++2D$$q(LLHJ!""1%3GG$"3"3T5G5GHI$$q(LLOQ!   1$KL//44""---4444''*n<++3$33557S:>AUC 2 244(   1$AB""1%3GGt~~-#++2D$$q(LL!:;++-++33F!D$$&11%8--/'7'>'>D$  1$8#T$*@*@%ACN&&(A(AC %%''$$q(LL!2 $ 6 6 @ @6 IK &&t'@'@'AB ",-)#II--..886ACD 

499: &&'N(>(>(N(NO6l#(()B)B)CDE "
 **::&k" )   1$M&&(A(AC //1%2%G%G%ID"""1%0066GGt~~-#++2D $$q(LLKM!""1%3GG$"3"3T5G5GHI$$q(LLRT! 9 9 9: 	"q LL778:a J.)3x/I/I+J*J*KL--.$$q(LLGI,E5c(4455-7) .(()B)B)CDE " -00I,J)77dnn,1C ((1,%EF-1K1KK-WW!3!3 55((1,%IJ-113((1,%IJ-44S[[ADNN*s{{c/A$$q(LL!>?0 *cUX5O5O-OO)T//11$$q(LL!CD)--/$$q(LL!CD)00=*%,,S[[9WW++--%))+%,,S[[9#44" $$7$7*9K9K %8 %M 	 q LL 6 3-	/
 !!##  1$23$///(222(888$$q(LL!3!5!?!?A,E(889-;)#II--,6689 (,'<'<&&q)(++>+>1%)%7%7 ,? ,9 % ""Q&78#...%%000$$q(LL!NO ""((*""55e<&&(**II--b15:49""1+;+B+B""(%2%G%G%ID"$.."4(88A=(00B6(33q8+!//2 	7& 	& $$q(LLM13 &*%7%78Q8Q8R%S",-)335 !  1$237 $ 2 243L3L3M NO$'(A$B!++-!5q LL?@#3#:#:   "--e4 ""II%%b)5	2//::Iy'/'C'C$!&#((*$   ''(<=66$b 7 2 ; !!::<< LLFH$$&11%8""$&&II--b15:05D-'7'>'>D$%2%G%G%ID""""
 t667&'D#,1)DLLL  1$BC  "!!000  1$?@'7'G'GD$--/ 11$7/3D,$$T%:%:%<dCq LLKLa M1  1$0$2D2DQ2GI  " q LL=>r!   c                s@   < V ^8  d   QhRS[ P                  RS[RS[/# )r   rp  add_to_preeditr   rJ  rE   rG   r   r    r  &  s.     G G8#4#4 Gd GVZ Gr!   c                s  < V P                   ^8  d   \        P                  RV4       V P                  P                  '       d)   V P                   ^8  d   \        P                  R4       R# VP
                  \        P                  P                  ,          '       d)   V P                   ^8  d   \        P                  R4       R# V P                  '       gU   V P                  P                  VP                  4      '       g*   V P                   ^8  d   \        P                  RV4       R# V P                  4       '       dK   V P                  '       g9   V P                  '       g'   V P                   '       g   V P"                  '       g   RpV P                  '       g   V P                  P                  '       g   V P$                  '       gy   V P&                  P)                  4       '       dY   V P&                  P+                  4       '       d9   \-        V P/                  4       4      V n        \3        V P0                  4      V n        VP                  \        P6                  \        P8                  \        P:                  \        P<                  \        P>                  \        P@                  \        PB                  \        PD                  \        PF                  \        PH                  \        PJ                  39   dH   V P                   ^8  d5   \        P                  R\        PL                  ! VP                  4      4       R# V PO                  4       ^ ,          pVP                  \        PP                  39   d   V P                  PS                  4        EM9V PT                  '       d   VR,          R59   d'   V P                  PW                  VP                  4       MV PX                  V,          P[                  VP\                  .V P^                  R	7      pWAP\                  8w  d   \3        V4      ^8X  dv   \        P`                  ! V4      pV P                   ^8  d3   \        P                  R
\c        V4      R\e        V4      R 2RVR 24       V P                  PW                  V4       M%V P                  PW                  VP                  4       V P                  '       gh   V P                   ^8  d   \        P                  R4       \f        Ph                  V P&                  n        V Pk                  4        V Pm                  4        R# V P                  Po                  V P                  4      pV P                   ^8  dO   \        P                  RV P                   Uu. uF  p\        PL                  ! V4      NK  	  up\c        V4      4       V Pq                  V. RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR07      w  rV'       d   V	# V P&                  P
                  \f        Pr                  8X  Ed.   V P&                  P+                  4       '       Ed   \f        Ph                  V P&                  n        V P/                  4       p. V n:        V P&                  Pw                  4        V P&                  Py                  R4       V P{                  4        . V n	        V Pk                  4        V P}                  4        V'       d-   V P                  \-        V4      4       V Pm                  4        R# \        SV E`  \        P                  P                  V4      4       RV nD        R# \f        Ph                  V P&                  n        . V n:        V P&                  Pw                  4        V P&                  Py                  R4       V P                  4        V P                  \        P                  P                  R14      R4       \        V\        4      '       g#   V Pk                  4        V P}                  4        R# V'       EgD   V P                   ^8  d   \        P                  R24       V P                  PS                  4        V Pk                  4        V P}                  4        VP                  V P                  9   d   V P                  P                  V P                  4      p
. V n	        V Pk                  4        V P}                  4        V'       d-   V P                  \-        V
4      4       V Pm                  4        R# \        SV E`  \        P                  P                  V
4      4       RV nD        R# V P                  4        R# V P                   ^8  d   \        P                  R34       . V n	        V Pk                  4        V'       d-   V P                  \-        V4      4       V Pm                  4        R# \        SV E`  \        P                  P                  V4      4       RV nD        V P                  P                  R18X  d)   V P                   ^8  d   \        P                  R44       R# V P                  \        P                  P                  R14      ^ R\        P                  P                  4       R# u upi )6re  rL  z&Do not interfere with m17n candidates.Fr  zbNot in a compose sequence and the key cannot start a compose sequence either. Key Event object: %sz(Inside compose sequence, ignoring key %sTr  r#  z-Using transliterated key for compose %s %s %sz
Unicode 0xr`  znew_keyval=0xz(Editing made the compose sequence empty.z<Inside compose sequence.key value names=%s compose_result=%sr1  #change_line_direction_left_to_right#change_line_direction_right_to_leftchange_line_direction_toggler  rv  r  r  rt  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r2  rC   z2Last key made compose sequence invalid, remove it.zCompose sequence finished.r  )r  r  )Qr  r3   r!  r*  r7  r   r   r;  r^  r+  r  Zis_start_keyrS  r  r  r  r  r  r  r;  r   r   r  rj  r,  r  r-  r5  r6  r7  r8  r9  r:  r;  r<  r=  r>  r?  r  rz  rO  r  r  r;  r5  r$  r  r  Zunicode_to_keyvalr2   r6  r|   r   r  r  r  r4  r   r7  r   r   r  r   r  r  r'  r   r   r%  ra  ri  rc  r   rP  r&  r  r  r   rn  r   r  )rP   rp  r  r
  Ztransliterated_msymbolZ
new_keyvalr  rS  rZ  r@  r&  r  s   &&&        r   _handle_composeZ#TypingBoosterEngine._handle_compose&  sS	   
 q LL.4!!,,,  1$EF99t((5555  1$67,,,++88AA  1$+,/1 MMOO***444+++555 #N,,,**555444"";;==""4466
 "&<<>"@D(+D,>,>(?D%GG&&^^^^____
&   1$G!--cgg68##%a(77t))++((,,.!!!SW%<D ((//8%)%:%:&"]CKK=040B0B # D # '++5./14!334JK
$$q(LLG34$S)?%@$CD'
1~6	8
 ,,33J?,,33CGG<+++  1$GH'7'>'>D$//1OO0088((*q LL$ !88:8S !!#&8:^$& !% 4 4 @x @D@D@  >@  (	@
  8@  2@  B@  :@  /@  7@  ;@  8@  6@  4@  ?@   4!@"  ?#@$  4%@&  ?'@(  4)@*  ?+@,  4-@.  ?/@0  41@2  ?3@4  45@6  ?7@8  49@:  ?;@<  4=@>  ??@ !5  !AB $$(8(L(LL""4466'7'>'>D$!IIKN!D$$&11%8--/+-D(//1  "--d>.BC!G		)).9;37D0#3#:#:   "--e4 ""II%%b)5	2.#..//1  "~  1$HJ((,,.//1  "ww$333 ++BB446 ' 02,335$$&! 11$7M2NOOO%  #II--.DEG7;4""$q LL56')$++-))$~*>?OOII%%n5	7/3,%%.."4  1$DE**II%%b)1e!!((	* A:s   k
c                sN   < V ^8  d   QhRS[ P                  RS[ P                  /# rI  )rh  rK  rE   rG   r   r    r  '  s-     S S((S-5->->Sr!   c                sv   V P                   f   V# V P                  pVP                  '       d"   V\        P                  P
                  ,          p\        P                  ! \        P                  P                  V P                   VP                  V4      VP                  V4      pRVn        VP                  R9   g   VP                  \        P                  8X  ga   VP                  VP                  8X  dH   VP                  \        P                   ,          VP                  \        P                   ,          8X  d   TpVP                  R9   dw   VP                  '       d4   V ;P                  \        P                  P"                  ( ,          un        M1V ;P                  \        P                  P"                  ,          un        VP                  R9   dw   VP                  '       d4   V ;P                  \        P                  P$                  ( ,          un        M1V ;P                  \        P                  P$                  ,          un        VP                  R9   dw   VP                  '       d4   V ;P                  \        P                  P&                  ( ,          un        M1V ;P                  \        P                  P&                  ,          un        VP                  R9   dw   VP                  '       d4   V ;P                  \        P                  P(                  ( ,          un        M1V ;P                  \        P                  P(                  ,          un        VP                  R9   dw   VP                  '       d4   V ;P                  \        P                  P*                  ( ,          un        M1V ;P                  \        P                  P*                  ,          un        V ;P                  \        P                   ,          un        V P,                  ^8  d!   \.        P1                  RW0P                  4       V# )	NTr  z!new_key: %s state for next key=%x)r  	Multi_key)r  r  )r  r  )r  r  )r  r  )r  r'  releaser   r;  r^  rh  rK  r  Zlookup_keysymr  Z
translatedr~   rS  ZKEY_VoidSymbolr   r  r<  r]  r  Z
SUPER_MASKZ	MOD5_MASKr  r3   r!  )rP   rp  r   Znew_keys   &&  r   _translate_to_ibus_keymapZ-TypingBoosterEngine._translate_to_ibus_keymap'  s    ##+J**;;;T&&333E##KK%%((#((E;HHe "HH99KK4...[[CGG#]]X;;;		H:::;, G <<11**t/@/@/K/K.KK***d.?.?.J.JJ*<<55**t/@/@/M/M.MM***d.?.?.L.LL*<<--**t/@/@/J/J.JJ***d.?.?.I.II*<<11**t/@/@/K/K.KK***d.?.?.J.JJ*<<./**t/@/@/J/J.JJ***d.?.?.I.II*""h&D&DD"q LL< "<"<>r!   c                s2   < V ^8  d   QhRS[ RS[ RS[ RS[/# )r   r  r  r   r   rg  rE   rG   r   r    r  (  s3     Q' Q'Q'(+Q'47Q'<@Q'r!   c           
     s:   \         P                  ! WV4      pV P                  ^8  d   \        P	                  RV4       \        P	                  RV P
                  4       V P                  ^8  df   \         P                   FQ  pV P                  V,          '       g   K  \        P	                  R\        V4      \        \        V4      R4      4       KS  	  V P                  '       d   V P                  V4      pV P                  '       d:   V P                  V4      '       d   V P                  V4      # V P!                  V4      # RpV P"                  '       g+   V P                  ^ 8  d   \        P	                  R4       RpEMdV P$                  '       de   \         P&                  ! V P(                  V P*                  P,                  4      '       d*   V P                  ^ 8  d   \        P	                  R4       RpMV P.                  '       d^   V P(                  \         P0                  P2                  P4                  39   d*   V P                  ^ 8  d   \        P	                  R	4       RpMV P(                  \         P0                  P6                  P4                  \         P0                  P8                  P4                  39   d)   V P                  ^ 8  d   \        P	                  R
4       RpV P;                  WF'       * R7      '       d   V P                  V4      # V P=                  V. ROR7      w  rxV'       d+   V'       d   V P                  V4      # V P!                  V4      # V'       d   V P!                  V4      # V P?                  V4      '       d   V P                  V4      # V P=                  V4      w  rxV'       d+   V'       d   V P                  V4      # V P!                  V4      # V PA                  V4      p	V	'       d   V P                  V4      # V P!                  V4      # )re  rL  r  zcapability: %s %s016bFzDirect input modeTz@Terminal detected and the option to disable in terminals is set.zoOSK is visible and input purpose is TERMINAL, disable to avoid showing passwords in the OSK completion buttons.z0Disable because of input purpose PASSWORD or PIN)r  r2  )rt  r  r  r  )!rh  rK  r  r3   r!  rQ  rq  rp  r   r   r?   r  r  r  rA  r  r  r  r  Zdetect_terminalr  r  r]   rr  rC  rD  r   ZPASSWORDZPINr  r4  r  _process_key_event)
rP   r  r  r   rp  ZcapZdisabledrZ  r@  r  s
   &&&&      r   do_process_key_eventZ(TypingBoosterEngine.do_process_key_event(  sK    7q LL.4LL4d6L6LM  1$#..C//#55%8%(Xvc#h/GI /
    005C)))22377((--%%c**  1$01H(((**4+>+>@Q@Q@X@XYY  1$67 Hlll""x'<'<'E'E'K'K&LL  1$./ H!!''0066''++1133   1$FHHLAA$$S)) $ 4 4 ; !5 !<
 ((--%%c**%%c**'',,$$S)) $ 4 4S 9((--%%c**((-$$S))!!#&&r!   c                r  rI  rJ  rE   rG   r   r    r  b(  s%     i
 i
h&7&7 i
D i
r!   c                sB<  < VP                   '       d   V P                  V4      '       d'   V P                  ^8  d   \        P	                  R4       V P
                  e   V P
                  P                  '       dj   V P
                  P                   '       gN   V P
                  P                  VP                  8X  d)   V P                  ^ 8  d   \        P                  R4       R# R# V P                  4       '       Edc   V P                  P                  4       '       EgB   V P                  ^8  d   \        P	                  RV4       VP                  ^ 8  d   V P                  4        R# VP                  \        P                  8X  dY   VP                  '       gG   VP                   '       g5   V P#                  VP$                  .4      '       g   V P                  4        R# VP                  ^ 8  Edo   VP&                  '       Eg\   V P(                  '       EgI   V P*                  '       Eg6   VP$                  R%9   Ed$   VP                  \        P,                  \        P.                  \        P0                  \        P2                  \        P4                  \        P6                  \        P8                  \        P:                  \        P<                  \        P>                  3
9   d   V P@                  '       g   VP                  \        PB                  \        PD                  \        PF                  \        PH                  \        PJ                  \        PL                  \        PN                  \        PP                  \        PR                  \        PT                  3
9   d   V PV                  '       d   V PY                  4       ^ ,          R8X  d   V P                  4        R# V PZ                  V PY                  4       ^ ,          ,          P]                  VP$                  .V P^                  R7      pV Pa                  VVR	7       V Pc                  4        V P                  4        R# VP$                  R&9  Ed   VP                  V Pd                  9   d#   V P#                  VP$                  .4      '       d   \g        VP$                  4      ^8X  dm   VP&                  '       g   VPh                  '       g   VPj                  '       g   VPl                  '       go   VPn                  '       g]   VPp                  '       gK   \r        Pt                  ! VP$                  4      '       Ed   V P#                  VP$                  .4      '       Eg   V P                  4       '       d3   V P                  P                  4       '       g   V P                  4        R# V Pv                  ^ ,          pV P                  4       '       g   VP$                  R
8X  d   V PZ                  V,          P]                  V Px                  VP$                  .,           V P^                  R7      V Pz                  V,          R
,           8w  d/   V P}                  VP$                  .4       V P                  4        R# VP                   '       Eg   V P                  P                  4       '       d   V P                  '       Ed   VP                  \        P                  \        P                  39   d   V P                  \g        V Px                  4      8  di   VP&                  '       d   \g        V Px                  4      V nC        MV ;P                  ^,          unC        V P                  4        V P                  4        R# VP                  \        P                  \        P                  39   dg   V P                  ^ 8  dV   VP&                  '       d	   ^ V nC        MV ;P                  ^,          unC        V P                  4        V P                  4        R# VP                  \        P                  39   d   V P                  ^ 8  d   RV P                  nI        RV P                  nJ        VP&                  '       d   V P                  4        MV P                  4        V P                  4       '       d   RV nM        RV nN        V P                  4        R# VP                  \        P                  \        P                  39   d   V P                  \g        V Px                  4      8  d   RV P                  nI        RV P                  nJ        VP&                  '       d   V P                  4        MV P                  4        V P                  4       '       d   RV nM        RV nN        V P                  4        R# VP                   '       Eg   V P                  P                  4       '       Ed   V P                  '       Eg   VP                  \        P                  \        P                  \        P                  39   dI   \        V P                  4       4      V n<        \g        V Px                  4      V nC        V P                  4        VP                  \        P                  \        P                  39   dy   V P                  ^ 8  dh   RV P                  nI        RV P                  nJ        VP&                  '       d	   ^ V nC        MV ;P                  ^,          unC        V P                  4        R# VP                  \        P                  39   d   V P                  ^ 8  d   RV P                  nI        RV P                  nJ        VP&                  '       d   V P                  4        MV P                  4        V P                  4       '       d   RV nM        RV nN        V P                  4        R# V P                  ^8  d   \        P	                  R4       V Pz                  V,          pV P                  V P                  ,          R,          ! V4      pV Pv                  ^ ,          R8X  EgD   V PZ                  V,          P]                  V Px                  VP$                  .,           V P^                  R7      pVP$                  '       Ed   VP                  VP$                  4      '       Ed   VR\g        VP$                  4      )  pV P                  V P                  ,          R,          ! V4      pVR8X  Ed   V P                  ^8  d   \        P	                  R4       V P                  P                  4       '       EdC   V P                  P                  4       '       Ed"   V P                  4       ;rEV Pa                  WTR	7       \        P                  ! V P                  4       VP                  \        P                  \        P                  39   d   VP&                  '       g   VPh                  '       gz   VPl                  '       gh   VPn                  '       gV   VPp                  '       gD   V Pc                  4        V P                  4        \        P                  ! ^V P                  4       R# V P                  4        R# V P                  4        R# MVP$                  R8X  dn   V Px                  R.8X  d\   VR8X  dU   \        P	                  R4       \l        SV E`  \        P                  P                  R4      4       V P                  4        R# V P                  ^8  d!   \        P	                  RVP$                  4       V P}                  VP$                  .4       V P                  4        R# V P                  P                  4       '       d3   V P                  P                  4       '       d   V P                  4       pEMyVP                  \        P                  \        P                  39   Ed   VP&                  '       g   VPh                  '       g   VPj                  '       g   VPl                  '       g   VPn                  '       g   VPp                  '       g   V P                  ^ 8X  d   VP                  \        P                  8X  d/   \l        SV E`  \        P                  P                  R4      4       M-\l        SV E`  \        P                  P                  R4      4       RV ne        V P                  4        R# VP                  \        P                  \        P                  \        P                  \        P                  39   Ed   VP&                  '       Eg   VPh                  '       Eg   VPj                  '       Eg   VPl                  '       Eg   VPn                  '       Eg   VPp                  '       Egx   V P                  \g        V Px                  4      8  EdS   V PZ                  V,          P]                  V Px                  RV P                   V P^                  R7      pV P                  V P                  ,          R,          ! V4      pV PZ                  V,          P]                  V Px                  V P                  R V P^                  R7      pV P                  R8X  d+   V P                  V P                  ,          R,          ! V4      pV'       d   V Pa                  WfRR7       V'       d   V Pa                  WwRRR7       V P                  4        \        P                  ! V P                  4       V F"  pV P                  \        P                  4       K$  	  V Pv                  ^ ,          R8X  dA   VP                  \        P                  \        P                  \        P                  39   d   R# V Pv                  ^ ,          P                  R4      '       d3   VP                  \        P                  8X  d   VP$                  R8X  d   R# \        P                  ! V P                  4       R# TpV'       g9   V P                  ^ 8  d   \        P                  R4       V P                  4        R# Rp	V P                  P                  4       '       d   Rp	\r        P                  ! WPP                  VP$                  R7      4      p
V'       g   TpV Pa                  WTR	7       VP                  \        P                  \        P                  39   d   VP&                  '       g   VPh                  '       gy   VPl                  '       gg   VPn                  '       gU   VPp                  '       gC   V Pc                  4        V P                  4        \        P                  ! ^V P                  4       MV P                  4        V Pv                  ^ ,          R8X  dA   VP                  \        P                  \        P                  \        P                  39   d   R# V Pv                  ^ ,          P                  R4      '       d3   VP                  \        P                  8X  d   VP$                  R8X  d   R# VP                  \        P                  39   d   V P                  P                  R8X  g,   V P                  P                  P                  R4      '       d   \        P                  R4       \        P                  ! V P                  4       V P                  \        P                  ^ 4       V P                  \        P                  \        P                  P                  4       \        P                  ! V P                  4       V	'       g3   \        ^ V
4       F"  pV P                  \        P                  4       K$  	  R# VP                  '       g7   VP$                  '       Ed   V P#                  VP$                  .4      '       Ed   RV P                  nI        V P                  4       '       d   V P                  4        V P                  '       d   V P                  '       d   R V nN        V P                  \r        P                  P                  ,          '       d   R V nN        V P                  \r        P                  P                  ,          '       d   RV nN        V P                  \r        P                  P                  ,          '       d   R!V nN        VP$                  R&9   d0   V P#                  VP$                  .4      '       g   VP                  pMVP$                  pV P                  '       gy   V P                  P                  4       '       dY   V P                  P                  4       '       d9   \        V P                  4       4      V n<        \g        V Px                  4      V nC        V P}                  V.4       V Pz                  V PY                  4       ^ ,          ,          p\g        VP$                  4      ^8X  d   VP$                  R8w  d   VP$                  V P                  9   d   V'       d   VR',          VP$                  8X  dx   \r        P                  ! V4      '       d\   V P                  ^8  d!   \        P	                  R"VP$                  4       V Pa                  VR,           VR	7       V Pc                  4        V P                  4       '       Ed   V PZ                  V PY                  4       ^ ,          ,          P                  V Px                  V P^                  R7      pV P                  ^8  d-   \        P	                  R#V Px                  V P                  V4       VEP                   '       Ed   VEP                  '       Ed   V Px                  VEP                  R V n<        \g        V Px                  4      V nC        V P                  4        . V n        V EP                  '       gg   VEP                  ^8X  dU   VEP                   VP                  8X  d9   VEP                  '       g&   VEP
                  '       g   V P                  4        R# \l        SV E`  \        P                  P                  VEP                   4      4       V P                  P                  R8X  g,   V P                  P                  P                  R4      '       d   \        P                  R$4       \        P                  ! V P                  4       V P                  \        P                  ^ 4       V P                  \        P                  \        P                  P                  4       V P                  4        R# V P                  4       '       d   V P                  4        R# )(re  zPreedit reopened successfully.Nz;Press key event was handled. Do not pass release key event.TFz$self.is_empty(): KeyEvent object: %sr  r#  r%  z
S-C-ReturnrZ  z'_process_key_event() commit triggered.
r^  r  rC   zCutting off the commit key made the transliteration empty. If anything is selected in the lookup table, commit it. Then call clear input and update UI to removeany remaining preedit or lookup table.r2  r  u   　z^Fullwidth space typed by typing Z+space on empty input. Commit it, clear input, and update UI.u.   Insert instead of commit: key.msymbol=“%s”Z	rc  )r&  r.  )r&  rv  r.  r  r~  r  rc  rZ  zmCommit triggered by space: Apply workaround for libreoffice autocorrection: Sleep, press and release Shift_L.r\  r   z+auto committing because of key.msymbol = %szaMaybe commit early: self._typed_string=%r self._typed_string_cursor=%s -> transliterated_parts=%rz`Early commit: Apply workaround for libreoffice autocorrection: Sleep, press and release Shift_L.r  )zG- zG-_rN  )r  r`  r  r3   r!  r&  r  rS  r{  r  r;  r   r  r   rI  rX  rT  r  r  rU  r  rr  ZKEY_0ZKEY_1ZKEY_2ZKEY_3ZKEY_4ZKEY_5ZKEY_6ZKEY_7ZKEY_8ZKEY_9r  r  r  r  r  r  r  r  r  r  r  r  rz  r5  r$  r  r)  r  rP  r  rV  rW  r  rY  rZ  rh  Zmsymbol_triggers_commitr  r,  r2  r  r  r  rE  rF  r-  r   r  rG  rH  rO  r   r   r  r  r1  r9  rM  rN  r  r   r  rj  r  r:  r%  r   r7  r8  r  rJ  rt  r   r  r  rV  r'  r   r   r%  rK  rL  r[  r  rS  r4   r  r+  r  rs   r6  r;  r^  r   r  r  r  r  r=  ZUPPERCASE_WORDSZUPPERCASE_CHARSZ	LOWERCASEr  Zcontains_letterr  r  r  r  r7  r  r  rI   )rP   rp  Ztransliterated_digitr'  r&  r|  Zinput_phrase_leftZinput_phrase_rightZ
dummy_charr  r  r'   Zinsert_msymbolr  r  s   &&            r   r  Z&TypingBoosterEngine._process_key_eventb(  s    ;;;))#..$$q(LL!AB*NN***...NN&&#''1$$q(KK !A B==??4#5#5#G#G#I#I  1$:CA ww|
 ++-4>>)			113;;-@@ ++-2ckkk(((KKEF WWjj$**djj$**jj$**djj$**jj$**.. @@@WWiiDIItyyiiDIItyyii,, @@@& ,,.q1W< 335$ ,0+@+@--/2,#mS[[M151C1C $ E ) '',%9 ( ; %%'//1 KK~-''T66633S[[MBB%*+++ XXX XXX YYY#)))sxxx55ckkBB!66}EEr }}t'9'9'K'K'M'M++-,,Q/K MMOO|(C%%!!.**ckk]:%)%7%7 "/ "9 //<|K	L
 --s{{m<!IIIt'9'9'K'K'M'M&*&F&F&F GG0A0ABB22t1123{{{478J8J4K111Q61((*557GGt/?/?@@11A5{{{45111Q61((*557GG 2 24411A58=D&&5FKD&&C{{{99;<<>}}-2*28/OO%GG1C1CDD11C8J8J4KK8=D&&5FKD&&C{{{88:;;=}}-2*28/OO%III4#5#5#G#G#I#I+/+K+K+K 77t}}d.>.>#113 3 *.DDF*HD&03D4F4F0GD-779GGt/?/?@@11A58=D&&5FKD&&C{{{45111Q61OO%GG 2 24411A58=D&&5FKD&&C{{{99;<<>}}-2*28/OO%   1$GH77DL++''))355ACL" %%a(J6#44 !!.**ckk]:%)%7%7 "/ "9  ;;;#,,S[[99
 (44Fc#++6F5F'G'+'7'7 33(55?(AAM(O'2-#0014 &%M!N !% 2 2 K K M M$($6$6$H$H$J$J %)$P$P$R!T $ 3 3$1 !4 !N !%

4+I+I J$'GG/M$M-0[[[0303			03			03$($5$5$7$($I$I$K %)$4$4()4+U+U%W (- %)$C$C$E', ;;=#(I .J ++,"00SE9*h6  &6 7 +DII,E,Eh,OP779#
  ,,q0"LL P #- 55s{{mD)#"";;==&&88:: !% L L N''dnndll;;;;;!hhh!hhh!iii!iii!hhh//14 77dll*G'		(A(A$(GHG'		(A(A#(FG7;4!''dnndll"oot/@/@B B;;;!hhh!hhh!iii!iii!hhh00T//01 ))+6DD**+ED,E,EF%)%7%7 E 9 " %)$4$4++%--7%99J%L! ))+6DD**4+D+D+EF%)%7%7 E 9 # **g5)-)9)9//*11;*=.*0& %'')). ( 0 &''*%*). ( 0 //1
 

499:"4J55dmmD #5
 &&q)Z7DOO$($5$5t7I7I$K K&&q)44T::4>>1ckkS6H 

499: !-  $$q(LL!DE++- &+"!!3355)-&!55~~CKK~HJJ,IDNNDLL99HHHIIIIIIHHH!!#557   D$N$NO//1
 ""1%3GG $ 1 143E3E G G""1%0066GGt~~-#++2DDNN,,&&33y@))66AA-PP @ A 

499:11$2B2BAF11$$d&7&7&D&DF JJt556)q*-A55dmmD .KKK 9 93;;- H H
 16D-}}   "((()))2>/((8+>+>+N+NNN2>/((8+>+>+N+NNN29/((8+>+>+H+HHH29/~-113;;-@@!$!$444&&??AA&&88:: &*@@B&D",/0B0B,C)))>*:; ,,))+A.0  CKK A%KK3&KK4#?#??  $3,,\::$$q(LLE% ## 3&\ $ C!!#%%'''+'<'<))+A.(00C0C**9K9K 1D 1M % $$q(LL5 **D,E,E,. )222,<<<)-););,<<=*?D&03D4F4F0GD-779 (*D$ ///0@@AE0::ckkI 4 < < < 4 ? ? ?)$G'		110::<= ))66)C,,99DD]SS@A 

4#A#AB99$:J:JAN99 ,,d.?.?.L.LNOO ==??'')r!   c                rD   r   r)   rE   rG   r   r    r  +  s     $ $T $r!   c                sv    V P                   ^8  d   \        P                  R4       V P                  RR4       R# )re  zentering do_focus_in()
rC   N)r  r3   r!  do_focus_in_idrn   r&   r   do_focus_inZTypingBoosterEngine.do_focus_in+  s/    
 q LL34B#r!   c                r  )r   r  r]   r   Nr   rE   rG   r   r    r  +  s*     F# F#"F#,/F#48F#r!   c                s\   V P                   ^8  d$   \        P                  RWV P                  R 4       \	        4       V n        \	        4       V n        V P                  4        \        P                  ! 4       w  ppV P                   ^8  d   \        P                  RW44       TpRV9  d    VRV,           R,           V,           ,          pMVRV,           ,          pWPP                  n        V P                   ^8  d+   \        P                  RV P                  P                  4       \        P                  ! 4       V n        V P                   ^8  d   V P                  P                  4        Fl  p\         P"                  ! V4      pVP%                  R4      '       g   VR8X  d   \        P                  RV4       VR9   g   KV  \        P                  R	V4       Kn  	  V P'                  V P(                  4       V P+                  4        R
V n        V P/                  4        V P1                  4        R# )re  z5object_path=%s client=%s self.client_capabilities=%s
Z010bu+   program_name=“%s” window_title=“%s”rg   zself._client_info.client=%r
Zdead_r  zAvailable compose key: %szAvailable key: %sFN)ZaZGreek_alphaZCyrillic_ef)r  r3   r!  rp  rB   rQ  rR  rt  itb_active_windowZget_active_windowr  r]   rh  r  r  r  r   r  rS  r  r  rw  r%  r  _apply_autosettings)rP   r  r]   rs   ru   Zclient_info_strr  r~   r  r   r  Z"TypingBoosterEngine.do_focus_in_id+  s   F q LLH(@(@'FI "1!2%4%6"--/*<<>		q LL=, !o%s\1C7,FFOs\11O#2 q LL/1B1B1I1IK$,$>$>$@!q 33;;=''/OOG,,{*LL!<dC>>LL!4d; > 	  !4!45/4,  "r!   c                rD   r   r)   rE   rG   r   r    r  ^+  s     </ </T </r!   c                s   V P                   ^ 8  d+   \        P                  RV P                  P                  4       V P
                  '       d   V P                  4        V P                  P                  '       g   R# / pV P                   EF  w  r#pV'       dA   W P                  9  g1   RV P                  V,          9  g   RV P                  V,          9  d   KQ  \        P                  ! V4      pVP                  V P                  P                  4      '       g   K  V P                  V,          R,          ! 4       pVR9   d   RP                  V4      p\        V4      \        \        \         \"        39  d   K  Rp\%        V\        4      '       d   TpM\%        V\         4      '       d-   VP'                  4       R9   d   VP'                  4       R8H  pMLEKN  \%        V\        4      '       d    \        V4      pM&\%        V\"        4      '       d    \#        V4      pMEK  \        P1                  R	W@P                  P                  W#4       WqV&   W`P
                  V&   EK  	  VP3                  4        FO  w  r#\        P1                  R
W P
                  V,          V4       V P                  V,          R,          ! VRR7       KQ  	  R#   \(        3 d8   p\        P+                  RTP,                  P.                  T4        Rp?EK|  Rp?ii ; i  \(        3 d8   p\        P+                  RTP,                  P.                  T4        Rp?EK  Rp?ii ; i)r    zself._client_info.client=%sNrw  rx  rV  rC   truez:Exception converting autosettings value to integer: %s: %suD   regexp “%s” matches “%s”, trying to set “%s” to “%s”zApply autosetting: %s: %s -> %sFrH  )rY  rU  )r  Zfalse)r  r3   r!  r  r]   r  _revert_autosettingsr  r  r  rE  r  r|  r  r   r?   r   r0  rc  r   r  r  r  rS   r{  rU  )	rP   Zautosettings_applysettingr   rH  r	  Zcurrent_valueZ	new_valuer4   r  r   r  Z'TypingBoosterEngine._apply_autosettings^+  s   q LL68I8I8P8PQ$$$%%'  '''-/(,(:(:$WV"5"55!)<)<W)EE!)<)<W)EEjj(G>>$"3"3":":;; //8HJM77 # 7M"3T5*AA68I---!	M400;;=$55 % 7IM3// #E
I M511 %eI KKV))00'B +4w'1>%%g.] );^ 1668NGKK9!:!:7!CUL(8/ 9- #} $$!00%9  #} $$!00%9 s0   /KLL+LLM+MMc                r  )r   r-  r&  r   Nr   rE   rG   r   r    r  +  s*     X2 X2!$X29<X2FJX2r!   c                s>   V P                   ^8  d   \        P                  RW4       V'       g)   V P                  V P	                  4       ^ ,          ,          pV'       g   \
        P                  ! V4      pRpV P                  '       d   V P                  ^ ,          P                  pV P                  '       dW   V P                  '       gE   V P                  P                  4       ^ 8w  g&   V'       d   VP                  V4      '       d   WC8X  d   TpMTp\
        P                  ! V4      p\
        P                  ! V4      p\
        P                  ! V4      pV P                  '       gU   V P                   ^8X  gD   V P"                  '       g2   V P$                  \
        P&                  P(                  ,          '       d)   V P                   ^8  d   \        P                  R4       R# V P                   ^8  d~   \        P                  RWVV P+                  4       V P-                  4       V P                   V P.                  P0                  P3                  V4      V P.                  P5                  V4      4       V'       d	   V'       g)   V P                   ^8  d   \        P                  R4       R# V P                   ^8X  d   V P.                  P5                  V4      '       g`   V P.                  P0                  P3                  V4      '       g5   V P                   ^8  d"   \        P                  RV P                   V4       R# V P                   ^8X  d`   V P.                  P0                  P3                  V4      '       g5   V P                   ^8  d"   \        P                  RV P                   V4       R# V P                   ^8  d   \        P                  R4       V P.                  P7                  VVV P+                  4       V P-                  4       R	7       V P9                  V4       R# )
re  z commit_phrase=%r input_phrase=%rrC   r1  Nzstripped_input_phrase=%r stripped_commit_phrase=%r p_phrase=%r pp_phrase=%r record_mode=%d spellcheck=%r previously recorded=%dz8Empty input or commit: NOT recording and pushing contextr2  r3  r4  )r  r3   r!  r2  rz  rh  ri  r7  r   r  rr  r;  r   rS  r  r  r  r  r  r=  r>  rp  rr  r   r  r  r?  r@  rv  )rP   r-  r&  r(  rZ  Zstripped_input_phraserA  r5   r   $_record_in_database_and_push_contextZ8TypingBoosterEngine._record_in_database_and_push_context+  s(   $ q LL;&677%%'*,L#LLL O"&"2"21"5"<"<+++<<<%%446!;&&11,??"2 !- / II ( 4 4\ B!)!5!5m!D     A%  8#6#6#>#>>>  1$JKq LL7 &!!#T%7%7%94;L;L**55mD++M:< %,B  1$NP"MM//0FGGMM..99:PQQ  1$F!..0FH"MM..99:PQQ  1$F!..0FHq LL9:77.)&&(((*	 	8 	,
 	01r!   c                rD   r   r)   rE   rG   r   r    r  +  s     ! !d !r!   c                st    V P                   ^8  d   \        P                  R4       V P                  R4       R# )re  zentering do_focus_out()
rC   N)r  r3   r!  do_focus_out_idrn   r&   r   r  Z TypingBoosterEngine.do_focus_out+  s-    
 q LL45R r!   c                r[   )r   r  r   Nr   rE   rG   r   r    r  +  s     #2 #2"#2'+#2r!   c                s   V P                   ^8  d   \        P                  RV4       V P                  '       d   V P	                  RR7       RV P
                  n        V P                  4       '       g   V P                  4        V P                  4        V P                  4        V P                  4        V P                   F$  pV P                  V,          P                  4        K&  	  R# )re  zobject_path=%s
Fr  rC   N)r  r3   r!  r  r  r  r]   r  r  rw  rV  r  r  r5  reset_ic)rP   r  r
  rj   r   r  Z#TypingBoosterEngine.do_focus_out_id+  s     q LL+[9)))**E*B
 $&  }}557'')!!#%%C !!#&//1 &r!   c                rD   r   r)   rE   rG   r   r    r  $,  s     ' 'd 'r!   c                s    V P                   P                  4        F=  w  r\        P                  R W4       V P                  V,          R,          ! VRR7       K?  	  / V n         R# )zRevert autosetting: %s: -> %srw  FrH  N)r  rU  r3   r{  r  )rP   r  r   re  r   r  Z(TypingBoosterEngine._revert_autosettings$,  sT    "77==?NGKK7H(8/ @ %'!r!   c                rD   r   r)   rE   rG   r   r    r  ,,  s     t* t*$ t*r!   c           	     s	   V P                   ^8  dw   \        P                  RV P                  P                  \        V P                  4      \        V P                  4      V P                  P                  V P                  4      4       V P                  '       d   V P                  RR7       R# \        4       V n        V P                  4        V P                   F$  pV P                   V,          P#                  4        K&  	  V P                  P                  R8X  Ed   V P                   ^8  d   \        P                  R4       V P$                  P'                  4        V P$                  P)                  R4       V P+                  4        V P-                  \.        P0                  P3                  R4      R4       RV P$                  n        \6        P8                  V P$                  n        V P<                  '       dq   V P<                  P>                  \.        P@                  \.        PB                  \.        PD                  39   d)   V P                   ^8  d   \        P                  R4       R# V P                   ^8  d   \        P                  R4       V PG                  4        R# V PH                  '       Ed   V PJ                  \L        PN                  PP                  PR                  39  d   V P                  PT                  pV P                  PV                  pVRV pV P                   ^8  d!   \        P                  R	V P                  4       V PX                  PZ                  R
8X  dm   VP]                  V P                  P                  4      '       gB   \        P                  RV P                  P                  4       \        P                  R4       R# RpV P<                  '       d1   \^        P^                  ! 4       V P<                  P^                  ,
          pRTu;8:  d   R8:  d+   M M'V P                   ^8  d   \        P                  R4       M&V P                   ^8  d   \        P                  R4       V Pa                  4       '       g   V Pc                  4        V P                   ^8  d   \        P                  R4       V PG                  4        V Pe                  4        R# )re  z~self._current_preedit_text.text_str=%r self._typed_string=%s self._typed_compose_sequence=%s compose preedit representation=%rFr  NrC   z@Current preedit is empty: do not record, clear input, update UI.z,Avoid clearing context after Return or EnterzIClear context: cursor might have moved, remembered context might be wrongr  rd  u,   self._current_preedit_text.text_str=“%s”zWhatever caused the reset did not commit the preedit. A reset seems to happen sometimes right after reopening a preedit. In that case nothing should be recorded, nothing cleared, nothing updated.rF  rM  zprobably triggered by keyzprobably triggered by mousezClearing context and input.)3r  r3   r!  r  r   r2   r,  r+  r  r&  r  r  rB   rQ  rt  r  r5  r  r;  r   r   ra  ri  r   r   r   r   r|   r   r   r&  rS  rK  rL  r  rw  rs  r  rh  rC  rD  r   r   rI   r  rq   r%  r7  r  r  rV  )rP   r
  r   rI   Ztext_to_cursorZtime_since_prev_key_handledr  r   do_resetZTypingBoosterEngine.do_reset,,  s    q LL = 33<<d001d::;00GG!99;< )))**E*B "1!2--/%%C !!#&//1 & %%.."4  1$ F G $$&11%8""$&&		))"-u605D-'7'>'>D$""OOT%6%68J8J'L L$$q(LLFH  1$ A B %%%(=(=(F(F(L(L'MM))..D//::J!+:.N  1$8!335!!++y8&//0J0J0S0STT K!77@@BLM
 &)#>>>*.))+8K8K*K'-44  1$89  1$:; }}557q LL67'')r!   c                r  )r   purposehintsr   Nr   rE   rG   r   r    r  ,  s*     G GG'*G/3Gr!   c           
     s   \         P                  R V\        VR4      4       Wn        W n        V P
                  ^8  Ed&   V P                  \        \        P                  4       Uu. uF  p\        V4      NK  	  up9  d!   \         P                  RV P                  4       \        \        P                  4       F@  pV P                  V8X  g   K  \         P                  RV P                  \        V4      4       KB  	  \        P                   FQ  pV P                  V,          '       g   K  \         P                  R\        V4      \        \        V4      R4      4       KS  	  R# R# u upi )zpurpose=%s hints=%s
r  z"self._input_purpose = %s (Unknown)zself._input_purpose = %s (%s)zhint: %s %sN)r3   r!  r   r  r  r  r  rh  rC  r?   r   r=  )rP   r  r  r`  Zinput_purposeZhintr  r   do_set_content_typeZ'TypingBoosterEngine.do_set_content_type,  s    	,gveV7LM%!q ##(,X-B-B(CD(C1A(CDEA!002!%h&;&;!<&&-7LL!@!%!4!4c-6HJ "= !++$$t++LL!$TF3t9f,EG , !Ds   &E'c                rD   r   r)   rE   rG   r   r    r  ,  s      4 r!   c                s    V P                   ^8  d   \        P                  R4       \        4       V n        \        4       V n        V P                  4        V P                  4        R# )re  zdo_enable()
N)r  r3   r!  rB   rQ  rR  rt  r  rn   r&   r   	do_enableZTypingBoosterEngine.do_enable,  sJ    q LL)!0!2%4%6"--/r!   c                rD   r   r)   rE   rG   r   r    r  ,  s     * *D *r!   c                sr    V P                   ^8  d   \        P                  R4       V P                  4        R# )re  zdo_disable()
N)r  r3   r!  rV  rn   r&   r   
do_disableZTypingBoosterEngine.do_disable,  s)    q LL)*'')r!   c                rk   rl   r   rE   rG   r   r    r  ,  s      D r!   c                sV    V P                  4       '       d   V P                  4        R # R # r  )rc  r  rn   r&   r   
do_page_upZTypingBoosterEngine.do_page_up,  s!    
 ==??--/r!   c                rk   rl   r   rE   rG   r   r    r  ,  s      d r!   c                sV    V P                  4       '       d   V P                  4        R # R# r]  )rb  r  rn   r&   r   do_page_downZ TypingBoosterEngine.do_page_down,  s#    
 ??--/r!   c                r  )r   _args_kwargsr   r   r   rE   rG   r   r    r  ,  s"      3 3 4 r!   c                sF    V P                  4       pV P                  4        V# r"   )r`  r  )rP   r  r  ress   &*, r   do_cursor_upZ TypingBoosterEngine.do_cursor_up,  s!    
 nn))+
r!   c                rk   rl   r   rE   rG   r   r    r  ,  s       r!   c                sF    V P                  4       pV P                  4        V# r"   )r^  r  )rP   r   rQ   r   do_cursor_downZ"TypingBoosterEngine.do_cursor_down,  s#    
  ))+
r!   c                r  r   r   rI  r   Nr  rE   rG   r   r    r  ,  s%     * **04*AE*r!   c                s    \         P                  R 4       V P                  P                  P	                  4        V P                  4        R# )zReloading dictionaries ...N)r3   r{  r   r  Zinit_dictionariesrV  rP   r   rI  r   r   r|  Z(TypingBoosterEngine._reload_dictionaries,  s3     	01""446'')r!   c                r  r  r  rE   rG   r   r    r  ,  s%     * **04*AE*r!   c                s    \         P                  R 4       \        P                  ! 4        \        P                  ! 4        V P                  4        V P                  4        R# )zReloading input methods ...N)r3   r{  r(  ZfiniZinitr6  rV  r  r   r   r}  Z)TypingBoosterEngine._reload_input_methods,  sA     	12""$'')r!   c          
      s^   < V ^8  d   QhRS[ P                  RS[ P                  RS[RS[RR/# )r   _enginer   rI   rJ   r   N)r   r~  r   r?   rE   rG   r   r    r  -  sC     "+ "+)-"+&*ii"+ -0"+ -0	"+ 59	"+r!   c                s8   V P                   ^8  d&   \        P                  RVP                  4       W44       VP                  4       V P                  n        W0P                  n        W@P                  n        V P                  P                  P                  4        R# )re  z#text=%r cursor_pos=%s anchor_pos=%sN)
r  r3   r!  Zget_textrQ  r   rI   rJ   rK   rO   )rP   r  r   rI   rJ   s   &&&&&r   rS  Z,TypingBoosterEngine._on_set_surrounding_text-  sq    8 q LL>*B&*mmo#,6),6)$$((*r!   c                rh  )r   	_settingsrp  r   N)r   r  r   rE   rG   r   r    r  1-  s)       \\038<r!   c                sR   \         P                  ! V P                  P                  V4      4      p\        P                  R W#4       W P                  9   d=   RV P                  V,          9   d%   V P                  V,          R,          ! VRR7       R# \        P                  R4       R# )z"Settings changed: key=%s value=%s
rw  FrH  NzUnknown key
)rh  r  r  Z	get_valuer3   r!  r  r  )rP   r  rp  r   r  r   rU  Z/TypingBoosterEngine._on_gsettings_value_changed1-  s     ))$//*C*CC*HI:CG&&&$"5"5c"::$^4/'r!   )r  r  r  r  r  r  r  r  r  r  r  r  r7  r8  r  r:  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r%  rP  r  r  r9  r  r  r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r
  r  r  r  r  r  r  r  r  rT  r	  r  r  r  r  r  r  r   r  r  r  r  r  r  r;  r  r  r  r*  r  r1  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r.  r  r/  r0  r  r  r  r&  r  r  r  r  r  r  r  r  r  r  r  r  rQ  rR  r  r  r  r  r'  r2  r3  r4  r5  r+  r,  r-  r  r  r  r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  )r  Fry   )rC   rF  rC   FFr  r  )r[  )rC   TT)Zin)r)   )rC   rC   r8   (j  rS   rT   r.   rU   rf   r]  ra  rd  rf  rg  ri  rj  rk  rm  rn  rz   rr  rs  rt  r  r6  r  r  r  r  r  r  r  r  r   r+  rB  r\  r^  r`  rb  rc  rf  ri  rj  rk  rm  r   rn  rp  rr  rt  rv  rw  r  rz  ry  r  r{  r  r   r  r  rB  rC  r  r  r  r  r  r  rD  r   r  r  r  r  r  r  rV  r  r  r  r  r  r  r   r  r  r  r	  r  r  r  r  rV  r  r  r,  r)  r5  r`  r  r  rl  r  r  r  r  r  r  rt  r  r~  rv  r  r  ry  r  r  r{  r  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  Zstaticmethodr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r  r  r  r#  r(  r)  r*  r  r0  rA  rC  rD  rG  rH  r  rL  rM  rN  rO  rP  rR  rS  rT  rU  rV  rW  rX  rh  rl  rn  ro  rr  rt  rv  rx  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r4  r  r  r[  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r|  r}  rS  rU  rV   rW   Z__classcell__)r  rF   s   @@r   r   r   B  s    w( w(r* *) )? ?4 45 57 72 23 35 5; ; H H M M
$ $q qf	. .*/ / U U, ,2 28. .2 22 22 22 2A AFZ5 Z5xw wr    	 	 $3 3> >N N`8 8" "        
# 
#. .@% %)9 )9V-E -E^) ) <) )J$ J$X( (: :@; ;<+7 +7Z+7 +7Z-< -<^-< -<^7< 7<r:< :<xF6 F6V *.)A)A7 7r' '42 2/ /& &  > 2 &# #J .  .D6= 6=pS2 S2j_ _B'$ '$RJ J22 2(N6 N6`-E -E^| ||= =~ " *i iVH6 H6T
T TlQ Qf06 06d0 04= =) ). .2' '. .8! !0 00
9 
9% %0 00A A- -0 007 7# #0 00C C/ /* *;A ;Az% %6D D
   2 2(I I2 2&J J0 0.: :& & 0  0D; ;' '0 0@: :& &0 088 8$ $C C4. .)0 )0V &! !A A4, ,0 00. .7 7@5 5
0 00- -7 7@4 40 00+ +7 7@2 20 00( (7 7@/ /0 00" "7 7@) )0 00& &7 7@- -0 00& &7 7@- -0 00" "7 70) )0 00& &7 70- -0 00& &#7 #7J- -0 02% %0 00   7 70' '0 00$ $< <0' '7 70" "6 60( (/ /24 40 00   0 00* *0 02" "
6 
60 00% %
9 
90 024 40 00) )7 78 9 9>. .< <B' '0 024 4? ?:' '
9 96! !N N.3 3I I.. .0 0,    1 12% %! !7 7,! !/ /<& &/ /:# #0 04/ /
0 0>8 8. .8$ $. .4+ +A AF &m m^    C CJc cJ	 	W Wr	 		 	= =~P Pd  (0 (0TP Pd+ +Z#L #LJ$ $L 6  > > >(
 
2 2h 2 2 $ "             { {z 
 
     8 89 9) )8 89 9) )8 89 9) )8 89 9) )8 89 9) )8 89 9) )8 89 9) )8 89 9) )8 89 9) )K KZ  n n`? ?2B Bg gRG G GRS SjQ' Q'fi
 i
V$ $F# F#P</ </|X2 X2t! !#2 #2J' 't* t*lG G( * *    * * * *""+ "+H  r!   )rh   r  )r   )_Ztypingr   r   r   r   r   r   r   r	   r0   Zversion_infor
   Ztyping_extensionsrP  r  r>  r  r7  rR   r   ZloggingrL   r  r  r#   Zdataclassesr   r   Zgir   Zgi.repositoryr   r   r   r(  rh  r  r  r"  rW  r  r  ZImportErrorr4   r  ZregexZVERSION1ZDEFAULT_VERSIONr  r  r  r  r  r  Zgoogle.cloudr   Zgoogle.cloud.speechr   r  r   r  rf  Zbidi.algorithmrg  Z	getLoggerr3   Z__all__r$   r'   r*   r>  r@  r?  rA  ZMAJOR_VERSIONZMINOR_VERSIONZMICRO_VERSIONr}  r6   r;   r  r<   r  r@   r=   rA   rB   rZ   ZEnumr|   r   r   r   r~  r   r)   r!   r   <module>r     s  2         
v)  	  
         (     u            $"  !NNE	BK # '!% +0 '4#99.2+ $)  -'+$ 
		0	1 #
.  
  & 
 $ ""D$6$68J8JK7"
 $$ FS $ 
%% % %N.9 .9`	!tyy 	!@' @'D   <7" 7"rk$++ ks 	~ $#$  K 	[*- '!&' 	~ 4.3+4 	~ -',$-s`   H "H1 >I I I) H.!H))H.1IIII
I&%I&)
I76I7