+
    qpÐj�  ã                  ó    € R t ^ RIHt ^ RIt^ RIt^ RIHtHtHtH	t	H
t
Ht ]	! R]]R,          ]R,          4      tR	t ! R R]],          4      tR# )
a:  
The MIT License (MIT)

Copyright (c) 2015-present Rapptz

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
)ÚannotationsN)ÚCallableÚGenericÚLiteralÚTypeVarÚoverloadÚUnionÚTTFÚExponentialBackoffc                  ó€   € ] tR t^)tRtRRR/R R lllt]R R l4       t]R R	 l4       t]R
 R l4       tR R ltRtR# )r
   aó  An implementation of the exponential backoff algorithm

Provides a convenient interface to implement an exponential backoff
for reconnecting or retrying transmissions in a distributed network.

Once instantiated, the delay method will return the next interval to
wait for when retrying a connection or transmission.  The maximum
delay increases exponentially with each retry up to a maximum of
2^10 * base, and is reset if no more attempts are needed in a period
of 2^11 * base seconds.

Parameters
----------
base: :class:`int`
    The base delay in seconds. The first retry-delay will be up to
    this many seconds.
integral: :class:`bool`
    Set to ``True`` if whole periods of base is desirable, otherwise any
    number in between may be returned.
ÚintegralFc               ó    € V ^8„  d   QhRRRR/# )é   ÚbaseÚintr   r	   © )Úformats   "ÚA/opt/hermes/.venv/lib/python3.14/site-packages/discord/backoff.pyÚ__annotate__ÚExponentialBackoff.__annotate__?   s   € ÷ hñ h˜Sð h°1ñ hó    c               	ó   € Wn         ^ V n        ^
V n        VR,          V n        \        P
                  ! 4       V n        \        P                  ! 4       pVP                  4        V'       d   VP                  V n        R# VP                  V n        R# )é    Ni   )Ú_baseÚ_expÚ_maxÚ_reset_timeÚtimeÚ	monotonicÚ_last_invocationÚrandomÚRandomÚseedÚ	randrangeÚuniformÚ	_randfunc)Úselfr   r   Úrands   &&$ r   Ú__init__ÚExponentialBackoff.__init__?   s`   € ØŒ
àˆŒ	ØˆŒ	Ø $ u¥ˆÔÜ'+§~¢~Ó'7ˆÔô �}Š}‹ˆØ�	‰	ŒçMU¸4¿>¹>ˆŽÐ[_×[gÑ[gˆŽr   c               ó    € V ^8„  d   QhRRRR/# )r   r&   z"ExponentialBackoff[Literal[False]]ÚreturnÚfloatr   )r   s   "r   r   r   N   s   € ×EÑEÐ6ÐE¸5ÑEr   c                	ó   € R # ©Nr   ©r&   s   &r   ÚdelayÚExponentialBackoff.delayM   s   € ÙBEr   c               ó    € V ^8„  d   QhRRRR/# )r   r&   z!ExponentialBackoff[Literal[True]]r+   r   r   )r   s   "r   r   r   Q   s   € ×BÑBÐ5ÐB¸#ÑBr   c                	ó   € R # r.   r   r/   s   &r   r0   r1   P   s   € Ù?Br   c               ó    € V ^8„  d   QhRRRR/# )r   r&   zExponentialBackoff[bool]r+   úUnion[int, float]r   )r   s   "r   r   r   T   s   € ×GÑGÐ,ÐGÐ1BÑGr   c                	ó   € R # r.   r   r/   s   &r   r0   r1   S   s   € ÙDGr   c               ó   € V ^8„  d   QhRR/# )r   r+   r5   r   )r   s   "r   r   r   V   s   € ÷ <ñ <Ð(ñ <r   c                óJ  € \         P                  ! 4       pWP                  ,
          pWn        W P                  8”  d   ^ V n        \        V P                  ^,           V P                  4      V n        V P                  ^ V P                  ^V P                  ,          ,          4      # )ab  Compute the next delay

Returns the next delay to wait according to the exponential
backoff algorithm.  This is a value between 0 and base * 2^exp
where exponent starts off at 1 and is incremented at every
invocation of this method up to a maximum of 10.

If a period of more than base * 2^11 has passed since the last
retry, the exponent is reset to 1.
)	r   r   r   r   r   Úminr   r%   r   )r&   Ú
invocationÚintervals   &  r   r0   r1   V   ss   € ô —^’^Ó%ˆ
Ø× 5Ñ 5Õ5ˆØ *Ôà×&Ñ&Ô&ØˆDŒIä˜Ÿ	™	 A� t§y¡yÓ1ˆŒ	Ø�~‰~˜a §¡¨a°·±­lÕ!:Ó;Ð;r   )r   r   r   r   r%   r   N)é   )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r(   r   r0   Ú__static_attributes__r   r   r   r
   r
   )   sQ   † ññ*h°u÷ hð hð ÜEó ØEàÜBó ØBàÜGó ØG÷<ñ <r   )r
   )rA   Ú
__future__r   r   r    Útypingr   r   r   r   r   r   Úboolr	   Ú__all__r
   r   r   r   Ú<module>rG      sN   ðñõ0 #ó Û ß G× GáˆC��w˜t•} g¨e¥nÓ5€ð€ô@<˜ �ö @<r   