+
    3j                         ^ RI t ^ RIt^ RIt^ RIHt ]P
                  ! ]4      tR R ltR R lt	R R lt
R	 R
 ltR R ltR# )    N)AnacondaAuthConfigc                0    V ^8  d   QhR\         R\        /#    
conda_pathreturnstrbool)formats   "Flib/python3.14/site-packages/anaconda_auth/_conda/env_logger_config.py__annotate__r   
   s            c                  a \        4       oV RRRSP                  R.p\        P                  ! VRRR7      pVP                  ^ 8w  d.   \
        P                  RSP                  VP                  4       R#  \        P                  ! VP                  4      p\        ;QJ d    V3R	 lV 4       F  '       g   K   R# 	  R# ! V3R	 lV 4       4      #   \        P                  \        3 d     R# i ; i)
zCCheck if anaconda-env-manager is installed in the base environment.list-nbasez--jsonTcapture_outputtextzFailed to check for %s: %sFc              3   ^   <"   T F"  qP                  R 4      SP                  8H  x  K$  	  R# 5i)nameN)getenv_manager_package).0pkgconfigs   & r   	<genexpr>+is_env_manager_installed.<locals>.<genexpr>   s"     UHS776?f&@&@@Hs   *-)r   r   
subprocessrun
returncodeloggerdebugstderrjsonloadsstdoutanyJSONDecodeError	TypeError)r   argsprocpackagesr   s   &   @r   is_env_manager_installedr/   
   s    !Fff.H.H(SD>>$t$?D!(&*D*Ddkk	
 ::dkk*sUHUssUsUsUHUUU  ), s*   6*C !C 8C ;C ?C C/.C/c                R    V ^8  d   QhR\         R\        \        \         3,          /# r   )r
   tupler   )r   s   "r   r   r      s#      C E$),< r   c                   \        4       pVP                   RVP                   VP                  ;'       g    R 2pV RRRVR.p\        P
                  ! VRRR7      pVP                  ^ 8w  dW   VP                  P                  4       ;'       g    VP                  P                  4       p\        P                  R	W%4       R
V3# R# )ziInstall anaconda-env-manager into the base environment.

Returns:
    Tuple of (success, error_message).
z:: installz--namer   z-yTr   zFailed to install %s: %sF)Tr3   )r   env_manager_channelr   env_manager_versionr    r!   r"   r%   stripr(   r#   r$   )r   r   r   r,   r-   errors   &     r   install_env_managerr9      s      !F''(6+E+E*FvGaGaGgGgegFh
iCD >>$t$?D!!!#::t{{'8'8':/<e|Or   c                >    V ^8  d   QhR\         R\         R,          /# )r   r   r   N)r
   )r   s   "r   r   r   5   s     ' ' 't 'r   c                    V RRRRRRR.p\         P                  ! VRRR	7      pVP                  ^ 8w  d#   \        P	                  R
VP
                  4       R# VP                  P                  4       ;'       g    R# )z<Retrieve the anaconda-anon-usage client token via conda run.r!   r   r   z--no-capture-outputpythonz-czJfrom anaconda_anon_usage.tokens import client_token; print(client_token())Tr   zFailed to get client token: %sN)r    r!   r"   r#   r$   r%   r(   r7   r   r,   r-   s   &  r   get_client_tokenr>   5   st     	T	D >>$t$?D!5t{{C;;&&$&r   c                0    V ^8  d   QhR\         R\        /# r   r	   )r   s   "r   r   r   H   s     , ,S ,T ,r   c                H    \        V 4      pV'       g   R# ^ RIHp V! V4      # )zCheck if the client token is already registered.

Retrieves the client token from anaconda-anon-usage and checks with the
read-only client-token-status endpoint.
F)check_client_token_status)r>   anaconda_auth.env_loggerrA   )r   tokenrA   s   &  r   is_client_registeredrD   H   s"     Z(EB$U++r   c                0    V ^8  d   QhR\         R\        /# r   r	   )r   s   "r   r   r   W   s      S T r   c                    V RR.p\         P                  ! V4      pVP                  ^ 8w  d#   \        P	                  RVP                  4       R# R# )zRegister with an organization via conda env-log.

Delegates org selection and registration to the plugin command.
The subprocess inherits stdio so the plugin can interact with the user.
zenv-logregisterz%Failed to register org (exit code %d)FT)r    r!   r"   r#   r$   r=   s   &  r   register_orgrH   W   sC     	:.D>>$D!<dooNr   )r&   loggingr    anaconda_auth.configr   	getLogger__name__r#   r/   r9   r>   rD   rH    r   r   <module>rN      s:       3			8	$$2'&,r   