+
    ÃìÜjˆ  ã                   óÂ   € ^ RI Ht ^ RIHt ^ RIHtHtHtHtH	t	H
t
 ^ RIHt ] ! R R4      4       t ! R R4      t]! 4       tR	 R
 ltR R lt]
! R]	R7      tR R ltR# )é    )Ú	dataclass©Úwraps)ÚAnyÚCallableÚIteratorÚListÚTypeÚTypeVar)ÚEventEmitterc                   ó,   a € ] tR t^t o V 3R ltRtV tR# )ÚHandlerc                ó2   <€ V ^8„  d   Qh/ S[ ;R&   S[;R&   # )é   ÚeventÚmethod©Ústrr   )ÚformatÚ__classdict__s   "€ÚF/opt/render/project/src/.venv/lib/python3.14/site-packages/pyee/cls.pyÚ__annotate__ÚHandler.__annotate__   s   ø‡ ‚ á�Jñ ñ Ñò ó    © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©r   s   @r   r   r      s   ø‡ ‡ „ r   r   c                   ó\   a € ] tR t^t o V 3R lR ltV 3R lR ltV 3R lR ltR tRtV t	R	# )
ÚHandlersc                ó   <€ V ^8„  d   QhRR/# ©r   ÚreturnNr   )r   r   s   "€r   r   ÚHandlers.__annotate__   s   ø€ ÷ +ñ +˜$ñ +r   c                ó   € . V n         R # ©N©Ú	_handlers©Úselfs   &r   Ú__init__ÚHandlers.__init__   s	   € Ø(*ˆŽr   c                ó   <€ V ^8„  d   QhRR/# r'   r   )r   r   s   "€r   r   r)      s   ø€ ÷ 'ñ ' ñ 'r   c                ó<   € V P                   P                  V4       R # r+   )r-   Úappend)r/   Úhandlers   &&r   r4   ÚHandlers.append   s   € Ø�‰×Ñ˜gÖ&r   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# ©r   r(   )r   r   )r   r   s   "€r   r   r)      s   ø€ ÷ $ñ $™(¡7Õ+ñ $r   c                ó,   € \        V P                  4      # r+   )Úiterr-   r.   s   &r   Ú__iter__ÚHandlers.__iter__   s   € Ü�D—N‘NÓ#Ð#r   c                ó   € . V n         R # r+   r,   r.   s   &r   ÚresetÚHandlers.reset   s	   € ØˆŽr   r,   N)
r   r   r   r   r0   r4   r;   r>   r!   r"   r#   s   @r   r%   r%      s-   ø‡ € ÷+ð +÷'ð '÷$ð $÷ð r   r%   c                óT   € V ^8„  d   QhR\         R\        \        .\        3,          /# )r   r   r(   r   )r   s   "r   r   r      s&   € ÷ 
ñ 
Œcð 
”h¤˜z¬8Ð3Õ4ñ 
r   c                ó   a € R V 3R llpV# )zf
Register an event handler on an evented class. See the `evented` class
decorator for a full example.
c                ó0   € V ^8„  d   QhR\         R\         /# )r   r   r(   )r   )r   s   "r   r   Úon.<locals>.__annotate__%   s   € ÷ ñ œ(ð ¤xñ r   c                 óH   <€ \         P                  \        SV R 7      4       V # ))r   r   )r-   r4   r   )r   r   s   &€r   Ú	decoratorÚon.<locals>.decorator%   s   ø€ Ü×Ñœ u°VÔ<Ô=Øˆr   r   )r   rE   s   f r   ÚonrG      s   ø€ ÷ð ð Ðr   c                ó<   € V ^8„  d   QhR\         R\         R\         /# )r   r/   r   r(   ©r   )r   s   "r   r   r   ,   s!   € ÷ ñ ”ð œSð ¤Sñ r   c                 ó:   a a€ \        S4      R  VV 3R ll4       pV# )c                ó$   € V ^8„  d   QhR\         /# r8   rI   )r   s   "r   r   Ú_bind.<locals>.__annotate__.   s   € ÷ -ñ -¤#ñ -r   c                  ó   <€ S! S.V O5/ VB # r+   r   )ÚargsÚkwargsr   r/   s   *,€€r   ÚboundÚ_bind.<locals>.bound-   s   ø€ á�dÐ,˜TÒ, VÑ,Ð,r   r   )r/   r   rP   s   ff r   Ú_bindrR   ,   s%   ù€ Ü
ˆ6ƒ]÷-ð -ó ð-ð €Lr   ÚCls)rP   c                ó0   € V ^8„  d   QhR\         R\         /# )r   Úclsr(   )rS   )r   s   "r   r   r   7   s   € ÷ =ñ =”ð =œñ =r   c                ó¸   aa€ \        \        4      o\        P                  4        V P                  o\	        V P                  4      R VV3R ll4       pWn        V # )aÉ  
Configure an evented class.

Evented classes are classes which use an EventEmitter to call instance
methods during runtime. To achieve this without this helper, you would
instantiate an `EventEmitter` in the `__init__` method and then call
`event_emitter.on` for every method on `self`.

This decorator and the `on` function help make things look a little nicer
by defining the event handler on the method in the class and then adding
the `__init__` hook in a wrapper:

```py
from pyee.cls import evented, on

@evented
class Evented:
    @on("event")
    def event_handler(self, *args, **kwargs):
        print(self, args, kwargs)

evented_obj = Evented()

evented_obj.event_emitter.emit(
    "event", "hello world", numbers=[1, 2, 3]
)
```

The `__init__` wrapper will create a `self.event_emitter: EventEmitter`
automatically but you can also define your own event_emitter inside your
class's unwrapped `__init__` method. For example, to use this
decorator with a `TwistedEventEmitter`::

```py
@evented
class Evented:
    def __init__(self):
        self.event_emitter = TwistedEventEmitter()

    @on("event")
    async def event_handler(self, *args, **kwargs):
        await self.some_async_action(*args, **kwargs)
```
c                ó@   € V ^8„  d   QhR\         R\         R\         RR/# )r   r/   rN   rO   r(   NrI   )r   s   "r   r   Úevented.<locals>.__annotate__j   s.   € ÷ Bñ B”3ð Bœsð B¬cð B°dñ Br   c                 óæ   <€ S! V .VO5/ VB  \        V R 4      '       g   \        4       V n        S F<  pV P                  P                  VP                  \        WP                  4      4       K>  	  R# )Úevent_emitterN)Úhasattrr   rZ   rG   r   rR   r   )r/   rN   rO   ÚhÚhandlersÚog_inits   &*, €€r   ÚinitÚevented.<locals>.initi   sY   ø€ á�Ð&�tÒ&˜vÒ&Ü�t˜_×-Ò-Ü!-£ˆDÔãˆAØ×Ñ×!Ñ! !§'¡'¬5°·x±xÓ+@ÖAó r   )Úlistr-   r>   r0   r   )rU   r_   r]   r^   s   & @@r   Úeventedrb   7   sQ   ù€ ôZ #¤9›o€HÜ‡O�OÔàŸ™€Gä
ˆ3�<‰<Ó÷Bð Bó ðBð „Là€Jr   N)Údataclassesr   Ú	functoolsr   Útypingr   r   r   r	   r
   r   Úpyeer   r   r%   r-   rG   rR   rS   rb   r   r   r   Ú<module>rg      s]   ðÝ !Ý ß ?× ?å ð ÷ð ó ð÷
ñ ñ ‹J€	õ
õñ ˆe˜4Ô €÷=r   