+
    Ãóöj}>  ã                  óD  € ^ RI Ht ^ RIt^ RIHtH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Ht ^R
IHt ]
'       d   ^ RIHs ^ RIHs ^ RIHs ^ RIH t  MRsRsRsR R lt!R R lt" ! R R]]#]#R,          3,          4      t$ ! R R]4      t%RR.t&R# )é    )ÚannotationsN)ÚIteratorÚMapping)Úcached_property)ÚTYPE_CHECKINGÚAny)Ú	FieldInfo)ÚSettingsError)ÚSecretVersion)Ú	InitStateÚ_parse_env_none_strÚ_validate_by_name_enabled)ÚEnvSettingsSource©Údefault©ÚCredentials©ÚSecretManagerServiceClient)ÚBaseSettingsc               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚNone© )Úformats   "ÚcC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\pydantic_settings\sources\providers\gcp.pyÚ__annotate__r      s   € ÷ ñ  4ñ ó    c                 ó  €  ^ RI Hs ^ RIHs \
        P                  ! 4       ;_uu_ 4        \
        P                  ! R\        R7       ^ RI	H
s
 RRR4       R#   + '       g   i     R# ; i  \         d   p \        R4      T hRp ? ii ; i)r   r   r   Úignore)Úcategoryr   NzjGCP Secret Manager dependencies are not installed, run `pip install pydantic-settings[gcp-secret-manager]`)Úgoogle.authr   Úgoogle_auth_defaultÚgoogle.auth.credentialsr   ÚwarningsÚcatch_warningsÚfilterwarningsÚFutureWarningÚgoogle.cloud.secretmanagerr   ÚImportError)Úes    r   Úimport_gcp_secret_managerr.      sb   € ð

Ý>Ý7ä×$Ò$×&Õ&Ü×#Ò# H´}ÕEÝM÷ '×&×&Ò&ûô ô ÜØxó
àð	ûðús4   ‚)A, «#AÁA, ÁA)	Á#A, Á)A, Á,BÁ7BÂBc               ó    € V ^8„  d   QhRRRR/# )r   ÚexcÚ	Exceptionr   Úboolr   )r   s   "r   r   r   -   s   € ÷ ñ ˜Yð ¨4ñ r    c                óJ   €  ^ RI Hp \        W4      #   \         d     R# i ; i)r   )ÚNotFoundF)Úgoogle.api_core.exceptionsr4   Ú
isinstancer,   )r0   r4   s   & r   Ú_is_not_found_errorr7   -   s'   € ðÝ7ä˜#Ó(Ð(øÜô Úðús   ‚ “"¡"c                  óÚ   € ] tR t^6t$ R]R&   R]R&   RR R llt]R R	 l4       tR
 R lt]	R R l4       t
]R R l4       tRR R lltRR R lltR R ltR R ltR R ltR R ltRtR# )ÚGoogleSecretManagerMappingzdict[str, str | None]Ú_loaded_secretsr   Ú_secret_clientNc          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r   Úsecret_clientr   Ú
project_idÚstrÚcase_sensitiver2   Úenv_parse_none_strú
str | Noner   r   r   )r   s   "r   r   Ú'GoogleSecretManagerMapping.__annotate__:   s<   € ÷ 6ñ 6à1ð6ð ð6ð ð	6ð
 'ð6ð 
ñ6r    c                	óD   € / V n         Wn        W n        W0n        W@n        R # ©N)r:   r;   Ú_project_idÚ_case_sensitiveÚ_env_parse_none_str)Úselfr=   r>   r@   rA   s   &&&&&r   Ú__init__Ú#GoogleSecretManagerMapping.__init__:   s$   € ð  "ˆÔØ+ÔØ%ÔØ-ÔØ#5Ö r    c               ó   € V ^8„  d   QhRR/# ©r   r   r?   r   )r   s   "r   r   rC   H   s   € ÷ Iñ I 3ñ Ir    c                	óL   € V P                   P                  V P                  4      # rE   )r;   Úcommon_project_pathrF   ©rI   s   &r   Ú_gcp_project_pathÚ,GoogleSecretManagerMapping._gcp_project_pathG   s   € à×"Ñ"×6Ñ6°t×7GÑ7GÓHÐHr    c               ó$   € V ^8„  d   QhRRRRRR/# )r   Ú
lower_namer?   Ú
candidatesú	list[str]r   r   )r   s   "r   r   rC   K   s"   € ÷ ñ ¸#ð È9ð ÐY\ñ r    c           	     	ó¸   € \        V4      ^8X  d
   V^ ,          # VP                  4        VR,          p\        P                  ! RV RV RV R2\        ^R7       V# )é   z)Secret collision: Found multiple secrets z normalizing to 'z
'. Using 'z' for case-insensitive lookup.)Ú
stackleveléÿÿÿÿ)ÚlenÚsortr'   ÚwarnÚUserWarning)rI   rT   rU   Úwinners   &&& r   Ú_select_case_insensitive_secretÚ:GoogleSecretManagerMapping._select_case_insensitive_secretK   si   € Üˆz‹?˜aÔØ˜a•=Ð ð 	�‰ÔØ˜B•ˆÜ�ŠØ7¸
°|ÐCTÐU_ÐT`ð aØ�XÐ;ð=äØõ		
ð ˆr    c               ó   € V ^8„  d   QhRR/# )r   r   zdict[str, str]r   )r   s   "r   r   rC   [   s   € ÷ ñ  .ñ r    c                	óä  € / p/ pV P                   P                  V P                  R 7      pV F�  pV P                   P                  VP                  4      P                  RR4      pWQV&   V P                  '       d   KP  VP                  4       pWb9  d   . W&&   W&,          P                  V4       Kƒ  	  V P                  '       g-   VP                  4        F  w  rgV P                  Wg4      W&   K  	  V# ))ÚparentÚsecretÚ )r;   Úlist_secretsrQ   Úparse_secret_pathÚnameÚgetrG   ÚlowerÚappendÚitemsr`   )rI   ÚmappingÚnormalized_groupsÚsecretsre   ri   rT   rU   s   &       r   Ú_secret_name_mapÚ+GoogleSecretManagerMapping._secret_name_mapZ   sÛ   € à"$ˆà24Ðà×%Ñ%×2Ñ2¸$×:PÑ:PÐ2ÓQˆÛˆFØ×&Ñ&×8Ñ8¸¿¹ÓE×IÑIÈ(ÐTVÓWˆDØ �D‰Mà×'×'Ò'Ø!ŸZ™Z›\�
ØÔ6Ø46Ð%Ñ1Ø!Õ-×4Ñ4°TÖ:ñ ð ×#×#Ð#Ø*;×*AÑ*AÖ*CÑ&�
Ø&*×&JÑ&JÈ:Ó&b�Ó#ñ +Dð ˆr    c               ó   € V ^8„  d   QhRR/# )r   r   rV   r   )r   s   "r   r   rC   r   s   € ÷ 2ñ 2˜yñ 2r    c                	óH   € \        V P                  P                  4       4      # rE   )Úlistrq   ÚkeysrP   s   &r   Ú_secret_namesÚ(GoogleSecretManagerMapping._secret_namesq   s   € ä�D×)Ñ)×.Ñ.Ó0Ó1Ð1r    c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úkeyr?   Úversionr   r   )r   s   "r   r   rC   u   s&   € ÷ Wñ W¨ð W°cð WÈñ Wr    c                	óN   € V P                   P                  V P                  W4      # rE   )r;   Úsecret_version_pathrF   )rI   rz   r{   s   &&&r   Ú_secret_version_pathÚ/GoogleSecretManagerMapping._secret_version_pathu   s!   € Ø×"Ñ"×6Ñ6°t×7GÑ7GÈÓVÐVr    c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úgcp_secret_namer?   r{   r   rB   r   )r   s   "r   r   rC   x   s'   € ÷ Dñ D°ð D¸sð DÐR\ñ Dr    c                	óî   €  V P                   P                  V P                  W4      R 7      P                  P                  P                  R4      p\        Y0P                  4      #   \         d     R# i ; i©)ri   zUTF-8N)	r;   Úaccess_secret_versionr~   ÚpayloadÚdataÚdecoder1   r   rH   )rI   r�   r{   Úvalues   &&& r   Ú_get_secret_valueÚ,GoogleSecretManagerMapping._get_secret_valuex   sk   € ð	Ø×'Ñ'×=Ñ=Ø×.Ñ.¨ÓHð >ó ç‰g—d‘dŸ6™6 '›?ð ô
 # 5×*BÑ*BÓCÐCøô ô 	Úð	ús   ‚AA% Á%A4Á3A4c               ó    € V ^8„  d   QhRRRR/# )r   r�   r?   r   rB   r   )r   s   "r   r   rC   �   s   € ÷ 	Dñ 	D¸#ð 	DÀ*ñ 	Dr    c                	ó6  €  V P                   P                  V P                  V4      R 7      P                  P                  P                  R4      p\        Y P                  4      #   \         d)   p\        T4      '       d   \        T4      Th Rp?R# Rp?ii ; irƒ   )r;   r„   r~   r…   r†   r‡   r1   r7   ÚKeyErrorr   rH   )rI   r�   rˆ   r-   s   &&  r   Ú_get_secret_value_or_raiseÚ5GoogleSecretManagerMapping._get_secret_value_or_raise�   s„   € ð	Ø×'Ñ'×=Ñ=Ø×.Ñ.¨Ó?ð >ó ç‰g—d‘dŸ6™6 '›?ð ô # 5×*BÑ*BÓCÐCøô	 ô 	Ü" 1×%Ò%Ü˜Ó/°QÐ6Ýûð	ús   ‚AA% Á%BÁ0BÂBc               ó    € V ^8„  d   QhRRRR/# )r   rz   r?   r   rB   r   )r   s   "r   r   rC   Œ   s   € ÷ )ñ )˜sð ) zñ )r    c                	óè  € WP                   9   d   V P                   V,          # V P                  '       d2   V P                  V4      V P                   V&   V P                   V,          # V P                  P	                  V4      pVf*   V P                  P	                  VP                  4       4      pV'       d    V P                  V4      V P                   V&   M\        V4      hV P                   V,          # rE   )r:   rG   rŽ   rq   rj   rk   r‰   r�   )rI   rz   r�   s   && r   Ú__getitem__Ú&GoogleSecretManagerMapping.__getitem__Œ   sÈ   € Ø×&Ñ&Ô&Ø×'Ñ'¨Õ,Ð,à××ÐØ(,×(GÑ(GÈÓ(LˆD× Ñ  Ñ%Ø×'Ñ'¨Õ,Ð,à×/Ñ/×3Ñ3°CÓ8ˆØÒ"Ø"×3Ñ3×7Ñ7¸¿	¹	»ÓDˆOçØ(,×(>Ñ(>¸Ó(OˆD× Ñ  Ò%ä˜3“-Ðà×#Ñ# CÕ(Ð(r    c               ó   € V ^8„  d   QhRR/# )r   r   Úintr   )r   s   "r   r   rC   Ÿ   s   € ÷ 'ñ '˜ñ 'r    c                	ó,   € \        V P                  4      # rE   )r[   rw   rP   s   &r   Ú__len__Ú"GoogleSecretManagerMapping.__len__Ÿ   s   € Ü�4×%Ñ%Ó&Ð&r    c               ó   € V ^8„  d   QhRR/# )r   r   zIterator[str]r   )r   s   "r   r   rC   ¢   s   € ÷ (ñ (˜-ñ (r    c                	ó,   € \        V P                  4      # rE   )Úiterrw   rP   s   &r   Ú__iter__Ú#GoogleSecretManagerMapping.__iter__¢   s   € Ü�D×&Ñ&Ó'Ð'r    )rG   rH   r:   rF   r;   rE   )Úlatest)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotations__rJ   ÚpropertyrQ   r`   r   rq   rw   r~   r‰   rŽ   r’   r—   rœ   Ú__static_attributes__r   r    r   r9   r9   6   s|   ‡ Ø*Ó*Ø.Ó.÷6ð ôIó ðIõð ôó ðð, ô2ó ð2÷W÷Dõ	Dõ)õ&'÷(ñ (r    r9   c                  ó¤   a € ] tR t^¦t$ R]R&   R]R&   R]R&   R]R&   RR V 3R	 llltR
 V 3R lltR R ltR R ltR V 3R llt	R R lt
RtV ;t# )Ú!GoogleSecretManagerSettingsSourceúCredentials | NoneÚ_credentialsú!SecretManagerServiceClient | Noner;   rB   rF   Ú_explicit_project_idc               óD   € 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R/# )r   Úsettings_clsztype[BaseSettings]Úcredentialsr¨   r>   rB   Ú
env_prefixrA   Úenv_parse_enumszbool | Noner=   rª   r@   Úproject_id_fieldr?   Ú_init_statezInitState | Noner   r   r   )r   s   "r   r   Ú.GoogleSecretManagerSettingsSource.__annotate__¬   sx   € ÷ ;%ñ ;%à(ð;%ð (ð;%ð ð	;%ð
 ð;%ð 'ð;%ð %ð;%ð 9ð;%ð $ð;%ð ð;%ð &ð;%ð 
ñ;%r    c           
     óÒ   <€ \         e   \        e	   \        f   \        4        W0n        RV n        W n        Wpn        W�n        RV n	        \        SV `-  VVVRVVV
R7       RV n	        R# )a)  Settings source that reads secrets from Google Cloud Secret Manager.

Args:
    project_id: The GCP project to read secrets from. If not provided, it is
        resolved lazily (see below).
    project_id_field: The key, populated by a previous (higher priority)
        settings source, to use as the ``project_id`` when one is not passed
        explicitly. This must match the key used in ``current_state`` by the
        previous source (typically the field name or its preferred alias).
        For example, with ``some_field: str = Field(alias='GCP_PROJECT')``,
        previous env sources will expose the value under ``'GCP_PROJECT'``.
        Defaults to ``'project_id'``.

The ``project_id`` is resolved lazily in :meth:`__call__` rather than at
construction time so that it can be sourced from settings resolved by previous
sources (only available via ``current_state`` once the source is called).
Resolution order is:

1. the explicit ``project_id`` argument
2. the ``project_id_field`` value from previous settings sources
3. ``google.auth.default()``
NF)r@   r¯   Úenv_ignore_emptyrA   r°   r²   T)r   r   r%   r.   r«   rF   r©   r;   Ú_project_id_fieldÚ_env_vars_loadedÚsuperrJ   )rI   r­   r®   r>   r¯   rA   r°   r=   r@   r±   r²   Ú	__class__s   &&&&&&&&&&&€r   rJ   Ú*GoogleSecretManagerSettingsSource.__init__¬   sx   ø€ ôH &Ò-´Ò1DÔH[ÒHcÜ%Ô'ð
 %/Ô!ØˆÔØ'ÔØ+ÔØ!1ÔØ %ˆÔä‰ÑØØ)Ø!Ø"Ø1Ø+Ø#ð 	ô 	
ð !%ˆÖr    c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úfieldr	   Ú
field_namer?   r   ztuple[Any, str, bool]r   )r   s   "r   r   r³   é   s"   € ÷ 1$ñ 1$ Yð 1$¸Cð 1$ÐDYñ 1$r    c                óÄ  <€ \        R VP                   4       R4      pV'       Ed   \        V P                  \        4      '       dâ   V P                  W4       FÇ  w  rEpV P                  '       d   TpM\V P                  P                  P                  V4      pVf4   V P                  P                  P                  VP                  4       4      pV'       g   K�  V P                  P                  Ws4      pVf   K¢  \        V P                  4      '       d   W‚V3u # W„V3u # 	  RVR3# \        SV `9  W4      w  ršp\        V P                  4      '       d	   V	e   W’V3# WšV3# )a´  Override get_field_value to get the secret value from GCP Secret Manager.
Look for a SecretVersion metadata field to specify a particular SecretVersion.

Args:
    field: The field to get the value for
    field_name: The declared name of the field

Returns:
    A tuple of (value, key, value_is_complex), where `key` is the identifier used
    to populate the model (either the field name or an alias, depending on
    configuration).
c              3  ój   "  € T F)  p\        V\        4      '       g   K  VP                  x € K+  	  R # 5irE   )r6   r   r{   )Ú.0Úms   & r   Ú	<genexpr>ÚDGoogleSecretManagerSettingsSource.get_field_value.<locals>.<genexpr>÷   s    é € Ða±.¨QÄJÈqÔR_×D`œy˜qŸyžy³.ùs   ‚3Ÿ3NF)ÚnextÚmetadatar6   Úenv_varsr9   Ú_extract_field_infor@   rq   rj   rk   r‰   r   Úconfigr¸   Úget_field_value)rI   r¼   r½   Úsecret_versionÚ	field_keyÚenv_nameÚvalue_is_complexr�   Úenv_valÚvalrz   Ú
is_complexr¹   s   &&&         €r   rÉ   Ú1GoogleSecretManagerSettingsSource.get_field_valueé   s;  ø€ ô Ña°%·.².ÓaÐcgÓhˆ÷
 ˆ>œj¨¯©Ô8R×SÒSØ9=×9QÑ9QÐRWÖ9dÑ5�	Ð%5Ø×&×&Ð&Ø2:‘Oà&*§m¡m×&DÑ&D×&HÑ&HÈÓ&R�OØ&Ò.ð +/¯-©-×*HÑ*H×*LÑ*LÈXÏ^É^ÓM]Ó*^˜ç"‘?Ø"Ÿm™m×=Ñ=¸oÓ^�GØÔ*ô 5°T·[±[×AÒAØ#*Ð8HÐ#HÒHØ&Ð3CÐCÒCñ# :eð* ˜ UÐ*Ð*ä$™wÑ6°uÓIÑˆ�*ô % T§[¡[×1Ò1°c²oØ JÐ.Ð.Ø˜Ð#Ð#r    c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r³     s   € ÷ *\ñ *\ dñ *\r    c                ó,  € V P                   e   R# V P                  pV P                  pVf>   V P                  P	                  V P
                  4      p\        V\        4      '       d   TpV P                  RJ ;'       d    VRJ pVRJ pV'       g	   V'       d7   \        4       w  rgV'       d   TpV'       d   \        V\        4      '       d   TpVf   \        R4      hW n        Wn         V P                  f   \        V P                  R7      V n        R# R# )a  Resolve the credentials, project_id and Secret Manager client.

``project_id`` is resolved, in order of precedence, from: the explicit
``project_id`` argument, the ``project_id_field`` value from previous settings
sources (``current_state``), and finally ``google.auth.default()``.
NzÚproject_id is required to be specified either as an argument, via a previous settings source, or from google.auth.default. See https://google-auth.readthedocs.io/en/master/reference/google.auth.html#google.auth.default)r®   )rF   r«   r©   Úcurrent_staterj   r¶   r6   r?   r;   r%   ÚAttributeErrorr   )rI   r>   r®   Ústate_project_idÚneed_credentialsÚneed_projectÚ_credsrF   s   &       r   Ú_resolve_gcp_projectÚ6GoogleSecretManagerSettingsSource._resolve_gcp_project  s  € ð ×ÑÒ'Ùà×.Ñ.ˆ
Ø×'Ñ'ˆð ÒØ#×1Ñ1×5Ñ5°d×6LÑ6LÓMÐÜÐ*¬C×0Ò0Ø-�
ð  ×.Ñ.°$Ð6×NÐN¸;È$Ð;NÐØ! TÐ)ˆßŸ|Ü"5Ó"7ÑˆFßØ$�ß¤
¨;¼× <Ò <Ø(�
àÒÜ ðnóð ð (ÔØ%ÔØ×ÑÒ&Ü"<È×IZÑIZÔ"[ˆDÖñ 'r    c               ó   € V ^8„  d   QhRR/# )r   r   zMapping[str, str | None]r   )r   s   "r   r   r³   H  s   € ÷ 
ñ 
Ð 8ñ 
r    c                	ó  € V P                   '       g   / # V P                  4        V P                  e   V P                  f   \	        R4      h\        V P                  V P                  V P                  V P                  R7      # )NzæGoogleSecretManagerSettingsSource: could not determine GCP project_id or initialize the Secret Manager client. Pass project_id explicitly or ensure it is available via application default credentials or a previous settings source.)r>   r@   rA   )r·   rÚ   rF   r;   r
   r9   r@   rA   rP   s   &r   Ú_load_env_varsÚ0GoogleSecretManagerSettingsSource._load_env_varsH  s€   € ð ×$×$Ð$ØˆIà×!Ñ!Ô#ð ×ÑÒ# t×':Ñ':Ò'BÜðJóð ô *Ø×ÑØ×'Ñ'Ø×.Ñ.Ø#×6Ñ6ô	
ð 	
r    c               ó   € V ^8„  d   QhRR/# )r   r   zdict[str, Any]r   )r   s   "r   r   r³   ]  s   € ÷ "ñ "˜.ñ "r    c                	óX   <€ R V n         V P                  4       V n        \        SV `  4       # )T)r·   rÞ   rÆ   r¸   Ú__call__)rI   r¹   s   &€r   râ   Ú*GoogleSecretManagerSettingsSource.__call__]  s+   ø€ ð !%ˆÔØ×+Ñ+Ó-ˆŒÜ‰wÑÓ!Ð!r    c               ó   € V ^8„  d   QhRR/# rM   r   )r   s   "r   r   r³   d  s   € ÷ 
ñ 
˜#ñ 
r    c                	ó¤   € V P                   e   V P                   MV P                  pV P                  P                   RV: RV P                  : R2# )Nz(project_id=z, env_nested_delimiter=Ú))rF   r«   r¹   rŸ   Úenv_nested_delimiter)rI   r>   s   & r   Ú__repr__Ú*GoogleSecretManagerSettingsSource.__repr__d  sR   € ð *.×)9Ñ)9Ò)E�T×%Ò%È4×KdÑKdˆ
à�~‰~×&Ñ&Ð' |°J±>ÐAXÐY]×YrÑYrÑXuÐuvÐwð	
r    )r©   r·   r«   rF   r¶   r;   rÆ   )	NNNNNNTr>   N)rŸ   r    r¡   r¢   r£   rJ   rÉ   rÚ   rÞ   râ   rè   r¥   Ú__classcell__)r¹   s   @r   r§   r§   ¦   sQ   ø‡ Ø$Ó$Ø5Ó5ØÓØ$Ó$÷;%ò ;%÷z1$ð 1$õf*\õX
÷*"ð "÷
ó 
r    r§   )'Ú
__future__r   Ú_annotationsr'   Úcollections.abcr   r   Ú	functoolsr   Útypingr   r   Úpydantic.fieldsr	   Ú
exceptionsr
   Útypesr   Úutilsr   r   r   Úenvr   r$   r   r%   r&   r   r+   r   Úpydantic_settings.mainr   r.   r7   r?   r9   r§   Ú__all__r   r    r   Ú<module>r÷      s‰   ðÝ 2ã ß -Ý %ß %å %å 'Ý !ß MÑ MÝ "çÝ:Ý3ÝEæ3à€KØ!%ÐØÐõõ$ôm( ¨¨c°D­j¨Õ!9ô m(ô`D
Ð(9ô D
ðN (Ð)LÐ
M‚r    