ó
    °"³jª  ã                  óØ   • S SK Jr  S SKrS SKJr        SS jrSS jrSS.           SS jjrSS.       SS	 jjrSS
 jr	SS.     SS jjr
SSS.         SS jjrg)é    )ÚannotationsN)ÚSequencec                óX   • U SLUSL:w  a   U b  SOSnU b  SOSn[        SU SU S35      eg)z?Raise if only one of aws_access_key/aws_secret_key is provided.NÚaws_access_keyÚaws_secret_keyÚ`z` was provided without `zT`. Both must be provided together, or neither (to use the default credential chain).)Ú
ValueError)r   r   ÚprovidedÚmissings       Ú[/home/mande/repo/quber/.venv/lib/python3.13/site-packages/anthropic/lib/aws/_credentials.pyÚvalidate_credentialsr      s_   € ð 	˜dÐ"¨¸dÐ(BÓCØ'5Ñ'AÑ#ÐGWˆØ&4Ñ&@Ñ"ÐFVˆÜØ�ˆzÐ1°'°ð ;`ð aó
ð 	
ð Dó    c                 ób   • U  H)  n[         R                  R                  U5      nUc  M'  Us  $    g)zAReturn the first non-None value from the given env vars, or None.N©ÚosÚenvironÚget)Úenv_varsÚvarÚvalues      r   Ú	_read_envr      s.   € ãˆÜ—
‘
—‘˜sÓ#ˆØÓØŠLñ ð r   )ÚANTHROPIC_AWS_API_KEY)Úapi_key_env_varsc                ó6   • U b  gUc  Ub  gUb  g[        U6 b  gg)uk  Determine whether to use SigV4 auth. Returns True for SigV4, False for API key.

Auth precedence:
1. api_key constructor arg â†’ API key mode
2. aws_access_key + aws_secret_key constructor args â†’ SigV4
3. aws_profile constructor arg â†’ SigV4
4. API key env var(s) â†’ API key mode (checked in order; first match wins)
5. Default AWS credential chain â†’ SigV4
FT©r   )Úapi_keyr   r   Úaws_profiler   s        r   Úresolve_auth_moder      s:   € ð" ÑØàÑ! ^Ñ%?ØàÑØô Ð"Ð#Ñ/Øð r   c                ó,   • U b  U $ U(       d  [        U6 $ g)z1Resolve the API key. Returns None if using SigV4.Nr   )r   Ú	use_sigv4r   s      r   Úresolve_api_keyr!   A   s!   € ð ÑØˆæäÐ*Ð+Ð+àr   c                ó–   • U b  U $ [         R                  R                  S5      =(       d    [         R                  R                  S5      $ )u   Resolve the AWS region from constructor arg or env var.

Does not silently default â€” returns None if no region is available.
Ú
AWS_REGIONÚAWS_DEFAULT_REGIONr   )Ú
aws_regions    r   Úresolve_regionr&   R   s6   € ð
 ÑØÐä�:‰:�>‰>˜,Ó'×O¬2¯:©:¯>©>Ð:NÓ+OÐOr   )ÚANTHROPIC_AWS_WORKSPACE_ID)Úworkspace_id_env_varsc               ó   • U b  U $ [        U6 $ )z‚Resolve the workspace ID from constructor arg or env var(s).

Returns None if no workspace ID is available (caller should raise).
r   )Úworkspace_idr(   s     r   Úresolve_workspace_idr+   ]   s   € ð ÑØÐäÐ+Ð,Ð,r   )ÚANTHROPIC_AWS_BASE_URLz/https://aws-external-anthropic.{region}.api.aws)Úbase_url_env_varsÚurl_templatec               óL   • U b  U $ [        U6 nUb  U$ Ub  UR                  US9$ g)z�Resolve the base URL from constructor arg, env var, or region.

Returns None if no base URL is resolvable (caller should raise).
N)Úregion)r   Úformat)Úbase_urlr0   r-   r.   Úenv_urls        r   Úresolve_base_urlr4   l   sB   € ð ÑØˆäÐ*Ð+€GØÑØˆàÑØ×"Ñ"¨&Ð"Ð1Ð1àr   )r   ú
str | Noner   r5   ÚreturnÚNone)r   Ústrr6   r5   )r   r5   r   r5   r   r5   r   r5   r   úSequence[str]r6   Úbool)r   r5   r    r:   r   r9   r6   r5   )r%   r5   r6   r5   )r*   r5   r(   r9   r6   r5   )
r2   r5   r0   r5   r-   r9   r.   r8   r6   r5   )Ú
__future__r   r   Útypingr   r   r   r   r!   r&   r+   r4   © r   r   Ú<module>r>      s  ðÝ "ã 	Ý ð
àð
ð ð
ð 
ô	
ôð 'Añàðð ðð ð	ð
 ðð $ðð 
õðL 'Añ	àðð ðð $ð	ð
 õô"Pð ,Kñ-Øð-ð )ð-ð õ	-ð& (CØIñØðð ðð %ð	ð
 ðð ör   