Ë
    ��h°  ã                   óÐ  — d Z ddlZddlZddlZddlmZ ddlmZm	Z	m
Z
mZmZmZmZmZ g d¢Z ed«      ZdZ ej&                  d«      Z G d	„ d
e«      Z	 dde
eef   dee   dedee   dee   f
d„Z	 dde
eef   dee   dedee   def
d„Zdeed      ddfd„Zdede
eef   fd„Ze G d„ d«      «       Z G d„ d«      Ze G d„ d«      «       Zeeeef   Ze G d„ d«      «       Z y) zPEP 610é    N)Ú	dataclass)ÚAnyÚClassVarÚDictÚIterableÚOptionalÚTypeÚTypeVarÚUnion)Ú	DirectUrlÚDirectUrlValidationErrorÚDirInfoÚArchiveInfoÚVcsInfoÚTzdirect_url.jsonz.^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$c                   ó   — e Zd Zy)r   N)Ú__name__Ú
__module__Ú__qualname__© ó    ú]/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/pip/_internal/models/direct_url.pyr   r      s   „ Ør   r   ÚdÚexpected_typeÚkeyÚdefaultÚreturnc                 ó\   — || vr|S | |   }t        ||«      st        |›d|› d|› d�«      ‚|S )z3Get value from dictionary and verify expected type.z has unexpected type for z (expected ú))Ú
isinstancer   ©r   r   r   r   Úvalues        r   Ú_getr#      sN   € ð �!�|ØˆØˆc‰F€EÜ�e˜]Ô+Ü&ØˆiÐ0°°°[ÀÀÈqÐQó
ð 	
ð €Lr   c                 óB   — t        | |||«      }|€t        |› d�«      ‚|S )Nz must have a value)r#   r   r!   s        r   Ú_get_requiredr%   )   s1   € ô ��M 3¨Ó0€EØ€}Ü&¨#¨Ð.@Ð'AÓBÐBØ€Lr   ÚinfosÚInfoTypec                 ó”   — | D �cg c]  }|€Œ|‘Œ	 } }| st        d«      ‚t        | «      dkD  rt        d«      ‚| d   €J ‚| d   S c c}w )Nz/missing one of archive_info, dir_info, vcs_infoé   z1more than one of archive_info, dir_info, vcs_infor   )r   Úlen)r&   Úinfos     r   Ú_exactly_one_ofr,   2   sj   € Ø#Ö8�d tÑ'7ŠTÐ8€EÐ8ÙÜ&Ø=ó
ð 	
ô ˆ5ƒz�A‚~Ü&Ø?ó
ð 	
ð �‰8ÐÐÐØ�‰8€Oùò 9s
   …A�AÚkwargsc                  ó\   — | j                  «       D ��ci c]  \  }}|€Œ	||“Œ c}}S c c}}w )z Make dict excluding None values.)Úitems)r-   ÚkÚvs      r   Ú_filter_noner2   @   s(   € à#Ÿ\™\›^×=‘T�Q˜¨q©}ˆAˆq‰DÓ=Ð=ùÓ=s   ”
(Ÿ(c                   óŠ   — e Zd ZU dZeed<   eed<   eed<   dZee   ed<   e	dee
eef      ded    fd	„«       Zde
eef   fd
„Zy)r   Úvcs_infoÚnameÚvcsÚ	commit_idNÚrequested_revisionr   r   c           	      óx   — |€y  | t        |t        d«      t        |t        d«      t        |t        d«      ¬«      S )Nr6   r7   r8   )r6   r7   r8   )r%   Ústrr#   ©Úclsr   s     r   Ú
_from_dictzVcsInfo._from_dictM   s<   € àˆ9ØÙÜ˜a¤ eÓ,Ü# A¤s¨KÓ8Ü# A¤sÐ,@ÓAô
ð 	
r   c                 óZ   — t        | j                  | j                  | j                  ¬«      S )N)r6   r8   r7   )r2   r6   r8   r7   ©Úselfs    r   Ú_to_dictzVcsInfo._to_dictW   s&   € ÜØ—‘Ø#×6Ñ6Ø—n‘nô
ð 	
r   )r   r   r   r5   r   Ú__annotations__r:   r8   r   Úclassmethodr   r   r=   rA   r   r   r   r   r   E   sk   … à€Dˆ(Óà	ƒHØƒNØ(,Ð˜ ™Ó,àð
˜8 D¨¨c¨¡NÑ3ð 
¸ÀÑ8Kò 
ó ð
ð
˜$˜s C˜x™.ô 
r   r   c                   óÖ   — e Zd ZdZ	 	 ddee   deeeef      ddfd„Zedee   fd„«       Z	e	j                  dee   ddfd	„«       Z	ed
eeeef      ded    fd„«       Zdeeef   fd„Zy)r   Úarchive_infoNÚhashÚhashesr   c                 ó    — || _         || _        y ©N)rG   rF   )r@   rF   rG   s      r   Ú__init__zArchiveInfo.__init__b   s   € ð ˆŒØˆ�	r   c                 ó   — | j                   S rI   )Ú_hashr?   s    r   rF   zArchiveInfo.hashk   s   € à�z‰zÐr   r"   c                 ó*  — |�o	 |j                  dd«      \  }}| j                  €||i| _        || _        y || j                  vr.| j                  j	                  «       | _        || j                  |<   || _        y # t        $ r t        d|›�«      ‚w xY w)Nú=r)   z"invalid archive_info.hash format: )ÚsplitÚ
ValueErrorr   rG   ÚcopyrL   )r@   r"   Ú	hash_nameÚ
hash_values       r   rF   zArchiveInfo.hasho   s¢   € àÐðØ(-¯©°C¸Ó(;Ñ%�	˜:ð
 �{‰{Ð"Ø(¨*Ð5�”ð ˆ�
ð  $§+¡+Ñ-Ø"Ÿk™k×.Ñ.Ó0�”Ø)3�—‘˜IÑ&Øˆ�
øô ò Ü.Ø8¸¸	ÐBóð ðús   „A: Á:Br   c                 óX   — |€y  | t        |t        d«      t        |t        d«      ¬«      S )NrF   rG   ©rF   rG   )r#   r:   Údictr;   s     r   r=   zArchiveInfo._from_dict�   s)   € àˆ9ØÙœ˜Q¤ VÓ,´T¸!¼TÀ8Ó5LÔMÐMr   c                 óD   — t        | j                  | j                  ¬«      S )NrU   )r2   rF   rG   r?   s    r   rA   zArchiveInfo._to_dict‡   s   € Ü §¡°4·;±;Ô?Ð?r   )NN)r   r   r   r5   r   r:   r   rJ   ÚpropertyrF   ÚsetterrC   r   r=   rA   r   r   r   r   r   _   sØ   „ Ø€Dð #Ø+/ñà�s‰mðð ˜˜c 3˜h™Ñ(ðð 
ó	ð ð�h˜s‘mò ó ðð 
‡[�[ð˜( 3™-ð ¨Dò ó ðð" ðN˜8 D¨¨c¨¡NÑ3ð N¸ÀÑ8Oò Nó ðNð
@˜$˜s C˜x™.ô @r   r   c                   óp   — e Zd ZU dZeed<   dZeed<   ede	e
eef      de	d    fd„«       Zde
eef   fd„Zy	)
r   Údir_infor5   FÚeditabler   r   c                 ó<   — |€y  | t        |t        dd¬«      ¬«      S )Nr\   F)r   ©r\   )r%   Úboolr;   s     r   r=   zDirInfo._from_dict‘   s    € àˆ9ØÙœM¨!¬T°:ÀuÔMÔNÐNr   c                 ó6   — t        | j                  xs d ¬«      S )Nr^   )r2   r\   r?   s    r   rA   zDirInfo._to_dict—   s   € Ü T§]¡]Ò%:°dÔ;Ð;r   N)r   r   r   r5   r   rB   r\   r_   rC   r   r   r:   r   r=   rA   r   r   r   r   r   ‹   s`   … à€Dˆ(Óà€HˆdÓàðO˜8 D¨¨c¨¡NÑ3ð O¸ÀÑ8Kò Oó ðOð
<˜$˜s C˜x™.ô <r   r   c                   óÐ   — e Zd ZU eed<   eed<   dZee   ed<   dedefd„Ze	defd„«       Z
dd	„Zed
eeef   dd fd„«       Zdeeef   fd„Zededd fd„«       Zdefd„Zdefd„Zy)r   Úurlr+   NÚsubdirectoryÚnetlocr   c                 óÞ   — d|vr|S |j                  dd«      \  }}t        | j                  t        «      r | j                  j                  dk(  r|dk(  r|S t
        j                  |«      r|S |S )Nú@r)   Úgit)rO   r    r+   r   r6   Ú
ENV_VAR_REÚmatch)r@   rd   Ú	user_passÚnetloc_no_user_passs       r   Ú_remove_auth_from_netlocz"DirectUrl._remove_auth_from_netloc¤   si   € Ø�fÑØˆMØ)/¯©°c¸1Ó)=Ñ&ˆ	Ð&ä�t—y‘y¤'Ô*Ø—	‘	—‘ Ò&Ø˜UÒ"àˆMÜ×Ñ˜IÔ&ØˆMØ"Ð"r   c                 ó&  — t         j                  j                  | j                  «      }| j	                  |j
                  «      }t         j                  j                  |j                  ||j                  |j                  |j                  f«      }|S )z¯url with user:password part removed unless it is formed with
        environment variables as specified in PEP 610, or it is ``git``
        in the case of a git URL.
        )ÚurllibÚparseÚurlsplitrb   rl   rd   Ú
urlunsplitÚschemeÚpathÚqueryÚfragment)r@   Úpurlrd   Úsurls       r   Úredacted_urlzDirectUrl.redacted_url²   si   € ô �|‰|×$Ñ$ T§X¡XÓ.ˆØ×.Ñ.¨t¯{©{Ó;ˆÜ�|‰|×&Ñ&Ø�[‰[˜& $§)¡)¨T¯Z©Z¸¿¹ÐGó
ˆð ˆr   c                 óB   — | j                  | j                  «       «       y rI   )Ú	from_dictÚto_dictr?   s    r   ÚvalidatezDirectUrl.validate¿   s   € Ø�‰�t—|‘|“~Õ&r   r   c                 ó>  — t        t        |t        d«      t        |t        d«      t	        t
        j                  t        |t        d«      «      t        j                  t        |t        d«      «      t        j                  t        |t        d«      «      g«      ¬«      S )Nrb   rc   rE   r[   r4   )rb   rc   r+   )
r   r%   r:   r#   r,   r   r=   rV   r   r   r;   s     r   rz   zDirectUrl.from_dictÂ   sy   € äÜ˜a¤ eÓ,Ü˜a¤ nÓ5Ü ä×*Ñ*¬4°´4¸Ó+HÓIÜ×&Ñ&¤t¨A¬t°ZÓ'@ÓAÜ×&Ñ&¤t¨A¬t°ZÓ'@ÓAðóô

ð 
	
r   c                 óª   — t        | j                  | j                  ¬«      }| j                  j	                  «       || j                  j
                  <   |S )N)rb   rc   )r2   rx   rc   r+   rA   r5   )r@   Úress     r   r{   zDirectUrl.to_dictÐ   sD   € ÜØ×!Ñ!Ø×*Ñ*ô
ˆð #Ÿi™i×0Ñ0Ó2ˆˆD�I‰I�N‰NÑØˆ
r   Úsc                 óJ   — | j                  t        j                  |«      «      S rI   )rz   ÚjsonÚloads)r<   r€   s     r   Ú	from_jsonzDirectUrl.from_jsonØ   s   € à�}‰}œTŸZ™Z¨›]Ó+Ð+r   c                 óL   — t        j                  | j                  «       d¬«      S )NT)Ú	sort_keys)r‚   Údumpsr{   r?   s    r   Úto_jsonzDirectUrl.to_jsonÜ   s   € Ü�z‰z˜$Ÿ,™,›.°DÔ9Ð9r   c                 óf   — t        | j                  t        «      xr | j                  j                  S rI   )r    r+   r   r\   r?   s    r   Úis_local_editablezDirectUrl.is_local_editableß   s"   € Ü˜$Ÿ)™)¤WÓ-ÒD°$·)±)×2DÑ2DÐDr   )r   N)r   r   r   r:   rB   r'   rc   r   rl   rX   rx   r|   rC   r   r   rz   r{   r„   rˆ   r_   rŠ   r   r   r   r   r   ž   sÇ   … à	ƒHØ
ƒNØ"&€L�(˜3‘-Ó&ð#¨sð #°só #ð ð
˜cò 
ó ð
ó'ð ð
˜$˜s C˜x™.ð 
¨[ò 
ó ð
ð˜˜c 3˜h™ó ð ð,˜#ð , +ò ,ó ð,ð:˜ó :ðE 4ô Er   r   rI   )!Ú__doc__r‚   ÚreÚurllib.parsern   Údataclassesr   Útypingr   r   r   r   r   r	   r
   r   Ú__all__r   ÚDIRECT_URL_METADATA_NAMEÚcompilerh   Ú	Exceptionr   r:   r#   r%   r,   r2   r   r   r   r'   r   r   r   r   ú<module>r”      s‡  ðÙ ã Û 	Û Ý !ß P× PÓ Pò€ñ ˆCƒL€à,Ð ØˆR�Z‰ZÐIÓJ€
ô	˜yô 	ð
 QUñØˆC�ˆH�~ðØ&*¨1¡gðØ47ðØBJÈ1Á+ðàˆa�[óð QUñØˆC�ˆH�~ðØ&*¨1¡gðØ47ðØBJÈ1Á+ðàóð˜8 H¨ZÑ$8Ñ9ð ¸jó ð>˜3ð > 4¨¨S¨¡>ó >ð
 ÷
ð 
ó ð
÷2)@ñ )@ðX ÷<ð <ó ð<ð �˜g wÐ.Ñ/€ð ÷AEð AEó ñAEr   