+
     åûjá ã            
      óh  a € 0 t $ ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHtHt ^ R	IHtH t  ^ R
I!H"t"H#t# ^ RI$t$Rt%Rt&R R lt'R R lt(R R lt)]*! 0 RXm4      t+ ]*! RR04      t, ^t- Rt. Rt/ Rt0 Rt1 Rt2 R R lt3RYt4  ! R R]Pj                  Pl                  4      t7R R lt8R R  lt9R! R" lt:R# R$ lt;R% R& lt<]*! 0 RZm4      t= R' R( lt>R) R* lt?R+ R, lt@ ! R- R.4      tAR/ R0 ltBR1 R2 ltCR3 R4 ltDR5 R6 ltER7 R8 ltFR9 R: ltGR; R< ltHR[R> R? lltIR@ RA ltJ]K! 4       tLRB]MRC&    RDtN RE RF ltORG RH ltPRI RJ ltQRK RL ltRRMR/RN RO lltSRPRRQRRRR=RSRRMR/RT RU lltTRQRRRR=RSRRMR/RV RW lltUR# )\é    )ÚannotationsN)ÚCallable)ÚUTCÚdatetime)Úparsedate_to_datetime)ÚPath)ÚAny)Ú	HTTPErrorÚURLError)ÚquoteÚurlparse)ÚRequestÚurlopenzhttps://huggingface.coÚkorniac               ó    € V ^8„  d   QhRRRR/# )é   ÚrepoÚstrÚreturn© )Úformats   "ÚPC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\core\download.pyÚ__annotate__r   1   s   € ÷ ?ñ ?�cð ?˜cñ ?ó    c                ó*   € RV 9   d   V # \          RV  2# )a¼  Return the full ``owner/name`` id *repo* names.

A repository *name* cannot contain a ``/``, so one marks a spelling that
already carries its owner; anything else is a repository in the ``kornia``
org. Both spellings of the same kornia repo must resolve identically, or the
URL and the cache name derived from them could disagree.

Example:
    >>> _hf_repo_id("hardnet"), _hf_repo_id("kornia/hardnet")
    ('kornia/hardnet', 'kornia/hardnet')
Ú/)Ú_HF_KORNIA_ORG)r   s   &r   Ú_hf_repo_idr   1   s!   € ð ˜$”;ˆ4Ð>¤~Ð&6°a¸°vÐ$>Ð>r   c               ó$   € V ^8„  d   QhRRRRRR/# ©r   r   r   Úfilenamer   r   )r   s   "r   r   r   @   s&   € ÷ gñ g�ð g ð g¨ñ gr   c           	     ó\   € \          R\        \        V 4      RR7       R\        VRR7       2# )añ  Build the ``resolve/main`` URL of one file in a Hugging Face model repository.

``url = hf_url(repo, filename)`` returns ``https://huggingface.co/<owner>/<name>/resolve/main/<filename>`` and
makes no request. A ``repo`` without a ``/`` names a repository of the ``kornia`` organization. Both arguments are
percent-encoded except for ``/``, so a ``#`` or a space stays part of the name, and an already encoded name such as
``"a%20b.pth"`` is encoded again.

Args:
    repo: repository name under the ``kornia`` HF org (e.g. ``"hardnet"``),
        or a full ``owner/name`` repository id for a repo owned by anyone
        else (e.g. ``"google/siglip2-base-patch16-224"``). The two are told
        apart by the ``/``, which a repository *name* cannot contain.
    filename: path of the file in that repo (e.g. ``"HardNetPP.pth"``); a
        ``/`` in it reaches into a subdirectory.

Returns:
    A ``resolve/main`` URL that can be passed directly to
    :func:`load_state_dict_from_url` or :func:`download_file_from_url`.

See Also:
    - :func:`download_hf_file`: downloads the file at this URL under a cache name that carries the repository.
    - :func:`load_state_dict_from_url`: loads a ``torch.load`` checkpoint from this URL.

Example:
    >>> hf_url("hardnet", "HardNetPP.pth")
    'https://huggingface.co/kornia/hardnet/resolve/main/HardNetPP.pth'
    >>> hf_url("google/siglip2-base-patch16-224", "model.safetensors")
    'https://huggingface.co/google/siglip2-base-patch16-224/resolve/main/model.safetensors'

r   )Úsafez/resolve/main/)Ú_HF_BASEr   r   ©r   r!   s   &&r   Úhf_urlr&   @   s2   € ô> ˆZ�qœœ{¨4Ó0°sÔ;Ð<¸NÌ5ÐQYÐ`cÔKdÐJeÐfÐfr   c               ó$   € V ^8„  d   QhRRRRRR/# r    r   )r   s   "r   r   r   b   s&   € ÷ Añ A˜cð A¨Sð A°Sñ Ar   c                óB   € \        V 4      P                  RR4       RV 2# )a‘  Return a cache filename that cannot collide with another repo's.

The download cache is one flat directory keyed by filename, which is fine
while every checkpoint has a name of its own -- and wrong the moment two
repositories publish the same one. Every safetensors repository on the Hub
calls its single-shard checkpoint ``model.safetensors``, so caching by the
URL basename would hand the second model whichever one was fetched first,
silently and forever.

The repository id is folded into the name with ``--`` for the same reason
the Hub's own cache layout does: it is not a path separator, so the result
stays one filename in one directory.

Args:
    repo: the repository, in either spelling :func:`hf_url` accepts. Both
        resolve to the same cache name, because they resolve to the same URL.
    filename: the file's name within that repository.

Returns:
    The cache filename to pass as ``file_name``.

Example:
    >>> _hf_cache_file_name("kornia/kimi-vl-a3b-instruct-vision", "model.safetensors")
    'kornia--kimi-vl-a3b-instruct-vision--model.safetensors'
    >>> _hf_cache_file_name("hardnet", "HardNetPP.pth")
    'kornia--hardnet--HardNetPP.pth'
r   z--)r   Úreplacer%   s   &&r   Ú_hf_cache_file_namer*   b   s(   € ô8 ˜$Ó×'Ñ'¨¨TÓ2Ð3°2°h°ZÐ@Ð@r   é­  i“  g      ð?g      N@g      >@ÚKORNIA_DOWNLOAD_TIMEOUTc               ó    € V ^8„  d   QhRRRR/# )r   ÚsecondsÚfloatr   Úboolr   )r   s   "r   r   r   Ä   s   € ÷ 0ñ 0˜Uð 0 tñ 0r   c                óJ   € ^ T u;8  ;'       d    \         P                  8*  # u # )a”  Return whether *seconds* is more than 0 and at most ``threading.TIMEOUT_MAX``.

``threading.TIMEOUT_MAX`` is the stdlib's documented ceiling on a blocking timeout. A
finite value far beyond it, such as ``1e300``, makes the socket raise ``OverflowError``
once the transfer starts, which the retry logic would then report as a failed source.
The bound does not promise that every value up to it is honoured: some platforms
truncate a wait longer than about 49 days (2**32 milliseconds), so such a timeout can
expire much sooner than asked. NaN and infinity fail the comparison, and an ``int`` too
large for a ``float`` is compared exactly rather than converted.
)Ú	threadingÚTIMEOUT_MAX©r.   s   &r   Ú_usable_timeoutr5   Ä   s#   € ð ˆw×/Ô/œ)×/Ñ/Ñ/Ð/Ñ/Ð/r   c                  ó>   a € ] tR t^ÖtRtR V 3R lltR R ltRtV ;t# )Ú_TruncatedTransfera¢  A response body that ended before the ``Content-Length`` its headers announced.

urllib ends a ``read(n)`` loop on an early close without an error, so without this
check a server that dropped the connection part-way left a short file in the cache,
returned as a hit by every later call (the root cause of #4309). It is an
:class:`~http.client.IncompleteRead`, which :func:`_is_transient` retries before the
next source is tried. Its message counts the bytes on disk, which the parent class
would report as 0 because it counts only a partial body held in memory, and reads
as a sentence, because the failure summaries print it without the class name (see
:func:`_describe`).
c               ó$   € V ^8„  d   QhRRRRRR/# )r   ÚreceivedÚintÚ	announcedr   ÚNoner   )r   s   "r   r   Ú_TruncatedTransfer.__annotate__ã   s!   € ÷ #ñ # ð #°ð #¸ñ #r   c                	ó\   <€ \         SV `  R W!,
          4       W3V n        Wn        W n        R# )r   N)ÚsuperÚ__init__Úargsr9   r;   )Úselfr9   r;   Ú	__class__s   &&&€r   r@   Ú_TruncatedTransfer.__init__ã   s)   ø€ Ü‰Ñ˜˜iÕ2Ô3àÐ)ˆŒ	Ø ŒØ"Žr   c               ó   € V ^8„  d   QhRR/# )r   r   r   r   )r   s   "r   r   r=   ê   s   € ÷ 
ñ 
˜#ñ 
r   c                	ó<   € R V P                    RV P                   R2# )z$transfer truncated: the server sent z of the z# bytes its Content-Length announced)r9   r;   )rB   s   &r   Ú__repr__Ú_TruncatedTransfer.__repr__ê   s(   € à2°4·=±=°/ÀÈ$Ï.É.ÐIYð Z+ð ,ð	
r   )r;   rA   r9   )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r@   rG   Ú__static_attributes__Ú__classcell__)rC   s   @r   r7   r7   Ö   s   ø† ñ
÷#ð #÷
ó 
r   r7   c               ó    € V ^8„  d   QhRRRR/# )r   ÚexcÚBaseExceptionr   r   r   )r   s   "r   r   r   ñ   s   € ÷ *ñ *�=ð * Sñ *r   c                óx   € \        V \        4      '       d   \        V 4      # \        V 4      P                   RV  2# )z\Return ``"<type>: <message>"`` for a failure summary; a truncated transfer describes itself.ú: )Ú
isinstancer7   r   ÚtyperI   ©rQ   s   &r   Ú	_describerX   ñ   s5   € ä�#Ô)×*Ò*Ü�3‹xˆÜ�3‹i× Ñ Ð!  C 5Ð)Ð)r   c               ó    € V ^8„  d   QhRRRR/# )r   Útimeoutúfloat | Noner   r/   r   )r   s   "r   r   r   ø   s   € ÷ *ñ *˜lð *¨uñ *r   c           
     ó2  € V f�   \         P                  P                  \        R4      P	                  4       pV'       g   \
        #  \        V4      p\        V4      '       g1   \        \         R\        P                  : RV: R\
        R R24      hV# \        V \        4      '       g   \        V \        \        34      '       g#   \!        R\#        V 4      P$                   R24      h\        V 4      '       gt   \        V \        4      ;'       d    V P'                  4       ^@8„  pV'       d   R	V P'                  4        R
2M
\)        V 4      p\        R\        P                  : RV R24      h\        V 4      #   \         d    \        P                  p ELDi ; i)aM  Return the timeout a call runs with, validated.

Args:
    timeout: the caller's value, or ``None`` for the ``KORNIA_DOWNLOAD_TIMEOUT``
        environment variable, or 30 s when that is unset or blank. An explicit value
        wins, and the variable is then not read at all.

Returns:
    The timeout in seconds.

Raises:
    TypeError: if *timeout* is not a number.
    ValueError: if *timeout*, or the variable it falls back to, is not greater than
        0 and at most ``threading.TIMEOUT_MAX`` (see :func:`_usable_timeout`); the
        message names which of the two it came from.
Ú z8 must be a number of seconds greater than 0 and at most z (threading.TIMEOUT_MAX), got z!. Unset it to use the default of Úgz s.z1timeout must be a number of seconds or None, got Ú.z
an int of z bitsz?timeout must be a number of seconds greater than 0 and at most )ÚosÚenvironÚgetÚ_DOWNLOAD_TIMEOUT_ENV_VARÚstripÚ_DOWNLOAD_TIMEOUT_SECONDSr/   Ú
ValueErrorÚmathÚnanr5   r2   r3   rU   r0   r:   Ú	TypeErrorrV   rI   Ú
bit_lengthÚrepr)rZ   ÚrawÚvalueÚhugeÚshowns   &    r   Ú_resolve_timeoutrp   ø   sp  € ð" ‚Ü�j‰j�n‰nÔ6¸Ó;×AÑAÓCˆßÜ,Ð,ð	Ü˜#“JˆEô ˜u×%Ò%ÜÜ,Ð-Ð-eÜ×(Ñ(Ñ+Ð+IÈ#Éð Q2Ü2KÈAÐ1NÈcðSóð ð
 ˆÜ�'œ4× Ò ¬
°7¼SÄ%¸L×(IÒ(IÜÐKÌDÐQXËM×LbÑLbÐKcÐcdÐeÓfÐfÜ˜7×#Ò#ä˜'¤3Ó'×EÐE¨G×,>Ñ,>Ó,@À2Ñ,Eˆß<@�*˜W×/Ñ/Ó1Ð2°%Ñ8ÄdÈ7ÃmˆÜØMÌi×NcÑNcÑMfð g,Ø,1¨7°!ð5ó
ð 	
ô �‹>Ðøô' ô 	Ü—H‘H‹Eð	ús   ÁE7 Å7FÆFc               ó    € V ^8„  d   QhRRRR/# ©r   rQ   rR   r   r0   r   )r   s   "r   r   r   %  s   € ÷ qñ q�]ð q tñ qr   c                óÐ   € \        V \        4      '       d   R# \        V \        4      ;'       d8    \        V \        4      '       * ;'       d    \        V P                  \        4      # )zOReturn whether *exc* is a socket timeout, raised directly or wrapped by urllib.T)rU   ÚTimeoutErrorr   r
   ÚreasonrW   s   &r   Ú_is_timeoutrv   %  sH   € ä�#”|×$Ò$ÙÜ�cœ8Ó$×pÐp¬Z¸¼YÓ-GÔ)G×pÐpÌJÐWZ×WaÑWaÔcoÓLpÐpr   c               ó    € V ^8„  d   QhRRRR/# )r   Úmessager   r   r<   r   )r   s   "r   r   r   ,  s   € ÷ -ñ -�3ð -˜4ñ -r   c                óÈ   € ^p\         P                  ! 4       pVe0   VP                  \        4       J d   VP                  pV^,          pK3  \
        P                  ! WR7       R# )aƒ  Warn, attributed to the first frame outside this module.

The public functions call each other -- :func:`download_hf_file` goes through
:func:`download_file_from_url` -- so a fixed ``stacklevel`` that is right for one
entry point points into this file for another. Walking out of the module instead
names the caller's line whichever way it came in.

Args:
    message: the warning text.
N)Ú
stacklevel)ÚinspectÚcurrentframeÚ	f_globalsÚglobalsÚf_backÚwarningsÚwarn)rx   ÚlevelÚframes   &  r   Ú_warnr„   ,  sH   € ð €EÜ× Ò Ó"€EØ
Ò
 §¡´7³9Ó <Ø—‘ˆØ��
ŠÜ‡M‚M�'×,r   c               ó    € V ^8„  d   QhRRRR/# )r   ÚurlÚobjectr   ú	list[str]r   )r   s   "r   r   r   ?  s   € ÷ %ñ %�6ð %˜iñ %r   c                óØ  € Rp\        V \        \        \        P                  34      '       d   V .pM \        V 4      pT'       g   \        R4      h. pV FÝ  p\        V\        P                  4      '       d%   \        V R\        V4      P                   R24      h\        V\        4      '       g%   \        V R\        V4      P                   R24      hV'       g   \        RV : R24      h\        \        V4      P                  4      ^8:  d   \        R	V: R24      hVP                  V4       Kß  	  V#   \         d'    \        T R\        T 4      P                   R24      Rhi ; i)
a?  Return *url* as a non-empty list of URL strings, or raise naming what is wrong.

Args:
    url: what the caller passed as ``url``.

Returns:
    The URLs, in order.

Raises:
    TypeError: if *url* is not a string or an iterable of strings.
    ValueError: if there is no URL, or one of them is empty or has no scheme.
z*url must be a URL string or a list of themz, got r_   Nz,url is an empty list; pass at least one URL.z, got a z&; to load a local file use torch.load.zurl must not be empty, got z%url must be a URL with a scheme, got )rU   r   Úbytesr`   ÚPathLikeÚlistri   rV   rI   rf   Úlenr   ÚschemeÚappend)r†   ÚexpectedÚurlsÚcheckedÚus   &    r   Ú	_url_listr”   ?  sN  € ð <€HÜ�#œœU¤B§K¡KÐ0×1Ò1Ø!˜U‰ð	PÜ˜“9ˆD÷ ÜÐKÓLÐLØ€GÛˆÜ�aœŸ™×%Ò%Ü˜x˜j¨´°a³×1AÑ1AÐ0BÐBhÐiÓjÐjÜ˜!œS×!Ò!Ü˜x˜j¨¬t°A«w×/?Ñ/?Ð.@ÀÐBÓCÐCßÜÐ:¸3¹'ÀÐCÓDÐDô Œx˜‹{×!Ñ!Ó" aÔ'ÜÐDÀQÁEÐIoÐpÓqÐqØ�‰�qÖñ ð €Nøô% ô 	PÜ˜x˜j¨¬t°C«y×/AÑ/AÐ.BÀ!ÐDÓEÈ4ÐOð	Pús   ³D8 Ä81E)c               ó$   € V ^8„  d   QhRRRRRR/# )r   r‘   rˆ   Ú	file_namezstr | os.PathLike[str] | Noner   ú
str | Noner   )r   s   "r   r   r   k  s#   € ÷ $ñ $ ð $Ð7Tð $ÐYcñ $r   c                ó0  € Ve�   \         P                  ! V4      p\        V\        4      '       g#   \	        R\        V4      P                   R24      hV\        9   g%   \         P                  P                  V4      V8w  d   \        RV: R24      hV# \         P                  P                  \        V ^ ,          4      P                  4      pV\        9   g%   \         P                  P                  V4      V8w  d   \        V ^ ,          : RV: R24      hR# )aY  Refuse a cache entry name that is not a single file inside the cache directory.

The cache is one flat directory and the entry is ``<model_dir>/<name>``. A
``file_name`` carrying a separator, an absolute path or ``..`` would put it
outside, where the cache repair of :func:`load_state_dict_from_url` would move
a file it never wrote aside, write over it and delete the original. A URL whose
path ends in ``/``, ``/.`` or ``/..`` names no file, and the name derived from it
would make the entry the cache directory or its parent. The name derived from a
URL is held to the same bare-name test as ``file_name``: on Windows a last
segment such as ``d:x.pth`` is a drive-relative path, not a name in the cache.

Args:
    urls: the URLs of the call; without ``file_name`` the first one names the entry.
    file_name: the caller's ``file_name``, a ``str`` or an :class:`os.PathLike`, or ``None``.

Returns:
    ``file_name`` as a ``str``, or ``None`` when it was not given.

Raises:
    TypeError: if ``file_name`` is neither a ``str`` nor a path-like naming one.
    ValueError: if the name is not a bare file name.
Nz3file_name must be a str or a path-like object, got r_   zBfile_name must be a bare filename inside the cache directory, got z\ does not end in a name that can be a file in the cache directory (its last path segment is z+); pass file_name= to name the cache entry.)r`   ÚfspathrU   r   ri   rV   rI   Ú_NOT_A_FILE_NAMEÚpathÚbasenamerf   r   )r‘   r–   Únames   && r   Ú_check_cache_file_namerž   k  sõ   € ð. ÒÜ�yŠy˜Ó#ˆÜ˜$¤×$Ò$ÜÐQÔRVÐW`ÓRa×RjÑRjÐQkÐklÐmÓnÐnØÔ#Ô#¤r§w¡w×'7Ñ'7¸Ó'=ÀÔ'EÜÐaÐbkÑanÐnoÐpÓqÐqØˆÜ�7‰7×ÑœH T¨!¥WÓ-×2Ñ2Ó3€DØÔÔ¤2§7¡7×#3Ñ#3°DÓ#9¸TÔ#AÜØ�A�w‰kð Ø™Ð!LðNó
ð 	
ñ r   c               ó    € V ^8„  d   QhRRRR/# )r   Ú	model_dirr	   r   r   )r   s   "r   r   r   ’  s   € ÷ 	Gñ 	G ð 	G¨ñ 	Gr   c                óŠ   € V f   R# \         P                  P                  V 4      pV\         P                  ! V 4      8X  d   V # T# )zîExpand a leading ``~`` in *model_dir*, as a shell would; ``None`` passes through.

Neither the ``makedirs`` nor the existence check expands it, so ``"~/weights"``
used to create a directory literally named ``~`` in the working directory.
N)r`   r›   Ú
expanduserr™   )r    Úexpandeds   & r   Ú_expand_model_dirr¤   ’  s<   € ð ÒÙÜ�w‰w×!Ñ! )Ó,€HØ ¤B§I¢I¨iÓ$8Ô8ˆ9ÐF¸hÐFr   c               ó    € V ^8„  d   QhRRRR/# )r   Úkwargsúdict[str, Any]r   r<   r   )r   s   "r   r   r   ž  s   € ÷ 
ñ 
 .ð 
°Tñ 
r   c           
     óð  €  \         P                  ! \        P                  P                  4      P
                  p\        ;QJ d*    R TP                  4        4       F  '       g   K   RM	  RM! R TP                  4        4       4      '       d   R# TP                  4        UUu0 uFU  w  r#TP                  \         P                  P                  \         P                  P                  39   g   KJ  TR8w  g   KS  TkKW  	  ppp\        \!        T 4      T,
          4      pT'       d3   \        RT^ ,          : RRP#                  \        T4      4       R	24      hR#   \        \        3 d     R# i ; iu uppi )
añ  Raise :class:`TypeError` for a keyword :func:`torch.hub.load_state_dict_from_url` does not take.

torch raises the same error, but only when it is called -- after the cache has been
consulted -- so the call's cache repair took a caller's typo for a corrupt entry: it
set the entry aside, downloaded the checkpoint again and reported ``RuntimeError``.

Args:
    kwargs: the keyword arguments destined for the torch function.

Raises:
    TypeError: naming the first keyword torch does not accept.
Nc              3  ól   "  € T F*  qP                   \        P                  P                  J x € K,  	  R # 5i©N)Úkindr{   Ú	ParameterÚVAR_KEYWORD)Ú.0Úps   & r   Ú	<genexpr>Ú(_check_torch_keywords.<locals>.<genexpr>¯  s%   é € Ð
PÑ<O°q�6‰6”W×&Ñ&×2Ñ2Õ2Ó<Oùs   ‚24TFr†   z>load_state_dict_from_url() got an unexpected keyword argument zM. It accepts timeout and the keywords of torch.hub.load_state_dict_from_url: z, r_   )r{   Ú	signatureÚtorchÚhubÚload_state_dict_from_urlÚ
parametersri   rf   ÚanyÚvaluesÚitemsr«   r¬   ÚPOSITIONAL_OR_KEYWORDÚKEYWORD_ONLYÚsortedÚsetÚjoin)r¦   r¶   r�   r¯   ÚacceptedÚunknowns   &     r   Ú_check_torch_keywordsrÁ   ž  s@  € ðÜ×&Ò&¤u§y¡y×'IÑ'IÓJ×UÑUˆ
÷ ƒsÑ
P¸J×<MÑ<MÔ<OÓ
P‡s‡s‚sÑ
P¸J×<MÑ<MÔ<OÓ
P×PÒPÙð "×'Ñ'Ô)ôá)‰GˆDØ�6‰6”g×'Ñ'×=Ñ=¼w×?PÑ?P×?]Ñ?]Ð^Ñ^ô 	àcgÐkpÑcp÷ 	ˆÙ)ð ñ ô
 ”S˜“[ 8Õ+Ó,€GßÜØLÈWÐUVÍZÉNð [ZØZ^×ZcÑZcÔdjÐksÓdtÓZuÐYvÐvwðyó
ð 	
ñ øô ”zÐ"ô Úðüós$   ‚8E Â%AE2Ã1E2Ã:E2ÅE/Å.E/c                  ó2   € ] tR tRtRtR R ltR R ltRtR# )	Ú_SleepBudgeti¾  z:The time a single call may spend waiting between attempts.c               ó    € V ^8„  d   QhRRRR/# )r   r.   r/   r   r<   r   )r   s   "r   r   Ú_SleepBudget.__annotate__Á  s   € ÷ !ñ ! ð !¨$ñ !r   c                	ó   € Wn         R # rª   ©Ú	remaining)rB   r.   s   &&r   r@   Ú_SleepBudget.__init__Á  s   € Ø Žr   c               ó    € V ^8„  d   QhRRRR/# )r   Údelayr/   r   r<   r   )r   s   "r   r   rÅ   Ä  s   € ÷ ñ ˜5ð  Tñ r   c                ód   € V ;P                   V,          un         \        P                  ! V4       R# )z1Wait *delay* seconds and charge it to the budget.N)rÈ   ÚtimeÚsleep)rB   rË   s   &&r   rÎ   Ú_SleepBudget.sleepÄ  s   € à�Š˜%Õ�Ü�
Š
�5Ör   rÇ   N)rI   rJ   rK   rL   rM   r@   rÎ   rN   r   r   r   rÃ   rÃ   ¾  s   † ÙDõ!÷ñ r   rÃ   c               ó    € V ^8„  d   QhRRRR/# )r   rQ   r
   r   r0   r   )r   s   "r   r   r   Ê  s   € ÷ >ñ >�yð > Tñ >r   c                óà   € V P                   \        9  d   R# \        V RR4      pVf   R# VP                  R4      e   R# VP                  R4      pVRJ;'       d    VP	                  4       R8H  # )a  Return whether *exc*'s headers mark it as a rate-limit response.

Args:
    exc: the HTTP error raised by a download attempt.

Returns:
    ``True`` if the status is one hosts use for rate limiting *and* the
    response carries a header that only a rate limit sets.
FÚheadersNúRetry-AfterTzX-RateLimit-RemainingÚ0)ÚcodeÚ_RATE_LIMIT_HTTP_STATUSÚgetattrrb   rd   )rQ   rÒ   rÈ   s   &  r   Ú_rate_limitedrØ   Ê  sj   € ð ‡x�xÔ.Ô.ÙÜ�c˜9 dÓ+€GØ‚ÙØ‡{�{�=Ó!Ò-ÙØ—‘Ð3Ó4€IØ˜DÐ ×=Ð= Y§_¡_Ó%6¸#Ñ%=Ð=r   c               ó    € V ^8„  d   QhRRRR/# )r   rm   r   r   r[   r   )r   s   "r   r   r   ß  s   € ÷ Eñ E ð E¨ñ Er   c                óp  € V P                  4       p  \        \        V 4      4      #   \         d     Mi ; i \	        T 4      pM  \
        \        3 d     R# i ; iTP                  f   TP                  \        R7      p\        T\        P                  ! \        4      ,
          P                  4       4      # )zãParse a ``Retry-After`` header value into a delay in seconds.

Args:
    value: the header value, either a number of seconds or an HTTP date.

Returns:
    The delay in seconds, or ``None`` if the value parses as neither form.
N)Útzinfo)rd   Ú_usable_delayr/   rf   r   ri   rÛ   r)   r   r   ÚnowÚtotal_seconds)rm   Úwhens   & r   Ú_retry_after_secondsrà   ß  s—   € ð �K‰K‹M€EðÜœU 5›\Ó*Ð*øÜô ÙðúðÜ$ UÓ+‰øÜ”zÐ"ô Úðúà‡{�{ÒØ�|‰|¤3ˆ|Ó'ˆÜ˜$¤§¢¬cÓ!2Õ2×AÑAÓCÓDÐDs   ’& ¦4³4¸A ÁAÁAc               ó    € V ^8„  d   QhRRRR/# )r   r.   r/   r   r[   r   )r   s   "r   r   r   ö  s   € ÷ ñ ˜5ð  \ñ r   c                óP   € \         P                  ! V 4      '       d   V R8:  d   R# V # )aø  Return *seconds* if it is a delay worth waiting, else ``None``.

``Retry-After: nan`` parses as a float and would reach :func:`time.sleep`,
which raises ``ValueError`` on a NaN -- from inside the retry handler, so the
rate limit that sent the header would never be retried at all. A non-positive
result is no guidance either: a date already in the past, or an
``X-RateLimit-Reset`` a host expressed as a delta rather than the epoch
GitHub uses, would otherwise fire every remaining attempt back to back.
g        N)rg   Úisfiniter4   s   &r   rÜ   rÜ   ö  s!   € ô �=Š=˜×!Ò! W°¤^ÙØ€Nr   c               ó    € V ^8„  d   QhRRRR/# )r   rQ   rR   r   r[   r   )r   s   "r   r   r     s   € ÷ &ñ & ð &°<ñ &r   c                ó–  € \        V \        4      '       g   R# \        V RR4      pVf   R# VP                  R4      pVe   \	        V4      ;pe   V# \        V 4      '       g   R# VP                  R4      pVf   R#  \        \        VP                  4       4      \        P                  ! 4       ,
          4      #   \         d     R# i ; i)zçReturn the delay *exc*'s host asked for before the next request.

Args:
    exc: the exception raised by a download attempt.

Returns:
    The requested delay in seconds, or ``None`` if the response carried no
    usable guidance.
NrÒ   rÓ   zX-RateLimit-Reset)rU   r
   r×   rb   rà   rØ   rÜ   r/   rd   rÍ   rf   )rQ   rÒ   Úretry_afterrË   Úresets   &    r   Ú_server_requested_delayrè     s´   € ô �cœ9×%Ò%ÙÜ�c˜9 dÓ+€GØ‚Ùð —+‘+˜mÓ,€KØÒÔ-AÀ+Ó-NÐ$N EÒ#[Øˆô ˜×ÒÙØ�K‰KÐ+Ó,€EØ‚}ÙðÜœU 5§;¡;£=Ó1´D·I²I³KÕ?Ó@Ð@øÜô Úðús   Á=;B9 Â9CÃCc               ó$   € V ^8„  d   QhRRRRRR/# )r   rQ   rR   Úattemptr:   r   r/   r   )r   s   "r   r   r   .  s!   € ÷ 0ñ 0�mð 0¨cð 0°eñ 0r   c                óv   € \        V 4      pVf   \        ^V^,
          ,          ,          # \        V\        4      # )aA  Return how long to wait before *attempt* + 1, honouring the server when it says.

Exponential backoff is a guess; ``Retry-After`` and ``X-RateLimit-Reset`` are
the host telling us when it will serve again. Retrying before then only
spends another request against the same limit, and waiting far longer than
asked wastes the job -- so the server's number wins where it is given,
clamped to :data:`_MAX_BACKOFF_SECONDS`.

Args:
    exc: the failure that is about to be retried.
    attempt: the 1-based number of the attempt that just failed.

Returns:
    The delay in seconds.
)rè   Ú_BACKOFF_SECONDSÚminÚ_MAX_BACKOFF_SECONDS)rQ   rê   Ú	requesteds   && r   Ú_retry_delayrð   .  s6   € ô  (¨Ó,€IØÒÜ !¨°!­Õ"4Õ4Ð4ÜˆyÔ.Ó/Ð/r   c               ó    € V ^8„  d   QhRRRR/# rr   r   )r   s   "r   r   r   D  s   € ÷ bñ b�}ð b¨ñ br   c                óâ   € \        V \        4      '       d'   V P                  \        9   ;'       g    \	        V 4      # \        V \
        \        \        \        P                  P                  34      # )a  Return whether *exc* is a temporary network condition worth retrying.

Rate limiting is the motivating case. An unauthenticated CI matrix fans many
jobs out at once, which regularly trips the anonymous request limits of
huggingface.co and github.com even though the checkpoint is served normally a
moment later.

Every :class:`~urllib.error.URLError` counts, ``exc.reason`` included: DNS
resolution and "network is unreachable" fail this way and are as often a
momentary condition as a permanent one. The cost of not separating them is
that an offline run with a cold cache waits out its retries before reporting
the same error, which the per-call sleep budget bounds.

Args:
    exc: the exception raised by a download attempt.

Returns:
    ``True`` if another attempt could plausibly succeed.
)rU   r
   rÕ   Ú_TRANSIENT_HTTP_STATUSrØ   r   rt   ÚConnectionErrorÚhttpÚclientÚIncompleteReadrW   s   &r   Ú_is_transientrø   D  sP   € ô( �#”y×!Ò!Ø�x‰xÔ1Ñ1×GÐG´]À3Ó5GÐGô �cœH¤l´OÄTÇ[Á[×E_ÑE_Ð`ÓaÐar   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r†   r   r¦   r§   r   r   )r   s   "r   r   r   c  s!   € ÷ -ñ -˜3ð -¨ð -¸3ñ -r   c                ót  € VP                  R4      pVf=   \        P                  P                  \        P
                  P                  4       R4      pVP                  R4      pVe   TM1\        P                  P                  \        V 4      P                  4      p\        P                  P                  W$4      # )aÖ  Return the path :func:`torch.hub.load_state_dict_from_url` would cache *url* at.

Mirrors torch's own resolution: ``<model_dir>/<file_name or basename(url)>``,
where ``model_dir`` defaults to ``<torch.hub.get_dir()>/checkpoints``.

Args:
    url: the URL that would be downloaded.
    kwargs: the keyword arguments destined for the torch function; only
        ``model_dir`` and ``file_name`` are consulted.

Returns:
    The absolute path of the cache entry for *url*.
r    Úcheckpointsr–   )	rb   r`   r›   r¾   r³   r´   Úget_dirrœ   r   )r†   r¦   r    r–   r!   s   &&   r   Ú_cached_file_pathrý   c  s‚   € ð —
‘
˜;Ó'€IØÒÜ—G‘G—L‘L¤§¡×!2Ñ!2Ó!4°mÓDˆ	ð —
‘
˜;Ó'€IØ%Ò1‰y´r·w±w×7GÑ7GÌÐQTË×HZÑHZÓ7[€HÜ�7‰7�<‰<˜	Ó,Ð,r   Tc               ó0   € V ^8„  d   QhRRRRRRRRRR	R
R/# )r   r†   r   ÚdstÚhash_prefixr—   Úprogressr0   rZ   r[   r   r<   r   )r   s   "r   r   r   |  sL   € ÷ kñ kØ	ðkà	ðkð ðkð ð	kð
 ðkð 
ñkr   c                óv  € \        V4      p\        P                  P                  V4      p\	        \
        P                  4       F5  pV R\        P                  ! 4       P                   R2p \        VR4      p M	  \        \        P                  R4      hTe   \        P                  ! 4       MRp\!        \"        P$                  RR4      p	 T;_uu_ 4        \'        T RR/R	7      p
\)        Y¤R
7      ;_uu_ 4       p\!        TRR4      pTP+                  4       P-                  R4      pT'       d   \/        T^ ,          4      MRpT	e   T	! Yã'       * RRRR7      M\0        P2                  ! 4       p^ pT;_uu_ 4        TP5                  \6        4      ;p'       d[   TP9                  T4       T\;        T4      ,          pTe   TP=                  T4       T	f   K[  TP=                  \;        T4      4       Kw   RRR4       RRR4       RRR4       \?        X\.        4      '       d   XT8  d   \A        TT4      hTe:   Te6   TPC                  4       pTR\;        T4       T8w  d   \E        RT RT R24      h\        PF                  ! Ya4         \        PP                  ! T4       R#   \         d     EKm  i ; i  + '       g   i     LÉ; i  + '       g   i     LÔ; i  + '       g   i     Lß; i  \H        \J        3 d0   p\M        T4      '       g   h \I        RTR R\N         R24      ThRp?ii ; i  \R         d     R# \T         d   p\W        RT RT R24        Rp?R# Rp?ii ; i   \        PP                  ! T4       i   \R         d     i \T         d   p\W        RT RT R24        Rp?i Rp?ii ; i; i)a·  Download *url* to *dst*, failing an attempt that stalls for *timeout* seconds.

:func:`torch.hub.download_url_to_file` with a timeout. torch's function opens
the URL with no timeout and has no parameter for one, so a server that accepted
the connection and then went quiet held the call forever. Giving it one from
outside would mean replacing ``torch.hub.urlopen`` or the process-wide socket
default, which changes torch or every other thread for everyone, so kornia runs
the transfer itself. Everything else follows torch: the ``User-Agent``, the chunk
size, the progress bar (torch's own ``tqdm``, or its stand-in without tqdm), the
hash check and its message, and writing to a temporary file beside *dst* that
replaces it only once complete, so a failed or interrupted transfer never leaves
a partial file at *dst*. Unlike torch, a body shorter than the ``Content-Length``
that framed it counts as failed rather than complete; a chunked or close-delimited
body, or one whose header http.client ignores, is taken as torch takes it.

Args:
    url: the URL to fetch; ``file://`` URLs work too.
    dst: the destination path; a leading ``~`` is expanded.
    hash_prefix: if given, the SHA256 of the download must start with it.
    progress: whether to show a progress bar on stderr.
    timeout: the bound on connecting and on each read, in seconds; ``None``
        uses the ``KORNIA_DOWNLOAD_TIMEOUT`` environment variable, or 30 s. It
        bounds each wait, not the whole transfer.

Raises:
    TimeoutError: if the server went *timeout* seconds without answering.
    http.client.IncompleteRead: if the body ended before its ``Content-Length``.
    RuntimeError: if the download does not match *hash_prefix*.
r_   z.partialÚxbz#No usable temporary file name foundNÚtqdmz
User-Agentz	torch.hub)rÒ   )rZ   ÚlengthzContent-LengthÚBTi   )ÚtotalÚdisableÚunitÚ
unit_scaleÚunit_divisorzinvalid hash value (expected "z", got "z")zthe server went r^   zè s without answering (the download timeout, which bounds connecting and each read). If the link is slow rather than stalled, pass a larger timeout= to load_state_dict_from_url, download_file_from_url or download_hf_file, or set the zz environment variable (in seconds), which also reaches callers that take no timeout, such as pretrained model constructorsz-Could not remove the temporary download file rT   z3. Delete it by hand once no other process holds it.),rp   r`   r›   r¢   ÚrangeÚtempfileÚTMP_MAXÚuuidÚuuid4ÚhexÚopenÚFileExistsErrorÚerrnoÚEEXISTÚhashlibÚsha256r×   r³   r´   r   r   ÚinfoÚget_allr:   Ú
contextlibÚnullcontextÚreadÚ_READ_CHUNK_BYTESÚwriter�   ÚupdaterU   r7   Ú	hexdigestÚRuntimeErrorr)   rt   r   rv   rc   ÚremoveÚFileNotFoundErrorÚOSErrorr„   )r†   rÿ   r   r  rZ   Ú_ÚpartialÚfr  Úbar_typeÚrequestÚresponseÚframedÚlengthsr  Úbarr9   ÚchunkÚdigestÚes   &&&&&               r   Ú_download_url_to_filer1  |  sW  € ôH ˜wÓ'€GÜ
�'‰'×
Ñ
˜SÓ
!€CÜ”8×#Ñ#Ö$ˆØ�E˜œ4Ÿ:š:›<×+Ñ+Ð,¨HÐ5ˆð	ä�W˜dÓ#ˆAñ 	ñ %ô œeŸl™lÐ,QÓRÐRà!,Ò!8ŒW�^Š^Ô¸d€FÜ”u—y‘y &¨$Ó/€Hð8ßŠQä˜c¨L¸+Ð+FÔGˆGÜ˜×2Õ2°hô ! ¨8°TÓ:�Ø"Ÿ-™-›/×1Ñ1Ð2BÓC�ß+2œ˜G A�Jœ¸�ð  Ò+ñ  5´,ÀSÐUYÐhlÕmä#×/Ò/Ó1ð ð
 �ß’SØ#+§=¡=Ô1BÓ#CÐC˜%ÖCØŸ™ œØ ¤C¨£JÕ.˜Ø!Ò-Ø"ŸM™M¨%Ô0Ø#Ô/ØŸJ™J¤s¨5£zÖ2ð D÷ ÷ 3÷ ô6 �fœc×"Ò" x°&Ô'8Ü$ X¨vÓ6Ð6ØÒ +Ò"9Ø×%Ñ%Ó'ˆFØÐ(œ˜KÓ(Ð)¨[Ô8Ü"Ð%CÀKÀ=ÐPXÐY_ÐX`Ð`bÐ#cÓdÐdÜ
�
Š
�7Õ ð
	Ü�IŠI�gÖøôo ô 	Ûð	ú÷2 —Sú÷ 3×2ú÷ �QûôD œ(Ð#ô 	Ü˜1�~Š~ØÜØ˜w q˜kð *`ô )Ð)ð *JðKó
ð ð	ûð	ûô !ô 	ÚÜô 	ô Ø?À¸yÈÈ1È#ð NDð E÷ò ûð	ûð	
	Ü�IŠI�gÕøÜ ô 	ÙÜô 	ô Ø?À¸yÈÈ1È#ð NDð E÷ñ ûð	ýsì   Á-J"Ã
K. Ã$KÃ<A?K	Å;J5Æ9J5ÇJ5Ç4K	Ç<KÈBK. Ê
L1 Ê"J2Ê1J2Ê5KË K	ËKËKËK+	Ë&K. Ë.L.Ë?*L)Ì)L.Ì.M) Ì1M&Ì?M&ÍM&Í	M!Í!M&Í)N8Í+NÎN8ÎN5ÎN8ÎN5ÎN5ÎN0Î+N8Î0N5Î5N8c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r†   r   r¦   r§   rZ   r/   r   r0   r   )r   s   "r   r   r   ê  s(   € ÷ )ñ )˜Cð )¨ð )À%ð )ÈDñ )r   c           	     óP  € \        W4      p\        P                  P                  V4      '       d   R# \        P                  ! \        P                  P                  V4      RR7       RpVP                  R4      '       db   \        P                  P                  P                  \        P                  P                  V4      4      pV'       d   VP                  ^4      MRp\        P                  P                  RV  RV R24       \!        WWAP                  R	R4      VR
7       R# )aœ  Download *url* into the torch hub cache if it is not already there.

Doing the fetch here rather than letting :func:`torch.hub.load_state_dict_from_url`
do it means torch finds the file present and never writes its status line to
stdout. A no-op when the file is already cached, which is the common case.

If the path computed here ever disagreed with torch's, the only consequence
is that torch downloads the file again -- the result stays correct.

Args:
    url: the URL to fetch.
    kwargs: the keyword arguments destined for the torch function;
        ``model_dir``, ``file_name``, ``check_hash`` and ``progress`` are
        honoured so the cache entry is identical to torch's.
    timeout: the bound on connecting and on each read, in seconds, already
        resolved by :func:`_resolve_timeout`.

Returns:
    Whether a transfer happened. A cache hit returns ``False``, which is how
    :func:`load_state_dict_from_url` tells a source that was really fetched
    from one that was handed the file already on disk.

Raises:
    TimeoutError: if the server stalled for *timeout* seconds; see
        :func:`_download_url_to_file`, which leaves nothing at the cache path.
FT)Úexist_okNÚ
check_hashzDownloading: "z" to Ú
r  )r  rZ   )rý   r`   r›   ÚexistsÚmakedirsÚdirnamerb   r³   r´   Ú
HASH_REGEXÚsearchrœ   ÚgroupÚsysÚstderrr  r1  )r†   r¦   rZ   Úcached_filer   Úmatchs   &&&   r   Ú_prefetch_to_cacherA  ê  sÌ   € ô6 $ CÓ0€KÜ	‡w�w‡~�~�k×"Ò"Ùä‡K‚K”—‘—‘ Ó,°tÕ<à€KØ‡z�z�,×ÒÜ—	‘	×$Ñ$×+Ñ+¬B¯G©G×,<Ñ,<¸[Ó,IÓJˆß(-�e—k‘k !”n°4ˆô ‡J�J×Ñ�~ c U¨%°¨}¸BÐ?Ô@Ü˜#¨KÇ*Á*ÈZÐY]ÓB^ÐhoÕpÙr   zset[str]Ú_DISCARDED_CACHE_PATHSz.kornia-discardedc               ó$   € V ^8„  d   QhRRRRRR/# )r   r†   r   r¦   r§   r   r—   r   )r   s   "r   r   r   #  s&   € ÷ Mñ M˜cð M¨>ð M¸jñ Mr   c                ó<  € \        W4      pV\        9   d   R# V \         2p \        P                  ! W#4       \        P                  T4       T#   \
         d     R# \         d3   p\        RT RT R24       \        P                  T4        Rp?R# Rp?ii ; i)aþ
  Move the cache entry for *url* aside, at most once per path per process.

Every URL in a fallback list resolves to the same path, because the cache
filename is pinned to the primary URL (see :func:`load_state_dict_from_url`).
A single bad write -- a truncated transfer, or an HTML rate-limit page served
with a 200 -- would therefore make :func:`_prefetch_to_cache` short-circuit on
each remaining source and hand torch the same broken file every time. The
fallback URLs could never take effect, and because the bad file survives the
process, the failure would repeat on every later run until the cache was
cleared by hand.

The entry is *renamed*, not deleted, because a load failure cannot tell a
corrupt cache entry from a healthy one that failed for an unrelated reason --
a bad ``map_location``, a ``weights_only`` rejection -- and a delete would
sometimes destroy an intact checkpoint, several of which are over a gigabyte.
Renaming makes the discard reversible; :func:`_settle_quarantine` owns the
decision and documents it. Within the same directory the rename is a metadata
operation, so the size of the checkpoint does not matter.

Gating the discard on the exception type instead was considered and does not
work. The types do not separate the two classes (torch 2.9.1): an HTML
rate-limit page served with a 200 -- the case that motivated this function --
and a ``weights_only`` rejection of a perfectly good file both raise
``UnpicklingError``, while a truncated zip checkpoint raises a bare
``RuntimeError``. A gate would discard the healthy entry it was meant to
spare and keep the commonest corruption there is.

What is bounded instead is the *refetch*: one per cache path per process,
tracked in :data:`_DISCARDED_CACHE_PATHS`. Without that, a failure the cache
cannot fix would re-download the checkpoint on every call, once per test that
builds the model -- the download storm this module exists to prevent, reached
from the other side.

Neither the ledger nor the rename is synchronised: two threads loading the
same checkpoint through one poisoned entry can have one of them find the path
already moved aside and fail where a single thread would have recovered. The
entry itself is never left in a worse state, and nothing in kornia loads one
checkpoint concurrently, so a lock is not worth its deadlock surface here.

Args:
    url: the URL whose cache entry should be moved aside.
    kwargs: the keyword arguments destined for the torch function; only
        ``model_dir`` and ``file_name`` are consulted.

Returns:
    The path the entry was moved to, or ``None`` if there was nothing to move
    or the bound is already spent. The caller needs this to hand to
    :func:`_settle_quarantine`, and to know which source was denied a real
    fetch by the entry that is now out of the way.
Nz%Could not discard the cache entry at rT   z_. If that file is corrupt, the fallback sources cannot take effect until it is deleted by hand.)	rý   rB  Ú_QUARANTINE_SUFFIXr`   r)   r#  r$  r„   Úadd)r†   r¦   r›   Ú
quarantiner0  s   &&   r   Ú_discard_cache_entryrH  #  s§   € ôf ˜SÓ)€DØÔ%Ô%Ùà�6Ô,Ð-Ð.€JðÜ
�
Š
�4Ô$ô& ×Ñ˜tÔ$ØÐøô' ô ò Üô ô 	Ø3°D°6¸¸A¸3ð ?Sð Tô	
ô 	×"Ñ" 4Ô(Ýûðús#   ¤A ÁBÁBÁ(BÁ)'BÂBc          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   r›   r   rG  Úloadedr0   Ú
downloadedr   r<   r   )r   s   "r   r   r   s  s1   € ÷ 0-ñ 0-˜Sð 0-¨cð 0-¸dð 0-ÐPTð 0-ÐY]ñ 0-r   c          
     óf  € V'       d    \         P                  ! V4       R#  \         P                  ! W4       T'       g   \
        P                  T 4       R# R#   \         d   p\        RT RT R24        Rp?R# Rp?ii ; i  \         d!   p\        RT  RT RT R24        Rp?R# Rp?ii ; i)aL  Resolve a quarantined cache entry once every source has had its turn.

The decision is the *outcome of the call*, never what happens to be sitting
at *path*. Whether a file is there says only that some source wrote one, not
that it is any good: a rate-limited mirror serving an HTML page with a 200
puts a file there, and settling on its presence would drop the quarantined
original in its favour -- destroying an intact multi-gigabyte checkpoint
behind a ``map_location='cuda'`` failure on a CPU-only build, which is the
very case renaming rather than deleting exists to survive.

So:

* *loaded*: whatever is at *path* is what just loaded, so the quarantined
  copy is the one that failed and is dropped.
* not *loaded*: everything tried failed, including anything a source wrote,
  so nothing on disk is known-good and the pre-call state is the safest one
  to leave behind. The original is moved back over whatever is there, and
  the caller ends the call with the cache it started with.

The bound in :data:`_DISCARDED_CACHE_PATHS` counts *successful refetches*, so
a failed call releases it again unless a source really did transfer the file.
Otherwise the first offline call in a process would spend the single allowed
discard on a path it could not repair, and a later call -- with the network
back -- could never clear a genuinely poisoned entry.

Args:
    path: the cache path the entry was moved out of.
    quarantine: the path :func:`_discard_cache_entry` moved it to.
    loaded: whether the call is returning a state dict.
    downloaded: whether any source transferred the file during the call.
z.Could not remove the discarded cache entry at rT   r_   Nz%Could not restore the cache entry at z from z>. Move it back by hand to avoid re-downloading the checkpoint.)r`   r"  r$  r„   r)   rB  Údiscard)r›   rG  rJ  rK  r0  s   &&$$ r   Ú_settle_quarantinerN  s  s»   € ÷@ ð	WÜ�IŠI�jÔ!ñ 	ðÜ
�
Š
�:Ô$÷ Ü×&Ñ& tÖ,ñ øô ô 	WÜÐBÀ:À,ÈbÐQRÐPSÐSTÐU×VÐVÙûð	Wûô ô ÜØ3°D°6¸À
¸|È2ÈaÈSð QKð Lô	
õ 	ûðús.   ŠA £B ÁBÁ%A=Á=BÂB0ÂB+Â+B0c               ó    € V ^8„  d   QhRRRR/# )r   r›   r   r   r<   r   )r   s   "r   r   r   ¦  s   € ÷ 
ñ 
 ð 
¨ñ 
r   c                ó¤   €  \         P                  ! V 4       R#   \         d     R# \         d   p\	        RT  RT R24        Rp?R# Rp?ii ; i)ay  Delete bytes the current source transferred and then failed to load.

Nothing is quarantined here: the file did not exist before this source wrote
it -- :func:`_prefetch_to_cache` only transfers into an empty path -- so there
is no earlier state to preserve and nothing to weigh it against. Setting it
aside instead would put it *back* in :func:`_settle_quarantine`, leaving the
caller a poisoned entry where the call found none, with the one allowed
discard spent on it, so no later call in the process could clear it. Deleting
returns the path to the state the call found, which is also the empty path the
next source needs in order to be fetched at all.

:func:`load_state_dict_from_url` calls this only while a later source remains,
because there a load failure does not establish that the bytes are bad -- a
``map_location`` a build cannot satisfy fails an intact checkpoint -- so the
final source keeps what it wrote. :func:`download_file_from_url` calls it for
every ``validate`` rejection of a fresh transfer, last source or not, because
that rejection *is* a verdict on the file.

Args:
    path: the cache path this source just wrote.
z(Could not remove the failed download at rT   z?. Delete it by hand if the fallback sources stop taking effect.N)r`   r"  r#  r$  r„   )r›   r0  s   & r   Ú_drop_failed_downloadrQ  ¦  sT   € ð,
Ü
�	Š	�$ŽøÜô ÚÜô 
ÜØ6°t°f¸B¸q¸cð BLð M÷	
ò 	
ûð
ús   ‚ šA¨A±A²A
Á
Ac          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r   r†   r   r¦   r§   ÚbudgetrÃ   rZ   r/   r   r0   r   )r   s   "r   r   r   Ç  s8   € ÷ Qñ Q˜cð Q¨>ð QÀ<ð QÐZ_ð QÐdhñ Qr   c                ó„  € \        ^\        ^,           4       F  p \        WV4      u # 	  \        R	4      h  \         d~   pT\        8X  g   \	        T4      '       g   h \        YT4      pYbP                  8”  d   h \        RT : RT RTR RT^,            R\         R24       TP                  T4        Rp?K¢  Rp?ii ; i)
a0  Run :func:`_prefetch_to_cache`, retrying transient failures with backoff.

Args:
    url: the URL to fetch.
    kwargs: the keyword arguments destined for the torch function.
    budget: the waiting time the whole call has left; a retry that would
        exceed it is not taken.
    timeout: forwarded to :func:`_prefetch_to_cache`.

Returns:
    Whether a transfer happened; see :func:`_prefetch_to_cache`.

Raises:
    Exception: the last failure, once the attempts are exhausted, the failure
        is not transient, or the call has no waiting time left.
zTransient failure fetching rT   z. Retrying in z.0fzs (attempt z of z).Nz4unreachable: the loop above always returns or raises)
r  Ú_MAX_ATTEMPTSrA  Ú	Exceptionrø   rð   rÈ   r„   rÎ   ÚAssertionError)r†   r¦   rS  rZ   rê   r0  rË   s   &&&&   r   Ú_prefetch_with_retryrX  Ç  sÄ   € ô" ˜œM¨AÕ-Ö.ˆð	 Ü% c°7Ó;Ò;ñ /ô ÐOÓ
PÐPøô ô 
	 Øœ-Ô'¬}¸Q×/?Ò/?ØÜ  Ó,ˆEØ×'Ñ'Ô'ØÜØ-¨c©W°B°q°c¸ÈÈcÀ{ð SØ# a�K˜=¨¬]¨O¸2ð?ôð �L‰L˜×Òûð
	 ús   œ7·B?ÁA2B:Â:B?rZ   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r†   ústr | list[str]rZ   r[   r¦   r	   r   r§   r   )r   s   "r   r   r   é  s0   € ÷ yñ y /ð y¸|ð yÐ^að yÐftñ yr   c               ó<  € \        V 4      p\        V4      p\        V4       \        W2P	                  R4      4      pVe   WBR&   VP	                  R4      e   \        VR,          4      VR&   VP	                  R4      f   RVR&   \        V4      ^8”  dF   VP	                  R4      f3   \        \        V^ ,          4      P                  4      P                  VR&   \        V^ ,          V4      p\        \        4      pRpRpRp	Rp
RpRpTpRp  \        V4       F~  w  ppRpV\        V4      ^,
          8  p \        VW&V4      pV
V,          p
\         P"                  P$                  ! V3/ VB pTe   \/        YWRT
R
7       RpTu Te   \/        YWRT
R
7       # # 	  V'       g   Ve	   V
'       d   MV.pRpKª  Ve   \/        WWRV
R
7       RpT'       d   T
'       g   T	e   R\1        T4       R2pY˜rË\3        R\        T4       RT: R\1        T4       T RT R2
4      Th  \&         d\   pTTrËT'       d   T'       d   \)        T4       M\+        TT4      pTe   TTTr˜pT'       d   \-        RT: RT R	24        Rp?EKf  Rp?ii ; i  Te   \/        YWRT
R
7       i i ; i)a°  Load a torch checkpoint from a URL or from fallback URLs, cached in the torch hub.

``state_dict = load_state_dict_from_url(url)`` takes a URL or a list of URLs tried in order, downloads the first
that works into ``<torch.hub.get_dir()>/checkpoints`` (or ``model_dir``) unless the file is already there, and
returns what :func:`torch.load` reads from it with ``weights_only=True``. Without ``map_location`` each tensor loads
on the device it was saved from. For a file :func:`torch.load` cannot read, such as a ``.safetensors`` checkpoint,
use :func:`download_file_from_url` and :func:`load_safetensors`.

Convention:
    - ``weights_only`` defaults to ``True``, where the torch function defaults to ``False`` on every torch version
      kornia supports. A checkpoint that pickles a type other than tensors, primitive types and plain containers
      then raises :class:`RuntimeError`, chained to the :class:`pickle.UnpicklingError` that names the type.
      Allowlist the type with ``torch.serialization.safe_globals([...])``, or pass ``weights_only=False``, but only
      for a file you trust: unpickling it can run arbitrary code.
    - ``weights_only=True`` does not stop a crafted checkpoint from running code before torch 2.6
      (`GHSA-53q9-r3pm-6pq6 <https://github.com/pytorch/pytorch/security/advisories/GHSA-53q9-r3pm-6pq6>`__)
      or from corrupting memory before torch 2.10
      (`GHSA-63cw-57p8-fm3p <https://github.com/pytorch/pytorch/security/advisories/GHSA-63cw-57p8-fm3p>`__).
      Load a checkpoint from a source you do not trust only on torch 2.10 or later.
    - With several URLs and no ``file_name``, every source caches under the first URL's file name, so a later call
      finds the file whichever source served it, and ``check_hash=True`` checks the hash in that one name.
    - A source is tried up to 3 times. A ``URLError``, a ``ConnectionError``, a stalled or truncated transfer,
      HTTP 408, 425, 429, 500, 502, 503 or 504, and a 403 with ``Retry-After`` or ``X-RateLimit-Remaining: 0``
      are retried after a doubling wait from 1 s, or after the delay the server names in ``Retry-After`` or
      ``X-RateLimit-Reset``; the waits of one call add up to at most 60 s. A warning names each retry and each
      source given up for the next.
    - A cached file that fails to load is moved aside and the remaining sources are fetched into its path. When
      none of them transfers a file, the source that failed is fetched once more. If nothing loads, the file is
      put back. A file this call downloaded and could not load is deleted when another source remains,
      and left in place after the last one. A cache path is refetched this way at most once per process.
    - The ``Downloading: "<url>" to <path>`` line goes to stderr; the torch function writes it to stdout.

Args:
    url: a URL string, or a list of URL strings tried left-to-right. A
        ``file://`` URL is cached by its base name like any other URL, so a
        cache entry of that name is returned instead of the local file; load
        a local file with :func:`torch.load`.
    timeout: seconds a connection attempt or a single read may stall before the
        attempt fails; it bounds each wait, not the whole transfer. ``None``
        uses the ``KORNIA_DOWNLOAD_TIMEOUT`` environment variable, read at
        each call, or 30 s when it is unset. The variable is how to raise the
        bound for callers that take no ``timeout``, such as ``pretrained=True``
        model constructors.
    **kwargs: forwarded to :func:`torch.hub.load_state_dict_from_url`
        (``map_location``, ``check_hash``, ``file_name``, ``model_dir``, ``progress``, ``weights_only``).
        ``file_name`` must be a bare file name, and a leading ``~`` in ``model_dir`` is expanded.

Returns:
    The loaded state dict.

Raises:
    TypeError: if ``url`` is not a URL string or a list of them, ``timeout``
        is not a number, or a keyword is not one the torch function takes. The arguments are checked before the
        cache is read or a request is made.
    ValueError: if ``url`` is empty or has no scheme (a local path is not a
        URL); if ``timeout`` is not greater than 0 and
        at most ``threading.TIMEOUT_MAX``, or it is omitted and
        ``KORNIA_DOWNLOAD_TIMEOUT`` holds such a value or no number (the message
        names which); if ``file_name`` is not a bare file name, or it is omitted
        and the first URL does not end in one.
    RuntimeError: if every URL fails. The message names the last error, the source it came from and the cache
        path to delete if the file there is corrupt, and the error is chained. When a cached file was moved aside
        and fetching it again failed too, the load failure is the one reported and chained.

See Also:
    - :func:`download_file_from_url`: the same cache, fallback and retries, returning the path instead of loading.
    - :func:`hf_url`: builds the URL of a file in a Hugging Face repository.

Example:
    >>> sd = load_state_dict_from_url([          # doctest: +SKIP
    ...     hf_url("hardnet", "HardNetPP.pth"),  # primary  (HF mirror)
    ...     "https://github.com/DagnyT/hardnet/raw/master/"
    ...     "pretrained/pretrained_all_datasets/HardNet%2B%2B.pth",  # fallback
    ... ])

r–   Nr    Úweights_onlyTFzFailed to load weights from rT   ú. Trying next source.©rJ  rK  r]   úT (the cache entry was set aside and refetching it from that same source failed too: Ú)z Failed to load weights from all ú source(s). Last URL tried: ú. Last error: ú. Cache path: ú0 -- delete it if it is corrupt and this repeats.)r”   rp   rÁ   rž   rb   r¤   r�   r   r   r›   r�   rý   rÃ   Ú_MAX_CALL_SLEEP_SECONDSÚ	enumeraterX  r³   r´   rµ   rV  rQ  rH  r„   rN  rX   r!  )r†   rZ   r¦   r‘   r–   Ú
cache_pathrS  rG  Údiscarded_urlÚdiscard_excrK  Úlast_excÚlast_urlÚsourcesÚre_attemptedÚir“   ÚfetchedÚmore_sourcesÚ
state_dictr0  ÚmovedÚrefetch_notes   &$,                    r   rµ   rµ   é  sà  € ôZ �S‹>€DÜ˜wÓ'€GÜ˜&Ô!Ü& t¯Z©Z¸Ó-DÓE€IØÒØ'ˆ{ÑØ‡z�z�+ÓÒ*Ü/°°{Õ0CÓDˆˆ{Ñð
 ‡z�z�.Ó!Ò)Ø!%ˆˆ~Ñô ˆ4ƒy�1„}˜Ÿ™ KÓ0Ò8Ü"¤8¨D°­GÓ#4×#9Ñ#9Ó:×?Ñ?ˆˆ{Ñô # 4¨¥7¨FÓ3€JÜÔ1Ó2€FØ!€JØ $€MØ$(€KØ€JØ!%€HØ€HØ€GØ€Lð2\ØÜ! 'Ö*‘��1Ø�Ø ¤3 w£<°!Õ#3Ñ3�ðä2°1°fÀgÓN�GØ 'Õ)�JÜ!&§¡×!CÒ!CÀAÑ!PÈÑ!P�Jð, Ò)Ü& zÀdÐWaÕbØ!%�JØ!Ñ!ð Ò!Ü˜z¸eÐPZÖ[ð "ñ_ +÷T ˜}Ò4¿
ØØ$�oˆGØŠLàÒ!Ü˜z¸eÐPZÕ[ð €LßŸJ¨;Ò+BðÜ$ XÓ.Ð/¨qð2ð 	ð )�(ä
Ø
*¬3¨t«9¨+ð 6Ø#™,ð 'Ü  Ó*Ð+¨L¨>ð :ð "�lÐ"Rð	Tóð ðøôq !ô Ø)*¨A˜hß÷ (Ü1°*Ô=øô
 !5°Q¸Ó ?˜Ø Ò,ØEJÈAÈq°{˜Jß#ÜÐ <¸Q¹EÀÀAÀ3ÐF[Ð\Ô]Þûð)ûðN Ò!Ü˜z¸eÐPZÖ[ð "úsT   Ä)J Ä67HÅ-J Æ	J Æ"J Æ.J ÈJÈ(I>È;(I>É$I>É7J É>JÊJ ÊJr–   r    r  Úvalidatec               ó4   € V ^8„  d   QhRRRRRRRRRR	R
RRR/# )r   r†   rZ  r–   r—   r    r  r0   rt  úCallable[[str], None] | NonerZ   r[   r   r   r   )r   s   "r   r   r   ¥  sY   € ÷ rñ rØ	ðrð ðrð ð	rð
 ðrð +ðrð ðrð 	ñrr   c               ó@  € \        V 4      p\        Wa4      p\        V4      p\        V4      p\	        V4      ^8”  d4   Vf0   \        \        V^ ,          4      P                  4      P                  pRVRVRV/p\        V^ ,          V4      p\        \        4      p	Rp
RpRpRpRpRpTpRp  \        V4       Fi  w  ppRpV\	        V4      ^,
          8  p \        VWyV4      pVV,          pVe	   V! V4       T
e   \%        YŠRTR
7       Rp
Tu T
e   \%        YŠRTR
7       # # 	  V'       g   Ve	   V'       d   MV.pRpK•  V
e   \%        WŠRVR
7       RpT'       d   T'       g   Te   R\'        T4       R2pYËrþ\)        R\	        T4       RT: R\'        T4       T RT R2
4      Th  \         dT   pTTrþT'       d   \        T4       M\!        TT4      pTe   TTTrËp
T'       d   \#        RT: RT R	24        Rp?EKI  Rp?ii ; i  T
e   \%        YŠRTR
7       i i ; i)a˜  Download a file into the torch hub cache, with fallback URLs, and return its path.

``path = download_file_from_url(url, file_name=name)`` takes a URL or a list of URLs tried in order, downloads the
first that works to ``<model_dir>/<file_name>`` and returns that path without loading the file. A file already at
that path is returned with no request. Retries, fallback and the stderr status line work as in
:func:`load_state_dict_from_url`.

Convention:
    - ``validate(path)`` runs after each attempt, on a cache hit too, and raising from it rejects the file.
    - A rejected file that was already cached is moved aside and the remaining sources are fetched into its path.
      When none of them transfers a file, the source that handed it back is fetched once more. If nothing passes,
      the file is put back.
    - A rejected file that this call downloaded is deleted and the next source, if any, is tried, so a one-URL call
      on an empty cache raises with the cache still empty.
    - Without ``validate``, a truncated cached file is returned on every call until it is deleted.

Args:
    url: a URL string, or a list of URL strings tried left-to-right. A
        ``file://`` URL is cached by its base name like any other URL, so a
        cache entry of that name is returned instead of the local file; read
        a local file directly.
    file_name: name to cache the file under. Defaults to the basename of the
        URL, of the first URL when several are given, so that every
        source shares one cache slot. Pass it whenever that
        basename is not unique to this file: two repositories publishing a
        ``model.safetensors`` each would otherwise share one cache entry, and
        the second model would load the first one's weights. Must be a bare
        file name: the cache is one flat directory, and a value with a path separator or naming
        ``.`` or ``..`` would write outside it.
    model_dir: directory to cache the file in. Defaults to torch's
        ``<hub dir>/checkpoints``, which is the cache CI restores. A leading
        ``~`` is expanded.
    progress: whether to display a progress bar during a transfer.
    validate: the check of the cached file. Keep it cheap, a header parse such as :func:`check_safetensors` rather
        than a full read.
    timeout: seconds a connection attempt or a single read may stall before the
        attempt fails, which then counts as transient; it bounds each wait, not
        the whole transfer. ``None`` uses the ``KORNIA_DOWNLOAD_TIMEOUT``
        environment variable, read at each call, or 30 s when it is unset.

Returns:
    The path of the cached file.

Raises:
    TypeError: if ``url`` is not a URL string or a list of them, or ``timeout``
        is not a number.
    ValueError: if ``file_name`` is not a single path component, or it is
        omitted and the first URL's path does not end in a file name; if
        ``url`` is empty or has no scheme (a local path is not a URL); or if
        ``timeout`` is not greater than 0 and at most
        ``threading.TIMEOUT_MAX``, or it is omitted and
        ``KORNIA_DOWNLOAD_TIMEOUT`` holds such a value or no number (the message
        names which).
    RuntimeError: if every URL fails. The message carries the last failure's
        type and text, the source it came from and the cache path in play,
        and the exception itself is chained.

See Also:
    - :func:`load_state_dict_from_url`: downloads the same way and loads the file with :func:`torch.load`.
    - :func:`download_hf_file`: downloads one file of a Hugging Face repository under a repository-specific name.
    - :func:`load_safetensors`: reads a downloaded ``.safetensors`` checkpoint into a state dict.

Example:
    >>> path = download_file_from_url(                      # doctest: +SKIP
    ...     hf_url("kimi-vl-a3b-instruct-vision", "model.safetensors"),
    ...     file_name="kornia--kimi-vl-a3b-instruct-vision--model.safetensors",
    ... )

Nr    r–   r  FTzFailed to download rT   r]  r^  r]   r_  r`  z%Failed to download the file from all ra  rb  rc  rd  )r”   rž   rp   r¤   r�   r   r   r›   r�   rý   rÃ   re  rf  rX  rV  rQ  rH  r„   rN  rX   r!  )r†   r–   r    r  rt  rZ   r‘   r¦   rg  rS  rG  rh  ri  rK  rj  rk  rl  rm  rn  r“   ro  rp  r0  rr  rs  s   &$$$$$                   r   Údownload_file_from_urlrx  ¥  s„  € ô\ �S‹>€DÜ& tÓ7€IÜ˜wÓ'€GÜ! )Ó,€Iô ˆ4ƒy�1„}˜Ò*Üœ $ q¥'Ó*×/Ñ/Ó0×5Ñ5ˆ	Ø)¨9°kÀ9ÈjÐZbÐc€Fô # 4¨¥7¨FÓ3€JÜÔ1Ó2€FØ!€JØ $€MØ$(€KØ€JØ!%€HØ€HØ€GØ€Lð7\ØÜ! 'Ö*‘��1Ø�Ø ¤3 w£<°!Õ#3Ñ3�ð#Ü2°1°fÀgÓN�GØ 'Õ)�JØÒ+Ù  Ô,ð@ Ò)Ü& zÀdÐWaÕbØ!%�JØ!Ñ!ð Ò!Ü˜z¸eÐPZÖ[ð "ñi +÷^ ˜}Ò4¿
ØØ$�oˆGØŠLàÒ!Ü˜z¸eÐPZÕ[ð €LßŸJ¨;Ò+BðÜ$ XÓ.Ð/¨qð2ð 	ð )�(ä
Ø
/´°D³	¨{ð ;Ø#™,ð 'Ü  Ó*Ð+¨L¨>ð :ð "�lÐ"Rð	Tóð ðøô{ !ô Ø)*¨A˜hßô" .¨jÕ9ô !5°Q¸Ó ?˜Ø Ò,ØEJÈAÈq°{˜Jß#ÜÐ 3°A±5¸¸1¸#Ð=RÐSÔTÞûð=ûðX Ò!Ü˜z¸eÐPZÖ[ð "úsN   Â+)H Ã"F'Ã7H Ä"	H Ä,H Ä8H Æ'HÆ23H Ç&H Ç9H È HÈH ÈHc               ó4   € V ^8„  d   QhRRRRRRRRRR	R
RRR/# )r   r   r   r!   r    r—   r  r0   rt  rv  rZ   r[   r   r   )r   s   "r   r   r   Z  sN   € ÷ =ñ =Ø
ð=àð=ð ð	=ð
 ð=ð +ð=ð ð=ð 	ñ=r   c          	     óH   € \        \        W4      \        W4      VVVVR7      # )aº  Download one file of a Hugging Face repository into the torch hub cache and return its path.

``path = download_hf_file(repo, filename)`` downloads ``hf_url(repo, filename)`` with :func:`download_file_from_url`
and caches it as ``<owner>--<name>--<filename>``, for example ``kornia--hardnet--HardNetPP.pth``, so two
repositories that both publish ``model.safetensors`` do not share a cache entry. A file already cached under that
name is returned with no request. For a ``.safetensors`` checkpoint, pass ``validate=check_safetensors`` and read
the path with :func:`load_safetensors`.

Args:
    repo: repository name under the ``kornia`` HF org, or a full
        ``owner/name`` id; see :func:`hf_url`.
    filename: file at the root of that repo.
    model_dir: directory to cache the file in. Defaults to torch's
        ``<hub dir>/checkpoints``, which is the cache CI restores.
    progress: whether to display a progress bar during a transfer.
    validate: forwarded to :func:`download_file_from_url`, which documents
        it.
    timeout: seconds a connection attempt or a single read may stall before the
        attempt fails; it bounds each wait, not the whole transfer. ``None``
        uses the ``KORNIA_DOWNLOAD_TIMEOUT`` environment variable, read at
        each call, or 30 s when it is unset. Forwarded to
        :func:`download_file_from_url`.

Returns:
    The path of the cached file.

Raises:
    TypeError: if ``timeout`` is not a number.
    ValueError: if ``filename`` carries a path separator; only files at the
        repository root are supported, because the cache is one flat directory.
        Also if ``timeout`` is not greater than 0 and at most
        ``threading.TIMEOUT_MAX``, or it is omitted and ``KORNIA_DOWNLOAD_TIMEOUT``
        holds such a value or no number (the message names which).
    RuntimeError: if the download fails; see :func:`download_file_from_url`.

See Also:
    - :func:`download_file_from_url`: downloads from any URL, under a cache name you choose.
    - :func:`hf_url`: only builds the URL, without a request.

Example:
    >>> path = download_hf_file(                        # doctest: +SKIP
    ...     "kimi-vl-a3b-instruct-vision", "model.safetensors"
    ... )

)r–   r    r  rt  rZ   )rx  r&   r*   )r   r!   r    r  rt  rZ   s   &&$$$$r   Údownload_hf_filer{  Z  s.   € ôl "ÜˆtÓÜ% dÓ5ØØØØôð r   >   é˜  é©  r+   éô  éö  é÷  éø  i   >   r]   r_   ú..)NTN)VÚ__conditional_annotations__Ú
__future__r   r  r  r  Úhttp.clientrõ   r{   rg   r`   r=  r  r2   rÍ   r  r€   Úcollections.abcr   r   r   Úemail.utilsr   Úpathlibr   Útypingr	   Úurllib.errorr
   r   Úurllib.parser   r   Úurllib.requestr   r   r³   r$   r   r   r&   r*   Ú	frozensetró   rÖ   rU  rì   rî   re  re   rc   r5   r  rö   r÷   r7   rX   rp   rv   r„   r”   rš   rž   r¤   rÁ   rÃ   rØ   rà   rÜ   rè   rð   rø   rý   r1  rA  r½   rB  Ú__annotations__rE  rH  rN  rQ  rX  rµ   rx  r{  )rƒ  s   @r   Ú<module>r�     s-  øð÷$ #Ð "ã Û Û Û Û Û Û 	Û 
Û Û Û Û Û Ý $ß "Ý -Ý Ý ß ,ß (ß +ã à#€à€õ?õgõDAñ> #Ò#FÓGÐ Ø aá# S¨# JÓ/Ð ðð €Ø 2àÐ Ø DàÐ ðð Ð ðð !Ð ðð 6Ð ðõ0ð Ð Ø cô
˜Ÿ™×3Ñ3ô 
õ6*õ*õZqõ-õ&%ñP š_Ó-Ð Ø Uõ$õN	Gõ
÷@	ñ 	õ>õ*Eõ.õ&õR0õ,bõ>-÷2kõ\)ñX $'£5Ð ˜Ó (Ø [à(Ð ðõMõ`0-õf
õBQðDyÈd÷ yðxrð !ðrð !ð	rð
 ðrð .2ðrð !÷rðj=ð !ð	=ð
 ð=ð .2ð=ð !÷=ñ =r   