Ë
    ‹¤ëjT  ã                  óÌ   — d Z ddlmZ ddlZddlmZmZ ddlmZ er
ddl	m
Z
mZmZ dd„Z	 	 	 	 	 	 	 	 	 	 dd„Z G d	„ d
e«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zy)zBase pip exception classes.é    )ÚannotationsN)ÚTYPE_CHECKINGÚLiteral)ÚText)ÚConsoleÚConsoleOptionsÚRenderResultc                ó2   — t        j                  d| «      d uS )Nz^[a-z]+(-[a-z]+)*$)ÚreÚmatch)Úss    úk/home/oem/CyberBrain26-unified/dev-env/.venv/lib/python3.12/site-packages/pip/_internal/exceptions/_base.pyÚ_is_kebab_caser      s   € Ü�8‰8Ð)¨1Ó-°TÐ9Ð9ó    c               óÜ   — t        | t        «      r| }n|j                  | «      }|j                  |d¬«      |j                  d|› �d¬«      j                  |j	                  d¬«      «      z   S )NÚignore)Úoverflowú
T)Úallow_blank)Ú
isinstancer   Ú
render_strÚjoinÚsplit)r   ÚconsoleÚprefixÚindentÚtexts        r   Ú_prefix_with_indentr      ss   € ô �!”TÔØ‰à×!Ñ! !Ó$ˆà×Ñ˜f¨xÐÓ8¸7×;MÑ;MØ
ˆVˆHˆ ð <Nó <ç
�dˆ4�:‰: $ˆ:Ó'Ó(ñ)ð )r   c                  ó   — e Zd ZdZy)ÚPipErrorzThe base pip error.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   r    r    #   s   „ Úr   r    c                  ó   — e Zd ZdZy)ÚInstallationErrorz%General exception during installationNr!   r&   r   r   r(   r(   '   s   „ Ú/r   r(   c                  ó   — e Zd ZdZy)ÚBlockedImportErrorzŒAn import blocked after wheel installation started.

    ImportError would be swallowed by codec lookup and cache the codec as missing.
    Nr!   r&   r   r   r*   r*   +   s   „ òr   r*   c                  óv   ‡ — e Zd ZU dZded<   dddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d
ˆ fd„Zdd„Z	 	 	 	 	 	 dd	„Zˆ xZS )ÚDiagnosticPipErrora§  An error, that presents diagnostic information to the user.

    This contains a bunch of logic, to enable pretty presentation of our error
    messages. Each error gets a unique reference. Each error can also include
    additional context, a hint and/or a note -- which are presented with the
    main error message in a consistent style.

    This is adapted from the error output styling in `sphinx-theme-builder`.
    ÚstrÚ	referenceÚerrorN)Úkindr.   Ú	note_stmtÚlinkc               ó6  •— |€t        | d«      sJ d«       ‚| j                  }t        |«      sJ d«       ‚|| _        || _        || _        || _        || _        || _        || _        t        ‰| �)  d| j                  j                  › d| j                  › d�«       y )Nr.   zerror reference not provided!z#error reference must be kebab-case!ú<z: ú>)Úhasattrr.   r   r0   ÚmessageÚcontextr1   Ú	hint_stmtr2   ÚsuperÚ__init__Ú	__class__r"   )	Úselfr0   r.   r7   r8   r9   r1   r2   r<   s	           €r   r;   zDiagnosticPipError.__init__?   s›   ø€ ð ÐÜ˜4 Ô-ÐNÐ/NÓNÐ-ØŸ™ˆIÜ˜iÔ(ÐOÐ*OÓOÐ(àˆŒ	Ø"ˆŒàˆŒØˆŒà"ˆŒØ"ˆŒàˆŒ	ä‰Ñ˜1˜TŸ^™^×4Ñ4Ð5°R¸¿¹Ð7GÀqÐIÕJr   c                ó¸   — d| j                   j                  › d| j                  ›d| j                  ›d| j                  ›d| j
                  ›d| j                  ›d�S )Nr4   z(reference=z
, message=z
, context=z, note_stmt=z, hint_stmt=z)>)r<   r"   r.   r7   r8   r1   r9   )r=   s    r   Ú__repr__zDiagnosticPipError.__repr__]   sl   € à�—‘×'Ñ'Ð(ð )ØŸ™Ð*ð +Ø—|‘|Ð&ð 'Ø—|‘|Ð&ð 'ØŸ™Ð*ð +ØŸ™Ð*Øðð	
r   c              #  óä  K  — | j                   dk(  rdnd}d|› d| j                   › d| j                  › d�–— d–— |j                  so| j                  �Gt	        | j
                  |d|› d	�d|› d
�¬«      –— t	        | j                  |d|› d�d|› d�¬«      –— nHt	        | j
                  |dd¬«      –— n,| j
                  –— | j                  �d–— | j                  –— | j                  €| j                  �d–— | j                  �t	        | j                  |dd¬«      –— | j                  �t	        | j                  |dd¬«      –— | j                  �d–— d| j                  › �–— y y ­w)Nr/   ÚredÚyellowú[z bold]z[/]: [bold]z[/]Ú u   ]Ã—[/] u   ]â”‚[/] )r   r   u   ]â•°â”€>[/] z]   [/] u   [red]Ã—[/] z  z[magenta bold]note[/]: z      z[cyan bold]hint[/]: zLink: )	r0   r.   Ú
ascii_onlyr8   r   r7   r1   r9   r2   )r=   r   ÚoptionsÚcolours       r   Ú__rich_console__z#DiagnosticPipError.__rich_console__h   s‰  è ø€ ð
 Ÿ)™) wÒ.‘°Hˆà�&�˜ §	¡	˜{¨+°d·n±nÐ5EÀSÐIÒIØŠà×!Ò!à�|‰|Ð'Ü)Ø—L‘LØØ˜v˜h gÐ.Ø˜v˜h hÐ/ô	ò ô *Ø—L‘LØØ˜v˜h lÐ3Ø˜v˜h hÐ/ô	ó ô *Ø—L‘LØØ(Øô	ó ð —,‘,ÒØ�|‰|Ð'Ø’Ø—l‘lÒ"à�>‰>Ð%¨¯©Ð)CØŠHà�>‰>Ð%Ü%Ø—‘ØØ0Øô	ò ð �>‰>Ð%Ü%Ø—‘ØØ-Øô	ò ð �9‰9Ð ØŠHØ˜4Ÿ9™9˜+Ð&Ó&ð !ùs   ‚E.E0)r0   zLiteral['error', 'warning']r.   ú
str | Noner7   z
str | Textr8   ústr | Text | Noner9   rJ   r1   rJ   r2   rI   ÚreturnÚNone)rK   r-   )r   r   rF   r   rK   r	   )	r"   r#   r$   r%   Ú__annotations__r;   r?   rH   Ú__classcell__)r<   s   @r   r,   r,   2   s£   ø… ñð ƒNð
 -4Ø $ð (,ØñKð *ðKð ð	Kð
 ðKð #ðKð %ðKð %ðKð ðKð 
õKó<	
ð:'àð:'ð  ð:'ð 
÷	:'r   r,   )r   r-   rK   Úbool)
r   z
Text | strr   r   r   r-   r   r-   rK   r   )r%   Ú
__future__r   r   Útypingr   r   Úpip._vendor.rich.textr   Úpip._vendor.rich.consoler   r   r	   r   r   Ú	Exceptionr    r(   r*   r,   r&   r   r   ú<module>rU      sˆ   ðÙ !å "ã 	ß )å &áßNÑNó:ð)Øð)àð)ð ð	)ð
 ð)ð 
ó)ô"ˆyô ô0˜ô 0ôÐ*ô ôp'˜õ p'r   